It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Confluence label change depending on issue epic link.

Hey

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

1 answer

0 votes
Dominic_Lagger Community Leader Jan 15, 2020

Hi @Rafał_Grochala 

Since you are on confluence server, you could implement your own user macro

There you could check the epic state and display with HTML and CSS your state in which color you want :) 

Regards, Dominic

Thanks!

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 = "")




$jiraBaseUrl/issues/?jql=project=$projectKey%20AND%20"Product%20Name"~"$productName"|count=true

Any ideas on how to tackle this? 

Dominic_Lagger Community Leader Jan 16, 2020

Hi @Rafał_Grochala 

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. 

Regards, Dominic

Like Rafał_Grochala likes this

Sure!

I'll try some experiments with Jira REST API Calls, and let you know how i figured this thing out. 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Confluence

What project did you transition or start on Confluence with the shift to remote work?

It’s been great to hear from fellow users over the last few weeks about the best tips and fun moments you’ve had working on Confluence since the transition to working remote. I’d love to keep the c...

397 views 11 11
Join discussion

Community Events

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

Events near you