Using jira automation, I am trying to extract the last commented customer in issues, excluding agents, and place this value in a custom field called "Last Commented Customer".
If you look at the json of one of my issues, you can see that customer comments contain the following attributes:
self: "https://xxxxxx/rest/api/3/issue/12345/comment/1234",
id: "1234",
author: {
self: "https://xxxxxx/rest/api/3/user?accountId=qm%xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
accountId: "qm:xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
emailAddress: "jon.doe@exampledomain.com",
avatarUrls: {
48x48: "https://xx.net/default-avatar.png",
24x24: "https://xx.net/default-avatar.png",
16x16: "https://xx.net/default-avatar.png",
32x32: "https://xx.net/default-avatar.png"
},
displayName: "Jon Doe",
active: true,
timeZone: "America/New_York",
accountType: "customer"
Notice the very last line has the value: accountType: "customer" (I redacted sensitive information)
How can i extract the last comment author ONLY if the accountType = customer for that user? If there is no comment containing an author where the accountType = customer, then i do not want the last comment author extracted. In other words, if an Agent makes a comment, the comment author should not be extracted. Any help would be appreciated! :)
I got it working. All i had to do was create a user condition stating "Initiator is a customer"
This automation rule extracts the last commented user, ONLY if the initiator is a customer (so if internal agents make comments, it will not run), and will edit a custom field called "Last commented Customer" with the comment author's email address using smart value {{comment.author.emailAddress}}
Well done, James!
I misunderstood and thought you generically were accessing the comments and not at the point of Issue Commented.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jamie Eliya
You may want to look at this article describing the new conditional processing for smart value lists. Seems like that could help with what you asked.
https://community.atlassian.com/t5/Automation-articles/Filtering-smart-value-lists/ba-p/1827588
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill,
Thanks for your response. Do you know how i would incorporate this into Jira automation?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.