Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,456,930
Community Members
 
Community Events
176
Community Groups

Mandatory Field

Hi All! 

I have a custom field in JIRA that I need to make mandatory when the ticket is closed.  I can't make it "required field" because then my customer email tickets to Jira will not work.  

What are my options?  How do I make it "hey this can't be blank if you want to close the ticket?"  

9 answers

1 accepted

13 votes
Answer accepted

@clare_lawson

You can utilize a Workflow Validation for this functionality.

  1. Edit the workflow
  2. Select the transition to the "Closed" status
  3. Select "Validators"
  4. Click the "Add validator" button
  5. Select the "Field Required Validator" option
  6. Click the "Add" button
  7. For "Fields required for this transition:", select the custom field you want to require
  8. For "Error message", specify an error message if the condition is not met
    1. This is optional, but recommended so your user understands what they did or didn't do
  9. Usually leaving the "Ignore Context" checkbox blank works fine
  10. Click the "Add" button

Once the above steps are completed, don't forget to publish the updated workflow!

My custom field does not show up on the list of fields to choose on the validator.  Any ideas?

Did you try to start typing out the name of the custom field in the textbox? Jira doesn't always seem to provide all available options in the drop down lists.

YES!  thank you !! :) 

Like Gary Spross likes this

you may want to create a transition screen with that field on it as well.   Gives them the opportunity to change or fill it out before the transition happens.

Like Keith Jones likes this

Yes, that's a good idea. A transition screen will attract the attention to that field.

You can set up the transition rule more loosely, meaning that during the transition, there just needs to be a value in the field, but the value may have been set up already (before getting to the transition screen), or more strictly, the rule would require the value to be set up on the transition screen. 

Like Keith Jones likes this

Agreed - the nice thing about a transition screen is that you can also put directions/information there to help the user with that field. Great suggestion.

As a slight twist, we use Conditions instead of Validation - the option to move to the next status doesn't even show up if the condition hasn't been met.

I agree that a Condition is also an option, but a benefit of using a Validator is that you can instruct the user (with an error message) as to why they can't transition the issue instead of leaving them guessing.

Like # people like this

That's true in some cases. We use it more as a gatekeeper strategy, primarily in our onboarding/offboarding process that contain a great deal of automation. 

Like # people like this

We also tried the Condition at some point, but it was causing a lot of confusion, people did not know why the option to close "disappeared" and they were complaining all the time. With a validation there would be at least an error message. 

Like # people like this

Yes, we do that as well for some required fields.

In our case, certain branches of our workflow are shown or not shown, based on select conditions - not just fields completed, but the content of those fields. For example, onboarding might provide different paths based on Employee or Contractor values in a field.

We also use Validation in other cases where we might need a value required, but don't care what that value is (e.g. a phone number or email address). 

Like # people like this

Try adding a generic default value to the field.  For some of my restricted fields I add 'default' to the drop down list and made that the default.  That way I can identify the new records where the user didn't select a value, but prevented the creating an error on a new record attempt in my sync process.

Good luck.

Best way is to add it as a validator on a transition to 'Closed'. 

1 vote

You could try to add a validator to the workflow?

If you use the Field Required Validator, then you can select what field must be filled in and a custom message if it is not.

1 vote

Hi @clare_lawson 

That would be a workflow thing to do. Add a validator on the close transition that the field cannot be blank (or require it to be changed) to make the transition.

Let me know if this helps

As others have already said, you could use either a validator or a condition. Each has its own pros and cons and at the end, you need to make the decision.

We have 2 options:

1. If you really want to make it Required while closure use "Workflow Validation" as Gary explained

2. You also said you wanted to make it mandatory but only for this project: You can use a different Field configuration scheme for this project with this field. Als you can use Context if want to enable this for a particular issue type. Here in this field configuration you can make this a Requerd field. But plaese know that now this will be a mandaory field when you create ticket.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events