Forums

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

Need help enabling behavior for ALL Projects and remove it for some selected projects

Apoorva Sharma
Contributor
June 30, 2023

Hello,

We are currently using ScriptRunner behaviors to enable them for 1 or 2 projects by mapping those projects to the created behaviors specifically. Or we can enable them to be mapped to All Projects.

But now we want to map some behaviors to all projects except from the 2 projects.

Can someone please provide any suggestion on how this can be done?

1 answer

0 votes
Radek Dostál
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.
June 30, 2023

You could use the IssueContext to get the project, such as:

if (getIssueContext().getProjectObject().getKey() in ["FORBIDDEN", "KEYS"])
return

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events