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

Add some validator and warning message in UI when a user enters only 2 digits of the year in format dd/MM/yyyy

    XMLWordPrintable

Details

    • 0
    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      Problem

      Add some validator and warning message in JIRA when a user enters a date (year part) using dd/MM/yy, while the input date format is set to dd/MM/yyyy

      Steps to Reproduce:

      1. Go to Administration > General Configuration > Advanced.
      2. Change the jira.date.picker.java.format from d/MMM/yy to dd/MM/yyyy.
      3. Create or edit an issue and type a number date in the Due Date field with format d/m/yy such as 1/1/14 for example
      4. Then click create or edit.
      5. After it is created or updated, go to the issue and click edit.

      Actual Results:

      The date typed is accepted and the Due Date field is storing 01/01/0014 instead of 2014.

      Suggestion

      Add some validator and warning message in JIRA UI when a user enters a date using dd/MM/yy, while the input date format is set to dd/MM/yyyy, so that the wrong year does not get set in JIRA.

      Notes

      It was decided in this original bug ticket that this behavior was actually not a bug, but an expected behavior due to the following reason:

      For parsing, if the number of pattern letters is more than 2, the year is interpreted literally, regardless of the number of digits. So using the pattern "MM/dd/yyyy", "01/11/12" parses to Jan 11, 12 A.D.
      

      source:

      Having said that, in order to avoid any confusion for JIRA users, it would be great to do a check on JIRA side on the input data before the date gets processed in the backend by the Java class.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jrey Julien Rey
              Votes:
              11 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated: