Trying to display resolved linked issues in the ticket comments via automation.

Helen C
Contributor
October 8, 2024

Hi 

I have an automation to put a comment on the Jira SM ticket whenever a linked Jira Software ticket is transitioned to resolved. This works nicely but in the comment I cannot get my syntax right and really needs some help. I want it to display the linked tickets that are in a status of resolved as a link. 

I can get it to display all linked issues whether resolved or not using {{issue.issuelinks}} but I actually only want the ones that are resolved. 

I have tried a few things with the latest being  :

{{#issue.issuelinks}}{{#if(equals(type.outward,"is resolved"))}}{{outwardissue.key}}{{/}}{{/}}

which I found on the atlassian pages. Rule works without error but fails to display any linked issues. 

Can Anyone help me please with what to put to get only the linked issues with a status of resolved? 

Thanks 

Helen

2 answers

1 vote
Manoj Gangwar
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 8, 2024

Hi @Helen C you can try below syntax and check. 

{{#issue.issuelinks}}

  {{#if(equals(issueLink.outwardIssue.fields.status.name, "Resolved"))}}

    [{{issueLink.outwardIssue.key}}|{{issueLink.outwardIssue.url}}]

  {{/}}

{{/}}

 

0 votes
Helen C
Contributor
October 9, 2024

Hi @Manoj Gangwar 

Thanks for this I have tested your suggestions and the rule does work but it still does not give the resolved links. The comment looks fine otherwise. 

Noting I opened a fresh JSM ticket and created a fresh linked Jira SW ticket, turned the rule on then resolved the Jira SW ticket and got the comment minus the links. We are JSM Cloud premium and audit log shows success

Cheers 

Helen

 

Suggest an answer

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

Atlassian Community Events