Project

General

Profile

Actions

feature request #7599

closed

treeView for specimen data in dataportal

Added by Katja Luther about 4 years ago. Updated over 1 year ago.

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

100%

Estimated time:
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 - OK
  • The full tree of derivatives stemming from the focused derivative are shown - OK
  • Derivatives which are not associated to the taxon are hidden. - OK
  • Derivate tree view should merge branches to multiple root elements into one branch #9216 --> postponed since there is no related data yet
  • first only the title of the field unit should be displayed, clicking on it should open the tree view - OK
    • the tree should contain the most important information like collection, record base, catalog number/accession number/barcode, kind of unit, derivation event, identifications - OK
    • 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 - OK
  • images should be shown with the derived unit/field unit they are linked to not as media gallery of the whole tree - OK
  • 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. - OK

Files

picture852-1.png (104 KB) picture852-1.png Andreas Kohlbecker, 09/11/2018 08:23 AM
picture495-1.png (17.4 KB) picture495-1.png Andreas Kohlbecker, 09/20/2018 08:44 AM
derivate-tree-testdata-in-editor.png (16 KB) derivate-tree-testdata-in-editor.png Andreas Kohlbecker, 08/14/2020 05:59 PM
derivate-tree-testdata-in-portal.png (371 KB) derivate-tree-testdata-in-portal.png Andreas Kohlbecker, 08/14/2020 06:06 PM
picture588-1.png (122 KB) picture588-1.png Katja Luther, 08/17/2020 02:07 PM
picture588-2.png (32.1 KB) picture588-2.png Katja Luther, 08/17/2020 02:07 PM
picture113-1.png (35.6 KB) picture113-1.png Andreas Kohlbecker, 10/02/2020 11:14 AM
picture343-1.png (146 KB) picture343-1.png Andreas Kohlbecker, 10/02/2020 11:17 AM

Related issues

Related to EDIT - feature request #7755: Implement advanced detail page for occurrencesNewKatja Luther

Actions
Related to EDIT - task #3749: Check if all molecular data is shown correctly in data portal [also DISCUSS]In ProgressAndreas Müller

Actions
Related to EDIT - task #8419: Harmonization of the different specimen representationsIn ProgressAndreas Kohlbecker

Actions
Related to EDIT - feature request #9216: Derivate tree view should merge branches to multiple root elements into one branch NewAndreas Kohlbecker

Actions
Related to EDIT - task #9191: selenium test for specimen tree view (bottom up)ClosedAndreas Kohlbecker

Actions
Related to EDIT - feature request #6866: Improve specimen pageClosedAndreas Kohlbecker

Actions
Related to EDIT - bug #9555: symbols for record basis (and kind of unit) in derivation treeClosedAndreas Kohlbecker

Actions
Related to EDIT - task #9579: restore css3pie if neededWorksformeAndreas Kohlbecker

Actions
Actions #1

Updated by Katja Luther about 4 years ago

  • Description updated (diff)
Actions #2

Updated by Katja Luther about 4 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.

Actions #3

Updated by Andreas Müller about 4 years ago

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

Updated by Andreas Kohlbecker about 4 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

Actions #5

Updated by Andreas Kohlbecker about 4 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...

Actions #6

Updated by Andreas Kohlbecker about 4 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

Actions #7

Updated by Andreas Kohlbecker about 4 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!

Actions #8

Updated by Andreas Kohlbecker about 4 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).
Actions #9

Updated by Andreas Kohlbecker about 4 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).

Actions #10

Updated by Katja Luther about 4 years ago

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

Actions #11

Updated by Katja Luther about 4 years ago

  • Status changed from Resolved to In Progress
Actions #13

Updated by Andreas Kohlbecker about 4 years ago

  • Assignee changed from Andreas Kohlbecker to Katja Luther
Actions #14

Updated by Katja Luther about 4 years ago

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

Actions #15

Updated by Andreas Kohlbecker about 4 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!

Actions #16

Updated by Katja Luther about 4 years ago

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

Updated by Katja Luther about 4 years ago

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

Actions #18

Updated by Andreas Kohlbecker about 4 years ago

Actions #19

Updated by Andreas Kohlbecker about 4 years ago

  • Description updated (diff)
Actions #20

Updated by Andreas Kohlbecker about 4 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

Actions #21

