Unable to assign Priorities to Card Colours in Jira Software Board
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
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.
*Fisheye および Crucible は除く
問題
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"
診断
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;
原因
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.
回避策
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:データベースの変更を行う場合は必ず事前にバックアップを取得してください。可能な場合は、まずステージング サーバーで SQL コマンドの変更、挿入、更新、または削除を行うようにします。
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