Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,458,191
Community Members
 
Community Events
176
Community Groups

Display linked issue in comments

I want to leave a comment to inform the reporter of linked issues. 

Something like:

Hello, your issue has been moved to another project's backlog. Please follow all future progress in issue _______. 

Where ________ is an existing linked issue to the current issue where the comment is being left.


I have tried many smart values but am striking out. Please help! :) 

3 answers

1 accepted

1 vote
Answer accepted
Stefan Salzl Community Leader Mar 11, 2022

Hi @Ryan Gill ,

to really find a solution that matches exactly your needs please specify your use case in more details and from a functional perspective. 

Best
Stefan

Hello Stefan

Here is my use case: 

I have a Jira Service Management project which is being used to triage issues before sending them to other projects.

There are workflow transitions that contain a post-function that use Jira Misc Workflow Extensions to create a new issue in another project, and link the new issue to the existing service management issue.

Once the transition to the "Send to Project X" status is done, there is a Jira Automation rule set to update the status of the issue in Jira Service Management to be "Sent to another project" (status type: done/green).

I want, via Jira Automation, for a comment to be left on the Jira Service Management issue, where a message informing the reporter of the Jira Service Management issue that their issue has been triaged and transferred to another project, and inform them of the new key of the issue where they can follow future work on their request by a development team.

Thank you for your help!

Stefan Salzl Community Leader Mar 13, 2022

Hi @Ryan Gill 

As far as the linking is already made by the workflow post-function the automation rule only needs to react to trigger of "issue linked". This will also take the source issue into context (which as far as I got it right will be your Service Management issue). The destination issue in this case is the newly created issue (see inward-outward link description). Therefore the following rule should do the expected work (just took the problem/incident linking, that needs to be configured according your requirements/linking types):

image.pngimage.png

Please keep in mind to configure the rule as multi-project or global rule as it is considered to operate in more than 1 projects.

Best
Stefean

Like Ryan Gill likes this
Stefan Salzl Community Leader Mar 17, 2022

Hi @Ryan Gill 

Did the suggested approach work?

Best
Stefan

Hi @Stefan Salzl , this worked perfectly!

I made it a global rule, but added an if condition to make it apply to a single origin project for the time being. Thank you very much. 

Like Stefan Salzl likes this
1 vote
Sam Harding Atlassian Team Mar 20, 2022

Hi @ryan

The other commenters here have left great suggestions which you can explore. One other method is to use the smart value `{{issue.issuelinks}}`. This provides a list of the issue links on an issue you can use in smart values. For example, the smart value

`{{#issue.issuelinks}}{{type.name}} - {{inwardIssue.key}}{{/}}`

Will print out:

<issue type> - <issue key>

for each link on your issue. In your case, you may want to filter the issue links down to just the one which is type of "Moved to" or whatever the name is of the link. In that case, you could use smart value

{{#issue.issuelinks}}{{if(equals(type.name, "Moved to"), inwardIssue.key)}}{{/}}

This will filter down the issue links to just the issue key of the linked issue, just replace the "Moved to" to the name of the link type. Depending on how the link was created, you may need to replace the inwardIssue to outwardIssue, if you are seeing the wrong issue key being displayed.

Hope that works for you!

Cheers,
Sam

Hi Sam, I got Stefan's suggested approach working nicely, I will keep this in mind for future iterations 

Thank you for your response!

I used Sam's method for an automation when we add a link to an issue in a duplicate situation.  For our use case if issue A and B are duplicates and issue B has a link added to issue A with link type "duplicates"  the automation adds a comment on issue B informing the user that it's a duplicate of issue A.  This was the smart value code I used and it worked great.  Thanks, @Sam Harding for pointing this out.  I had not seen details about this smart value in the documentation.

{{#issue.issuelinks}}
Key: {{outwardIssue.key}}
Reporter: {{outwardIssue.reporter.displayName}}
Summary: {{outwardIssue.summary}}
Description: {{outwardIssue.description}}
{{/}}

0 votes
Mark Segall Community Leader Mar 11, 2022

Hi @Ryan Gill - First, be sure to consider that if your linked issues are on another project, you'll need to expand the rule scope to include those projects.  Here's how I'd handle it:

Perform a Lookup Issues action with the following query:

Issue IN (linkedIssues({{issue}}))

Then use {{lookupIssues}} in your comment.

Suggest an answer

Log in or Sign up to answer