Project

General

Profile

feature request #7599

treeView for specimen data in dataportal

Added by Katja Luther about 2 years ago. Updated 13 days ago.

Status:
In Progress
Priority:
Highest
Category:
cdm-dataportal
Start date:
07/30/2018
Due date:
% Done:

50%

Severity:
normal

Description

The specimen tab/page section should show the tree structure of the specimen. To avoid performance problems the data should be provided by DTOs.

DTO Implementation:

  • implement DTOs for FieldUnits, PreservedSpecimen/Observations, Collection, MolecularData, SequenceData
  • Superclass for FieldUnitDTO and PreservedSpecimen is DerivateDTO
  • Structure is similar to cdm classes

Treeview in dataportal

  • The tree-view for specimen and occurrence data will be focused on the DerivedUnit which is directly associated to the taxon
  • The full tree of derivatives stemming from the focused derivative are shown
  • Derivatives which are not associated to the taxon are hidden.
  • Derivate tree view should merge branches to multiple root elements into one branch #9216
  • first only the title of the field unit should be displayed, clicking on it should open the tree view
    • the tree should contain the most important information like collection, record base, catalog number/accession number/barcode, kind of unit, derivation event, identifications
    • the identifications should be clickable with link to name
    • sequence data should be clickable
    • for more information there should be a link to the details page which contains all information about the derived unit/field unit
  • images should be shown with the derived unit/field unit they are linked to not as media gallery of the whole tree
  • sequences should be displayed with primer information
  • in a next step the details of the derived units should be hidden, with the possibility to open it by clicking on the title.

picture852-1.png View (104 KB) Andreas Kohlbecker, 09/11/2018 08:23 AM

picture495-1.png View (17.4 KB) Andreas Kohlbecker, 09/20/2018 08:44 AM

derivate-tree-testdata-in-editor.png View (16 KB) Andreas Kohlbecker, 08/14/2020 05:59 PM

derivate-tree-testdata-in-portal.png View (371 KB) Andreas Kohlbecker, 08/14/2020 06:06 PM

picture588-1.png View (122 KB) Katja Luther, 08/17/2020 02:07 PM

picture588-2.png View (32.1 KB) Katja Luther, 08/17/2020 02:07 PM

picture113-1.png View (35.6 KB) Andreas Kohlbecker, 10/02/2020 11:14 AM

picture343-1.png View (146 KB) Andreas Kohlbecker, 10/02/2020 11:17 AM


Related issues

Related to Edit - feature request #7755: Implement advanced detail page for occurrences New 09/12/2018
Related to Edit - feature request #3749: Check if all molecular data is shown correctly in data portal [also DISCUSS] In Progress 12/19/2013
Related to Edit - task #8419: harmonization of the different specimen representations New 07/25/2019
Related to Edit - feature request #9216: Derivate tree view should merge branches to multiple root elements into one branch New 09/07/2020
Related to Edit - task #9191: selenium test for specimen tree view (bottom up) Closed 08/13/2020

Associated revisions

Revision 6b53ead8 (diff)
Added by Katja Luther about 2 years ago

first implementation for specimen page with DTOs

Revision c10f70e4 (diff)
Added by Katja Luther about 2 years ago

first steps of specimen page with DTOs

Revision 98262d29 (diff)
Added by Katja Luther about 2 years ago

code cleaning

Revision ff21181c (diff)
Added by Katja Luther about 2 years ago

mend

ref #7599: minor

Revision fc169e34 (diff)
Added by Katja Luther about 2 years ago

ref #7599: add excluded fields for specimen

Revision 267da0d1 (diff)
Added by Katja Luther about 2 years ago

create an item_list for specimen page

Revision 7965ef92 (diff)
Added by Katja Luther about 2 years ago

add item list to table resolves the problem of rendering the description items

Revision 416bc78f (diff)
Added by Katja Luther about 2 years ago

use mediaDTO

Revision 52f57468 (diff)
Added by Katja Luther about 2 years ago

smaller changes in dna part of tree view

Revision 3f6d782a (diff)
Added by Katja Luther about 2 years ago

ref #7599: further improvement for specimenDtos

Revision 106e1cf9 (diff)
Added by Katja Luther about 2 years ago

ref #7599: fix php problems and code cleaning

Revision a0f26798 (diff)
Added by Katja Luther about 2 years ago

remove link to detail page for fieldUnits

Revision f1239704 (diff)
Added by Katja Luther about 2 years ago

ref #7599: fix problem with links in descriptions

Revision 8e15d0fb (diff)
Added by Katja Luther about 2 years ago

ref #7599: create link and render array when description is URL in compose_sequences

Revision 8cba0a5f (diff)
Added by Andreas Kohlbecker almost 2 years ago

ref #7599 updating compose_specimen_table() after renaming of render_cdm_specimenDTO_page()

