Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Event on Jira issue create/update

Nikhil_Tyagi April 26, 2020

Hey,

 

Is it possible to create a PRE-event on a Jira issue create/update acitivity. basically what i need is whenever someone tries to create or update a Jira issue which is of a particular issue Type then my listener should be called to validate few custom fields. If the validation is failed then the event should be cancelled and the user should not be able to create/update issue. 

 

Please advice.

 

Thanks,

1 answer

1 vote
Nic Brough -Adaptavist-
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.
April 26, 2020

No, there's no way to do this.  Also, a listener is the wrong place to do this - they happen after the issue is updated, it's too late to do any validation.

You should do this in a validator on the create transition for the issue type.

Nikhil_Tyagi April 27, 2020

Hey @Nic Brough -Adaptavist- ,

Thanks for the prompt response on this.

Can you point me to some doc or any example on how to do this? 

Nic Brough -Adaptavist-
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.
April 27, 2020

How are you planning to create the validator?  There are only a couple off-the-shelf with plain Jira, so the question is are you going to add a plugin to provide one, write an app to do it, or look at one of the scripting or automation apps?

Nikhil_Tyagi April 29, 2020

I would prefer doing it via plugin. Can you point me in the right direction as to how to do it?

Nikhil_Tyagi May 7, 2020

@Nic Brough -Adaptavist-  hey pinging back to see if you saw my message. i've been going over docs but couldn't find anything. Any help would be greatly appreciated.

Nic Brough -Adaptavist-
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.
May 8, 2020

Go to "manage apps" in admin and search for the app that provides the validator you want to use, and install it.

Then go to your workflow and edit it, clicking on the "create" transition arrow.  It will pop up a box with transition properties, including a tab for validators.  Go to that tab, click "add" and select the validator you want to use.  It will probably ask for some config, so give it that, save it and publish the workflow (if it were a draft)

Suggest an answer

Log in or Sign up to answer