How to implement Notification based on field value

SRIDHAR July 30, 2012

I have a radio button

Gender : O male O female

When male is selected then an email needs to be sent to a person A .

2 answers

1 vote
ROGER PICKETT February 20, 2014

You might also check the addon Notification Assistant for Jira. This is resident functionality for this addon and it is relatively cheap: $1 per user

1 vote
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 30, 2012

You'll need to write some code to do this - Jira sends email based on "events", not fields, so you'll need to write a listener to pick up the changes, make the decision and go from there.

However, there is one trick...

If you define groups of users (even if there's only one person in each group) called "male" and "female", you can include the group in the notification scheme (send mail to group custom field).

Chrisjir Parkin June 10, 2020

Wouldn't you still need some scripted logic to decide which group to send to? 

Let's imagine that I include a Group or Role in a notification scheme.  For a given event, the notification scheme will always notify that same group.  There's no way to notify a group conditionally without additional logic, right?  (Note: I'd love to be wrong about this)

However, there is a way to Notify Component Lead, and there can be a different lead for each component.  The user would have to know which component to pick, though, in which case the user might as well choose whom to notify from a multiple user picker.

Ultimately, what would be very useful is to have Jira notify just one out of many Roles based on the value of a drop-down list in another field.  This would also allow us to separate the name of the Role from the drop-down choices in the evaluated field.  So, the latter could be a list of familiar names (purchase, travel, office supplies, ...) and the roles could be the names of groups who approve such things (business office, travel department, administration, ...).  

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 10, 2020

No, you don't need extra logic.  I should have explained the last bit a bit more (albeit 8 years ago).

Jira has a custom field with a type of "group picker".  If you have one of those, and you select a group in an issue, you can tell the notification scheme "on event, notify the people represented by the data in a custom field" - when you try to add that type of notification, it will ask you to select from all the user and group picker type fields in the system.

The user would need to know what group to pick from the group list though.

Like Chrisjir Parkin likes this
Chrisjir Parkin June 10, 2020

Ideal.  Thank you.

Suggest an answer

Log in or Sign up to answer