Revision ddbbdb0b (diff)
Added by Katja Luther over 1 year ago

ref #7599: exclude collection string from specimen tree view

Revision 292b1ebe (diff)
Added by Andreas Kohlbecker 20 days ago

ref #7599, ref #7599 specimen tree view: fixing bug and adapting test

Revision a584de6a (diff)
Added by Andreas Kohlbecker 14 days ago

ref #7599 adapting derivate tree view to DTOs and solving code inconsistencies

History

#1 Updated by Katja Luther about 2 years ago

  • Description updated (diff)

#2 Updated by Katja Luther about 2 years ago

  • Status changed from New to In Progress

The current implementation provides all specimen with the whole tree with the first WS call, is it better to get first only the fieldUnit informations and when clicking for the details, getting the details or do it with the actual implementation and create the complete tree.

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

  • Target version changed from Release 5.2 to Release 5.3

#4 Updated by Andreas Kohlbecker about 2 years ago

  • Status changed from In Progress to Resolved
  • Assignee changed from Katja Luther to Andreas Kohlbecker
  • % Done changed from 0 to 50

starting review

#5 Updated by Andreas Kohlbecker about 2 years ago

Review Result:

1)

  • method create_cdm_specimen_or_observation() needs either be named render_cdm_specimen_or_observation() or compose_...
  • methods returning markup are render_.. methods.
  • if you think that it could make sense to use the output via AJAX you need to call it compose_
  • see also create_specimen_array()
  • compose methods are marked as * @ingroup compose per php doc, none compose functions must not be marked as such

to be continued...

#6 Updated by Andreas Kohlbecker about 2 years ago

2)

diese neue Funktionalität in modules/cdm_dataportal/includes/pre-drupal8.inc

    if (strpos($description, 'http:') !== false && !is_array($description)){
        //make links for urls
        $description = l($description, $description);
    }

sollte eigentlich nicht in _description_list_group_add() hinein. Besser den link schon vorher in $description schreiben

#7 Updated by Andreas Kohlbecker about 2 years ago

Andreas Kohlbecker wrote:

sollte eigentlich nicht in _description_list_group_add() hinein. Besser den link schon vorher in $description schreiben

und außerdem ist https auch wichtig!

#8 Updated by Andreas Kohlbecker about 2 years ago

php notice in http://test.e-taxonomy.eu/dataportal/preview/cichorieae/cdm_dataportal/taxon/1ad7630a-290b-464f-99e3-43c9dfb3c38b/specimens:

    Notice: Undefined property: stdClass::$_fieldObjectMedia in cdm_dataportal_taxon_page_specimens() (line 86 of /var/www/drupal-7.32/sites/_jenkins-workspace/modules/cdm_dataportal/includes/pages.inc).
    Notice: Undefined property: stdClass::$listOfMedia in cdm_dataportal_taxon_page_specimens() (line 208 of /var/www/drupal-7.32/sites/_jenkins-workspace/modules/cdm_dataportal/includes/pages.inc).
    Notice: Undefined property: stdClass::$listOfMedia in cdm_dataportal_taxon_page_specimens() (line 208 of /var/www/drupal-7.32/sites/_jenkins-workspace/modules/cdm_dataportal/includes/pages.inc).
    Notice: Undefined property: stdClass::$listOfMedia in cdm_dataportal_taxon_page_specimens() (line 208 of /var/www/drupal-7.32/sites/_jenkins-workspace/modules/cdm_dataportal/includes/pages.inc).
    Notice: Undefined variable: pager in cdm_dataportal_taxon_page_specimens() (line 308 of /var/www/drupal-7.32/sites/_jenkins-workspace/modules/cdm_dataportal/includes/pages.inc).
    Notice: Trying to get property of non-object in theme_cdm_pager() (line 370 of /var/www/drupal-7.32/sites/_jenkins-workspace/modules/cdm_dataportal/theme/cdm_dataportal.common.theme).
    Notice: Undefined variable: pager in cdm_dataportal_taxon_page_specimens() (line 317 of /var/www/drupal-7.32/sites/_jenkins-workspace/modules/cdm_dataportal/includes/pages.inc).
    Notice: Trying to get property of non-object in theme_cdm_pager() (line 370 of /var/www/drupal-7.32/sites/_jenkins-workspace/modules/cdm_dataportal/theme/cdm_dataportal.common.theme).

#9 Updated by Andreas Kohlbecker about 2 years ago

further minor php problems at the example of http://test.e-taxonomy.eu/dataportal/preview/phycobank/cdm_dataportal/taxon/f48b4b22-0625-4820-ad82-abf12e20859a

