Forums

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

Priority mandatory

Daniel Juravski
Contributor
June 26, 2018

Hi,

I added to the 'Priority' field new priority named "None", I would like to make the 'Priority' field mandatory, such that the user will have to pick some option of the priorities and not leave the "None" priority as it.

 

How can I do it ? 

Thank you.

4 answers

1 accepted

0 votes
Answer accepted
Deleted user June 26, 2018

Welcome to the Community @Daniel Juravski!

You can define the field behavior with field configuration schemes.

Daniel Juravski
Contributor
June 26, 2018

Hi @[deleted] and thank you !

I know how to define a mandatory behavior to a field, however my problem is that even when the 'Priority' field is required - it has already a default value, what makes it not really mandatory. 

Like BRAHITI Ouramdane likes this
Deleted user June 26, 2018

@Daniel Juravski,

It is currently not possible to default the Priority Field Value to NULL (non-selected).

Your request makes sense and others have requested this before. Feel free to comment and vote for this suggestion: Allow 'No default' for Priority (JRASERVER-13048).

A 'dirty' solution would be to create a new priority (called 'Please select' or 'Unselected') and set it as the default. You can then add a validation in the Create transition to verify that the field value was changed (this may require an add-on).

1 vote
Robb F Watkins July 23, 2018

@Daniel Juravski  Did you ever get this resolved.  I have the same issue.  What about seeing if the field changed from a default value like "None"  Priority Assignment.png

Daniel Juravski
Contributor
July 23, 2018

Hi @Robb F Watkins,

I did resolve it. I added the 'none' value (in your case - 'ENTRY PRIORITY'), set the priority field as a required with the 'none' as default.

Then, on each issue type that I wanted to force the priority choice, I edited its workflow such as the create transition will has a validator that checks if the priority value is not None (I used the ScriptRunner add-on with the next command: issue.priority?.name != 'None')

Robb F Watkins July 24, 2018

@Daniel Juravski  Wow.  That is so simple I am almost embarrassed for asking.  It worked like a champ.  Thank you!

Daniel Johnson
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!
June 4, 2019

@Daniel Juravskiyou saint! I got just as far as you and @Robb F Watkins without even thinking of scripting the validator to make it required to have another option other than the "None" priority I created. Thank you!

Like Daniel Juravski likes this
Matt Song
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!
February 26, 2020

Hello, I'm currently trying to accomplish this but using the script above does nothing when added as a validator.

Is there more to the script that I'm missing? 

0 votes
Grigory Salnikov
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.
June 26, 2018

Hi!

I'm sorry, but why adding a "None" option in the first place?

Regarding your question, you can only make a field mandatory, not the value in it.

Daniel Juravski
Contributor
June 26, 2018

Hi @Grigory Salnikov,

Pls. see my answer to @Yogesh Mude

0 votes
Yogesh Mude
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.
June 26, 2018
Daniel Juravski
Contributor
June 26, 2018

Hi @Yogesh Mude,

Even when the field is required, its automatically gets the default value of 'Priority', thus the user doesn't really need to insert its value to it.

Grigory Salnikov
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.
June 26, 2018

That still leaves us an option to choose "None"

Daniel Juravski
Contributor
June 26, 2018

The 'None' option was to force the user to insert its real value for 'Priority'.

Like Steve Guyer likes this
Yogesh Mude
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.
June 26, 2018

Yes, as @Grigory Salnikov said why you have been added None value/option to Priority field.

If you want to make this field Mandatory then you should not add the None value/option to this field because the None value/option will be set as Default one.

Daniel Juravski
Contributor
June 26, 2018

If Ill remove the None value at all, so I'll be need to pick other default value for the priority, what still doesn't solve my issue, because the 'Priority' still will have other default value inserted and the user not actually will need to insert its own value. 

Yogesh Mude
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.
June 26, 2018

Yes, if you want to select the priority field value by the User then why you are setting a default value, just make this field required that's it.

While creating ticket the user must need to provide the value of it otherwise the user will not be able to proceed further.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events