Project

General

Profile

Actions

feature request #4522

closed

custom status colors not working in cyprus portal

Added by Andreas Kohlbecker over 9 years ago. Updated about 1 month ago.

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

100%

Estimated time:
Severity:
normal
Tags:

Description

custom status colors as to be set in http://flora-of-cyprus.eu/admin/config/cdm_dataportal/settings/layout/taxon#edit-distribution-status-colors

{
  "IN":"#339966",
  "IN?":"#39966",
  "CU?":"#bdb76b",
  "CA":"#ffff00",
  "CA?":"#ffff00",
  "NN":"#ff9900",
  "NN?":"#ff9900",
  "NA":"#ff0000",
  "NA?":"#ff0000",
  "Q":"#00ccff",
  "Q?":"#00ccff",
  "f":"#cccccc"
}

edit map service being used is v1.2 (others are not working at all)

==> the map is not displayed!!!

once this problem is solves and custom status colors can be used the hardcoded colors for cyprus in EditGeoServiceUtilities.getDefaultPresenceAbsenceTermBaseColors() should be removed


Related issues

Related to EDIT - bug #10313: Default color of terms is not shown correctly in dataportal mapsClosedAndreas Müller

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

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

Actions
Actions #1

Updated by Andreas Kohlbecker over 8 years ago

The cause for this issue is that the EditGeoServiceUtilities.buildStatusColorMap() is limiting the search for terms by IdInVocab to one vocabulary, this works well as long all status terms are managed in the default vocabulary, but it breaks for cyprus .

In a past commit the hardcoded colors have been removed from the code, this leads to areas filled with black color, since the default color is @000000@.

For now, the custom colors have been applied in the database to the terms itself and secondly the code in EditGeoServiceUtilities.buildStatusColorMap() has been adapted so that all PresenceAbsenceTerm Vocabulary are searched: 5454a90 r27015

Solutions:

A. replace the distribution status colors settging UI in the dataportal so that all status are listed as single form entry together with a widget to choose the color. JSON will no longer being used in this setting implementation. The term will be referenced by its UUID. The Service and Controller code must also be changed for this.

B. completely give up this way of defining the colors and put them into the cdm directly - much simpler but not as flexible and generic.

Actions #2

Updated by Andreas Müller over 8 years ago

  • Target version set to Unassigned CDM tickets
Actions #3

Updated by Andreas Müller 5 months ago

  • Description updated (diff)
  • Assignee changed from Andreas Kohlbecker to Andreas Müller
  • Target version changed from Unassigned CDM tickets to Release 5.47
Actions #4

Updated by Andreas Müller 5 months ago

  • Related to bug #10313: Default color of terms is not shown correctly in dataportal maps added
Actions #5

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
  • % Done changed from 0 to 10
  • Private changed from Yes to No

Is this duplicated by 10313?

Actions #6

Updated by Andreas Müller about 1 month ago

  • Tags set to performance
  • Status changed from In Progress to Resolved
  • % Done changed from 10 to 60

Cyprus does not have 2 vocabularies for distribution status anymore therefore this ticket has reduced relevance. However, in future there might be other DBs using terms from other vocabularies. Therefore the possibility to use UUIDs instead of idInVocabulary has been introduced.

Actions #7

Updated by Andreas Müller about 1 month ago

Andreas Müller wrote in #note-5:

Is this duplicated by 10313?

It's less a duplicate than the reason for #10313. See #10313#note-8.

Actions #8

Updated by Andreas Müller about 1 month ago

Actions #9

Updated by Andreas Müller about 1 month ago

There is a follow up ticket for a better color picker: #10516

Actions #10

Updated by Andreas Müller about 1 month ago

  • Priority changed from Highest to Priority14
  • % Done changed from 60 to 90

still needs final testing

Actions #11

Updated by Andreas Müller about 1 month ago

  • Priority changed from Priority14 to Priority13
Actions #12

Updated by Andreas Müller about 1 month ago

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

Works as expected in production

Actions #14

Updated by Andreas Müller about 1 month ago

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

Also available in: Atom PDF