Unable to assign Priorities to Card Colours in Jira Software Board

Still need help?

The Atlassian Community is here for you.

Ask the community

This article only applies to Atlassian's server products. Learn more about the differences between cloud and server.





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

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.

    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.

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

    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 performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

    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


Description
Product
Last modified on Feb 25, 2019

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.