Question about changing assignee of sub tasks
Currently I am trying to automate the assignee of sub-tasks, but could not find any reference of how to accomplish this.
We have an issue which has 1-N sub-tasks.
Below I will explain what we are trying to achieve…
The sub-tasks have a custom field name ‘Sequence’, which is the order they need to be processed. This is a simple select menu with numeric values 1-10.
When a sub-task is transitioned the assignee of the next sequential sub-task should be automatically assigned to a named user. I was planning for this to be the same user name (i.e. "user_name" ). I could also add the user to a custom field if it makes it easier.
Is it possible to update the sub-task assignee using a condition or Filtering by field values to check that the value of the Sequence is 1 greater than the sub-task that is being transitioned?
Comments (5)
-
repo owner -
reporter Hi, I'm not sure this will work from the parent issue transition. The parent issue is automatically transitioned from Open -> In Progress when the first sub-task is transitioned. NOTE: the parent and sub-tasks have a different workflow.
If I add this post-function to the sub-task workflow transition, should the expression us siblingSubtasks?
filterByPredicate(siblingSubtasks(), toNumber(^%{12004}) = toNumber(^%{12004}) + 1)
-
repo owner Sorry, you are right. Use the same post-function in sub-task's workflow using the following issue list expression:
filterByPredicate(siblingSubtasks(), toNumber(^%{nnnnn}) = toNumber(%{nnnnn}) + 1)
replacing nnnnn with field code for Sequence custom field.
-
reporter Thanks for all of the help! It now works perfectly for our needs!
-
repo owner - changed status to resolved
You are welcome.
- Log in to comment
Hi @ecolane,
You can do it using "Write field on issues returned by JQL Query or Issue List" post-function in parent issue with the following configuration:
Issue list expression is:
replacing nnnnn with field code for Sequence custom field.