Forums

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

ScriptRunner Behaviour not working on Create on specific Jira projects (PORTAL ONLY)

Harvey Bennett February 18, 2022

We have a situation where the Behaviour feature offered by ScriptRunner is not working on specific Jira projects. Changing field visibility, editability, and code that changes these features do not work on the project. I can see code executing those through the initializer when i launch our JSM portal screens that the behavior is tied to in the jira.log file but the 'interactive' part of it is non responsive. I have cloned the Jira project and strangely enough once the behavior is applied to that Jira project is works. Is there any plugins or configurations that have been known to impact or override the usage of Behaviours?

Thanks,

Harvey

3 answers

1 accepted

2 votes
Answer accepted
PD Sheehan
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.
February 18, 2022

Could your project context fall into more than one behavior mappings?

Check for "All Projects" or "All Request Types" in addition to any that are specific to your project/request type. 

When you have more than one behaviour mapping and both touch the same field, there is no guarantee of which one will win. 

If that's the case, you need to either adjust the mappings or combine the two sets of rules into a single one that will have some logic to know which to apply/when

If all else fails, disable all but the one behaviour configuration you are interested in to see if it will work.

Harvey Bennett February 22, 2022

This appeared to be my issue even though different fields are present throughout the behaviours. I suppose it is smart to look at the plugin itself before ruling it out and blaming other plugins. Thanks for the suggestion and answer.

2 votes
Sachin Dhamale
Community Champion
February 21, 2022

@Harvey Bennett 

To find out which app is causing this issue is put jira in safe mode ( disable all plugin except script runner) and check if its working fine or not. 

If you are still facing this issue then its related with some configuration.

Harvey Bennett February 22, 2022

This was my 2nd option that I was planning on exercising. I didn't need to go down this route but always helpful nevertheless. Thanks for the suggestion.

Like Ranchin Hervé likes this
PRAMOD KUMAR REDDY KASIREDDY
Contributor
June 2, 2022

Question :

We're Using An Behaviour for (Check Commit Values) Script. in a test A project. there we have kept conditions like 1) When Workflow Action: Fix(transition). it is working perfectly. Here we are using the Production A Project. Same workflow and same fields everything is the same. But when we mapped this project to Behaviour. the script Validation working is in every transition. not only in Fix Transition. At the same time in Test A Project, this behaviour works fine. 

0 votes
Ranchin Hervé
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 26, 2024

I have a trouble similar but i found that the behaviour run correctly for a user who is NOT in a organisation !
Have you any idea what are the link between Organisation and script ?

For information the script only add text in the description !

Suggest an answer

Log in or Sign up to answer