Mandatory fields being "too mandatory"

Looking for a little help with a mandatory field.

I created a field that is mandatory so when a bug is resolved a checkbox must be chosen. The default is for no checkboxes set. All is good.

Problem is I'm in a Catch-22: I put the field on the edit screen in case someone needs to change it, but if they use the edit screen for a different field and no checkboxes are selected they are required to select a checkbox. For now I removed the field from the screen so devs must re-open the bug and resolve it again to change it but I'm looking for any better suggestions.

Thanks!

2 answers

1 accepted

0 vote

If you set a field mandatory in Jira, it is mandatory from the beginning of the lifecycle and all the way through. You have to set it when the issue is created, and you can't blank it out again.

The screens it is on are irrelevant. If it's mandatory, it's got to have a value from create, doesn't matter if you don't put it on any other screens.

The way to deal with this is usually validators. These check that a user is doing something on an issue *transition*. Annoyingly, Jira off-the-shelf totally neglects the very common case that a field is only required later in an issue lifecycle and doesn't provide a useful validator. Lots of plugins do though: Misc workflow extensions, Jira Suite utilities and several others. To use them, you strip the mandatory field setting in the field config and then add in validators like "Field called Root-Cause must be filled in before allowing user to close the issue" (incident type workflow) or "Field called Tester must be filled in before allowing user to push issue into the first QA step".

D'oh! You're right about issue creation & mandatory fields. I'll take a look at some plugin validators.

Edit: It was easy with MWE (Misc Workflow Extensions) to add "field must be modified" ...But what happens if a bug is re-opened and re-resolved? If the field was set correctly the first time it was resolved and subsequently got re-opened then when its resolved the second time it must have the field changed. One way to avoid this is to modify the workflow so a re-open uses a different transition but I was hoping to avoid change the workflow too much. Any other ideas?

I'd clear the field on re-open - I think the MWE has "set custom field to a value" as a postfunction, so you could use that to set the calue to "". If that's not appropriate, then I think you might need a different reopen :-(

Nic - Very helpful. I do see this post function. Unfortunately, my custom field is a set of check boxes and it's not obvious to me how to uncheck them. Using a blank field or "NONE" doesn't do anything. I thought to try some javascript but it looks like MWE accepts ASCII or groovy...

You could use a Select List field type instead of the series of checkboxes. You can also choose choose a Multi-Select field if you want to let the user choose multiple selections. Then you can clear the field easily on the reopen transition.

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 Sunday in Agility

You asked for it, so we delivered: images on issues have arrived

A picture tells a thousand words. And agility boards have just released their latest feature: cover images on issues – so now your board can tell a story at first glance. Upload attachmen...

172 views 1 10
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