We have 3 issues types: Task, Request, and Initiative. An Initiative is created first. I am trying to build an automation where when a Request is created that is linked to an Initiative it will fill in the custom Initiative Name field on the Request with the Summary from the linked Initiative. Otherwise, it will put in some default text liked "Requested Enhancement" or something similar. Important note: there will always only be up to 1 linked Initiative, any other linked issues will be other Requests or Tasks.
I have tried building this automation with a branch but it attempts to update the custom field on the linked Initiative which is not right. I have also tried to use an if/else component but I cannot figure out what combination of smart values or JSON to use to update the Initiative Name field with the Summary from the linked Initiative.
Hi @JAMJAR -- Welcome to the Atlassian Community!
For a question like this, context is important for the community to help. Please post the following:
Until we see those...
Once inside the branch, the rule tries to edit the branched-to issue(s). As you want to edit the newly created Request instead, the rule could do this:
Seeing your rule images will confirm the specific changes needed.
Kind regards,
Bill
Hi @Bill Sheboy
It is a team managed project. Here is an image of the automation as it currently stands but as I said I have made many changes. I have removed my poor attempts at smart values and JSON and JQL so this is the entirety, there are no hidden details in the components.
My thinking was perhaps I could use the JSON editor in that final edit issue fields component to pull in the summary from the linked issue of type Initiative. Would that work?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that information, and please try what I suggested using the Lookup Issues action with JQL to get the data needed: https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Lookup-issues
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That worked perfectly! Since I wanted this to do something else if there is not linked Initiative I actually made it an If/else component. In the If it checks if there is a linked issue of relates so, and further uses JQL to check if some of those linked issues are type Initiative. Then used google to find out how to write the JQL to check for linked issues of type Initiative for the lookup component. Then used the smart value you specified to edit the Initiative Name field. And in the Else branch just had it update to the default value I specified above. Tested the 3 cases I can imagine (Request with no links, Request with links to non-Initiatives, and Request with link to an Initiative) and all 3 went as expected. Thank you for your help!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome, and well done adding the extra steps needed!
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.