Uploaded image for project: 'Automation for Cloud'
  1. Automation for Cloud
  2. AUTO-714

Using custom variables with date function doesn't work

XMLWordPrintable

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      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

              Unassigned Unassigned
              060522e4e917 Phumi
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: