Why does "ScriptRunner Fast-trak an issue not work for multi-select custom field?

Joseph Pursel September 30, 2017

 

Using the ScriptRunner Fast-trak an issue to perform a hidden transition during the Create Issue Transition, does not produce an Action.

I have a transition, named 911, going from the initial status, named Intake, of the Create Issue transition to the status, named 911, when a user responds Yes to the multi-select custom field, 911, as shown below.

I use the cfValues['911'] == 'Yes' condition in the script. The Action is transition 911 (721). Previewing the script shows:

ScriptRunner workflow function - Fast-track transition an issue (condition apply).
Action: None will be applied
Note that this should go after the Fire Event function.

The post function is last in the list and below the Fire a Create Issue Event. The workflow diagram showing this transition is

ScriptRunner Fast-trak an issue transition - 911.PNG

ScriptRunner Fast-trak an issue post function.PNG

ScriptRunner Fast-trak an issue post function script.PNG

Can someone help me understand what I am doing correctly, or is this a bug in ScriptRunner? 

I am using ScriptRunner 5.1.6 in JIRA Server 7.3.0'

Thank you for helping me.

Joe

 

1 answer

0 votes
Thanos Batagiannis _Adaptavist_
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.
October 2, 2017

Hi Joe,

So if I understand right the post function is on the Create Issue step and you want to fast track transition the issue to status 911 (which actually mean to skip the Intake status).

So your condition should be 

'Yes' in cfValues["911"]*.value (If the name of the Multi Select List is 911)

To be honest is weird the fact that when you preview the Action appears as None.

Can you please check the logs for any errors ?

And also can you please check in the Workflow overview, when you click Diagram if there is another action with the name 911 and a different than the 721 id ?

kind regards, Thanos

Joseph Pursel October 2, 2017

Hi Thanos,

Yes, your understanding is correct. I need to clarify that the Yes option is an InTENSO Dynamic Forms - Dynamic Checkboxes field.

 InTENSO [Dynamic Forms] - Dynamic Checkboxes

I use this type of field to show additional Related Fields when the Yes box is selected and is part of the Dynamic Forms plugin.

Also, I did verify only one transition in the workflow for 911 exists. The transition is from the Intake step to the 911 step for the 911 request.

Regarding the log errors, when would I see the log errors and are you referencing the atlassian.jira.log file? Please clarify this for me so I can provide you with the data you need to help me.

Thank you,

Joe

Thanos Batagiannis _Adaptavist_
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.
October 3, 2017

Hu Joseph,

thanks for clarifying the type of the custom field. I am not sure that the condition will work as is with InTENSO checkboxes. 

But the logs will actually tell the truth. So after you reproduced the scenario you can check the atlassian-jira.log at https://confluence.atlassian.com/jira063/where-are-the-application-server-logs-683542381.html 

or you can use the ScriptRunner built in script -> View server logs.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events