Project

General

Profile

Actions

bug #6356

closed

taxontree sort order as in editor

Added by Andreas Kohlbecker about 7 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
New
Category:
cdm-dataportal
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Severity:
normal
Found in Version:

Description

The classification browser (taxontree) should be using the same sort order as the taxon navigator in the editor.

Maybe this should be optional? Do we need to allow configuring the sort mode?

How taxon nodes are sorted in the portal:

the nodes at level lower than root level are being sorted in the portal in the function cdm_taxontree.module#cdm_taxontree_populate. The order of nodes at root level seems not to be changed:

function cdm_taxontree_populate($tree, $expand_excluded, $filter_default = NULL) {

...

// Reorder nodes which are not expanded, expanded nodes are reordered
      // implicitly above.
      if (isset($tree[$uuid]->children) && count($tree[$uuid]->children) > 1) {
        // Copy the children into an array which can be sorted by its keys.
        $ordered = array();
        foreach ($tree[$uuid]->children as $cnode) {
          // Concatenate full name and uid.
          $reordered[str_pad($cnode->titleCache, 255, '-') . $cnode->taxonUuid] = $cnode;
        }

        // Sort.
        ksort($reordered);

        // Move the children back into the parent node.
        $tree[$uuid]->children = array();
        foreach ($reordered as $cnode) {
          $tree[$uuid]->children[$cnode->taxonUuid] = $cnode;
        }

...

}

That is the nodes are sorted only alphabetically in the portal.

TODO: Check if the order of the nodes as they are coming from the web service is already ordered correctly. In this case we only need to remove the reordering implemented in the portal


Related issues

Related to EDIT - bug #9102: taxonNode status icon breaks sort order in taxontreeClosedAndreas Kohlbecker

Actions
Actions #1

Updated by Andreas Müller about 7 years ago

  • Target version changed from Release 4.6 to Release 4.7
Actions #2

Updated by Andreas Müller almost 7 years ago

  • Target version changed from Release 4.7 to Release 4.8
Actions #3

Updated by Andreas Müller almost 7 years ago

  • Target version changed from Release 4.8 to Release 4.9
Actions #4

Updated by Andreas Müller over 6 years ago

  • Target version changed from Release 4.9 to Release 4.10
Actions #5

Updated by Andreas Müller over 6 years ago

  • Target version changed from Release 4.10 to Release 4.11
Actions #6

Updated by Andreas Kohlbecker over 6 years ago

  • Description updated (diff)
Actions #7

Updated by Andreas Kohlbecker over 6 years ago

Can someone provide us with a good test case, example for well ordered taxon nodes which covers most of the special cases?

Actions #8

Updated by Andreas Müller over 6 years ago

  • Target version changed from Release 4.11 to Release 4.12
Actions #9

Updated by Andreas Müller over 6 years ago

  • Target version changed from Release 4.12 to Release 4.13
Actions #10

Updated by Andreas Müller about 6 years ago

  • Target version changed from Release 4.13 to Release 4.14
Actions #11

Updated by Andreas Müller about 6 years ago

  • Target version changed from Release 4.14 to Release 5.0
Actions #12

Updated by Andreas Kohlbecker almost 6 years ago

  • Target version changed from Release 5.0 to Release 5.1
Actions #13

Updated by Andreas Müller almost 6 years ago

  • Target version changed from Release 5.1 to Release 5.2
Actions #14

Updated by Andreas Kohlbecker over 5 years ago

  • Tags deleted (phycobank)

no longer important for phycobank since we will model the classification with taxon relations

Actions #15

Updated by Andreas Kohlbecker over 5 years ago

  • Target version changed from Release 5.2 to Release 5.3
Actions #16

Updated by Andreas Kohlbecker over 5 years ago

  • Target version changed from Release 5.3 to Release 5.4
Actions #17

Updated by Andreas Kohlbecker over 5 years ago

  • Target version changed from Release 5.4 to Release 5.5
Actions #18

Updated by Andreas Kohlbecker about 5 years ago

  • Target version changed from Release 5.5 to Release 5.6
Actions #19

Updated by Andreas Kohlbecker about 5 years ago

  • Target version changed from Release 5.6 to Unassigned CDM tickets
Actions #20

Updated by Andreas Müller about 5 years ago

  • Description updated (diff)
Actions #21

Updated by Andreas Kohlbecker almost 4 years ago

  • Related to bug #9102: taxonNode status icon breaks sort order in taxontree added
Actions #22

Updated by Andreas Kohlbecker over 3 years ago

  • Status changed from New to In Progress
Actions #23

Updated by Andreas Kohlbecker over 3 years ago

  • % Done changed from 0 to 40
Actions #24

Updated by Andreas Kohlbecker over 3 years ago

The sort code in cdm_taxontree_populate() mentioned above is related to the no longer used special featured of the taxon tree and thus has no effect on the sort order. Cleaning this up is another issue.

I defined TaxonNodeSortMode.RankAndAlphabeticalOrder as default sort order for all web service controlers, which should be fine, since this order is expected anyway in all cases as far as I know.

Actions #25

Updated by Andreas Kohlbecker over 3 years ago

  • Status changed from In Progress to Resolved
  • Assignee changed from Andreas Kohlbecker to Norbert Kilian
  • Target version changed from Unassigned CDM tickets to Release 5.18
  • % Done changed from 40 to 50

Please confirm that the sort order is now as expected.

Actions #26

Updated by Andreas Kohlbecker over 3 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 50 to 100

Norbert wrote: "alles klar, gelöst!"

Actions

Also available in: Atom PDF