Updated by Katja Luther about 4 years ago

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

Updated by Andreas Müller almost 4 years ago

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

Updated by Andreas Müller over 3 years ago

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

Updated by Andreas Müller over 3 years ago

  • Target version changed from Release 5.6 to Reviewed Next Major Release
Actions #26

Updated by Andreas Kohlbecker about 2 years ago

  • Related to task #8419: Harmonization of the different specimen representations added
Actions #27

Updated by Katja Luther about 2 years ago

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

Updated by Andreas Kohlbecker about 2 years 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.
Actions #30

Updated by Katja Luther about 2 years 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.

Actions #31

Updated by Andreas Kohlbecker about 2 years ago

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

Updated by Andreas Kohlbecker about 2 years ago

  • Description updated (diff)
Actions #33

Updated by Andreas Kohlbecker almost 2 years 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

Actions #34

Updated by Andreas Kohlbecker almost 2 years 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

Actions #35

Updated by Andreas Kohlbecker almost 2 years ago

Ah ok,

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

VG
A.

Actions #36

Updated by Andreas Kohlbecker almost 2 years 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

Actions #37

Updated by Andreas Kohlbecker almost 2 years 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

Actions #38

Updated by Andreas Kohlbecker almost 2 years ago

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

Updated by Andreas Kohlbecker almost 2 years ago

  • Tags set to specimens-view-tree
Actions #40

Updated by Andreas Kohlbecker almost 2 years ago

  • Target version changed from Reviewed Next Major Release to Release 5.18
  • % Done changed from 50 to 40
Actions #41

Updated by Andreas Kohlbecker almost 2 years ago

  • Target version changed from Release 5.18 to Release 5.19
Actions #42

Updated by Andreas Kohlbecker over 1 year ago

Andreas Kohlbecker wrote:

[Andreas Müller wrote:]

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.

Hallo,

bei dieser beispielhaften Darstellung ging es mit darum das handling komplexer Situationen mit multiplen Wurzelknoten im Graphen zu diskutieren.

Dass solche Bäume in der Regel und Praxis anders aussehen ist ja klar, aber wenn es darum geht Regeln auf ihre Sinnhaftigkeit abzuklopfen baucht es manchmal simplifizierte Extrembeispiele.

Übrigens ist die oben dargestellte fusionierte Form nicht ganz richtig und sollte eher so lauten:

FU1,FU2,D5 --> D1 --> *D3* --> D6
                        |
                        +----> D7

In dieser Verkürzung wäre ein Sachverhalt falsch dargestellt: D1 scheint ein Derivat von D5 zu sein. Aber bei einer reinen Baumstruktur bekommt man D5 nicht anders unter, es sei denn man lässt es einfach weg, was vielleicht tatsächlich die bessere Option ist. Dieser Fall kommt mit Sicherheit, wenn überhaupt sooooo selten vor, dass er vernachlässigbar ist.

Viele Grüße
Andreas

Actions #43

Updated by Andreas Kohlbecker over 1 year ago

Ahh, ich sehe gerade, dass in #9216 schon die finale Lösung hinterlegt ist.

Actions #44

Updated by Andreas Kohlbecker over 1 year ago

  • Target version changed from Release 5.19 to Release 5.21
Actions #45

Updated by Andreas Kohlbecker over 1 year ago

  • Target version changed from Release 5.21 to Release 5.22
Actions #46

Updated by Andreas Kohlbecker over 1 year ago

  • Description updated (diff)

Open issues:

  • the identifications should be clickable with link to name --> link url broken
  • sequence data should be clickable --> DNA display incomplete
  • 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., --> see also #6866
Actions #47

Updated by Andreas Kohlbecker over 1 year ago

Actions #48

Updated by Andreas Kohlbecker over 1 year ago

  • Description updated (diff)
Actions #49

Updated by Andreas Kohlbecker over 1 year ago

  • Related to bug #9555: symbols for record basis (and kind of unit) in derivation tree added
Actions #50

Updated by Andreas Kohlbecker over 1 year ago

  • Related to task #9579: restore css3pie if needed added
Actions #51

Updated by Andreas Kohlbecker over 1 year ago

  • Status changed from In Progress to Closed
  • % Done changed from 40 to 100

appart from the questions discussed in #9579 this ticket is now complete.

Actions

Also available in: Atom PDF