Forums

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

Use Automation to add a comment that tags multiple users within a field

Michael Cole November 11, 2020

Hi there,

I'm trying to use automation to leave an internal comment that tags both the assignee and the task's approvers if the SLA is going to breach soon. I can't figure out the code to use though to have the comment tag the approvers if there are multiple approvers.

Right now this is what the comment looks like:

Hey [~accountId:{{assignee.accountId}}],

This ticket will breach its SLA in 2 hours. Please respond to the customer before our standard response time passes.

Approvers: [~accountId:{{approvers.accountId}}]

Cheers,
Your friendly automation bot

The approver's output is a link that ends in atlassian.net/people/5e725189d6e3cc0c3dda032f,%205f32e7d23aa35b003fd05e01, which is just both accountId's with a comma separating them.

Does anyone know the proper way to handle user picker fields with multiple users?

Thanks,
Michael

1 answer

1 accepted

7 votes
Answer accepted
Hana Kučerová
Community Champion
November 12, 2020

Hi @Michael Cole ,

welcome to the Atlassian Community!

Please try something like this:

{{#approvers}}[~accountId:{{accountId}}]{{^last}},{{/}}{{/}}

 There is a great article about smart values and lists, I found the information there.

Michael Cole November 16, 2020

This worked perfectly! And thank you for the article. I wasn't sure where to look in the documentation since I'm not familiar with some of the Jira terms yet. I'll give this a thorough read-through.

Like # people like this

Suggest an answer

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

Atlassian Community Events