Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation - How comment linkedIssues

Julian Governale
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 12, 2020

Im setting up an automation rule to do the following.

  • On create issue check to see if other issues have a matching customer number (working)
  • Link issues with matching customer number back to the created issue (Working)
  • JQL for issues with same Customer Number (working)
  • Comment on issues returned in the JQL indicating the newly created issue has the same customer number, add link to trigger issue in comment {{triggerIssue.key}} (working)
  • Comment on newly created issue with issue keys to linked issues (Not working)

I cant get the last piece to work which is the newly created issue that kicked off the automation rule to have a comment posted indicating the other linked issues have the same customer number.

Ive tried multiple ways using the following smart value but none post the issue key into the comment - {{issue.fields.issuelinks.outwardIssue.key}}"

Any help would be appreciated.

Step 1

automationRule-1.jpg

Step 2

automationRule-2.jpg

Step 3

automationRule-3.jpg

Full Comment from step 3

automationRule-3-1.jpg

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Alexander Pappert
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 12, 2020

In step1 you create the links:
link type = ?

in step3 you try to geht the key of these links:
link type = outward

 

see also https://blog.codebarrel.io/how-to-use-the-linked-issue-trigger-in-automation-for-jira-1616b68c2d6e?gi=6ebd378e4ca3 

{{issue.issuelinks.outwardIssue.key}} 

 

can you use the "reload" function befor step 3?
maybe the link is there, but aotomation does not see it because you just created it

grafik.png

Julian Governale
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 12, 2020

Thanks for the response.  I added the re-fetch action but same result, was not able to pull the linked issues keys into the comment.  I tired the smart value you indicated as well but didnt work.  i was using outwardIssue in my smart value initially as that's where the data resides within the array when i run the end point from postman https://{{host}}/rest/api/2/issue/<issueKey>?expand=names

Im using the duplicates linkedIssue option but can really use any. Screen shot of newly created issue with the same customer number, blank linkedIssue key in comment. 

automationRule_test.jpg

Alexander Pappert
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 13, 2020
Julian Governale
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 13, 2020

@Alexander Pappert The destinationIssue smart value didnt work but it lead me to another thread by searching some key words fund in there which lead me to the smart value solution.  In essence, i didnt need the issue.fields step and once I removed .fields, I got the results I was looking for.   If you update your initial solution with a link the codebarrel article you had, i'll mark your answer as the solution.

https://community.atlassian.com/t5/Marketplace-Apps-Integrations/Can-I-link-issues-with-Automation-for-JIRA-when-I-create-a-new/qaq-p/2712 

Only caveat im seeing is that only the last issue has an active link in the comment. 

This ticket has the same customer number as {{issue.issuelinks.outwardIssue.key}} 

 automationRule_test-2.jpg

Like Alexander Pappert likes this
Alexander Pappert
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 13, 2020

@Julian Governale 

I updated my initial post

JD
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 15, 2020

Hey @Julian Governale ,

I don't know a lot about the outwardIssue smart value but you could try an issue lookup action and comment with the smart value. 

The smart value provides a list of issues as the result based on a JQL search. You can use the issue key and Jira should automatically convert it to a link (note I put a space after the {{key}} and the {{/}} ).

{{#lookupIssues}}{{key}} {{/}}

Screen Shot 2020-12-16 at 11.08.54 am.png

 

- John

Like # people like this
Julian Governale
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 16, 2020

Thanks @JD this is great as it add's links to all the Keys! Much appreciated. 

Mauricio Heberle
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.
July 22, 2022

Thanks !!

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events