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".
Community moderators have prevented the ability to post new answers.
Darren,
You can create a custom listener that sends an email via script runner. No need to develop your own plugin for this.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think you'll need a listener
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.