Project

General

Profile

Actions

bug #8297

closed

Fix condensed distribution string for E+M

Added by Andreas Müller almost 5 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Highest
Category:
cdmlib
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Severity:
normal
Found in Version:
Tags:

Description

for previous rules and discussions see also #3907 and other related tickets.

http://portal.cybertaxonomy.org/euromed/cdm_dataportal/taxon/6a8e85bd-5e52-4ae2-9444-99128c87a672

http://ww2.bgbm.org/EuroPlusMed/PTaxonDetail.asp?NameCache=Abies%20alba&PTRefFk=7500000

Some issues from old+new A. alba comparison:

  • EM endemism should come first and should not show area label
  • Subareas of fallback areas (Ju etc) should not be handled in brackets, Ju should not appear if any subarea data exists
  • ? / ??
  • [dCy] / DCy
  • old: Ga(F) and [cGa(F)] in same string => error according to ERS
  • nHb(E N) / nHb(E) nHb(N)

webservice results: example

portal code is in modules/cdm_dataportal/includes/descriptions.inc ab Zeile 787 in der function compose_feature_block_distribution($taxon, $descriptionElements, $feature)

known errors in BM portal:

Comparison with Cuba:

  • Cuba: areas always bold
  • Cuba: has outOfScope areas split with " - "
  • EM: has "introduced" (foreign origin) areas in square brackets
  • Cuba: has not subareas with abbrevlabel including the parent area and the parent part needs to be removed
  • EM: if status is the same in all subareas it should only be shown on the parent area level

Related issues

Related to EDIT - feature request #3907: EuroMed: implement condensed "status" string of distribution informationClosedAndreas Kohlbecker

Actions
Related to EDIT - feature request #5050: revise the subAreaPreference rule for filtering DistributionsClosedAndreas Kohlbecker

Actions
Related to EDIT - feature request #5779: Update EuroPlusMedCondensedDistributionComposer to use new symbol fieldClosedAndreas Müller

Actions
Related to EDIT - feature request #5682: Implement condensed distribution string for CubaClosedAndreas Müller

Actions
Related to EDIT - bug #7107: "Omit level" (TDWG Level2) in distribution hierarchy should not supress distributions source referenceDiscussedAndreas Müller

Actions
Related to EDIT - bug #7096: Add second symbol attribute to DefinedTermBaseResolvedAndreas Müller

Actions
Related to EDIT - bug #8858: Ordering of distribution status 'undefined' is not correct in E+MClosedAndreas Müller

Actions
Related to EDIT - bug #5206: Status symbols in condensed distribution string repeated for subareasClosedAndreas Müller

Actions
Related to EDIT - feature request #9484: Distinguish default hidden/fallback area handling from empty list of hidden/fallback area markersRejectedAndreas Müller

Actions
Related to EDIT - feature request #9500: Allow removing certain distribution status from distribution publicationFeedbackAndreas Müller

Actions
Related to EDIT - task #9501: Find inconsistent higher area distribution status data in E+MNewAndreas Müller

Actions
Related to EDIT - feature request #9502: Implement subarea preference rule and fallback areas for areas with complex hierarchyResolvedAndreas Müller

Actions
Related to EDIT - feature request #9503: Handle term tree of areas and distribution status for distributionInfo in dataportalClosedKatja Luther

Actions
Related to EDIT - feature request #9521: Fallback areas in textual representation should always stand aloneClosedAndreas Müller

Actions
Related to EDIT - bug #9526: Sort order in E+M distribution string should be strictly alphabeticClosedAndreas Müller

Actions
Related to EDIT - feature request #10210: UI for configuring condensed distribution string via separate parametersNewKatja Luther

Actions
Related to EDIT - feature request #10330: Handle term tree distribution status for distributionInfo in dataportalClosedKatja Luther

Actions
Copied to EDIT - bug #9583: Fix formatting of parent area in condensed distributions string if subareas have various status but at least 1 area has status nativeClosedAndreas Müller

Actions
Actions #1

Updated by Andreas Müller almost 5 years ago

  • Related to feature request #3907: EuroMed: implement condensed "status" string of distribution information added
Actions #2

Updated by Andreas Müller almost 5 years ago

Actions #3

