Forums

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

Prevent Listeners when editing via API

David Harkins
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.
August 8, 2022

We have a simple script that updates the Organizations field using a WEB HTTP POST to the API from ScriptRunner. 

Looking for a way to prevent this update from firing Listeners. 

Can do this when updating custom fields, but the Organizations field does not seem to be updateable the same way.

 

def PayLoad = ["fields": ["customfield_10110": [OrganizationID]]]

OrganizationsUpdate.put(

            path: '/rest/api/2/issue/' + issue.key,

            contentType: ContentType.JSON,

            body: PayLoad

        )

1 answer

0 votes
Florian Bonniec
Community Champion
August 8, 2022

Hi @David Harkins 

 

Updating Organization trigger an event that is catched by the listener.

Is it should be possible to filter event trigger from the UI or RESt API if you are using a specific user for the REST API then in the listener filter on the user who trigger the event.

 

It seems to be possible from the javadoc.

https://docs.atlassian.com/software/jira/docs/api/7.6.1/com/atlassian/jira/event/issue/IssueEvent.html

 

Function getUser() 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events