Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-31291

JIRA Date Picker not working for dates after 2031

    XMLWordPrintable

Details

    Description

      NOTE: This bug report is for JIRA Server. Using JIRA Cloud? See the corresponding bug report.

      Summary

      By default Jira ships with settings to accept only 2 digits for year values in dates. This causes ambiguity for dates of events that are several years in the future or past because of the inherit loss of precision that comes with trying to store a four digit value like a year with only two digits.

      Steps to reproduce:

      1. Create or edit an issue and set the Due Date to 12/31/2031 or any date after that.

      Expected behavior:

      Jira should set the correct date.

      Actual results:

      You pick a date after 12/31/2031 it will yield a date from early 1900's.

      For example, picking 12/31/2032 yields 12/31/1932 when the field is saved.

      Workaround:

      A Jira Administrator can change the input settings and the look and feel setting so that all dates in Jira will always use 4 digit years instead of 2 digit years. This will help to avoid the problem when users are setting values going forward.

      1. ⚙︎ -> System -> General configuration -> Advanced settings:

      Change 4 values on this page

      1. jira.date.picker.java.format
      2. jira.date.picker.javascript.format
      3. jira.date.time.picker.java.format
      4. jira.date.time.picker.javascript.format

      For the java fields change the 'yy' portion to 'yyyy'. For the javascript entries, the syntax is different, you have change '%y' to '%Y'.   So for example if jira.date.picker.java.format has a current value of 'd/MMM/yy' (without quotes) you would change this to 'd/MMM/yyyy'.

      2. ⚙︎ -> System -> User Interface -> Look and Feel


      The look and feels settings also need to be updated. Change the year values here from 'yy' to be 'yyyy'.

      Attachments

        1. advancedset1.png
          advancedset1.png
          832 kB
        2. lookfeel1.png
          lookfeel1.png
          175 kB
        3. Screen Shot 2017-10-30 at 12.12.03 PM.png
          Screen Shot 2017-10-30 at 12.12.03 PM.png
          43 kB
        4. Screenshot 2020-12-18 at 16.17.32.png
          Screenshot 2020-12-18 at 16.17.32.png
          98 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              pcora Pedro Cora
              Votes:
              74 Vote for this issue
              Watchers:
              70 Start watching this issue

              Dates

                Created:
                Updated: