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

 

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

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

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

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
Community showcase
Published Nov 29, 2018 in Marketplace Apps

How to set up an incident workflow from the VP of Engineering at Sentry

Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...

1,304 views 0 8
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you