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

Shai Dahan January 24, 2016

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

0 votes
Answer accepted
Fidel Castro
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.
January 24, 2016

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

0 votes
Shai Dahan January 24, 2016

Thank you Fidel, you were spot on as always.

Resolution works as expected.

Fidel Castro
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.
January 24, 2016

Nice smile

Suggest an answer

Log in or Sign up to answer