Can you force users to select a Priorty?

HI,

we want to force the users to make a decision about the priority of an issue. currently I can not see a way of achieving this without replacing the field as a custom field. 

 

regards,
Mike

6 answers

3 votes

Change the "field configuration" for the issues - make priority mandatory.

Since there's a default value, you would have to make a workflow validator on the create transition that checks if the value of Priority has changed. That would mean you can't use the default Normal value though, since it's going to force you to change it.

To remediate that, you could create a priority called "No Priority" or something like that, and make that the default value.

I'm not 100% sure you can use that validator with only JIRA out of the box, so you may have to get the Misc. Workflow Extensions add-on. But it's worth the price.

Hi Michael,

Using JJUPIN plugin you can very easy put conditions on JIRA's fields.
For example, let's say you don't want to allow users to create issues with priority different from "Major". All you have to do is to create a validator on the create transition from your workflow. It should look like this: 

if(priority != "Major") {
   return false, "priority", "Priority must be Major!";
}

The result would be: 

 

Capture.PNG

Hope this heps,
Alexandra 

Hello Michael!

You don't need to have a custom field to set it as mandatory, you can set a default field in JIRA as required as per the Making a field required or optional section in the link https://confluence.atlassian.com/display/JIRA/Specifying+Field+Behavior#SpecifyingFieldBehavior-Makingafieldrequiredoroptional

But notice that, if you modify the field behavior in the Fields Configurations, all the projects which use the project will be affected with the required behavior.

 

Cheers!
Teilor

HI all,

Sorry I wasn't very clear. I have already set the field to mandatory but I want to force the users to select a priority rather than it defaulting to an any value.

 

regards,

Mike

Hi Michael,

This is very simple to do using JJUPIN. We have Live Fields (you can read more about it on our documentation page: https://confluence.kepler-rominfo.com/display/JJUP30/Live+Fields) integrated, so all you have to do is write a few lines. 

For your problem, you will need a custom field in which you will retain if the priority has been changed, two scripts of one line each and a short validator on the "create" transition. Let me  show you:

The first script would look like this:

lfWatch("priority", "priority", "hook.sil");

The second script ("hook.sil"): 

lfSet("prioritySet", "true");

And the validator: 

if(prioritySet != "true") {
   return false, "prioritySet", "Priority hasn't been set!";
}

This way, an user won't be able to create an issue if he doesn't change the priority.

Alexandra 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,445 views 15 19
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