Automation rule not updating (shows no errors)

Raúl Eduardo Echeverría Urbina August 16, 2022

Hi, I'm trying to create an automation rule.  I have two fields, first the due date, the other one is  a number (custom field).  And I want to to do this.

  • Calculate the difference in days between now date and due date.
  • Split the result with the number field.

I'm using this formula

{{now.diff(issue.fields.duedate).days/issue.fields.customfield_10104}}

Automation rule is not triggering any issue, but it's not updating the field.

3 answers

1 vote
Bill Sheboy
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 16, 2022

Hi @Raúl Eduardo Echeverría Urbina 

For questions on automation rules, please post images of your complete rule and the audit log details, showing the execution.  That will provide context for the community to offer suggestions.  Thanks!

From what you have shown thus far...

To perform division you may either use the slash and a mathematical expression, or just use the divide function, such as this: 

{{now.diff(issue.duedate).days.divide(issue.customfield_10104)}}

Kind regards,
Bill

0 votes
Mykenna Cepek
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 16, 2022

You're in good hands with @Bill Sheboy and @John Funk

I'd just add that you might want to review how the math expression syntax works for Smart Values in automation (as documented here). The general format for math expressions is:

{{#=}} expr {{/}} 

 Automation can handle this kind of thing well, but the syntax and semantics of Smart Values will have you fussing with it until it finally works.

As for "not triggering" and "not updating", screenshots of your rule and the Audit Log will be helpful.

0 votes
John Funk
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 16, 2022

Hi Raúl,

I would do that in two different steps to help with any troubleshooting. 

Create another custom number field. 

Update the new custom number field based on the diff of the two dates. 

And then update the original number using the division. 

Suggest an answer

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

Atlassian Community Events