Using custom variables with date function doesn't work

XMLWordPrintable

      Problem

      Passing a custom variable to a function like the following doesn't work anymore

      {{now.minusBusinessDays(n)}}

       

      Environment

      Jira Cloud

      Steps to Reproduce

      • Create a variable varTimeSpent like
        {{#=}}{{issue.timetracking.timeSpentSeconds.divide(3600).divide(8)}}{{/}}
      • Use the variable in a time function like this:
         {{now.minusBusinessDays(varTimeSpent).jiraDate}}

      Expected Results

      The function is supposed to evaluate the custom variable to an integer and perform calculations.

      Actual Results

      Nothing, just an empty value

      Workaround

      Add the output of the custom variable to a custom field and pass in the custom field like this:

       {{now.minusBusinessDays(issue.customfield_xxxx).jiraDate}}

      Notes

            Assignee:
            Unassigned
            Reporter:
            Phumi
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: