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

Time related smart values may fail depending on the default timezone configuration

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 8.2.0, 9.0.2
    • Smart-values
    • None
    • Severity 3 - Minor

    Description

      Issue Summary

      Java supports timezone formats as GMT offset (such as GMT-0300) or as named timezone (such as America/Sao_Paulo).
      When adjusting the timezone to either of the above formats, Jira works as expected.
      However, Automation for Jira time operations, such as time related smart values may fail when using the GMT offset configuration.

      This issue may occur when the JVM uses the system timezone configuration or when the user.timezone JVM property is configured.

      Steps to Reproduce

      1. Install a vanilla instance of Jira.
        • This was validated with Jira Software Data Center on versions 9.4.10 and 9.11.1.
        • This was validated with Automation for Jira on versions 8.2.0 and on 9.0.2
      2. Create an automation rule that will log the now smart value when manually triggered from an issue.
      3. Configure the JVM to use the following startup property and restart Jira.
        -Duser.timezone=America/Sao_Paulo
        
      4. Access Administration > System > System info and search for User Timezone to confirm the property is in use.
      5. Access a Jira issue, trigger the automation rule and notice from the rule audit log that the smart value works as expected.
      6. Configure the JVM to use the following startup property and restart Jira.
        -Duser.timezone=GMT-03:00
        
      7. Access Administration > System > System info and search for User Timezone to confirm the property is in use.
      8. Access a Jira issue, trigger the automation rule and check the rule audit log.

      Expected Results

      now smart value is properly resolved and the rule succeeds.

      Actual Results

      The rule fails as Automation for Jira couldn't resolve the now smart value.
      Checking the action details from the rule audit log, the following error is shown:

      Error rendering smart-values when executing this rule:
      Failed to get value for now: Now: {{now}}
      



      Workaround

      Adjust the JVM timezone using the named timezone format instead of an offset from GMT.
      Be mindful that named timezones may follow daylight saving times rules, while an offset won't.

      Attachments

        1. screenshot-1.png
          screenshot-1.png
          28 kB
        2. screenshot-2.png
          screenshot-2.png
          31 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tmasutti Thiago Masutti
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: