Hi all,
I'm trying to find a way to create an automation that’ll inherit "Domain" field values from all Epics to their parent Initiative everytime the field values are updated or when the parent is changed.
I found a way to make it happen but there's an issue if the Initiative has 2 Epics or more under it: The values in the Initiative will stay as they are and the automation just adds the new values to it - But keeps the old values as well which are no longer relevant:
To solve this I tried to first clear the Initiative "Domain" values (every time the Epic's "Domain" field is changed) and re-fetch the values again - But then it only takes the values from the Epic that was modified (the trigger issue), so it's not working for me.
Another idea was to use a variable or lookupissues to get a list of all the Epics under the Initiative - capture the values of "Domain" from all of them - and then put them back in the Initiative. When I tried that I got the following error:
(Specify the value for Domain in an array (Domain))
Any idea how to get past this error?
here's what I tried:
Instead of using "fields" (value:), try using: "update" (set:)
"update": {
"Domain": {
"set":
Take a look at the difference between "update" and "fields":
here
Hi @Stevan Mandić , thanks for your reply.
the goal here is to aggregate all the Epic's field values to the Initiative parent which means I'll have to clear the Initiative field first, so in this case "update" or "set" doesn't matter. Otherwise, it may keep the values that are no longer in another Epic's field.
I believe the issue is more related to the format expected by the field that differs from the one I get with the lookupissue.
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.
@Shir Avtabi here is the working solution, just replace XXXXX with your Domain Field ID (both in variable and edit action)
this rule will always keep Initiative Domain field values updated when child Domains change.
1)Trigger: Field value changed (Domain)
2)Condition - issuetype equals Epic
3) Lookup issues - JQL:
issuekey in portfolioChildIssuesOf("{{issue.Parent}}") and issuetype = Epic
4) Create variable - "childDomains":
{{lookupIssues.customfield_XXXXX.value}}
5) Branch For: Parent
5.1) Edit issue fields - More options:
{
"fields": {
"customfield_XXXXX": [ {{#childDomains.remove("[").remove("]").split(",").trim}}{ "value": "{{.}}" }{{^last}},{{/}}{{/}} ]
}
}
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.
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.