[RESPDAM-58] Negative values are inserted in focal areas under some circumstances Created: 09/Feb/22  Updated: 10/Feb/22  Resolved: 10/Feb/22

Status: Closed
Project: DAM Focal
Component/s: None
Affects Version/s: 2.1
Fix Version/s: 2.2

Type: Bug Priority: Neutral
Reporter: Raphael Falvo Assignee: Raphael Falvo
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: JPEG File elevate-map-preview-cropped.jpg     JPEG File elevate-map-preview.jpg    
Issue Links:
relation
Template:
Acceptance criteria:
[ ]* ensure actions are not available that shouldn't be available (proper writePermissionRequired settings)
[ ]* no ignored tests

check bugs are not reproducible in the new app

[ ]* (MGNLUI-6509) Item added via detail SubApp is not selected in the browser after saving
[ ]* (MGNLUI-6550) Ensure detail subApps don't use path but <thing>'s name in tab titles -> and thus page title
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[X]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Sprint: Sprint 14

 Description   

SwissRe noticed that from time to time some images are not properly displayed. It seems that this might happen after re-uploading several time the same picture, but by cropping it with an external tool before upload. It has not been found yet how to clearly reproduce the issue, this will be the first part of investigation

Steps to reproduce

  1. Start a magnolia bundle with dam-focal module installed
  2. Go to admin central and launch Asset app
  3. Upload elevate-map-preview.jpg picture you can find attached in the ticket
  4. Set selection areas of all variant in the second tab to the very bottom right part
  5. Press Save
  6. Edit the asset and replace the picture with elevate-map-preview-cropped.jpg by uploading it
  7. Press Save
  8. Open the asset and go to focal area tab, the selections look to overflow the pictures, the offset and dimensions look to match the ones from previous bigger picture, if you click on the selection the offsets become negative

Expected results

Offset and dimensions of the areas shall be reset on upload and match the new picture size

Actual results

Offset and dimensions seem to be kept from previous image and offset turns negative when trying to change the area selection

Workaround

Development notes

Reset is indeed done when uploading the picture, but pressing save button after an upload doesn't trigger the code which is actually saving the new areas details in imaging JCR workspace

In FocalAreasFieldConverter l.58, focalAreasBean.getAreas() map is empty when clicking Save after an upload.

In FocalAreasField l. 245 : this.areasBean.getAreas().clear(); => which makes the above map empty 


Generated at Mon Feb 12 00:42:07 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.