Forums

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

Script runner showing Transition Screen based on certain condition

murali kadiri
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!
November 28, 2023

Hi Atlassian Community,

I'm facing a challenge in configuring my Jira workflow, and I need some guidance on achieving a specific behaviour during the transition of issues from "In Progress" to "Close."

Scenario:

I have a requirement where, during the transition from "In Progress" to "Close," I want a specific Transition Screen to appear if the value of the 'Component' field is set to "ABC." If the 'Component' value is anything other than "ABC," the Transition Screen should not show up. It's worth noting that the 'Done' status should be allowed for all transitions.

Constraints:

  • I cannot have two transitions with identical names.
  • The Transition Screen should be conditional based on the 'Component' field value.

Questions:
        1.  How can I set up a condition in the Jira workflow to display a Transition Screen only when the 'Component' field is set to "ABC" during the transition from "In Progress" to "Close"?

        2.  Considering the constraint of not having two transitions with identical names, how can I achieve this without compromising the integrity of the workflow?

Any insights, suggestions, or examples from the community would be greatly appreciated!

Thank you in advance.

2 answers

0 votes
Trudy Claspill
Community Champion
November 29, 2023

An alternative is to have two transitions with slightly different names. Attach the screen to just one of the transitions. Add a Condition to the transition to make it available only when the Component field has the specified value. In the other transition, set Conditions so that it will be available only when the Component field does not have the specified value.

Then only one of the transitions will be available at a time, based on the value of the Component field, and you can present the screen through the just the transition that will display when the Component field indicates that the screen is necessary.

0 votes
Sebastian Krzewiński
Community Champion
November 29, 2023

Hi @murali kadiri 

 

You can use behaviour but with this you can't hide whole transition screen. What you can do is to hide several fields on screen and leave default comment field on a screen (comment screen is always displayed) and make field visible and mandatory when component will be ABC.

 

Regards,

Seba

murali kadiri
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!
November 29, 2023

Hi @Sebastian Krzewiński 

Thank you for your earlier response regarding the use of behaviours to control the visibility of fields on a transition screen in Jira.

I would greatly appreciate it if you could provide a sample script or guide me on how to implement the behaviour you suggested. Specifically, I'm looking to hide certain fields on the transition screen based on the value of the 'Component' field, with the condition that the Transition Screen should display when the 'Component' field is set to "ABC."

Your expertise in this matter would be immensely helpful, and I'm eager to implement this solution in our Jira workflow.

Thank you in advance for your assistance.

Regards,
Murali

Suggest an answer

Log in or Sign up to answer