Updated by Andreas Müller almost 5 years ago

  • Related to feature request #5779: Update EuroPlusMedCondensedDistributionComposer to use new symbol field added
Actions #4

Updated by Andreas Müller almost 5 years ago

Actions #5

Updated by Andreas Müller almost 5 years ago

  • Description updated (diff)
Actions #6

Updated by Andreas Müller about 3 years ago

  • Description updated (diff)
Actions #7

Updated by Andreas Müller about 3 years ago

  • Description updated (diff)
Actions #8

Updated by Andreas Müller about 3 years ago

  • Description updated (diff)
Actions #9

Updated by Andreas Müller about 3 years ago

  • Description updated (diff)
Actions #10

Updated by Andreas Müller about 3 years ago

  • Description updated (diff)
Actions #11

Updated by Andreas Müller about 3 years ago

  • Description updated (diff)
Actions #12

Updated by Andreas Müller about 3 years ago

  • Description updated (diff)
Actions #13

Updated by Andreas Müller about 3 years ago

  • Description updated (diff)
Actions #14

Updated by Andreas Müller about 3 years ago

AM:

Wenn es für ein Areal Unterareale gibt und diese haben einmal einen indigenous und einmal einen „foreign“ Status, dann soll das Areal 2x aufgeführt werden, einmal im indigenous Bereich und einmal bei foreign, korrekt? Beispiel Uk auf http://ww2.bgbm.org/EuroPlusMed/PTaxonDetail.asp?NameCache=Crepis%20capillaris&PTRefFk=7000000 , dort kommt -Uk(K) und UK(U) getrennt vor.
Das ist vermutlich korrekt so und soll so ein? (abgesehen davon, dass Uk glaube ich inzwischen nicht mehr Überareal der beiden Areale ist, aber mir geht es nur ums Prinzip)

ERS:

ja, das ist richtig so. Wüsste nicht, wie man es sinnvoll anders machen sollte.

Actions #15

Updated by Andreas Müller about 3 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10

AM:

Wenn die Subareale beide z.B. indigenous sind, aber unterschiedliche Status haben, sollen die Hauptareale dann mehrfach angezeigt werden? In http://ww2.bgbm.org/EuroPlusMed/PTaxonDetail.asp?NameCache=Erigeron%20acris&PTRefFk=7000000 ist das für Tu der Fall (Tu(A) -Tu(E)). Aus einer alten Mail und alten Tickets entnehme ich aber, dass das evtl. nicht so gewollt ist. Wenn sie nur einfach angezeigt werden sollen, wie soll dann die Formatierung erfolgen. Grundsätzlich das Hauptareal ohne fett und ohne Präfix, dafür die Subareale entsprechend formatiert? Also im obigen Beispiel Tu(A -E) ?
Bei gleichem Status soll ja nur das Hauptareal formatiert sein bzw. bei native soll wohl auch die Klammer sowie die Subareale fett sein, korrekt?

ERS:

unterschiedliche Lösungen sind denkbar, die Frage ist, was ist am Intuitivsten. Ich denke besonders auch an Überareale mit vielen Unterarealen wie Rf oder Ca. Da ist es sinnvoll, die Hauptareale nur einfach, nicht mehrfach anzuzeigen, denke ich. Für die Fomatierung könnte ich mir besser vorstellen, dass das Hauptareal fett bleibt, wenn mindestens ein Unterareal native ist (denn d.h., dass die Sippe im Hauptareal ebenfalls native ist). Also Tu(A -E). oder Ca(?C dF G H dL P T) In jedem Fall bleibt das Hauptareal ohne Praefix.

=> fixed in #9583

Actions #16

Updated by Andreas Müller about 3 years ago

Diskussion mit AK über handling des CondensedDistributionString im Portal:

Derzeit werden Teile des Strings hardcodiert im Portalcode erzeugt, wie z.B: die Klammer um die "foreign" Informationen. Um eine einheitliche Darstellung des Strings über alle Publikationsmedien hinweg zu erreichen, sollte dies vermieden werden und der String komplett vom CondensedDistributionComposer erzeugt werden.
Um in Zukunft aber interaktive Zusatzinformationen (z.B. über MouseOver) zu Teilen des Strings zu ermöglichen, sollte in einem weiteren Schritt aber eine TaggedText ähnliche Ausgabe angestrebt werden.

