Project

General

Profile

bug #6356

taxontree sort order as in editor

Added by Andreas Kohlbecker over 2 years ago. Updated 3 months ago.

Status:
New
Priority:
New
Category:
cdm-dataportal
Target version:
Start date:
01/20/2017
Due date:
% Done:

0%

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

History

#1 Updated by Andreas Müller about 2 years ago

  • Target version changed from Release 4.6 to Release 4.7

#2 Updated by Andreas Müller about 2 years ago

  • Target version changed from Release 4.7 to Release 4.8

#3 Updated by Andreas Müller almost 2 years ago

  • Target version changed from Release 4.8 to Release 4.9

#4 Updated by Andreas Müller almost 2 years ago

  • Target version changed from Release 4.9 to Release 4.10

#5 Updated by Andreas Müller over 1 year ago

  • Target version changed from Release 4.10 to Release 4.11

#6 Updated by Andreas Kohlbecker over 1 year ago

  • Description updated (diff)

#7 Updated by Andreas Kohlbecker over 1 year ago

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

#8 Updated by Andreas Müller over 1 year ago

  • Target version changed from Release 4.11 to Release 4.12

#9 Updated by Andreas Müller over 1 year ago

  • Target version changed from Release 4.12 to Release 4.13

#10 Updated by Andreas Müller over 1 year ago

  • Target version changed from Release 4.13 to Release 4.14

#11 Updated by Andreas Müller over 1 year ago

  • Target version changed from Release 4.14 to Release 5.0

#12 Updated by Andreas Kohlbecker about 1 year ago

  • Target version changed from Release 5.0 to Release 5.1

#13 Updated by Andreas Müller 11 months ago

  • Target version changed from Release 5.1 to Release 5.2

#14 Updated by Andreas Kohlbecker 10 months ago

  • Tags deleted (phycobank)

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

#15 Updated by Andreas Kohlbecker 9 months ago

  • Target version changed from Release 5.2 to Release 5.3

#16 Updated by Andreas Kohlbecker 9 months ago

  • Target version changed from Release 5.3 to Release 5.4

#17 Updated by Andreas Kohlbecker 7 months ago

  • Target version changed from Release 5.4 to Release 5.5

#18 Updated by Andreas Kohlbecker 4 months ago

  • Target version changed from Release 5.5 to Release 5.6

#19 Updated by Andreas Kohlbecker 3 months ago

  • Target version changed from Release 5.6 to Unassigned CDM tickets

#20 Updated by Andreas Müller 3 months ago

  • Description updated (diff)

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)