Forums

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

Appending a comment with Jira Automation Multiple times

Michael Savedra July 27, 2022

Hi!

I'm trying to add a comment form jira automation that will highlight any missing fields required for a particular process. 

For example when a ticket is raised, there could be a comment added (Missing fields:) follwied by separet advanced compar "If" conditions that will check if each required field is empty and if so will edit comment with "{{issue.comment.last.body}} + Field name to create a list of the missing fields. 

This problem i'm having is that {{issue.comment.last.body}} always uses the value from the original comment and does not account from any additional edits from the previous conditions in the automation. Even when I re-fetch data after making the first comment edit. 

Screenshot 2022-07-27 at 12.31.28.png

As a further example, final comment left by this automation would be {{first  comment}} + Last Name and the first name would no longer be present. 

Any workaround for this?

thanks in advance!

1 answer

1 accepted

1 vote
Answer accepted
Piotr Zadrożny _Eyzee_
Community Champion
July 27, 2022

Hi @Michael Savedra 

You can try:

chrome_40nBLwSjJY.pngchrome_Phn3Mv0nJi222.png

You can also for example create a variable to store comment body value and save it as the last comment body at the end of the rule.

Can you please describe your requirements here and why you need such comment anyway? Maybe your requirement can be met differently...

 

Best

Piotr

Michael Savedra July 27, 2022

Thanks Piotr, 

 

That's done the trick. 

 

Out of curiosity how does one create a variable within the automation?

 

Thanks

Piotr Zadrożny _Eyzee_
Community Champion
July 27, 2022

There is an action "Create Variable", so you can change your rule to something like the following:

all.png

Variable initialization details:

initialization.png

To change the variable value you just use the same action component "Create Variable":

changeVariableValue.png

Best

Piotr

Michael Savedra July 27, 2022

That's very handy to know, hadn't spotted that before. 

 

Many thanks!

Suggest an answer

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

Atlassian Community Events