Automation in fields

Barry Neilson
Contributor
August 26, 2024

Hi All,

I am working with Automation - Jira Cloud - Team managed

Script 1 worked once or twice.  Then I created a second script to run.

 

Script 1

When: Issue is updated

Then: Edit Plan Days field (Number field)

Script: {{issue.Start Date.diff(issue.Plan End Date).days}}

result: Audit log says aborted.

 

Script 2

When: Issue is updated

Then: Edit Complete Days field (number field)

Script: {{#=}} {{issue.Plan Days}} * {{issue.% Complete}} * 100 {{/}}

Result:  Completed Days does not populate.  Rules Tab shows black circle with i.

What am I doing wrong?

 

2 answers

0 votes
Duc Thang TRAN
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 26, 2024

Hello @Barry Neilson 

Can you show me the audit log for these automations? And can you confirm that 'Start Date' and 'Plan End Date' are custom fields of type 'Date' and '% Complete' is of type 'Number'?

Best,

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 26, 2024

Hello @Barry Neilson 

A black circle with an "i" next to the rule name usually means you have put something into the Rule Details Description field, and if you hover over the "i" it will show you that information.

Can you provide screen images of the rules and the Audit Log information? Sometimes there are typos in the actual rule that don't get carried into the community post when you retype it.

 

I suspect that part of the problem is that you are trying to run two rules simultaneously against the same issue triggered by the same event, and one rule depends on the value of a field that is being change by the other rule.

Is there a reason that you are choosing not to combine the Edits into a single rule?

 

One execellent debugging technique for Automation Rules is the Log action.

https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Log-action

This action prints information into the rule execution log. I use this action to print the original values of each field I want to change, and to print any calculations I'm doing or smart value references I use to set the value of fields. That can help tell you if the fields and smart values contain the values you expect.

You also must be precise with spacing and capitalization for field identification in smart values. The wrong spacing or capitalization can result in you referencing a different field than you intended. The Automation Rule will not necessarily tell you that it can't find the field you referenced. Instead is will just evaluate the value to be Null.

Barry Neilson
Contributor
August 27, 2024

Thanks Trudy

Thanks again for your help.

you said: A black circle with an "i" next to the rule name usually means. Thanks, good to know.

I check spelling, caps and everything.... Jira does not update very fast even when it does work. It's insanely slow. The audit log takes months to update. 

But now all of the rules have failed.  Every single <insert favorite string of expletives here> one of them.

Update:

.... aaaaaand I think I know what the problem is.   

Monthly rule executions have been exceeded.

... and I've been sitting here like a dummy trying to work out that I've met the trial limits.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 27, 2024

Ah, yes, the rule execution limits.

With a trial the limit is quite low.

So, again another good tactic is to use the Log action to print out all the field values and calculations that you would use in your rule before adding any actions to change issues. A rule that has only Log actions does not count against your monthly usage. Refer to this documentation for more information on how rule usage is calculated.

https://support.atlassian.com/cloud-automation/docs/how-is-my-usage-calculated/

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events