I know that the topic might be misleading, but the case is a bit tricky, so sorry about that ;).
We've got the case where we have to display 3 states on confluence which is Red/Yellow/Green. (We are going to have 2 Epic Links in Jira Risk and Issue )
Whenever there is issue created in Jira with specific epic link the status/ label has to change on confluence space
ex. I have 1 issue with epic link named Risk, with that i want confluence status/label to change into yellow label (in more advanced case to display a chart with notification what issue is doing that)
If there are no issues with Epic Link Risk or Issue Confluence has to display Green Label
If there are issues with Epic Link Issue Confluence has to display Red Label
If there are issues with Epic Link Risk Confluence has to display Yellow Label
Although I managed to research a bit about those User Macros. I managed to create one that is showing me all the issues in a specific project but that's about it.
I'm going with the approach to base on issue count and on that to have a macro to display me status ( Change the Label of a space)
With that, I'm now stuck since I simply have no idea how to change it to display the numbers instead of a table of issues.
## @Param ProjectKey:title=Project Key|type=string|required=true
## @Param ProductName:title=Product Name|type=string|required=true
#set($projectKey = $paramProjectKey)
#set($productName = $paramProductName)
#set($jiraBaseUrl = "")
Any ideas on how to tackle this?
I would go another way with a JIRA REST API call.
For that, here is a community post, which helps you to create JIRA REST API call from confluence user macro: https://community.atlassian.com/t5/Answers-Developer-Questions/Jira-REST-API-Call-from-confluence-page/qaq-p/557196
With that, you can get the issue you want to analyze with the JIRA API, which is documented here: https://docs.atlassian.com/software/jira/docs/api/REST/8.5.3/#api/2/issue-getIssue
And then, you have to find the relevant fields and display your status with HTML and CSS.
User Macros are a little bit "try and error", so sorry for not sending you a proper user macro :) I would also have to try these things out.
Let me know, it this worked. If not, I try to help you with a proper macro, but for this I would need some time.
- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events