bug #9855
closedSpecimen images sometimes show duplicates
100%
Updated by Andreas Müller over 1 year ago
AK:
eu.etaxonomy.cdm.remote.controller.iiif.ManifestController.doTaxonMedia()
Updated by Andreas Müller over 1 year ago
- Status changed from New to In Progress
Duplication only happens in UniversalViewer (using the ManifestController.doTaxonMedia()) code. Switching to simple viewer does not show duplicates.
Updated by Andreas Kohlbecker over 1 year ago
Andreas Müller wrote:
Duplication only happens in UniversalViewer (using the ManifestController.doTaxonMedia()) code. Switching to simple viewer does not show duplicates.
So this clearly related to eu.etaxonomy.cdm.remote.controller.iiif.ManifestController.doTaxonMedia()
Updated by Andreas Müller over 1 year ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 50
Applied in changeset cdmlib|75539fa3b6e75f1972f2c3e3f90a3b395ea9d356.
Updated by Andreas Müller over 1 year ago
- % Done changed from 50 to 0
The reason for the duplicates was that in TaxonServiceImpl.listMedia() media were not deduplicate if e.g. an image of a MediaSpecimen was also attached via image gallery to an occurrence. This is dirty data but happenes due to a bug in ABCD import.
I added deduplication if duplicated images exist for whatever reason. Additionally I fixed the ABCD bug to avoid such media duplicates in future.
Updated by Andreas Müller over 1 year ago
- Assignee changed from Andreas Müller to Andreas Kohlbecker
- % Done changed from 0 to 50
AK can you please review if the result is as expected.
KL can you please review the fix for ABCD.
Updated by Andreas Kohlbecker about 1 year ago
- Assignee changed from Andreas Kohlbecker to Andreas Müller
For de-duplicating the Media in TaxonService.listMedia()
I suggest to use a more modern java code style:
taxonMedia = taxonMedia.stream().distinct().collect(Collectors.toList());
this way the CdmUtils.removeIdentical()
method can be removed - it is used only once in the library.
Updated by Andreas Müller about 1 year ago
- Assignee changed from Andreas Müller to Andreas Kohlbecker
Andreas Kohlbecker wrote in #note-7:
For de-duplicating the Media in
TaxonService.listMedia()
I suggest to use a more modern java code style:taxonMedia = taxonMedia.stream().distinct().collect(Collectors.toList());this way the
CdmUtils.removeIdentical()
method can be removed - it is used only once in the library.
Good point. I adapted the code accordingly. Can you check again and then pass the ticket to KL?
Updated by Andreas Kohlbecker about 1 year ago
- Assignee changed from Andreas Kohlbecker to Katja Luther
- % Done changed from 50 to 70
Excellent!
@Katja: I's your turn now.
Updated by Katja Luther about 1 year ago
- Assignee changed from Katja Luther to Andreas Müller
The ABCD Import code is correct, too. So I think we can close this ticket.
Updated by Andreas Müller about 1 year ago
- Status changed from Resolved to Closed
- % Done changed from 70 to 100
Updated by Andreas Müller about 1 year ago
- Target version changed from Release 5.38 to Release 5.29