Date picker fields allow for incorrect input when using MM/dd/yy format

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Low
    • None
    • Affects Version/s: 8.20.6, 9.12.0
    • Component/s: Issue - Fields
    • None
    • 8.2
    • 2
    • Severity 3 - Minor
    • 0

      Issue Summary

      In Jira Data Center, when inputting a value into a field that's using a MM/dd/yy format, it allows users to put incorrect values into it.
      This issue is reproducible on Jira Data Center 8.20.6 and 9.12.0 so far.

      Steps to Reproduce

      1. Navigate to Jira Administration > General Configuration > Advanced Settings
      2. Set jira.date.picker.java.format to MM/dd/yy
      3. Set jira.date.time.picker.java.format to MM/dd/yy h:mm a
      4. Navigate to a field that uses a date picker (Target Start or Target End)
      5. Input 01/20/12023 or 11/29/233 into the field.
      6. Run a REST API call against the issue like so to see the value set:
      https://serverName/jira/rest/api/2/issue/issue-Key?fields=customfield_<id of date field> 

      Expected Results

      Error should be returned in the UI showing that this is invalid input and the REST response shouldn't have the incorrect value.

      Actual Results

      The UI will take the incorrect input and may display it correctly or incorrectly depending on the value that's inputed.
      For example, if we input 11/29/233 we see that it sets the date to 29/Nov/33 in the UI and 0233-11-29 with in REST response:

      Workaround

      Using the default d/MMM/yy doesn't seem to allow for incorrect input. 

        1. Screenshot 2023-12-08 at 07.03.38.png
          Screenshot 2023-12-08 at 07.03.38.png
          32 kB
        2. screenshot-1.png
          screenshot-1.png
          126 kB
        3. image-2023-12-05-17-33-13-789.png
          image-2023-12-05-17-33-13-789.png
          21 kB
        4. image-2023-12-05-17-33-13-770.png
          image-2023-12-05-17-33-13-770.png
          32 kB
        5. image-2023-12-05-17-33-13-747.png
          image-2023-12-05-17-33-13-747.png
          41 kB

            Assignee:
            Unassigned
            Reporter:
            Adrian Castillo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: