How can I make a field "required" only after a specific state is reached?

We want to make the "Fix Version" field a required field, but only later in the workflow.

I know we can use validators to do that, but i don't want to use validators, since we have too many transitions.

Any links or pointers?

Thanks - John.

 

1 answer

0 vote

I'm afraid validators are the answer to this one. 

You could try injected javascript (don't), or behaviours, but they're both by-passable, only work in some places, and hence prone to failure.  Validators is the only way to do it.

Hi Nic,

Thanks for the quick reply

How can I use behaviours to achieve this?
Can we specify states in behaviors?

I was thinking something like this should work, but I need the exact syntax to specify states.

FormField Version= getFieldByName("Fix Version")

if(State=="Done"||State=="Closed" ){
Version.setRequired(true)
}

Thanks.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

Meet the AUG leaders of Northern Virginia

@Rachel Wright (Jira Genie), @Billy Poggi (AUG NOVA, DC), and @Dana Jansen (Confluence Queen) are just some of the folks that lead one of the world's most active Atlassian User Group (AUG)....

148 views 5 9
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