Project

General

Profile

bug #9354

Sorting in distribution editor is broken

Added by Katja Luther 6 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Highest
Assignee:
Category:
taxeditor
Target version:
Start date:
12/09/2020
Due date:
% Done:

90%

Severity:
normal
Found in Version:

Description

The comparator for sorting the taxa in distribution editor does not work correctly.


Related issues

Related to Edit - feature request #8889: Remaining issues for distribution editor - continue In Progress 03/10/2020
Duplicates Edit - feature request #8708: Sort taxa in distribution editor same as in navigator Duplicate 11/20/2019
Copied to Edit - task #9416: Improve distribution editor sort methods New 01/22/2021

Associated revisions

Revision f34ce847 (diff)
Added by Katja Luther 6 months ago

fix distribution editor comparator

Revision 6b6ae919 (diff)
Added by Katja Luther 6 months ago

fix distribution editor comparator

Revision 87855850 (diff)
Added by Katja Luther 5 months ago

ref #9354: add nodeDto to TaxonDistributionDTO

Revision 9f1bb997 (diff)
Added by Katja Luther 5 months ago

ref #9354: improve sorting in distribution editor

Revision bed37770 (diff)
Added by Katja Luther 5 months ago

ref #8889: sort taxonnodes for distribution editor on server side

Revision 5594bd68 (diff)
Added by Katja Luther 5 months ago

ref #8889: the dto list is already ordered for distribution editor, add sortMode to method call

Revision 6502eaa6 (diff)
Added by Andreas Müller 5 months ago

ref #9354 fix NPE in TaxonNodeByRankAndNameComparator

Revision 1c63b6c5 (diff)
Added by Andreas Müller 5 months ago

ref #9354 unify TaxonNodeDao.listChildrenOf(...) methods

Revision 49e5a25a (diff)
Added by Andreas Müller 5 months ago

ref #9354 unify TaxonNodeDao.listChildrenOf(...) methods (fix test)

History

#1 Updated by Katja Luther 6 months ago

  • Status changed from New to Resolved
  • Assignee changed from Katja Luther to Andreas Müller

fixed for hotfix 5.18.1

#2 Updated by Andreas Müller 6 months ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Katja Luther
  • % Done changed from 0 to 10

There are still open issues as the comparator does not follow the comparator contract and handling of names with rank1 != rank2 is not handled.

Generally the comparator should work the same way as the taxon navigator compartor. But this might be another ticket (does it exist already?)

#3 Updated by Katja Luther 5 months ago

  • Target version changed from Release 5.18 to Release 5.19

#4 Updated by Andreas Müller 5 months ago

  • Severity changed from normal to critical

I put this to critical as it is a requirement the E+M Bratislava team to edit disttribution data for CZ and SK which itself is a requirement for the outstanding E+M publication.

#5 Updated by Katja Luther 5 months ago

Andreas Müller wrote:

There are still open issues as the comparator does not follow the comparator contract and handling of names with rank1 != rank2 is not handled.

Generally the comparator should work the same way as the taxon navigator compartor. But this might be another ticket (does it exist already?)

This is not as easy as it looks like because in navigator we have a tree structure and in the distribution editor we have a list. If we use the same comparator like in the navigator we have the same problem that the higher ranks come first.

#6 Updated by Katja Luther 5 months ago

#7 Updated by Katja Luther 5 months ago

  • Severity changed from critical to normal

Andreas Müller wrote:

Generally the comparator should work the same way as the taxon navigator compartor. But this might be another ticket (does it exist already?)

this is described in #8889

#8 Updated by Katja Luther 5 months ago

  • Status changed from Feedback to Resolved

this is fixed now by sorting the list on server side. The sortMode is a method parameter.

#9 Updated by Katja Luther 5 months ago

  • Assignee changed from Katja Luther to Andreas Müller

please review.

#10 Updated by Andreas Müller 5 months ago

There is an NPE issue in TaxonNodeByRankAndNameComparator if name or rank does not exist in taxon. I fixed it.

#11 Updated by Katja Luther 5 months ago

Andreas Müller wrote:

There is an NPE issue in TaxonNodeByRankAndNameComparator if name or rank does not exist in taxon. I fixed it.

Thanks!

#12 Updated by Andreas Müller 5 months ago

  • % Done changed from 10 to 50

I unified the 2 TaxonNodeDao.listChildrenOf(...) methods as I don't think it is good to have recursion input parameters on a publicly available method.

#13 Updated by Andreas Müller 5 months ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Katja Luther
  • % Done changed from 50 to 90

Works as expected. We only could do some further improvements which I put in a new ticket #9416.

Please review my changes and close if ok.

#14 Updated by Andreas Müller 5 months ago

  • Copied to task #9416: Improve distribution editor sort methods added

#15 Updated by Katja Luther 5 months ago

  • Status changed from Feedback to Closed

The code looks fine. Close the ticket.

#16 Updated by Katja Luther about 1 month ago

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)