[JIRA] creating issue --> specific notification depending on dropdown field content

Mathias Buchholz September 24, 2012

Hello,

it is planned to match an order process workflow with jira.

while creating an issue the user is forced to select the order group in a cascading select field.

Depending of the made selection different should get a notification.

integrating a select group field is not an option.

Is such mask content conditional notification possible?

---

an sample:

- creating project roles (carSeller, bikeSeller)

- creating cascading select field (seller --> car, seller --> bike)

selecting "selling car" --> with order creation the 'carSeller' should get an notification (and being on the watchlist - or at least mention list) [post-event]

(minimum clicks for users for creating issues --> minimum amount of errors)

1 answer

1 accepted

2 votes
Answer accepted
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.
September 24, 2012

Not without code.

Jira's notifications are based purely on events. Event happens, the notification system sees it, looks in the notification scheme to see who to mail, and mails them.

There is a "group field" option in the "who to send to" list, but I think you've spotted that and ruled it out because you need a cascading-select list.

Two options spring to mind, obviously needing code (and imagine me pointing and waving at Jamie's Script Runner plugin to make it a lot easier...)

  1. You're going to need to find/write a listener that can pick up the event, execute some decision code based on the content of your cascading select and send the mail outside Jira's standard notifications.
  2. A slightly different approach - find/write a post-function on the "create" transition that will pick up the cascading select content, work out a group to send it to, automatically populate a real "group select" field (one that you don't actually offer to the user on the create screen), set it to run before the "fire event". Then you can use that group select field in the notification scheme.
Mathias Buchholz September 25, 2012

Hello Nic,

thanks for fast replying. It is planned using LDAP, Microsoft Active Directory, for authentication. So it seems the second option isnt possible. Is there something similar using project roles?

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.
September 25, 2012

Eh? You can have groups in LDAP can't you? You need it to provide groups because otherwise you can't set up the basic "can log in" permission.

Mathias Buchholz September 25, 2012

oh, so i was reading wrong the manual non creating jira groups (just non creating LDAP groups). So i have to watch witch code i need. Thank you

Mathias Buchholz September 27, 2012

meanwhile i solved the issue:

- using Script Runner plugin, writing code with IDEA

- adding a post function to 'Create Issue'

- reading the cascading select field

- depending on selection adding specific user-group users to watch list

thanks a lot

Mario Günter
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.
February 11, 2015

Hi, it seems that this question is similar to my own question: https://answers.atlassian.com/questions/12266549/custom-script-runner-script---not-working-at-all May I ask you to check my code snippet?

Suggest an answer

Log in or Sign up to answer