Display linked issue list in comments

Gabrielė Vlasova September 13, 2022

Hey!

I've set up an automation that's supposed to list all of the resolved linked issues in the comments of the main issue (split from / split to) for the customer to be aware.

At first it seemed that the automation works perfectly, however, I've now noticed, that when there's more than one linked issue, only one of them is displayed with a link and there's only the ticket number for all of the remaining ones. 

Screenshot 2022-09-13 at 17.41.44.png

Screenshot 2022-09-13 at 17.44.39.png

Is there anything I can do to have a proper list with all of the linked issues and their URLs?

Thanks!

3 answers

1 accepted

0 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 13, 2022

Hi @Gabrielė Vlasova 

I reproduced the same symptoms using {{issue.issueLinks}} and the lower level smart values {{issue.issueLinks.inwardIssue}} and {{issue.issueLinks.outwardIssue}}

So this appears to be a defect, and I recommend working with your site admin to submit it to Atlassian.  I did not find any similar defects in the public backlog.

As a work-around, I tried writing these with HTML as comments to explicitly add them as smart links but that did not work with the comment markup not recognizing the HTML.

Kind regards,
Bill

Gabrielė Vlasova September 28, 2022

Hello @Bill SheboyThanks a lot for looking into this.

Do you think there's another way of providing the whole list of linked issues (Split to) and each linked issue status? The link is not necessary. My goal is to find a way to display the issue summary and the status to keep the customer in the loop. For example: 

LT 🇱🇹 – Resolved
UK 🇬🇧 – In progress
etc.

Thank you!

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 28, 2022

Please try this to include just the summary and status name values for each of the inward and outward links.  Just iterating on issueLinks will not work for this case.

{{#issue.issueLinks.inwardIssue}}{{summary}}: {{status.name}}{{^last}}, {{/}}{{/}}
{{#issue.issueLinks.outwardIssue}}{{summary}}: {{status.name}}{{^last}}, {{/}}{{/}}

I added a comma-delimiter between the items.

Like Tomas Slavkovsky likes this
Saira August 7, 2023

This method just combines all the linked issues into one long line and does not split into each issue 

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 7, 2023

Hi @Saira 

The original question was to list the issues, and no more.

Do you have an additional want / need?  If so, I recommend creating a new question of your own, including images of your complete automation rule, the audit log details showing the rule execution, and to describe what is not working in your rule as you expect.

Kind regards,
Bill

Saira August 7, 2023

well, it's a similar issue - but when i use the following lines of your code in my json file , the result is that all the related linkes are concatenated into one long line - that line looks like a link on a confluence page, but that isn't really a link

this is the code i copy pasted into my json file. 

{{#issue.issueLinks.inwardIssue}}{{summary}}: {{status.name}}{{^last}}, {{/}}{{/}}
{{#issue.issueLinks.outwardIssue}}{{summary}}: {{status.name}}{{^last}}, {{/}}{{/}} 

 When the Confluence page is generated, it looks like the attached snapshot. You can't really go to that link, though it appears like a link. 

Saira August 7, 2023

Screen Shot 2023-08-07 at 3.15.25 PM.png

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 7, 2023

Please note that only the summary and status name are in that expression.  I believe you need to supply the issue key (and / or HTML markup with the url field) if you want the link to be available.

Saira August 7, 2023

can you provide sample code for that? 

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 7, 2023

Please try adding {{key}} to the expression, perhaps ahead of {{summary}} for Confluence to recognize this as an issue link.

Saira August 7, 2023

This is what I have - but still no luck

 

{{#issue.issueLinks.inwardIssue}}{{summary}}: {{status.name}}:{{key}} {{url}}{{^last}}, {{/}}{{/}}{{#issue.issueLinks.outwardIssue}}{{summary}}: {{status.name}}{{^last}}, {{/}}{{/}}

 

It just appears as one long concatenated link - which is a link that leads nowhere

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 7, 2023

As a reminder, automation rules require learning and experimenting.  I recommend trying a hard-coded issue key first to confirm your Confluence page building syntax is correct before adding content from the issue links.

The Confluence macro you are using appears just to be for a single issue key.  But you are passing a list of summaries, status names, and keys.

Once you have the page build working for a single key, you will repeat the macro structure inside of the iterator for the linked issues.  For example,

{{#issue.issueLinks.inwardIssue}} code to create the macro for the issue {{key}} code to close the macro for the issue {{/}}

If this does not help, please work with your Jira site admin to submit a ticket for contact with the Atlassian support team.

0 votes
Saira August 12, 2023

Thanks, just out of curiosity, is there a way to filter on {{issue.issueLinks.outwardIssue}}? like what if i want to find only the linked  issues that belong to a given project? So something like {{issue.issueLinks.outwardIssue.project....}} 

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 12, 2023

Hi, @Saira 

Please create a new question when you have a new question...rather than adding more questions to an existing thread.

In the meantime, please read about smart value, list filtering here to do what you asked: https://community.atlassian.com/t5/Automation-articles/Filtering-smart-value-lists/ba-p/1827588

Kind regards,
Bill

0 votes
Elyes Gannoun _Elements_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 2, 2022

Hello @Gabrielė Vlasova ,

I'm Elyes, a Product Manager at Elements.
If you are fine using a marketplace app, we can answer differently your need of seeing only resolved linked issues portal with our new codegeist winning application.

You can specify which linked issues, based on a JQL, you want to display, and even configure which fields to show.

Elements Overview - custom display for related issues

Get direct access to related issues (linked or matching a JQL), and more:

  • Display related issues on the customer portal
  • Display relevant data from related issues
  • Edit custom field values directly from an overview
  • Transition related issues without changing context
  • Choose which location suits you best (Issue panel or in the Glance view)

Try it out! And if needed, you can read our documentation, reach out to our support team or share your feedback with me.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events