Hello! I'm trying to setup a automation that auto-fills a sub-task description whenever certain number of fields are populated (These fields hold info relating to the sub-task description).
I'm running into a issue of how I would have the rule check if the sub-task is already created. Otherwise it will duplicate the sub-task every-time the work item is updated.
Workflow I'm trying to achieve:
When: Work item Updated (Conditions applied: Role =! Empty, Start Date =! Empty, Team =! Empty)
IF: Some subtasks match : parent = {{issue.key}} and type = Sub-task and summary ~ “Add to Tool”
---Stop rule (Don't add the sub-task)
ELSE: Create sub-task, auto-fill description with smart-values
Am I using the JQL correctly? Any Recommendations to how I should set this rule up?
This is what I have so far:
I recommend not using a JQL condition to check for the presence of the child / sub-task of the trigger work item.
Instead, please use a Lookup Work Items action with the JQL to check for the subtask and an Smart Values condition to check the count returned is 0. This will give you more precise control over what is checked. For example:
Also, I recommend testing your JQL outside of the rule with an example trigger work item using an search. This will confirm you have the correct type name for your sub-task: subtask versus sub-task versus ...
Kind regards,
Bill
Coming back to post the solution and what worked for me.
the JQL statement was parent = {{issue.key}} AND issuetype = "Sub-Task" AND summary ~ "Add to Tool"
Here is the finished rule with logic to only perform actions whenever specific fields are filled and logic to prevent duplication of sub-tasks. Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for posting the rule image, @Logan Reichert
Perhaps as an adjustment: are you expecting the exact phrase "Add to Tool" in the Summary?
As written for that JQL expression, the CONTAINS ~ operator will perform a "fuzzy match" on those words: Add, to, and Tool. When you expect the exact phrase, please try this syntax:
AND summary ~ "\"Add to Tool\""
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.