Hi Fidel -
I'm trying to modify the "Create Issue" transition of my sub-task workflow to limit the types of sub-tasks that can be created based on the state of the parent ticket.
As an example, if the parent is in state 1, there are 6 types of subtasks that can be created, but if the parent were to be in state 4, there are only 3 types of sub-tasks available that may or may not be a subset of the previously mentioned 6.
I was looking at the "validation based on regular expression" but that looks like an all or nothing option and the "Validation on subtasks" doesn't quite do it since that doesn't look like it would work as part of the subtask workflow.
Maybe a new validator such as "valdation on parent"? An inverse of the current subtask validator? Or is there another option to do what I'm attempting that I'm missing?
Thanks, -Matt
Hi Matthew,
It's very easy to implement it using "Boolean validator with math, date-time or text-string terms". Let's see an example:
We want to restrict subtask type creation depending on parent issue status:
We would use the following configuration of "Boolean validator with math, date-time or text-string terms":
For readability I copy+paste the boolean expression:
(%{00042} = “Open” AND (%{00014} = “Subtasks_type_1” OR %{00014} = “Subtasks_type_2” OR %{00014} = “Subtasks_type_3”)) OR (%{00042} = “Resolved” AND (%{00014} = “Subtasks_type_1” OR %{00014} = “Subtasks_type_4”))
Notice that:
Once configured, transition will look like this:
Now, let's suppose we replace restriction 3 with:
"If parent status is different from "Resolved" and "Open" any subtask type is allowed."
In that case, the following configuration will do the task:
For readability I copy+paste the boolean expression:
(%{00042} = “Open” AND (%{00014} = “Subtasks_type_1” OR %{00014} = “Subtasks_type_2” OR %{00014} = “Subtasks_type_3”)) OR (%{00042} = “Resolved” AND (%{00014} = “Subtasks_type_1” OR %{00014} = “Subtasks_type_4”)) OR (%{00042} != “Open” AND %{00042} != “Resolved”)
Notice that:
Once configured, transition will look like this:
Regards,
Fidel