Project

General

Profile

Actions

bug #10313

closed

Default color of terms is not shown correctly in dataportal maps

Added by Andreas Müller about 1 year ago. Updated 29 days ago.

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

100%

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

Description

NoK:

fällt mir gerade mal wieder auf: Die Farben für die Status native und present sind nicht zu unterscheiden:
https://cichorieae.e-taxonomy.net/portal/cdm_dataportal/taxon/55309c20-e883-4ed9-bc8b-c85f56074e72 (Sachalin is "present")

AM:

stimmt, die sind sehr ähnlich.
Eigentlich sollte man im TaxEditor unter Windows/Extras-Terms-Voabulary-DistributionStatus und dort Auswahl des Terms mit Color im Details View einstellen können, was die default Farbe ist für den jeweiligen Status. Ich habe das für „present“ mal zeitweise auf rot gestellt, aber ohne Erfolg (auch nach CDM Server neustart). Auch für native wird das derzeitig eingestellte gelb auf den Karten nicht angezeigt.

Der Wert scheint also nicht richtig ausgelesen zu werden.

Eine weitere Möglichkeit, die Farben der Status im Portal einzustellen ist im Admin Bereich des Portals unter https://cichorieae.e-taxonomy.net/portal/admin/config/cdm_dataportal/settings/layout/taxon und dann unter Taxon profile und dann ganz unten unter „Custom status colors“. Dort habe ich jetzt mal {"p":"#00ff00"}
eingetragen. Es wird also reines grün angezeigt. Das scheint auch zu funktionieren, ist aber die weniger schöne Variante.

====

I make this a cdmlib issue for now as it is unclear if the problem is in DistributionInfo generation or on dataportal side.

It looks like the default color from term initialization is taken, not the one persisted with the term.
The same problem also exists for the maps in the TaxEditor, so it does not seem to be a dataportal issue.

====

after fixing this ticket reset settings in dataportal settings. Also make sure that colors in all dataportals are still the same as they currently are.


Related issues

Related to EDIT - task #10322: Use DTOs for portal taxon page (cont.)ResolvedAndreas Müller

Actions
Related to EDIT - feature request #4522: custom status colors not working in cyprus portalClosedAndreas Müller

Actions
Related to EDIT - feature request #10516: Use color picker to define distribution map colorsNewKatja Luther

Actions
Related to EDIT - bug #6217: Adapt colour mapping in dataportalsWorksformeAndreas Kohlbecker

Actions
Actions #1

Updated by Andreas Müller about 1 year ago

  • Description updated (diff)
Actions #2

Updated by Andreas Müller about 1 year ago

  • Description updated (diff)
Actions #3

Updated by Andreas Müller about 1 year ago

  • Related to task #10322: Use DTOs for portal taxon page (cont.) added
Actions #4

Updated by Andreas Müller 5 months ago

  • Target version changed from Release 5.49 to Release 5.47
Actions #5

Updated by Andreas Müller 5 months ago

Actions #6

Updated by Andreas Müller about 1 month ago

  • Status changed from New to In Progress
  • Priority changed from New to Highest
  • Target version changed from Release 5.47 to Release 5.43
Actions #7

Updated by Andreas Müller about 1 month ago

  • Description updated (diff)
Actions #8

Updated by Andreas Müller about 1 month ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 70

The problem was that the colors for 8 status were defined as defaultPresenceAbsenceTermBaseColors in DistributionServiceUtilities. This was to workaround the problem described in #4522. As the above setting had priority over the value defined in the status term itself the status term value had no impact when being changed (but only for these 8 status terms).

This could be fixed by fixing #4522 and removing DistributionServiceUtilities.defaultPresenceAbsenceTermBaseColors.

To not break existing portal coloring default values currently displayed in existing dataportals the default colors defined in the .csv file were replaced by the values use in DistributionServiceUtilities.defaultPresenceAbsenceTermBaseColors, but only if the old default values were still in place.

Actions #9

Updated by Andreas Müller about 1 month ago

Actions #10

Updated by Andreas Müller about 1 month ago

Actions #11

Updated by Andreas Müller about 1 month ago

Actions #12

Updated by Andreas Müller about 1 month ago

Update script still needs to be tested and commited. => done

Actions #13

Updated by Andreas Müller about 1 month ago

After release check colors. Especially those deviating from default

SELECT dtb.id, dtb.uuid, dtb.titleCache, dtb.idInVocabulary, dtb.defaultColor, dtb.vocabulary_id
FROM DefinedTermBase dtb
WHERE 
   dtb.uuid = 'cef81d25-501c-48d8-bbea-542ec50de2c2' AND defaultColor <> '4daf4a' # present 
OR dtb.uuid = 'ddeac4f2-d8fa-43b8-ad7e-ca13abdd32c7' AND defaultColor <> '4daf4a' # native
OR dtb.uuid = '310373bf-7df4-4d02-8cb3-bcc7448805fc' AND defaultColor <> '377eb8' # native: doubtfully native
OR dtb.uuid = '9eb99fe6-59e2-4445-8e6a-478365bd0fa9' AND defaultColor <> '984ea3' # cultivated
OR dtb.uuid = '643cf9d1-a5f1-4622-9837-82ef961e880b' AND defaultColor <> 'ff7f00' # introduced
OR dtb.uuid = '42946bd6-9c22-45ad-a910-7427e8f60bfd' AND defaultColor <> 'ffff33' # casual
OR dtb.uuid = 'fac8c347-8262-44a1-b0a4-db4de451c021' AND defaultColor <> 'a65628' # introduced: cultivated
OR dtb.uuid = 'e191e89a-a751-4b0c-b883-7f1de70915c9' AND defaultColor <> 'f781bf' # naturalised
;

SELECT id
FROM DescriptionElementBase deb
WHERE deb.DTYPE = 'Distribution'

SELECT dtb.id, dtb.uuid, dtb.titleCache, dtb.idInVocabulary, dtb.defaultColor, dtb.vocabulary_id
FROM DefinedTermBase dtb
WHERE dtb.uuid IN ('cef81d25-501c-48d8-bbea-542ec50de2c2','ddeac4f2-d8fa-43b8-ad7e-ca13abdd32c7','310373bf-7df4-4d02-8cb3-bcc7448805fc',
'9eb99fe6-59e2-4445-8e6a-478365bd0fa9','643cf9d1-a5f1-4622-9837-82ef961e880b','42946bd6-9c22-45ad-a910-7427e8f60bfd',
'fac8c347-8262-44a1-b0a4-db4de451c021','e191e89a-a751-4b0c-b883-7f1de70915c9')
ORDER BY idInVocabulary
Actions #14

Updated by Andreas Müller about 1 month ago

  • Priority changed from Highest to Priority14
Actions #15

Updated by Andreas Müller about 1 month ago

  • Priority changed from Priority14 to Priority13
Actions #16

Updated by Andreas Müller about 1 month ago

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

Works as expected in production

Actions #18

Updated by Andreas Müller about 1 month ago

  • Related to bug #6217: Adapt colour mapping in dataportals added
Actions #19

Updated by Andreas Müller 29 days ago

In E+M the color settings were moved from dataportal to database, using

{
    "p": "#9CDF00",
    "n": "#008000",
    "nd": "#00FF00",
    "nq": "#00c8b4",
    "f": "#FFFFFF",
    "in": "#C86400",
    "i": "#C89600",
    "ip": "#C89600",
    "ia": "#c8c800",
    "iq": "#ffc896",
    "c": "#ffff00"
}
Actions

Also available in: Atom PDF