Project

General

Profile

bug #9556

occurrence/{uuid}/fieldUnitDTOs web service adds duplicate units to response

Added by Andreas Kohlbecker 16 days ago. Updated 12 days ago.

Status:
Feedback
Priority:
Highest
Category:
cdmlib
Target version:
Start date:
03/25/2021
Due date:
% Done:

0%

Severity:
critical
Found in Version:

Description

see http://localhost:8080/occurrence/8585081c-b73b-440b-b349-582845cf3fb4/fieldUnitDTOs.json

the response data may be filtered with

http http://localhost:8080/occurrence/8585081c-b73b-440b-b349-582845cf3fb4/fieldUnitDTOs.json | jq '.' | grep 'XKCD MASKS 2X (Masks)'   

to see duplicates easily


Related issues

Related to Edit - bug #9557: implement occurrence/{uuid}/rootUnitDTOs Closed 03/25/2021
Related to Edit - task #9253: revise OccurrenceServiceImpl.findFieldUnitDTO(..) Closed 10/15/2020

Associated revisions

Revision 3309605f (diff)
Added by Andreas Kohlbecker 15 days ago

ref #9556 DerivedUnitFacadeController.doGetFieldObjectMediaDTO() is no longer using loadFieldUnitDTO

Revision 5446c6d5 (diff)
Added by Katja Luther 12 days ago

ref #9556: remove derivates from fieldUnitDto in loadFieldUnitDto

History

#2 Updated by Andreas Kohlbecker 15 days ago

  • Related to bug #9557: implement occurrence/{uuid}/rootUnitDTOs added

#3 Updated by Andreas Kohlbecker 15 days ago

This method is kind of misused: After solving #9557 it is only being used by .DerivedUnitFacadeController.doGetFieldObjectMediaDTO() which again is used by the data portal to retrieve the FieldUnit Media.

  • First of all this method adds an extra overhead by creating DTOs for all intermediate units which are not being used at all.
  • Secondly does this method not deliver media of all FieldUnits, only for the first one that is found, see #9253

#4 Updated by Andreas Kohlbecker 15 days ago

  • Related to task #9253: revise OccurrenceServiceImpl.findFieldUnitDTO(..) added

#5 Updated by Andreas Kohlbecker 15 days ago

  • Related to task #9430: revise OccurrenceServiceImpl._findRootUnitDTO(..) supports multiple origin paths added

#6 Updated by Andreas Kohlbecker 15 days ago

  • Related to deleted (task #9430: revise OccurrenceServiceImpl._findRootUnitDTO(..) supports multiple origin paths)

#7 Updated by Andreas Kohlbecker 15 days ago

  • Status changed from New to Rejected
  • Target version deleted (Release 5.22)

since the intermediate units are not used at all by consuming methods, they should be skipped completely.

#8 Updated by Andreas Kohlbecker 15 days ago

  • Status changed from Rejected to Feedback
  • Assignee changed from Andreas Kohlbecker to Katja Luther
  • Target version set to Release 5.22

reopening this issue since loadFieldUnitDTO() is being used in the Taxeditor

@Katja: are the derivatives of the FieldUnitDTO being used in the TaxEditor?

#9 Updated by Andreas Kohlbecker 15 days ago

  • Category changed from cdmlib-remote to cdmlib

DerivedUnitFacadeController.doGetFieldObjectMediaDTO() is no longer using loadFieldUnitDTO see 3309605f
therefore the Taxeditor is the only component which is using this method.

#10 Updated by Katja Luther 15 days ago

  • Assignee changed from Katja Luther to Andreas Kohlbecker

Andreas Kohlbecker wrote:

reopening this issue since loadFieldUnitDTO() is being used in the Taxeditor

@Katja: are the derivatives of the FieldUnitDTO being used in the TaxEditor?

no, the derivatives are not used in the editor

#11 Updated by Andreas Kohlbecker 15 days ago

  • Assignee changed from Andreas Kohlbecker to Katja Luther

so we should modify this service method so that it no longer add the derivatives or is there an alternative service method that can be used instead. In the latter case loadFieldUnitDTO could be removed.

#12 Updated by Katja Luther 12 days ago

  • Assignee changed from Katja Luther to Andreas Kohlbecker

I removed that the derivatives are added to the fieldUnitDto in loadFieldUnitDto().

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)