Validate for Project?
We need to make Priority required for only one project.
I have successfully created a validator for the first part usingA field is/isn't initialized or has/hasn't been modified.
I cannot validate for the second part; limiting validation to a single project. I've tried using Validation based on JQL query with this JQL: * project = "%{13400}". It isn't working*.
Thanks for your guidance.
Comments (7)
-
repo owner -
reporter It is a PID value; it may not be the correct one to use.
I obtained it this way: JIRA Admin > Projects > Copy link location for the "Edit" link alongside the project > pid=13400
-
repo owner You should use the project key instead.
Assuming that field
%{13400}
contains the project key, you can implement your validator using Boolean validator with math, date-time or text-string terms with the following boolean expression:%{00018} = %{13400} IMPLIES %{00017} != null
where
%{00018}
is field code for Project key and%{00017}
is field code for Priority.In my solution I'm assuming that the project for which Priority is required is the one whose project key is selected in field
%{13400}
, but in case you want a fixed project you can use the following boolean expression:%{00018} = "CRM" IMPLIES %{00017} != null
where CRM is the key of the project that requires Priority to be set.
-
reporter Both expressions you suggested have failed: %{00018} = %{13400} IMPLIES %{00017} != null %{00018} = "SI" IMPLIES %{00017} != null
We're using native JIRA priority field, which allows you to set a default and cannot be empty. Is there an expression for %{00017} to signify it is not the default?
-
repo owner Hi @jirasysadmin,
Try the following validations:
%{00018} = %{13400} IMPLIES hasChanged(%{00017})
or
%{00018} = "SI" IMPLIES hasChanged(%{00017})
-
reporter Hi Fidel - the code for hasChanged also did not work.
Thanks for your help; you've given me a nice trail of breadcrumbs to continue on my own.I'll mark this ticket resolved.
-
reporter - changed status to resolved
- Log in to comment
Hi @jirasysadmin,
Which is the content of field
%{13400}
?Is is a project key or a project name?