Hello everyone,
I'm back with another automation question 😅. I've read all the suggested posts and they make sense, but there must be some small error I'm making that I'm not noticing.
We have an epic which has a custom field called "Residual Quantified Risk." Every issue in the epic has a field called "Quantified Risk." I want to sum the Quantified Risks from the issues into the Residual Quantified Risk in the Epic. This is what I have so far. The audit log says only "config change," even though I've tried to trigger it many time.
Thank you again for your help!
Good morning from blustery Finland! It is definitely the right audit log, and it's a company-managed project.
I already tested changing the editing part, so that changing the QR would change the summary, and that worked. It's just the part where it sums the QRs in the RQR field that doesn't work.
Hi @Lana Kelly , Finland is on my travel list one day...
so you need to have a lookup issues component immediately after your epic branch component...
Then lookup issues JQL parent = {{issue.key}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Okay, so it found the correct issues, but now it's still not summing anything.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please share your current rule via screenshot.
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.
Actually, I wish to see the entire rule if possible.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's much the same as when I first posted, just with a new lookup portion.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
can you replace "lookup" in your edit issues JSON with "lookupIssues"? If that does not work can you simply place {{lookupIssues.Quantified Risk.sum}} into the short form field box as in below example rather than in more options?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, and...if that does not work, the smart value for the field may be incorrect. Sometimes a field's display name on screens is different than the smart value.
You can check that using this how-to article to identify your smart value, or use the custom field id as an alternative: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh my goodness, the last bit was the lookupIssues. You know how you change things many times to test why it's not working and then forget to change it back...? Thank you so much @Jack Brickey and @Bill Sheboy
Now just to change the trigger and hope it still works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It does not 😔. I added this trigger (and took away the "If issue type is Threat" condition, since it's a project rule)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Lana Kelly , I see you accepted the answers here but your last comment seems to convey you still have issues? If things still are not quite right please let's us know.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I accepted the answers that fixed the formatting problem for my lookup part, but the triggering is still not working correctly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
to be clear if you use Manual trigger the rest of the rule works but if you trigger on the field changing and you change the field then the rule does not trigger. Is that correct?
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.
Thanks for confirming. So it certainly seems odd. Can you or have you tested with using a different field recently? For example, if you change the trigger based on The priority field. If that works then test out a custom field, if you have one. And just to be sure, you checked the Audit log and are not seeing the rule trigger. I just want to ensure we are not instead seeing "some errors" or "no actions performed " instead.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Okay, so when I changed the trigger to "When value changes for Severity," then the rule kicks in and the RQR is updated properly.
When the trigger is "When value changes for Quantified Risk," then the rule doesn't trigger, and the log shows the last rule execution was 3 minutes ago (when I changed the trigger to Severity) and the last item in the log is "Config Change"
I thank you deeply for your patience with me in fixing this tedious thing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No worries Lana I am glad to assist.
what type of field is QR? Though all types are supported I believe. Are you absolutely sure the field is getting updated? Are you testing with the same issue that was triggering when Severity was used?
I have to wonder if we are hitting a bug but it really would surprise me as the Community would be blowing up with posts on this which it is not.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Another test to run...
change the trigger to "issue updated" then ONLY edit the QR field and observe results. Does it trigger? If not then the issue lies with detection of change made to QR. if it does trigger the the issue lies with the "field changed" trigger specifically for the QR field or field type. It would also, be interesting to test the field changed trigger with another field of the same field type as the QR. If you happen to have such a field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When a field is not listed for the Field Value Changed trigger (or does not seem to trigger the rule), Jack is correct that the generic Issue Updated trigger can be tried. And then use an advanced compare condition to determine if your field changed by checking the changelog:
Yes, and...FYI some fields from marketplace addons can be calculated dynamically and so do not trigger rules. Those cannot be detected...unless there is a webhook to set up for the external product. This does not seem to be the case for this rule...correct?
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.
what type of field is QR? Though all types are supported I believe. Are you absolutely sure the field is getting updated? Are you testing with the same issue that was triggering when Severity was used?
The QR field is a number field. I'm absolutely sure it's being changed. It's a mathematical operation from other fields, so the value changes in real time (or as near to real time as Jira can get). Is it possible it's not changing because the value is an equation, and since the equation never changes, it never triggers?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah!
how is that field being updated? Is there another automation rule? You say this is an equation but Jira natively does not have any mathematical fields. As @Bill Sheboy mentions Automation does not support addon custom fields. I fear that is what we are dealing with here. 😬
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Jack Brickey @Bill Sheboy I've changed the trigger to be when either the Likeliehood or Severity changes (which would cause the QR to change, since it's a function of those two), and the RQR updates. So, basically, the flow looks like this:
Likelihood * Severity = Quantified Risk
So, for Threats A and B, the equation for RQR for the overall risk is:
(LikelihoodA * SeverityA) + (LikelihoodB * SeverityB).
Changing the trigger to make it so if likelihood or severity changes in the project, the RQR will update is sufficient, I suppose. I'd still like to know why the change in QR doesn't trigger a change in RQR, but perhaps it's just One Of Those Things.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's another automation rule (which @Bill Sheboy helped me with earlier)
It creates two lookup tables for Likelihood and Risk, and then multiplies them
{{#=}}{{SeverityTable.get(issue.Severity)}} * {{LikelihoodTable.get(issue.Likelihood)}}{{/}}
Nothing is an addon. Everything is done natively. :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please see my last response that overlapped your update.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok so then in the QR trigger go to the Details of the rule and ensure you have this box checked...
"Check to allow other rule actions...".
my bet is on this being the problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh my goodness! That was it!!! Thank you so much! I didn't even know that was an option. I just assumed that all rules would trigger always. A huge thank you to you @Jack Brickey and @Bill Sheboy for being so patient and knowledgable!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Lana Kelly
Your rule is referencing a Lookup Issues result to sum the field, but your rule does not have a Lookup Issues action.
Please add that action, with the JQL to gather the children of the epic, before your edit and the rule will work as you expect.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
agreed and that was my next comment but then I also saw what I thought led me to my last inquiry on TMP vs. CMP. I wanted to provide a full working example but needed that bit first.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How do you search for the relevant issues? I've tried
parent = {{issue.key}}
parentEpic = {{issue.key}}
parent = issue.key
parentEpic = issue.key
"Epic link" = {{issue.key}}
"Epic link" = issue.key
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.
Ah, sorry. I thought they had attached, but apparently not.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks. So you are saying the rule is not triggering, correct? Is this a single project rule and are the issues in the same project? I assume there is only one "quantified risk" field in your instance (just want to rule that out as the problem)?
while we are trying to resolve the trigger issue you might test the rest of your rule by changing the trigger to manual temporarily.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I changed it to manual trigger, and it says success, but it hasn't updated the field. It's a single project rule and all the issues are in this project, yes. And there is only one "quantified risk" field, which is a number field (same for "residual quantified risk")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not triggering - so you are editing the QR for an issue and it is not triggering? I assume this is a number field. It would be interesting to test triggering on a different field changing. This would help us understand if the issue is with detecting whether the rule can't detect changes to QR only or any field. You could test with something like priority or some other custom field.
not summing:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I changed the automation to change the description of the epic, and that worked, so it has something to do with the command to sum the QR fields and enter that value into the RQR field.
This is the original screen. The RQR field is on the right. The QR field is the same automation as the issues in the epic.
This is the original Aliens Invade issue.
This is the changed Aliens Invade issue. The QR has changed according to the automation.
The Epic stays the same.
And here, it shows the execution.
Then, I changed the automation to change the summary when triggered and it did.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I will unpack all of this in a bit when I get back to my computer. However, the fact that it isn't triggering still bugs me. Whether or ONT the summing is working or not it has nothing to do with triggering. You can check this by gutting all of the current conditions and actions and simply add a single action that comments on the issue that triggered the event. Then on a given issue change the QR and see if the comment is added.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Lana Kelly , I am hung up on the rule not triggering when updating the QR. I want to confirm that you are in in fact looking at the Audit log under project settings > automation for the associated rule. Please confirm.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
question....
is this a Team or Company managed project? I am wondering if you are are using Epic (parent) (CMP) in your branch rather than Parent (TMP).
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.