Forums

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

Contol the trigger of postfunctions

Pascal Müller January 17, 2012

Hi there

Is it possible to prevent the postfunctions from beeing triggered, when updating an issue technically?

The following situation:

If someone changes an issue on the GUI, a postfunction shall be triggered (as usual). I do catch those with a listener in the plugin. But i'd like to prevent Jira from triggering a postfunction when i change an issue within the plugin. Is that possible? A found out, that it is possible for attachments and comments, but also for all the other (and custom-) fields?

Many thanks in advance!

br, muellae

2 answers

1 vote
MattS
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.
January 19, 2012

Looking at the code I recall seeing where the transition occurs and where the post functions get called. You could customize that to avoid calling the post function, or customize the post function to do nothing, or even more easily add a duplicate transition that doesn't have the post function.

~Matt

0 votes
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.
January 17, 2012

How would you handle the "how do I know whether to run the post function or not" question?

Pascal Müller January 17, 2012

I thought, there must be some kind of a parameter, which indicates that.

the problem is: when I have this Listener called, I'd d like to update some fields on the issue. But this triggers the listener again and makes it kind of recursive. And I'd just like to prevent to trigger this event again.

Or, not sure if I missunterstood the question now?

Suggest an answer

Log in or Sign up to answer