Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Is it possible to parse a comment for a username and update the assignee of that ticket to that user

Zach Schuett August 8, 2020

Anytime a Grafana alert is thrown, a Jira ticket is created. Currently, we acknowledge the alert in Grafana, which submits an internal note to the ticket that lists who acknowledged the alert for tracking purposes. After the acknowledgement is complete, we move to the Jira ticket and manually assign it to ourselves. 

My question is, is there an automation that can be made with the Jira Project Automation tool that grabs the username of the person that acknowledges the Grafana alert from that internal note, and assigns the ticket to that person automatically? I am having trouble finding a solution for this issue. 

I am hoping that I may use Smart Values for this solution, but am not sure the syntax to check the internal note field.

Maybe something like :
{{issue.activity.internalnote}} ? 

1 answer

0 votes
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 10, 2020

Hello @Zach Schuett

Welcome to the Atlassian Community!

Per your description, I understand that you have some kind of integration between Jira and Grafana, where an internal note is automatically added to the related Jira issue when the alert is acknowledged in Grafana. Now, you want the same alert acknowledgment to also assign the issue to the user that acknowledged the alert. Is that correct?

I must confess that I don't know exactly how this integration between Jira and Grafana works or what kind of connections/links it has with actions and users, however, here are some smart values that could help you achieve your need using Jira Automation:

  1. {{initiator.accountId}} - This Smart value will collect the user that triggered the automation. If your internal note is added by the user that acknowledged the alert in Grafana, this automation rule might work:
    Screen Shot 2020-08-10 at 12.15.41.png
  2. {{comment.author.accountId}} - This one uses the same logic from the rule above, selecting the user that added the comment
  3.  To extract a user mentioned in the comment body, you can use the following smart value:
    {{issue.comments.last.body.match("(\[~accountid:.+\])").remove("[~accountid:").remove("]")}}
     

P.S: The suggestions provided above can be applied using the new Jira automation. You can find it by navigating to your project > Project settings > Project Automation (Not automation).

Let us know if this information helps.

Suggest an answer

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

Atlassian Community Events