Update trigger

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

3 answers

0 votes

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 Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

899 views 3 9
Read article

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