Hello,
I am attempting something with automation that I havent messed with much before so hoping to get some clarity here.
This is the scenario:
We have Initiatives and nested under those Initiatives are Features and Enablers. We have a mutli-value field on the features and enablers that I would like to roll up to the parent initiative whenever that field is updated. The issue here is that I need the values from all of the child features and enablers to roll up continuously.
So basically the parent needs to reflect the combination from all multi field values from all of the child tickets
As an example:
Feature 1 has values A, B, C, D in the multi field value
Feature 2 has values C, D, E in the multi field value
Feature 3 has values A, E in the multi field value
Feature 4 has values F in the multi field value
The parent of these features should show values A, B, C, D, E, F in the multi field value
Additionally if Feature 2 deletes D from the multi-field value, it should still show in the parent because it is still linked in Feature 1
Any thoughts on how I could approach this? Thanks in advance.
Hello @Travis Hill
To clarify, your trigger is field change on the feature and if that field is updated, you want to find that feature's initative, find all features/enablers of that initiative, and then copy these values over?
If so, can you tell:
Thanks for reaching out. That is exactly the scenario yes. When that trigger field is updated it should find that tickets parent then spot check all children of that parent and copy those values over, exactly!
As far as the answers to your questions above, it is yes to all three
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
<edit - summarizing steps for quick reference>
</edit>
So, start a new rule with:
Please cross check my JQL for lookupIssues...
Create this rule, trigger the rule by adding/remove a value from the check box field and share the audit log. We need to see if lookupIssues gets all features/enablers
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.
It looks like it found all the child issues as you can see with the linked issues above. Those are the only two under that particular parent.
However it didnt update the parent to reflect the changes made to the child. Im assuming I missed a then statement to say update parent?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
No, we havent gone that far, :p.
In your rule, can you next log {{lookupIssues.Your Field.value}}
Replace bolded part above with actual field name.
Then, select few values in both the features, preferrably duplicates..
And share the audit log again.
We still havent updated the Initiative yet, we are getting there.. I promise.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I trust you!
Ok I added the same value to the field on each of the child tickets, here is the audit log
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you share your rule screenshot as well. As you can see, last 2 log statements are not printing correctly so something if off..
Also, make sure {{lookupIssues.Your Field.value}} has your correct field name...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Im wondering if I need to use the custom field id instead?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
2 things.
Please use lookupIssues, not lookupissues... (capital I instead of lower case i)
So change it to {{lookupIssues.key}}
And the last lookup, change it to {{lookupIssues.Agile Release Train.value}}
Please update both, trigger rule by adding a check box field and share audit log. Thanks!
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.
Great. I am going to list down series of next steps. I am not in front of computer right now so Please implement them and share screenshot of the rule and audit log as you go long to understand issues.
Next:
{{#lookupIssues.Agile Release Train}}{{value}}{{^last}},{{/}}{{/}}
{
"fields": {
"Agile Release Train": [ {{#myvar.split(", ")}}{ "value": "{{.}}" }{{^last}}, {{/}}{{/}} ]
}
}
Trigger rule by making change to a field and share rule screenshot and audit log:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looks like were pretty close, its pulling everything in accurately to the Log but failing to add it to the parent. But as you can see from the last Log Action there is no space between the two variables, could that be the issue?
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.
Yes, those values should be separated by commas.
So there are few corrections I had to make. So please delete earlier steps and please redo like below:
your variable myvar should be:
{{lookupIssues.Agile Release Train.value}}
Then do branch -> Choose JQL and give query = key={{issue.Parent Link}}
Then do a log action and log below value to verify:
{
"fields": {
"Agile Release Train": [ {{#myvar.remove("[").remove("]").replace(" ","").split(",")}}{ "value": "{{.}}" }{{^last}},{{/}}{{/}} ]
}
}
Then edit issue -> Additional Fields - Remove existing JSON and replace with below:
{
"fields": {
"Agile Release Train": [ {{#myvar.remove("[").remove("]").replace(" ","").split(",")}}{ "value": "{{.}}" }{{^last}},{{/}}{{/}} ]
}
}
Your last few steps should look like below:
Please clear steps from my earlier post and implement these from the "Create Variable" step onward, trigger rule and share audit log if issues.
*fingers crossed*
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
looks like were hitting a similar snag. Seems like it errors out with the Additional Fields query.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey,
no.. we are almost there..
Can you, before your edit issue in the last step, in the log action.. replace existing string with below value and share edit log.. I was stripping spaces in your fields..I need to check if I need to do that or not..
{
"fields": {
"Agile Release Train": [ {{#myvar.remove("[").remove("]").split(",")}}{ "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.
OK. Another edit :p
Please use below JSON in log and also in the edit issue replacing existing content.. Just had to trim extra white spaces..
{
"fields": {
"Agile Release Train": [ {{#myvar.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.
You've updated it in both places the above JSON?
Including the edit issue section?.. The last step?
Please share the log right before this error..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please replace highlighted section in below screenshot with below JSON::
{
"fields": {
"Agile Release Train": [ {{#myvar.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.
Yeah, copied that over into both places. I believe this was the audit log before we made that change:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, that audit log is from before..
I know we have been at this for a while so apologies
But please copy below JSON in both places of last 2 steps and trigger the rule again.
I have tested this in my jira and it works.
{
"fields": {
"Agile Release Train": [ {{#myvar.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.
No need to apologize at all. Youre an absolute rockstar and I appreciate your help greatly! I spot checked everything and Im still getting the same error. Let me drop the latest audit log and a screen shot of the flow for reference because I know im missing something small
:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you Please share screenshot of the details of the edit issue fields screenshot which shows the JSON?
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.
OK, so every thing is correct.
Only thing I can think of is, in the edit section. the field "Agile Release Train" is not working.
We need to find the custom field value for this one.
If you dont know this value already..
https://yourdomain.net/rest/api/2/issue/RD-2643?expand=names
Please refer to this process for details on this step:
https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/
And once you find it.. replace "Agile Release Train" with that value in edit section, something like below:
{
"fields": {
"customfield_XXXX": [ {{#myvar.remove("[").remove("]").split(",").trim}}{ "value": "{{.}}" }{{^last}},{{/}}{{/}} ]
}
}
Since its late, maybe we can tackle this tomorrow. Sorry it ended up being marathon.. I wasnt on my other machine earlier..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That was it!! Just needed the custom field id and now its working like a charm!!
This is amazing and I really appreciate your help on this. I never would have figured it out.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome.
Given that its working, I will summarize what we did for reference:
This last step of looking up customfield is a glitch in Jira and should have worked directly.
Please test few more scenarios and if its working as expected, consider accepting solution. Folks in future may find it hard but hopefully they can benefit.
Thanks!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Tested it out on a few more and it seems to be working perfectly. Thank you for walking me through this. Appreciate it greatly!
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.