Weiterhin sollten Formatierungsinformationen mit Informationsgehalt wie die fette darstellung von Arealen, die besagt, dass es sich hier um ein natives Vorkommen handelt, nicht einzig über clientseitige Formattierungen implementiert werden sondern sollten Teil des Strings bzw. später des TaggedText sein. Z.B. könnte das durch Verwendung des HTML Tag im Text erreicht werden, auch wenn dieser innerhalb von HTML eher deprecated ist. Es könnte aber auch irgendein anderer eindeutiger Markierer verwendet werden. In der TaggedText Variante kann dies durch ein TaggedText Attribut einfach implementiert werden.

Noch nicht diskutiert wurde die Hinterlegung der projektspezifischen Konfigurationsparameter, die z.B. in den CdmPreferences erfolgen könnte.

Actions #17

Updated by Andreas Müller about 3 years ago

  • Description updated (diff)
Actions #18

Updated by Andreas Müller about 3 years ago

  • Related to bug #7107: "Omit level" (TDWG Level2) in distribution hierarchy should not supress distributions source reference added
Actions #20

Updated by Andreas Müller about 3 years ago

ERS (2020-06-23):

Unterareale sollten ja eigentlich in Klammern nach dem Hauptareal zusammengefasst werden, also das Hauptareal nicht wiederholt. Das ist jetzt zum Teil richtig, zum Teil falsch (siehe z.B. Gänseblümchen https://europlusmed.org/cdm_dataportal/taxon/0eb6ca37-3365-4af5-a800-8fc4b8c366fa

Richtig ist:

Au(A L)
Be(B L)
Hb(E N)
Hs(A S)
Ju(BH Cg Ct Sl Sr)
Falsch ist:
AE(G) AE(T) => AE(G T)

Ga(C) Ga(F) => Ga(C F)

Rf(C) Rf(CS) Rf(E) Rf(K) Rf(N) Rf(NW) => Rf(S) Rf(C) Rf(CS) Rf(E) Rf(K) Rf(N) Rf(NW) Rf(S)
Tu(A) Tu(E) => Tu(A E)

Überflüssig ist es auch, die Statusangabe immer zu wiederholen, wenn sie für alle Unterareale gleich ist.

Also: nAz(J M S T)
nicht: nAz(nJ nM nS nT)
und die -●EM-Angabe sollte nach vorne gerückt werden.

Ab(A) AE(G) AE(T) Al Ar Au(A L) Be(B L) Bl(N) Br Bu By Co Cr Cs Cy Da -●EM Ga(C) Ga(F) Ge Gg Gr Hb(E N) He Ho Hs(A S) Hu Ir ??Is It Jo Ju(BH Cg Ct Sl Sr) Le Lu Ma Md ??Md(M) ??Mk Mo dNo Po Rf(C) Rf(CS) Rf(E) Rf(K) Rf(N) Rf(NW) Rf(S) Rm Sa Si(S) dSi(M) Sk ??Su Sy Tu(A) Tu(E) Uk(Cm U) [nAz(nJ nM nS nT) nEs nFa nFe nLa nLt]

Actions #21

Updated by Andreas Müller about 3 years ago

  • Related to bug #7096: Add second symbol attribute to DefinedTermBase added
Actions #22

Updated by Andreas Müller about 3 years ago

  • Related to bug #8858: Ordering of distribution status 'undefined' is not correct in E+M added
Actions #23

Updated by Andreas Müller about 3 years ago

AM:

für folgende Status bräuchte ich noch die korrekten Symbole:

• native: reported in error => „-“ ? Genauso wie introduced: reported in error? Soll das dann ein minus sein oder ein längerer Strich? 6446 Fälle

• native: formerly native => ist das der extinct Fall „†“ aus https://dev.e-taxonomy.eu/redmine/issues/3907 (759 Fälle)

• introduced: doubtfully introduced (perhaps cultivated only) => “d” ? (826 Fälle) Beispiel: Ageratum houstonianum

Damit würden sich dann folgende Symbole für die genutzen Verbreitungsstatus ergeben:

"titleCache" "symbol2"
"endemic" "●"
"native"

"native: doubtfully native" "d"
"naturalised" "n"
"casual" "a"
"introduced: uncertain degree of naturalisation" "p"
"introduced"

"introduced: doubtfully introduced (perhaps cultivated only)" "d"
"native: presence questionable" "?"
"introduced: presence questionable" "?"
"cultivated" "c"
"not endemic" "-●"
"unknown endemism" "?●"
"native: formerly native" "†"
"native: reported in error" "-"
"introduced: reported in error" "–"
"undefined" "??"

SELECT  st.titleCache, st.symbol2  -- ,  st.id, tb.titleCache, COUNT(*) AS n
FROM DescriptionElementBase deb 
INNER JOIN DescriptionBase db ON db.id = deb.inDescription_id
INNER JOIN TaxonBase tb ON tb.id = db.taxon_id
LEFT JOIN DefinedTermBase st ON st.id = deb.status_id
WHERE deb.DTYPE = 'Distribution' AND deb.status_id -- AND st.id = 2083
 GROUP BY st.id
 ORDER BY st.orderIndex
Actions #24

Updated by Andreas Müller about 3 years ago

ERS:

für native: reported in error gilt das gleiche wie für introduced: reported in error, ein Minus - vor dem Kürzel.

formerly native ist Extinct †", ja.

Und für not endemic oder unknown endemism würde ich keine Symbole verwenden, nur für endemic. Für not endemic ist es einfach nicht üblich, und für unknown endemism würde ich ungern auf unsere Lücken aufmerksam machen. Denn in den allermeisten Fällen (geschätzt 98%) ist es so, dass man den Endemismus-Status kennt, der Bearbeiter nur nicht genügend recherchiert hat. Bei ganz wenigen Taxa wäre dieser Status wirklich sinnvoll.

Actions #25

Updated by Andreas Müller about 3 years ago

  • Related to bug #5206: Status symbols in condensed distribution string repeated for subareas added
Actions #26

Updated by Andreas Müller about 3 years ago

  • Description updated (diff)
Actions #27

Updated by Andreas Müller about 3 years ago

  • Related to feature request #9484: Distinguish default hidden/fallback area handling from empty list of hidden/fallback area markers added
Actions #28

Updated by Andreas Müller about 3 years ago

  • Description updated (diff)
  • Status changed from In Progress to Resolved
  • Assignee changed from Andreas Müller to Eckhard von Raab-Straube
  • Target version changed from Euro+Med Portal Release to Release 5.21
  • % Done changed from 40 to 50

This should be fixed now and can be reviewed on test or on production after the next release

Actions #29

Updated by Andreas Müller about 3 years ago

AM:

auf introduced: doubtfully introduced (perhaps cultivated only) bist du noch nicht explizit eingegangen in der Mail. Das “d” stimmt also?

ERS:

ja, das sollte stimmen. Gut, das man die Symbole über den Term-Editor anpassen kann.

Actions #31

Updated by Andreas Müller about 3 years ago

  • Related to feature request #9500: Allow removing certain distribution status from distribution publication added
Actions #32

Updated by Andreas Müller about 3 years ago

  • Related to task #9501: Find inconsistent higher area distribution status data in E+M added
Actions #33

Updated by Andreas Müller about 3 years ago

  • Related to feature request #9502: Implement subarea preference rule and fallback areas for areas with complex hierarchy added
Actions #34

Updated by Andreas Müller about 3 years ago

  • Related to feature request #9503: Handle term tree of areas and distribution status for distributionInfo in dataportal added
Actions #35

Updated by Andreas Müller about 3 years ago

  • Assignee changed from Eckhard von Raab-Straube to Andreas Müller

An open issue:

... sollen im CondensedDistributionString für die Überareale jeweils nur die Unterarealstatus ausgegeben werden, auch wenn es einen abweichenden Status für das Überareal gibt? Also im konstruierten Fall „?Bl(I dM)“ das ? weglassen? Bisher habe ich das so implementiert, dass NUR im Fall, dass sowohl alle Unterareale UND das Hauptareal den gleichen Status haben, der Status quasi aggregiert nur vor dem Hauptareal angezeigt wird. Ansonsten zeige ich die Status einzeln an, auch den vom Hauptareal. Dadurch sieht man dann solche Inkonsistenzen evtl. schneller, aber natürlich führt es auch eher zur Verwunderung beim User.

... noch ein kleiner Nachtrag: bei der derzeitigen Implementierung kann es auch dazu kommen, dass Daten sowohl im native als auch im introduced Bereich des CondensedDistributionString auftreten, aber mit einem eigentlich nicht passenden Symbol.
Für das Beispiel Talinum paniculatum (http://test.e-taxonomy.eu/dataportal/preview/euromed/cdm_dataportal/taxon/3f28aea3-829f-46dc-957a-9991c30050f4) ergibt sich z.B.
-Md(??M) [aAu(A) pAz(aF aP) aHu -Md]

Actions #36

Updated by Andreas Müller about 3 years ago

  • Related to feature request #9521: Fallback areas in textual representation should always stand alone added
Actions #37

Updated by Andreas Müller about 3 years ago

Andreas Müller wrote:

An open issue:

... sollen im CondensedDistributionString für die Überareale jeweils nur die Unterarealstatus ausgegeben werden, auch wenn es einen abweichenden Status für das Überareal gibt? Also im konstruierten Fall „?Bl(I dM)“ das ? weglassen? Bisher habe ich das so implementiert, dass NUR im Fall, dass sowohl alle Unterareale UND das Hauptareal den gleichen Status haben, der Status quasi aggregiert nur vor dem Hauptareal angezeigt wird. Ansonsten zeige ich die Status einzeln an, auch den vom Hauptareal. Dadurch sieht man dann solche Inkonsistenzen evtl. schneller, aber natürlich führt es auch eher zur Verwunderung beim User.

ERS:

Die von dir erwähnte bisherige Implementierung, die die unterschiedlichen Status im condensed distribution string so anzeigt wie du es beschreibst, finde ich gut, auch wenn es verwirrend aussieht, denn wie gesagt, macht es auf Inkonsistenzen aufmerksam. Letztlich kommen wir da um Datenreinigung nicht drumrum. Besser, als Daten nicht zu zeigen.

Actions #38

Updated by Andreas Müller about 3 years ago

Andreas Müller wrote:

... noch ein kleiner Nachtrag: bei der derzeitigen Implementierung kann es auch dazu kommen, dass Daten sowohl im native als auch im introduced Bereich des CondensedDistributionString auftreten, aber mit einem eigentlich nicht passenden Symbol.
Für das Beispiel Talinum paniculatum (http://test.e-taxonomy.eu/dataportal/preview/euromed/cdm_dataportal/taxon/3f28aea3-829f-46dc-957a-9991c30050f4) ergibt sich z.B.
-Md(??M) [aAu(A) pAz(aF aP) aHu -Md]

AM

Das tritt primär beim Status "undefined" auf. Dieser wird in Zukunft grundsätzlich nicht mehr im CondDistStr angezeigt werden (#9500), daher ist das Problem inzwischen relativ, es wäre aber sinnvoll nach solchen Fällen zu suchen die nicht mit "undefined" zu tun haben (s. auch #9501).

Actions #39

Updated by Andreas Müller about 3 years ago

This should be fixed. Only code cleanup is needed.

Actions #40

Updated by Andreas Müller about 3 years ago

  • Related to bug #9526: Sort order in E+M distribution string should be strictly alphabetic added
Actions #41

Updated by Andreas Müller about 3 years ago

  • % Done changed from 50 to 100

Code cleaned-up as far as time for this existed. A followup ticket with an open issue was created: #9526

Actions #42

Updated by Andreas Müller about 3 years ago

  • Status changed from Resolved to Closed
Actions #43

Updated by Andreas Müller about 3 years ago

  • Copied to bug #9583: Fix formatting of parent area in condensed distributions string if subareas have various status but at least 1 area has status native added
Actions #44

Updated by Andreas Müller over 1 year ago

  • Related to feature request #10210: UI for configuring condensed distribution string via separate parameters added
Actions #45

Updated by Andreas Müller 11 months ago

  • Related to feature request #10330: Handle term tree distribution status for distributionInfo in dataportal added
Actions

Also available in: Atom PDF