I would like to send an email to a watcher upon changing a custom field to a specific selection

Darren Weaver September 21, 2016

I would like to send an email to a watcher upon changing a custom field to a specific selection.

Context:

I have a field called "approval" which is a multi selection list set to a default of "not requested".  As part of my workflow I created a transition from and to the development complete status so that the user could click "request code review". 

I would like a notification to be sent to a group of people when the custom field is set to "requested". 

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
joachimbollen
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.
September 22, 2016

Darren,

You can create a custom listener that sends an email via script runner. No need to develop your own plugin for this.

0 votes
GabrielleJ
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.
September 21, 2016

JIRA Listeners can listen to certain events like the "Issue Updated" event that can basically do everything (technically) you want whenever there's a change to a ticket.

The most basic way to do this (without add-ons, scripting) is to remove the "Approval" custom field on the Edit screen and put that field in a transition screen (you can create a global transition so that it can be available on any status). For that transition, put a post-function to do whatever you want.

0 votes
Joe Pitt
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 21, 2016

I think you'll need a listener

Darren Weaver September 21, 2016

I'm not necessarily that comfortable with creating a listener however I do have several plug ins that I use like groovy script runner, etc.  Can I use one of those to do something?

 

Joe Pitt
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 21, 2016

I don't know. I stay away from listeners and scripts because of potential problems supporting them in the future. Gabrielle's solution works with built in functionality and is what I've done in the past for approvals  

Darren Weaver September 21, 2016

even if I do a post condition I still have no good method to send an email upon selection of a specific value in a custom field. 

Joe Pitt
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 21, 2016

If the value is selected during the transition you are correct. If it is preexisting you can use a validator to select one of two transitions. On the one for the special value fire a custom event and setup the notification scheme to send to a special role. You'll need to create that role and assign the person to it also. You DO NOT want to specify a particular user because when they leave you'll need to modify the transition. And best practices is you never do anything based on a particular user, always a role or group. Much easier to maintain in the long run.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events