Hi there, I am very new to some aspects of automation, particularly branching. What I'm trying to do is this: If field A "request type" on parent issue ="abc", AND if subtask #1 is marked "done," THEN create subtask #2.
My automation is as follows:
When value changes for "status"
Issue type = subtask
Status = "done"
--> (branch - for: parent) request type ="abc"
if sub-tasks <2
--> (branch - for: parent) then edit issue fields "detailed status"
--> (branch - for: parent) then create new subtask
My thought is that if any of the bolded items above are not true, then a subtask should not be created and the detailed status should not be updated, but you can see below the "request type" condition is not met and the automation is still firing. What can I do differently? Thank you!
Hello @Joshua Smith
You can access a sub-task's parent's info using smart values.
So if you want to check a sub-task parents request type is abc, you dont need a branch. You can do a smart value if condition.
Your steps will be:
Trigger = Issue transition to Done
If condition => If issue type = Subtask
If Condition (smart values) => If {{issue.parent.Request Type}} equals abc
lookupIssues with JQL => parent = parent = {{issue.parent.key}}
If Condition =>{{lookupIssues.size}} less than 2
Then create Issue with
Please see screenshot below, I have highlighted key steps and create subtask section for quick reference.. let us know if questions.
Thank you very much for the detailed response and screenshot, this is very helpful and I think I'm about 95% there.
The third step - the compare of whether {{issue.parent.Request Type}} equals abc, is not checking the parent but the subtask which triggered the automation - I can see it in the audit log.
Any suggestions? Is "issue.parent" a pre-defined function, or is that a variable that I need to set?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If trigger issue is a sub-task, {{issue.parent.Request Type}} will give you the parent's request type field value.
Please log above smart value before the If condition share the screenshot.
Also, the value is case sensitive so abc != ABC.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did a bit more looking and figured out the field in question, "Request type," exists multiple times so I think that threw it off. Renamed the field and updated the smart value accordingly, and it worked. Thanks very much!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Welcome to our Community. Could you please provide the screenshot of "My automation is as follows" part?
Thanks,
YY哥
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.