Jira Automation: how to copy description field from static issue to issue that triggers automation?

Yana V_ January 8, 2024

What I have now:

Screenshot 2024-01-08 092341.png

 

It's a simple rule: if the issue is moved to the review state by user_x, add a comment with specified text.

I have the template of the text saved in another Jira issue. When I need to make changes in the text, I need to change it both in the static template issue and the automation rule.

Is it possible to copy the content of the description field of Jira issue XX-YYYY when I add a comment to the issue that triggered automation? We are using Jira cloud.

2 answers

2 accepted

2 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.
January 8, 2024

Hi @Yana V_ 

I recommend an adjustment to your rule to do that with the lookup issues action:

  • trigger: issue transitioned
  • condition: checking the initiator
  • action: lookup issues with JQL to find your source issue, such as with
    • key = yourSourceIssueKey
  • action: add comment, referencing the data from the lookup
    • {{lookupIssues.first.description}}

 

Kind regards,
Bill

Yana V_ January 9, 2024

Thank you, Bill! It was really easy change to make

Like # people like this
1 vote
Answer accepted
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 8, 2024

Hi Yana,

I added a branch for the static key along with a variable (I used the description field, but you can use whatever your field is). 

Screenshot.png

Yana V_ January 9, 2024

Thanks, John!

Like John Funk likes this
Luis Villamizar March 7, 2024

Hi @John Funk ,

I'm trying to implement the same approach for when an Issue is created, but no success so far :( 

In this scenario, I have a Task (DRAFT-01) and I want to reuse the description from this task when a new User Story is created. 

 

Both Task and new user stories are under the same project, however they're no related in any other way. 

 

Would this be the right approach for this scenario? 

 

Screenshot 2024-03-07 at 11.54.46 pm.png

Yana V_ March 10, 2024

Hi, @Luis Villamizar; I ended up with this rule; maybe it will help you, too?

Screenshot 2024-03-11 073127.png

Like John Funk likes this

Suggest an answer

Log in or Sign up to answer