Forums

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

Using Assignee smart values in a "Add Comment" automation

Amelia Fraczkowski
Contributor
August 14, 2024

I am trying to assign a ticket automatically based on a issue transition trigger. The first two steps work no problem, however I am having problems with the "Add comment to issue" action.

The desired action I would like is whoever is chosen in step 2, receives a tag in a comment in step 3. However, the automation is not using this newly assigned person in the comment but rather whoever was the assignee before the issue transitioned. I tried using a delay between assigning the issue and posting the comment but this does not help.

2024-08-14 15_28_36-Rule builder - Automation - coneva Product Delivery - Jira and 48 more pages - W.png

 

I tried if the assignee is unknown before this automation happens then the account id in {{assignee.accountId}} is not filled in and thus, there is no tagging in the comment. --> 1st comment below

Then when there is someone assigned (myself in this case) before the automation is executed then the person who was the assignee is tagged in the comment. --> 2nd comment below

2024-08-14 15_34_14-[CPD-728] Ticket to test automation - Jira and 48 more pages - Work - Microsoft​.png

Is there another smart user value I should be using or need to adjust the automation rule in some way to get the newly assigned person in step 2 to be mentioned in the comment and not the previous assignee? 

1 answer

1 accepted

1 vote
Answer accepted
František Špaček _MoroSystems_
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.
August 14, 2024

Hi @Amelia Fraczkowski

 

this should be easily solved by adding action called "Re-fetch issue data" between Assign and Comment actions. this action will ensure previously set assignee is saved to the database and automation will work with newest values possible.

Have a nice day!

Amelia Fraczkowski
Contributor
August 14, 2024

Thank you so much, problem solved! :) 

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.
August 14, 2024

Hi @František Špaček _MoroSystems_ 

By default, the components of a rule (i.e., actions, conditions, branches) use the data loaded at the time of the trigger firing.  They do not automatically refresh as changes are made by the rule or any other updates (e.g., other rules, user entry, etc.).

The Re-fetch Issue action does not save data to the cloud storage.  The rule actions perform the updates of the cloud storage.  Instead, Re-fetch Issue reloads the current data from cloud storage before the rule proceeds.

Sometimes this is needed, as in the case of Amelia's rule, and sometimes it is not needed and may instead cause problems / errors in the rule.

Kind regards,
Bill

Suggest an answer

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

Atlassian Community Events