How to set a validator on create issue to force a certain type of priority based on a component?

I would like to force a reporter to select type of priority based on the component he have selected when he create the issue.

The condition should be:

If the selected Component/s is 'CS Internal', reporter must select Priority CS1, CS2 or CS3 (and not any other priority type)

Component/s and Priority are system field

Custom script validator with groovy script can help here.

Any advise will be appreciated.

2 answers

1 accepted

Hi Shai,

You can do it using "Boolean validator with math, date-time or text-string terms" validator (provided by JIRA Workflow Toolbox) in transition "Create Issue" using the following configuration:

Captura de pantalla 2016-01-24 a las 21.58.42.png

Boolean expression is:

%{00094} ~ "CS Internal" IMPLIES %{00017} in ["CS1", "CS2", "CS3"]

Note that:

  • %{00094} is field code for field "Components"
  • %{00017} is field code for field "Priority"

 

Once configured, transition "Create Issue" will look like this:

Captura de pantalla 2016-01-24 a las 22.05.01.png

Regards,

Fidel Castro Armario

Thank you Fidel, you were spot on as always.

Resolution works as expected.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

753 views 2 19
Join discussion

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