Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,369,432
Community Members
 
Community Events
168
Community Groups

Prevent Listeners when editing via API

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

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

Atlassian Community Events