Project

General

Profile

bug #8270

TermDTOs with an orderIndex are ordered in unordered term vocabularies

Added by Patrick Plitzner 11 days ago. Updated 10 days ago.

Status:
New
Priority:
New
Category:
taxeditor
Target version:
Start date:
05/09/2019
Due date:
% Done:

0%

Severity:
normal
Found in Version:

Description

To reproduce this behavior:

  1. Open the term editor for states.
  2. Move a term to the "State" vocabulary (Must be from an unordered vocabulary). "State" is an ordered term vocabulary.
  3. Move the term back to its original vocabulary -> The term is added to the last position

This happens because the orderIndex is set to 1 from the move to the "State" vocabulary.
Sorting is done in eu.etaxonomy.taxeditor.editor.definedterm.DefinedTermSorter.

possible solution
Add the class type of the term/vocabulary to the DTO to distinguish between sorting by label and sorting by orderIndex-

History

#1 Updated by Patrick Plitzner 11 days ago

  • Subject changed from TermDTOs in unordered term vocabularies are ordered to TermDTOs with an orderIndex are ordered in unordered term vocabularies

#2 Updated by Andreas Müller 10 days ago

This generally should not be possible!!
An OrderedTerm must NEVER be moved to an unordered vocabulary. AND currently "State" are ordered terms therefore their vocabularies must ALWAYS be OrderedTermVocabularies!
If this is not implemented in such a way in TaxEditor or in imports it needs to be changed. Unfortunately cdmlib does not seem to force it.

However, in future this will change. All vocabularies will be saved in an ordered way but if order is relevant will be defined by a flag in the vocabulary (same for term collections like term trees). But until then we need to handle this correctly.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)