Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-82395

Date Time Picker custom field does not respect comparison with NOW expression with a few hours of difference

XMLWordPrintable

      Issue Summary

      When adding a workflow transition validator to check if a Date Time Picker type custom field is valid against a now expression, for example:

      Even if the condition is true, there is a time difference between the time the Custom Field has and the actual time being reported by Jira.

      Steps to Reproduce

      1. Create a Date Time Picker type custom field.
      2. Create a workflow transition and add a validator to compare the date/time field value with the current time being reported by Jira.

      Expected Results

      The condition is respected and the status is transitioned or not as limited by the time in the condition.

      Actual Results

      The condition is not respected because there is a time difference between the time filled in and the now expression used.

      Workaround

      Fill the time gap with the additional hours required for the condition to be respected. For example:

      {{now}} / {{now.minusHours(3).shortTime}} 
      

      The number of hours required is the offset from GMT in the site's default timezone set in System > General configuration > Internationalization.

      Eg. in a site set to 'Singapore (+8)' the "now" value used by the validator will be 8 hours in the future, but sites set to 'London (+0)' will have the correct value for "now".

        1. image-2023-11-20-17-42-01-740.png
          124 kB
          Roger B.
        2. image-2023-11-20-17-46-58-744.png
          409 kB
          Roger B.

            1590a4180611 Jessica Collins
            671ebca7909b Roger B.
            Votes:
            16 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved: