Forums

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

Scriptrunner Behavior: Can I map to multiple workflows?

Diana
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 12, 2023

I have a number of custom workflows each with unique status, except they all have a common status "Canceled".

When transitioning to "Canceled" I have a Behavior that makes a text box required on the transition screen. It's simple enough to set it up for 1 workflow, but I need to have the same Behaviour for about 5 other workflows. 

Is there a way I can just use 1 Behaviour but have it mapped to multiple workflows that using the same custom field? Or is the only way to do it is create 5 separate Behaviours and map to each individual workflow?

2 answers

1 accepted

0 votes
Answer accepted
Tim Perrault
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 12, 2023

You would have to create 5 separate behaviours since the behaviour is using the specific workflow as a guide.

Diana
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 12, 2023

@Tim Perrault thanks for the quick response.

but dang. it would be a nice feature if it could!

Tim Perrault
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 12, 2023

Honestly for something like this, I like to use the Field(s) required validator on the workflow step itself. That way I don't have to go back and forth to the behaviour screen when something in the workflow messes up.

Like Deepak Jain likes this
0 votes
Deepak Jain
Community Champion
June 12, 2023

Hi @Diana Gorv ,

Thanks for connecting to Atlassian Community.

You can create one behavior and map it to the Project and Issuetype combination. Here is the URL for script runner behavior

{baseUrl}/plugins/servlet/scriptrunner/admin/behaviours 

It will be a tricky one, but it will help you to make it at one place.

Thanks !!

Suggest an answer

Log in or Sign up to answer