Update trigger

how do I fire an event upon an update of a field? Thanks.

3 answers

0 vote

You don't. Events are fired on all issue updates. The event contains a list of all changes, so what you do is catch any issue event and look for a change in the content of the field you are interested in.

Thanks for the quick reply, Nic.

Here is what I need to accomplish, there's a JIRA field and I want to validate the content based on some logic, before user can save the changes on the submit/update form. There are several validator plugin on the market, but I don't think they meet my needs. I think the only approach is to write a custom plugin in JIRA. Wondering how to get started on this.

Simple "get you started" answer - use the Atlassian SDK to write a validator plugin. I don't know how familiar you might be with coding, but start at https://developer.atlassian.com/display/JIRADEV/Workflow+Plugin+Modules for details on writing a workflow plugin such as a validator. If you've never looked at writing an Atlassian based plugin before, then you probably want to look higher up the page-tree for the getting-started guides too.

You might be able to use the script runner plugin instead of having to write your own plugin. I believe it supports the creation of custom conditions, validators, and post functions. Of course, this will only help you on workflow transitions - not direct edits. https://marketplace.atlassian.com/plugins/com.onresolve.jira.groovy.groovyrunner

Is it possible - without writing my own plugin - to catch every "Save" (Update) event and firing a script?

As I see it, events and notifications are only during transitions, but I would like to catch every "update" and fire a groovy script or similar - like creating a LISTENER to fire a Groovy/Jelly



No, and you're wrong about events and transitions.

Events are thrown by EVERY change to an issue. Not just transitions. Issue commented by comments (no transition there), issue update by any change of fields (no transition there), and so on...

And "no" because you need to write *something* to catch the events and trigger any actions. You don't necessarily need to write your own plugin - the script runner allows you to write listeners inside itself for example, but you still need to write something in there to perform any actions.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,242 views 14 20
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot