Forums

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

Mandatory field for a specific status in the workflow

Pragynaparamita Dash April 23, 2021

When a ticket is moved from "To Do" to "In Progress" or "Backlog" to "In Progress", uses the same transition ( "Go to In Progress"). In the above workflow, I have a specific requirement of making a certain field mandatory in each transition. But the fields are different in each case.

Hence how to make two different fields required in the same transition used in two different places. 

 

From status                     To Status                      Transition                 Field required

To Do                              In Progress                  Go to In Progress      Capex ID

Backlog                           In Progress                  Go to In Progress      Compliance ID

3 answers

1 accepted

2 votes
Answer accepted
John Funk
Community Champion
April 23, 2021

Hi Pragyna - Welcome to the Atlassian Community!

You would need to use two different transitions. Is there a problem with that? 

Pragynaparamita Dash April 23, 2021

Hi John ,

Thanks for responding. 

Actually I gave an example of two,but the requirement is of 7-8 scenarios where i have used only 1 transition. Now if i change it to separate transitions,  then it will be more confusing.Is there any other way feasible ?

Like John Funk likes this
John Funk
Community Champion
April 23, 2021

JMWE or ScriptRunner add-ons probably have the ability to do Conditional transitions. 

1 vote
David Fischer
Community Champion
April 23, 2021

Hi @Pragynaparamita Dash ,

using our JMWE app, you could add one Fields Required Validator per source status, and configure each validator using the following approach (taking "To Do" as the example source status):

  • Required Fields: Capex ID
  • Conditional execution:
issue.get("status").name == "To Do" 

Cheers,

David

0 votes
Thorsten Letschert _Decadis AG_
Atlassian Partner
April 23, 2021

Hi @Pragynaparamita Dash ,

If your goal is to use a single (reused) transition, you'll probably need an additional workflow app from the Atlassian Marketplace

For Jira Workflow Toolbox being one among those, you could use a logical validator with an expression like

(%{issue.status} = "To Do" AND %{issue.cf12345} != null) OR (%{issue.status} = "Backlog" AND %{issue.cf67890} != null)

where 12345 has to be replaced with the id of your 'Capex ID' field and 67890 with the id of your 'Compliance ID' field.

Cheers
Thorsten

Disclaimer: I'm part of the team behind the aforementioned app.

Suggest an answer

Log in or Sign up to answer