Custom-Events / Notifications for Edit/Assign or any generic event for particular issue-type

Keshavan Babu May 26, 2016

This question is in reference to Atlassian Documentation: How To Send Notifications By Issue Type

This article speaks about custom event for "create issue" action only, but we are looking for triggering custom-events for generic actions like Edit, Assign or Comment for particular issue-type only, ex., Bug., which are not controlled through a workflow

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.
May 26, 2016

Those events are hard coded.  When you edit issues, an issue-updated event goes out, when you comment, you get issue-commented, and so-on.

You can associate different users with the different events to get emails.  But the edit/assign/comment etc actions will always fire the same events.

Keshavan Babu May 26, 2016

Our basic question is how do we enable these notifications (edit/comment/assign, etc.) for specific issue-types. We do not want to fire notifications for all issue-types, but only for "Bug" issue-type.

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.
May 26, 2016

Sorry, I did not explain that too well.  I said the events for issues are hard-coded.  I mean the events outside the workflow (edit, comment, log work, etc).  There's nothing you can do with those, the issue type is irrelevant.

Create, and the other events triggered in the workflow are customisable - if you have a workflow for bug, and another one for features, you can fire totally different sets of events.

The other thing that might be worth a look - editing the outgoing emails - if you're on server, it's really easy to add "#if (issuetype = x)" type blocks of code to them. 

Keshavan Babu May 26, 2016

The last suggestion sounds interesting and workable. Kindly provide more details on how to add these conditions for outgoing emails on the server-side.

 

On the other side, does Atlassian have a plan to introduce issue-type wise Notification Schemes, just like the Workflow Schemes wherein different workflows can be mapped to different issue-types?

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.
May 27, 2016

There's a good write up of editing email content at https://confluence.atlassian.com/jira/customizing-email-content-185729653.html

From memory, you probably need to insert things like

#if ( $issue.getIssueTypeObject().getName == "Bug")

  do stuff for bug emails

#else

  all the body of the original template

#end

Some of those calls might be wrong, I haven't memorised the API in full, and there may be better ways to write it, but it should get you started.

Suggest an answer

Log in or Sign up to answer