Automation: Invalid Dates with "plusMonths" in Smart Values

XMLWordPrintable

    • Severity 3 - Minor

      Issue Summary

      Using "plusMonths" in the smart value works well in most situations. However, it may lead to errors in certain cases where the resulting date becomes invalid after the addition. For example, adding 1 month to 31 Jan would result in 31 Feb, which is an invalid date.

      Steps to Reproduce

      1. Create an automation rule to fetch a date value
      2. Now add the fetched date value with 1 month using the smart value "plusMonths" and assign it to a variable
      3. Print the smart value variable in the audit log

      Expected Results

      The date value should automatically get adjusted to the 1st of next month

      Actual Results

      The below error is thrown in the Automation audit log:

      Failed to get value for now.plusMonths(1): {{now.plusMonths(1)]}} 

      Workaround

      Currently, there is no known workaround for this behaviour. A workaround will be added here when available

            Assignee:
            Unassigned
            Reporter:
            Prabhu Subramaniyan
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: