Uploaded image for project: 'Automation for Jira Server'
  1. Automation for Jira Server
  2. JIRAAUTOSERVER-223

{{now.weekOfYear}} returns the wrong week number

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 7.3.0
    • 7.2.6
    • Smart-values
    • None
    • Severity 3 - Minor

    Description

      Issue Summary

      When now.weekOfYear is used in A4J rules, it returns the wrong week number

      Steps to Reproduce

      1. Create an automation rule to create a ticket in a project
      2. In the Create issue event, include now.weekOfYear in the summary
      3. Execute the rule and check the week number in the issue summary

      Expected Results

      now.weekOfYear should return the correct week number

      Actual Results

      now.weekOfYear returns the wrong week number

      Example:
      In the screenshots attached, the log-action shows week 9 but we are in week 8 (Feb 22 - Feb 28) of 2021

      Workaround

      There're different ways to count the week of the year (see Week numbering), so, due to that, on Automation for Jira 7.3.3 (Release notes) a new Smart Value was added to differ both weeks count compliant:

      • ISO compliant
        {{now.weekOfYearIso}}
      • Classic compliant
        {{now.weekOfYear}}

      With that said, use the ISO compliant, then you should get the expected week count.

      Attachments

        1. Screen1.png
          Screen1.png
          296 kB
        2. Screen2.png
          Screen2.png
          347 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              fe9534534cb0 Deepak Kumar
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: