Details
-
Bug
-
Resolution: Fixed
-
Low
-
7.13.7, 7.18.1, 7.18.3
-
4
-
Severity 3 - Minor
-
Description
Issue Summary
Confluence "Jira Issue Macro" does not show status lozenge colour from Jira 9.0.0+.
This is reproducible on Data Center: yes
Steps to Reproduce
- Install Jira 9.0.0 with sample Software Project (e.g. named Test Project)
- Navigate to Jira Administration » Issues » Workflows
- Edit the Software Simplified Workflow for Project TP
- All the remaining Statuses with Allow all statuses to transition to this one for:
- CLOSED
- RESOLVED
- REOPENED
- OPEN
- Navigate to Issues » Search for Issues
- Transition a few tickets so there are tickets in each of the various statuses
- Install Confluence 7.18.3
- Connect the two as application links
- Create a new Confluence page with a Jira Issue Macro
- Use this JQL:
project = "TP" order by key
- Publish the page
Expected Results
The Jira Issue Macro should show the Status lozenge as these colours:
- Green (Done, Resolved, Closed)
- Blue (In progress)
- Grey (Reopened, Open, To Do)
Actual Results
The Jira Issue Macro shows all the Status lozenge in grey :
Data from Jira
- Jira Issue Macro end point:
- <Jira-Base-URL>/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?tempMax=20&returnMax=true&jqlQuery=project%3D"TP"+&field=summary&field=issuetype&field=issuekey&field=created&field=duedate&field=reporter&field=assignee&field=priority&field=updated&field=resolution&field=status&field=link&field=type
Jira Issue macro Rest End Point in Jira 7/8 returned:
<item> <link>http://localhost:47102/j7102/browse/TP-23</link> <key id="10022">TP-23</key> <summary>Test Issue Jira 7</summary> <type id="10001" iconUrl="http://localhost:47102/j7102/images/icons/issuetypes/story.svg">Story</type> <priority id="3" iconUrl="http://localhost:47102/j7102/images/icons/priorities/medium.svg">Medium</priority> <status id="10001" iconUrl="http://localhost:47102/j7102/" description="">Done</status> <statusCategory id="3" key="done" colorName="green"/> <resolution id="10000">Done</resolution> <assignee username="admin">admin</assignee> <reporter username="admin">admin</reporter> <created>Fri, 3 Jun 2022 04:33:30 +1000</created> <updated>Wed, 15 Jun 2022 13:08:30 +1000</updated> <due></due> </item>
Jira Issue macro Rest End Point in Jira 9 returns a different colorName value:
<item> <link>http://localhost:8900/j900/browse/TP-23</link> <key id="10022">TP-23</key> <summary>Test Issue Jira 9</summary> <type id="10001" iconUrl="http://localhost:8900/j900/images/icons/issuetypes/story.svg">Story</type> <priority id="3" iconUrl="http://localhost:8900/j900/images/icons/priorities/medium.svg">Medium</priority> <status id="10001" iconUrl="http://localhost:8900/j900/" description="">Done</status> <statusCategory id="3" key="done" colorName="success"/> <resolution id="10000">Done</resolution> <assignee username="admin">admin</assignee> <reporter username="admin">admin</reporter> <created>Mon, 4 Jul 2022 21:47:48 +1000</created> <updated>Sun, 17 Jul 2022 06:22:48 +1000</updated> <due></due> </item>
Workaround
- Create a new directory:
- <confluence-install>/confluence/templates
- <confluence-install>/confluence/templates/macros
- If Confluence is running on Linux, ensure the two new directories ownership and permissions matches the surrounding directories
- Create a new file called <confluence-install>/confluence/templates/macros/lozenge-utils.vm and populate it with this content:
#macro (lozengeClass $color) #if($color == "blue-gray" || $color == "default") aui-lozenge-default #elseif($color == "green" || $color == "success") aui-lozenge-success #elseif($color == "yellow" || $color == "inprogress") aui-lozenge-current #elseif($color == "brown") aui-lozenge-complete #elseif($color == "warm-red") aui-lozenge-error #else aui-lozenge-default #end #end
- If Confluence is running on Linux, ensure the file ownership matches the surrounding directory
- If Confluence is running on Linux, ensure the file permissions are 644 (e.g. chmod 644 lozenge-utils.vm)
- Restart Confluence for the change to take effect
- Reload the Confluence page containing the Jira Issue Macro and the change should take effect
If Confluence is running in a Cluster, apply the above change onto each Confluence DC node (one at a time)
If Confluence is upgraded to a newer version that is still affected by this bug, the above workaround will need to be manually applied after the upgrade.
Attachments
Issue Links
- has a derivative of
-
CONFSERVER-87601 Confluence "Jira Two-dimensional chart" does not show status lozenge colour from Jira 9.0.0+
- Gathering Impact
- is related to
-
CONFCLOUD-71617 Wrong Jira status colour in jira issue macro
- Gathering Impact
- was cloned as
-
CONFCLOUD-75958 Confluence "Jira Issue Macro" does not show status lozenge colour from issues linked from Jira DC 9.0.0+
- Gathering Impact