Unable to assign Priorities to Card Colours in Jira Software Board
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Problem
Opening the Board > Configuration > Card Colours and try to select colours based on Priorities, will throw an error in the UI, eg:

The following appears in the atlassian-jira.log
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2019-02-15 12:23:50,951 https-jsse-nio-9443-exec-24 url:/jira/rest/gree.../strategy/priority username:normaluser ERROR normaluser 743x1319248x2 xxxxx123 103.30.185.173,192.168.3.103,10.164.152.108 /rest/greenhopper/1.0/cardcolors/2089/strategy/priority [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: For input string: "black"
java.lang.NumberFormatException: For input string: "black"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
at java.lang.Integer.valueOf(Integer.java:740)
at java.lang.Integer.decode(Integer.java:1197)
at java.awt.Color.decode(Color.java:729)
at com.atlassian.greenhopper.service.rapid.view.color.CardColorPalette.getDefaultColorForPriority(CardColorPalette.java:110)
at com.atlassian.greenhopper.service.rapid.view.color.CardColorQueryServiceImpl.attributePriorityValuesForBoard(CardColorQueryServiceImpl.java:316)
at com.atlassian.greenhopper.service.rapid.view.color.CardColorQueryServiceImpl.queryAndAttributeColorSettingsForBoard(CardColorQueryServiceImpl.java:274)
at com.atlassian.greenhopper.web.rapid.view.CardColorHelper.getColorModelForStrategy(CardColorHelper.java:140)
at com.atlassian.greenhopper.web.rapid.view.CardColorResource$2.call(CardColorResource.java:70)
at com.atlassian.greenhopper.web.rapid.view.CardColorResource$2.call(CardColorResource.java:66)
at com.atlassian.greenhopper.web.util.RestCall.response(RestCall.java:42)
at com.atlassian.greenhopper.web.AbstractResource.createResponse(AbstractResource.java:111)
at com.atlassian.greenhopper.web.AbstractResource.response(AbstractResource.java:91)
at com.atlassian.greenhopper.web.rapid.view.CardColorResource.getStrategyColors(CardColorResource.java:65)
Take note on For input string: "black"
Diagnosis
Diagnostic Steps
Note on
getDefaultColorForPriority
from the stack trace above, this suggests Priority color instead of Card color.Run the following SQL query to locate the incorrectly configured string, in this case, black.
1
select * from priority;
Cause
There is an incorrect string configured as the status_color value stored in the database for the priority table. It is unclear how the incorrect value was inserted.
Solution
Workaround
Steps to resolve the issue would be to perform the following.
Run the following SQL query to identify the ID of the affected priority
1
SELECT id,pname,status_color FROM priority where status_color = 'black';
Run SQL
UPDATE
of the following to resolve the issue:Always back up your data before making any database modifications. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.
1
UPDATE priority SET status_color='#000000' where status_color='black' and id='<retrieved from above query>';
#000000 - is the Color HEX for Black color
black - is the value from the ERROR stack trace in example above
Was this helpful?