Cannot create 5-ditig string for Bug issuetype
Hi Fidel,
I am having hard time figuring out the correct syntax for 'Validation based on JQL query' validator. My goal is to make custom field Environment be required during Bug creation (not req'd on all other issuetypes) Here's my JQL: issuetype = bug and cf[10403] = NULL
What it needs to look like is this: issueType = %{nnnnn} and %{10403} = NULL
Question: Which 5-digit string should I use for bug? Its Jira ID is "1" ?
Comments (5)
-
repo owner -
reporter It worked. When would you recommend using "Validation based on JQL query" validator vs. "Boolean validator" one?
Thanks for the help! Michael
-
reporter - changed status to resolved
-
repo owner Currently Boolean validator with math, date-time or text-string terms is such a versatile and powerful feature that you can almost write any validator you may need with it.
Using it you can write expressions that depends on linked issues, subtasks and other issues in your project, and its values. The only difficulty is that you may not know well the syntax, and typically everybody has some knowledge of JQL.
As rule of thumb, you should always use Boolean validator with math, date-time or text-string terms when you want to implement a validation based on the values of current issue.
When you want to implement a validation based on the values of other issues in your current project, or in all your JIRA instance, and you know how to write a JQL query for selecting them, you can use use Validation based on JQL query, but usually you can also use Boolean validator with math, date-time or text-string terms.
-
reporter Yes, I had questions about syntax in Bolean validator but found these two helpful articles: https://bitbucket.org/fcarmario/jira-workflow-toolbox/wiki/others/Parser https://bitbucket.org/fcarmario/jira-workflow-toolbox/wiki/others/Examples%20of%20Parser%20Expressions
Again, thanks for the help! Michael
- Log in to comment
You can force the field "Environment" to be set for issue types "Bug" using "Boolean validator with math, date-time or text-string terms" with the following configuration:
Expression used is: %{00014} = "Bug" IMPLIES %{00070} != null
Notice that:
Once configured, transition "Create Issue" will look like this:
Please, don't forget to close the issue if the solution is valid for you.