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

Entering a date with the year too far into the past or the future (for example Jan 1944) in a date field results in the value being saved incorrectly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • Issue - View
    • None

    Description

      Issue Summary

      Entering a date with the year too far into the past or the future (for example Jan 1944 or 2044) in a date field results in the value being saved incorrectly

      Update - as of Jan 25, 2024 - entering a date in 1943 also causes this same problem. Issue is reproducible with dates in Jan 1943 to Dec 1943. Date gets changed to 2043 when saved and page is refreshed.

      Update: as this is an issue related to moving window of time, the examples will change over time.

      Steps to Reproduce

      Write any date earlier than 1st of Jan, 1943, like "01/01/1942", and hit enter.

      Expected Results

      The value is displayed and saved as entered.

      Actual Results

      The value looks to be saved, but when we look at the issue history, see that the value is now 01/01/2042

      • Once we refresh, the value in the date field will also display this incorrect date.

      Notes:

      • For the sake of testing, here are a few more examples where any date earlier than 1st of Jan 1943 that will result in an incorrect day month and year. For example:
        • 1st of Jan 1400 (01/01/1400) is saved as 9th of Jan 2000 (01/09/2000):
        • 1st of Jan 1850 (01/01/1850) is saved as 1st of Jan 1950 (01/01/1950):
        • 1st of Jan 1700 (01/01/1700) is saved as 1st of May 2000 (05/01/2000):
      • In the examples shown, the UI is showing the correct date entered but once the issue is refreshed, we see the actual value saved, which is the one indicated in the issue history.
      • This happens with any date and date time field.

      Workaround

      Changing the date format settings under System > General configuration > Advanced settings from the default 2-digit year to a 4-digit year allows saving a date outside of this 100-year range.

      For date fields, set these values:

      • jira.date.picker.java.format to d/MMM/yyyy (default is "d/MMM/yy")
      • jira.date.picker.javascript.format to %e/%b/%Y (default is "%e/%b/%y")

      For datetime:

      • jira.date.time.picker.java.format to dd/MMM/yyyy h:mm a (default is "dd/MMM/yy h:mm a")
      • jira.date.time.picker.javascript.format to %e/%b/%Y %I:%M %p (default is "%e/%b/%y %I:%M %p")

      Attachments

        1. screenshot-3.png
          screenshot-3.png
          30 kB
        2. screenshot-2.png
          screenshot-2.png
          36 kB
        3. screenshot-1.png
          screenshot-1.png
          30 kB
        4. image-2023-03-02-19-31-17-387.png
          image-2023-03-02-19-31-17-387.png
          105 kB
        5. image-2023-03-02-19-30-18-247.png
          image-2023-03-02-19-30-18-247.png
          83 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rchiquete Rene C. [Atlassian Cloud Support]
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated: