ScriptRunner Behavior do not execute On Create screen

Roberto 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.
February 8, 2019

Hello Community,

My behaviors are not being executed when on the Create screen. They run on edit screens but not Create screens. 

Has anyone run into this issue? looking at the JIRA logs I notice that whenever I click Create Screen no Behaviors run. When I click Edit Screen all my Behaviors run. It is very weird.

Any help on this topic would be appreciate,

Thanks!

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 9, 2019

I suspect that the Behaviour runs, but does nothing.  Could you show us the configuration of it?

Roberto 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.
February 9, 2019

Hi @Nic Brough -Adaptavist-!

i have my Behavior linked to a personal project and to the Epic issuetype In said project. 

My Behavior actually works fine when I am in the edit screen for Epics. The issue is that when I am in the Create screen for an Epic it does not work.

-Roberto

Tom Lister
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 9, 2019

Yes but what does your configuration actually look like

Roberto 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.
February 11, 2019

@Tom Lister and @Nic Brough -Adaptavist-,

Below is the screenshot of my Behaviors config. As you can see I have mapped it to the right Project (Planview) and the right issuetype (Epic) and put the Behavior function on the right field "Project Type".

Once more, my code runs in the Planview project in the Epic issuetype on the Project Type field if I am in the Edit screen. It only does not run if I am on the "Create" screen.

If I look at the JIRA logs, none of my debugging statements display when I open the "Create" screen. All of my debugging statements display when I open the "Edit" screen. It seems that Behaviors are not running on Create screen. Does anyone know why? Could this be a JIRA setting I turned off?

BehaviorConfig.PNG

Roberto 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.
February 25, 2019

Figured it out.

Checked the logs and it turns out a Behavior was not running correctly On Create screen and therefore the error it threw wouldn't let any other Behavior run.

Michael Spoonauer April 16, 2021

Same thing happened to me.  I was checking for the current value of a custom field to compare it to the new value, but that obviously won't work if the underlyingIssue object does not yet exist. :-) 

Suggest an answer

Log in or Sign up to answer