Fire an event that can be processed by the listeners

SSchoepel September 18, 2015

The title of my question is a post-function reference here: https://confluence.atlassian.com/jiracloud/advanced-workflow-configuration-735941233.html

 

But, I don't have that post-function. Where is it?

And, does it work on custom fields with usernames in them to send an email...when I finally have the post function?

1 answer

0 votes
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 18, 2015

There are five post-functions added to every transition automatically and they cannot be removed.  One of them is "fire an event".  Have a look at your post-functions and you'll see it there.  You will not be able to remove it either, all you can do is change the event to another.

Yes, it works on custom fields - you can put in a field like "cc these users", make it a user picker, and then refer directly in the notification scheme.

SSchoepel September 18, 2015

Sorry, I'm not getting it. I see the generic event. I can change it to "Issue Updated." Now I have to create a listener event?

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 18, 2015

No. There's no such thing as a "listener event". There are events, and listeners. Listeners listen for events and do things when they catch them. There is a listener built into JIRA that listens for all events and generates emails based on rules given to it in a notification scheme. I think this question is moving into "what are you trying to achieve?" territory - forget what JIRA is doing internally for the moment, tell us what you want to happen.

Like Anna likes this
SSchoepel September 18, 2015

Great, it might not be as complicated as I'm thinking it could be. I have two custom user fields to identify reviewers. When a "ready for review" transition is chosen in the workflow (and after the two users are added in the window), I would like to have JIRA email the people in the custom field that they were ID in an issue.

Like Anna likes this
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 18, 2015

Sounds like you're nearly there! I assume your custom user fields are either single or multi user picker fields (because they hold users as objects, which is what JIRA needs to be able to send email). The next bit is to look at the event fired by the "ready for review" transition. It doesn't really matter what event it is, but I would think about adding a new event type dedicated for this (so that you differentiate it from all the others and not share it). One last step - go to the notification scheme and find the event you have chosen for the post function. Add a recipient to that event and when it asks you who, look for "user custom field". That should offer you both of your reviewer fields, so add them. That should be it!

Suggest an answer

Log in or Sign up to answer