Boolean validator Parse Error using count
I'm attempting to use a Boolean validator to evaluate if an existing ticket exists using the criteria of 2 custom fields. We have Department and Dept. Priority custom fields. We logically roll up the Departments into a sudo Head Department (not an actual field in JIRA) and allow each Head Department to rank 3 tickets 01-03 for candidates to put on our production support kanban board. I need to prevent someone from having multiple 01 priority tickets set based on the head department. So attempting to use IMPLIES and count(issuesFromJQL) validation.
Attached is the Config and Parse Error.
Comments (7)
-
repo owner -
reporter - attached JWT-BooleanValidator-Expression.txt
Text attached.
-
repo owner Hi @corepatt,
Can you, please, tell me which type are fields
%{10101}
and%{10007}
? -
reporter 10101 = Select List (single choice) 10007 = Select List (single choice)
-
repo owner Try the following boolean expression:
(%{10101} in ["Department 1","Department 2","Department 3"] IMPLIES count(issuesFromJQL("project = '" + %{00018} + "' AND issuekey != '" + %{00015} + "' AND \"Dept. Priority\" = \"'" + %{10007} + "'\" AND status = \"Pending Assignment\" AND assignee = fequeue AND Department in (\"Department 1\",\"Department 2\",\"Department 3\")")) = 0) AND (%{10101} in ["Department 4","Department 5","Department 6","Department 7","Department 8","Department 9","Department 10"] IMPLIES count(issuesFromJQL("project = '" + %{00018} + "' AND issuekey != '" + %{00015} + "' AND \"Dept. Priority\" = \"'" + %{10007} + "'\" AND status = \"Pending Assignment\" AND assignee = fequeue AND Department in (\"Department 4\",\"Development\\QA\",\"Department 6\",\"Department 7\",\"Department 8\",\"Department 9\",\"Department 10\")")) = 0) AND (%{10101} in ["Department 11","Department 12"] IMPLIES count(issuesFromJQL("project = '" + %{00018} + "' AND issuekey != '" + %{00015} + "' AND \"Dept. Priority\" = \"'" + %{10007} + "'\" AND status = \"Pending Assignment\" AND assignee = fequeue AND Department in (\"Department 11\",\"Department 12\")")) = 0) AND (%{10101} in ["Department 13","Department 14"] IMPLIES count(issuesFromJQL("project = '" + %{00018} + "' AND issuekey != '" + %{00015} + "' AND \"Dept. Priority\" = \"'" + %{10007} + "'\" AND status = \"Pending Assignment\" AND assignee = fequeue AND Department in (\"Department 13\",\"Department 14\")")) = 0) AND (%{10101} in ["Department 15","Department 16"] IMPLIES count(issuesFromJQL("project = '" + %{00018} + "' AND issuekey != '" + %{00015} + "' AND \"Dept. Priority\" = \"'" + %{10007} + "'\" AND status = \"Pending Assignment\" AND assignee = fequeue AND Department in (\"Department 15\",\"Department 16\")")) = 0) AND (%{10101} in ["Department 17","Department 18","Department 19","Department 20","Department 21","Department 22","Department 23"] IMPLIES count(issuesFromJQL("project = '" + %{00018} + "' AND issuekey != '" + %{00015} + "' AND \"Dept. Priority\" = \"'" + %{10007} + "'\" AND status = \"Pending Assignment\" AND assignee = fequeue AND Department in (\"Department 17\",\"Department 18\",\"Department 19\",\"Department 20\",\"Department 21\",\"Department 22\",\"Department 23\")")) = 0)
The cause of the syntax error was a missing
+
operator after%{10007}
when composing the string for the JQL query.I have also added some parentheses and changed
OR
connective withAND
because I think that those changes are necessary in order to make the expression behave as you expect. -
reporter Perfect! Thank you so much. And thank you for the fast resolution.
-
reporter - changed status to resolved
- Log in to comment
Hi @corepatt,
Please, attach the text of the boolean expression you are trying to use, so that I will be able to test it.