1) compressed table active

    Notice: Undefined property: stdClass::$_fieldObjectMedia in cdm_dataportal_taxon_page_specimens() (line 86 of /home/andreas/workspaces/cdm/cdm-dataportal/modules/cdm_dataportal/includes/pages.inc).
    Notice: Undefined variable: pager in cdm_dataportal_taxon_page_specimens() (line 317 of /home/andreas/workspaces/cdm/cdm-dataportal/modules/cdm_dataportal/includes/pages.inc).
    Notice: Trying to get property of non-object in theme_cdm_pager() (line 370 of /home/andreas/workspaces/cdm/cdm-dataportal/modules/cdm_dataportal/theme/cdm_dataportal.common.theme).

2) default specimen view (see above for php problems at 'notice' level)

3) specimen tree

the tree view is not showing up

    Warning: Invalid argument supplied for foreach() in cdm_dataportal_taxon_page_specimens() (line 75 of /home/andreas/workspaces/cdm/cdm-dataportal/modules/cdm_dataportal/includes/pages.inc).
    Notice: Undefined variable: occurrence in cdm_dataportal_taxon_page_specimens() (line 86 of /home/andreas/workspaces/cdm/cdm-dataportal/modules/cdm_dataportal/includes/pages.inc).
    Notice: Trying to get property of non-object in cdm_dataportal_taxon_page_specimens() (line 86 of /home/andreas/workspaces/cdm/cdm-dataportal/modules/cdm_dataportal/includes/pages.inc).
    Notice: Undefined variable: map_render_array in cdm_dataportal_taxon_page_specimens() (line 119 of /home/andreas/workspaces/cdm/cdm-dataportal/modules/cdm_dataportal/includes/pages.inc).
    Notice: Undefined variable: pager in cdm_dataportal_taxon_page_specimens() (line 317 of /home/andreas/workspaces/cdm/cdm-dataportal/modules/cdm_dataportal/includes/pages.inc).
    Notice: Trying to get property of non-object in theme_cdm_pager() (line 370 of /home/andreas/workspaces/cdm/cdm-dataportal/modules/cdm_dataportal/theme/cdm_dataportal.common.theme).

#10 Updated by Katja Luther about 2 years ago

the php issues should be solved and the tree view is shown now.

#11 Updated by Katja Luther about 2 years ago

  • Status changed from Resolved to In Progress

#13 Updated by Andreas Kohlbecker about 2 years ago

  • Assignee changed from Andreas Kohlbecker to Katja Luther

#14 Updated by Katja Luther about 2 years ago

the php problems are solved and the NPE in CollectionDto as well

#15 Updated by Andreas Kohlbecker about 2 years ago

thank you for fixing the issues so far. Unfortunately there are still some:

1)
on this page the Locality should be Berlin, small river Wuhle instead English is shown

2.b)
The method compose_cdm_specimen_or_observation_tree_entry() returns a markup string. since this is a compose method it should return a render array instead $occurrence_elements.

You may want to replace the $output = drupal_render($occurrence_elements); and everything below by

2.a)

TO NOT USE link targets like 'blank', etc this is discouraged!!!!!


$render_array = array();
$render_array['occurrence'] = $occurrence_elements;
$render_array['gallery'] = markup_to_render_array($gallery_html);
$render_array['specimen_page_link'] = markup_to_render_array(l("detail page", path_to_specimen($specimenOrObservation->uuid));

return $render_array;

WARNING code snipped untested!

#16 Updated by Katja Luther about 2 years ago

  • Target version changed from Release 5.3 to Release 5.4

#17 Updated by Katja Luther about 2 years ago

as long as the detail page for field units is not implemented the link to detail page of field unit is removed.

#18 Updated by Andreas Kohlbecker about 2 years ago

#19 Updated by Andreas Kohlbecker about 2 years ago

  • Description updated (diff)

#20 Updated by Andreas Kohlbecker about 2 years ago

Andreas Kohlbecker wrote:

2)

diese neue Funktionalität in modules/cdm_dataportal/includes/pre-drupal8.inc

    if (strpos($description, 'http:') !== false && !is_array($description)){
        //make links for urls
        $description = l($description, $description);
    }

sollte eigentlich nicht in _description_list_group_add() hinein. Besser den link schon vorher in $description schreiben

Dieser Code verursacht auch Probleme:

http://portal.cybertaxonomy.org/salvador/cdm_dataportal/media/4bd68891-a187-456f-b123-01c38c1f654a

#21 Updated by Katja Luther about 2 years ago

  • Related to feature request #3749: Check if all molecular data is shown correctly in data portal [also DISCUSS] added

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

  • Target version changed from Release 5.4 to Release 5.5

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

  • Target version changed from Release 5.5 to Release 5.6

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

  • Target version changed from Release 5.6 to Reviewed Next Major Release

#26 Updated by Andreas Kohlbecker 2 months ago

  • Related to task #8419: harmonization of the different specimen representations added

#27 Updated by Katja Luther 2 months ago

  • Description updated (diff)
  • Assignee changed from Katja Luther to Andreas Kohlbecker

