Forums

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

How to automate an email notification for a Custom Assigned Field on a transition screen

Deanne Wilson
Contributor
July 23, 2021

We have added a new status in our workflow called Code Review that is triggered when we change the status from In Progress to Code Review and before Work Completed. On the transition screen, we have created a custom field (user pickler- single user) called Code Review Assigned. The idea is to have one of the senior developers or dev management review the code for the developer. We do not want to override the original assignee field so that we know who the developer working on the ticket is. 

Expected Behavior: We would like the Code Review Assigned to receive an email when they are assigned. We do not want to default to one person because there are many different people who can review the code depending on the issue.

We couldn't find automation that allows this, now could we nor a post function in the workflow.

Any thoughts on how to do this?

Please advise and thank you in advance.

 

In Progress to Code Review Transition Screen.png

2 answers

0 votes
Boris Berenberg - Atlas Authority
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.
July 26, 2021

You could use a combination of JQL and our app Notification Assistant for Jira for exactly this. Set your custom field as the recipient, and then adjust the JQL to limit the notification to the right tickets. Then set the trigger as Field Updated and pick your code reviewer field.

0 votes
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.
July 23, 2021

Hi @Deanne Wilson 

An alternative to this is to have people pair with the senior engineers until everyone in a dev role can review anything, making this much simpler to do... For your specific question:

There is an open suggestion in the backlog to support your use case: https://codebarrel.atlassian.net/browse/AUT-273

Until something like that gets implemented you could try some more complicated work-arounds with automation for Jira rules:

Re-use the assignee field temporarily

  • create a rule which...is triggered as you wish...
  • save the assignee in a created variable (e.g. varRealAssignee)
  • use round-robin assignment to assign your code reviewer (it will save in assignee)
  • re-fetch the issue
  • save the assignee (which is the code reviewer) to another created variable (e.g. varCodeReviewer)
  • edit your custom Code Review Assignee field to the created variable, varCodeReviewer
  • edit your assignee to set back to varRealAssignee
  • send your email to varCodeReviewer

The re-fetch is key in order to get this to work.

Manually re-create round-robin assignment (if you have only a few reviewers)

  • use LookupIssues and JQL to determine how many issues Reviewer A has open
  • save this count in a created variable (e.g varReviewerACount)
  • repeat the above two steps for each reviewer
  • use if/else conditions to determine who gets the next review
  • set the Code Review Assignee
  • send your email

Both of these ideas have a lot of moving parts, so if you try them I suggest writing to the audit log a lot for testing.

Best regards,
Bill

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