Validating priority field

Grant Donovan
Contributor
April 19, 2018

I want to ensure that the priority field is completed on a particular project when the issue is created but this doesn't seem to be possible.

I am using Jira Cloud

When an issue is created it gets set as

Priority: Not Assigned

I want to ensure that this value is changed before the issue transitions to a status.  The Validator Regular Expression Check doesn't have the Priority field listed, so I can't use that one.

How can I ensure that the Priority field has been set to something other than Not Assigned

Thanks

Grant

3 answers

0 votes
Sabine Van Regenmortel
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!
October 4, 2023

This worked for me:

  • In the priority scheme, set a low priority value as default (e.g. None or Lowest).
  • In the project's workflow, on the Create step, set a Simple Scripted Validator (Scriptrunner) to validate that the priority must be different from None
     issue.priority?.name != 'None'
  • you can also set a condition by the OR || clause e.g. the project key
    issue.projectObject.key != 'SIL' || issue.priority?.name != 'None'

image.png

0 votes
Deleted user April 19, 2018

Hi @Grant Donovan,

You could use this Validator to check if the priority field has been altered from the default value (I assume this is Not Assigned). 

Hope this helps

0 votes
Adrián Plaza [DEISER]
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.
April 19, 2018

Hi @Grant Donovan,

 

You can use this validator in the workflow:

Screenshot_1.pngScreenshot_3.pngScreenshot_4.png

I hope this help.

 

Cheers,

Adrián.

Grant Donovan
Contributor
April 19, 2018

That doesn't look to work

2018-04-19_135345.png

2018-04-19_135141.png

I tried it without and with changing the value before I pressed the workflow option.

Would that work anyway, for example if a user had change it from the default at some point I wouldn't want the validator

Thanks

Grant

Adrián Plaza [DEISER]
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.
April 19, 2018

Hi @Grant Donovan,

 

You need to add a screen to this transition with the priority field inside, then the check will work fine.

 

Cheers,
Adrián.

Grant Donovan
Contributor
April 19, 2018

Thanks for your help on this.

The issue with doing that is that it wants me to change the priority on the form (during the transition) but I don't want that, as the value could have been changed when the user created the issue (say to Blocker).  My only requirement is to ensure that it is not set to Not Assigned

Thanks

Grant

Adrián Plaza [DEISER]
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.
April 19, 2018

Hi @Grant Donovan,

 

I know what do you mean, but I need to say that this is not possible with the default JIRA tools.

I don't know if this is valid for you but you can hide the transition until the field change with the Condition -> "Value Field" with this configuration:

Screenshot_5.png

 Cheers,

Adrián.

 

 

Grant Donovan
Contributor
April 19, 2018

 thought that could be the case.  I used to do it the way you mention above, the issue was that the user had no indication as to what was missing, the workflow options didn't show, but they didn't know why.

Thanks for your help though

Grant

Adrián Plaza [DEISER]
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.
April 19, 2018

Hi @Grant Donovan,

 

We need to wait until Script runner develops validation and conditions in the cloud, you can find here information about it: https://community.atlassian.com/t5/Jira-questions/Scriptrunner-for-jira-cloud-validation-check/qaq-p/659520

 

Cheers,

Adrián.

Suggest an answer

Log in or Sign up to answer