#28 Updated by Andreas Kohlbecker 2 months ago

developing the test for the derivate tree view I found a potential problems.

As far as my understanding of the derivate tree goes, it should show the whole bouquet of all derivatives stemming from one filed unit and gathering event. I created the following test data in //160.45.63.201/cdm_integration_reference :

Problems in http://int.e-taxonomy.eu/dataportal/integration/reference/cdm_dataportal/taxon/d245083e-3bda-435f-9bb3-bdc2249ff23c/specimens:

  • The portal page misses the media specimen and the DNA
  • The field unit is repeated twice.

#29 Updated by Andreas Kohlbecker 2 months ago

(screen shot for above report)

#30 Updated by Katja Luther 2 months ago

this is a screenshot of algaterra-new with a derivate view containing dna derivates and siblings "B 40 0041140" and "DB 16922"

so the specimen page should contain all derivates of a derivate determined to the taxon or its name and all elements should be displayed only once.

#31 Updated by Andreas Kohlbecker about 1 month ago

  • Related to feature request #9216: Derivate tree view should merge branches to multiple root elements into one branch added

#32 Updated by Andreas Kohlbecker about 1 month ago

  • Description updated (diff)

#33 Updated by Andreas Kohlbecker 20 days ago

Hallo Katja,

ich habe noch eine weitere Frage.

Soweit ich das verstanden habe gilt auch folgender Anforderung: "Derivatives which are not associated to the taxon are to be hidden."

Gilt das für alle Derivate egal ob Origin oder derivative?

Es sollten aber dennoch alle Root Elemente angezeigt werden auch wenn Zwischen-Derivate nicht direkt zum Taxon gehören? Also so (alle mit dem Taxon assoziierten Derivate sind hier blau)

VG
A

#34 Updated by Andreas Kohlbecker 20 days ago

[Katja wrote:]

Hallo Andreas,

die Origin derivate sollten schon angezeigt werden, auch wenn sie keine Assoziation zu dem Taxon haben, weil gerade bei Algen oder ähnlichem sind FieldUnits und die ersten Derivate ja gar keinem Taxon/Namen zugeordnet.

Viele Grüße
Katja

#35 Updated by Andreas Kohlbecker 20 days ago

Ah ok,

das Ausblenden/Verstecken bezog sich nur auf die Compressed Table, richtig?

VG
A.

#36 Updated by Andreas Kohlbecker 20 days ago

Naja, nicht ganz. Es geht auch im Tree View darum, dass in einem Derivat Baum, der aus einer Mischprobe entsteht, nicht alle daraus entstandenen Kulturen bei einem Taxon angezeigt werden (das kann sehr unübersichtlich werden), also sollen beim DerivateTree eigentlich auch nur die Derivate angezeigt werden, die über Taxon Association oder Determination an einem Taxon oder Namen hängen und ihre direkten Eltern und Kinder (+ KindesKinder…).

Also im Endeffekt muss man die Derivate raus suchen, die eine Assoziation zu dem Taxon haben und dann die direkten Vorgänger und die Nachfolger finden.
Andere Derivate, die von Origin Derivaten abstammen würden erstmal nicht dazugehören, außer sie sind ebenfalls mit dem Taxon assoziiert.

Im Editor sieht das zum Beispiel so aus, wenn man nach den Specimen von Achnanthes brevipes sucht:

Im Portal sollen aber auf der Seite von Achnanthes brevipes nur der Teilbaum angezeigt werden, der wirklich auch das Taxon betrifft (roter Kringel), die anderen Teilbäume sollen ausgeblendet werden.

Ist das verständlich? Das ist wahrscheinlich sehr aus der Sicht der Algen gedacht, aber es sollte ja eigentlich keine Derivate geben, die dann plötzlich einem anderen Taxon zugeordnet sind, oder?

Viele Grüße
Katja

#37 Updated by Andreas Kohlbecker 20 days ago

[Andreas Müller wrote:]

Hallo,

wenn ich es richtig verstehe bezieht sich das auf die Derivate, die unterhalb von „D3“ in deinem Beispiel kommen. Also D6 . Die fehlen weitgehend in der Graphik, aber das ist ja eigentlich der Regelfall, dass der Baum nach unten breit wird und nach oben immer nur 1 Parent existiert. Die Graphik zeigt einen Baum mit vielen Parents und meist nur einem oder keinem Kind.

Mit der Compressed Table hat das ausblenden glaube ich eher nicht zu tun bzw. dort gelten vermutlich sehr ähnliche Regeln.

Viele Grüße,
Andreas M

#38 Updated by Andreas Kohlbecker 20 days ago

  • Related to task #9191: selenium test for specimen tree view (bottom up) added

#39 Updated by Andreas Kohlbecker 13 days ago

  • Tags set to specimens-view-tree

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)