Automation rules seem to read previous value

Gerdi Olivier April 5, 2023

I'm busy setting up some automation rules to post comments to a parent if changes are made to the child's description. 

It works as intended, but it posts the description before the change is saved, and not the new value. How would I go about posting the new value, and not the old value?

SCR-20230405-h96.png

I've also tried {{issue.description}}. Any suggestions would be appreciated

3 answers

1 accepted

2 votes
Answer accepted
Gerdi Olivier April 5, 2023

For Linked Issue switches contexts the other ticket, so when it comments with a description, it will use the other ticket's description. 

The solution would be to put the new description in a variable before switching contexts. 
See screenshot in reply to Juan's comment

0 votes
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.
April 5, 2023

Hi @Gerdi Olivier 

If I understand your scenario correctly, you need to use the {{triggerIssue}} as the source of data to update the linked issues. 

 

The meaning of {{issue}} can change in a rule based on the rule structure.  For example:

  • trigger: some action  At this point, {{issue}} and {{triggerIssue}} refer to the same thing.
  • action: some action  At this point, {{issue}} and {{triggerIssue}} refer to the same thing.
  • branch: to some issues  At this point, {{issue}} and {{triggerIssue}} refer to the same thing.
    • action: another action  At this point, {{issue}} refers to the issue(s) branched-to and {{triggerIssue}} remains the original one.
  • action: one more action  At this point, {{issue}} and {{triggerIssue}} refer to the same thing.

 

And so for your scenario, you could the Comment action to just use {{triggerIssue.description}}

 

Kind regards,
Bill

0 votes
Juan Carlos Vera
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.
April 5, 2023

Hi @Gerdi Olivier ,

Try to put a "refresh" in the Automation,  Before the "FOR"

refr2.PNG

Hope it help you ;)

Gerdi Olivier April 5, 2023

Hey @Juan Carlos Vera 
Thanks for the suggestion, it pointed me towards the actual issue. 
So because the context was switched back to the parent ticket (with For Linked Issue), it posted the parent ticket's description instead of the child. 
This can be solved by first populating a variable before switching contexts. 
Screenshot of working solution below:SCR-20230405-i5o.png

Like Juan Carlos Vera likes this

Suggest an answer

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

Atlassian Community Events