When comparing two Date Type Custom Fields using Diff, an empty result is produced

XMLWordPrintable

    • Severity 3 - Minor

      Issue Summary

      In an Automation Rule, while making use of the Smart Values' Diff function between dates stored in two Custom Fields (Date Type), an empty result is returned when it should display a resulting calculation diff between those two fields.

      Steps to Reproduce

      The steps are explained in this article:

      By using the same example smart value expression on this article (also below for reference), an empty result is returned.

      It's possible to add "Log Action" steps to print the value from the smart value result, and an empty result is logged.

      By switching these values to "Now" function for example, the results are then displayed. The problem seems to happen while using two custom fields for the Diff function.

      It could be that this was working before and stopped at some point, mostly because the article used this method as an example.

      {{issue.customfield_10189.diff(issue.duedate).prettyPrint}}
      

      Expected Results

      A Diff calculation result should be returned.

      Actual Results

      An empty result is displayed.

      Workaround

      It's possible to copy the Date values to a "Create Variable" step, then switch the Custom Fields in the expression with the variable names.

      {{myDateTypeVariableOne.diff(myDateTypeVariableTwo).prettyPrint}}
      

            Assignee:
            Unassigned
            Reporter:
            Michel Guedes
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: