Can you force users to select a Priorty?

michael jones May 19, 2015

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
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 19, 2015

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

1 vote
michael jones May 19, 2015

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

1 vote
teilor_soares
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.
May 19, 2015

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

1 vote
Alexandra Topoloaga
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.
May 19, 2015

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 

1 vote
Nicolas Bourdages
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.
May 19, 2015

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.

0 votes
Alexandra Topoloaga
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.
May 20, 2015

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