Missed Team ’24? Catch up on announcements here.

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

Mandatory Field

Clare Lawson September 29, 2022

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

Suggest an answer

Log in or Sign up to answer
13 votes
Answer accepted
Gary Spross
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 29, 2022

@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!

Clare Lawson September 30, 2022

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

Gary Spross
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 30, 2022

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.

Like # people like this
Clare Lawson September 30, 2022

YES!  thank you !! :) 

Like Gary Spross likes this
Dan W October 3, 2022

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
Ani Popova October 3, 2022

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
Keith Jones
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 3, 2022

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.

3 votes
Keith Jones
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 29, 2022

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.

Gary Spross
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 29, 2022

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
Keith Jones
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 29, 2022

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
Ani Popova September 29, 2022

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
Keith Jones
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 29, 2022

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
1 vote
Vanessa Scott
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!
September 29, 2022

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.

1 vote
Ani Popova September 29, 2022

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

1 vote
Jimi Wikman
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 29, 2022

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
Mike Rathwell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 29, 2022

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

Somesh Sahoo May 9, 2024

please refer this for quick solution.

0 votes
Amir Katz (Outseer)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 30, 2022

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.

0 votes
Praveen Bansal September 29, 2022

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.

TAGS
AUG Leaders

Atlassian Community Events