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

Using date picker custom field with the format “YYYY/MM/DD”, and setting a date after 2039 using API call, automatically changes the year to 19XX.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 7.13.12, 8.5.4
    • REST API
    • None

      Issue Summary

      Using date picker custom field with the format “YYYY/MM/DD”, and setting a date after 2039 using API call, automatically changes the year to 19XX.

      Steps to Reproduce

      1. Create a date picker custom field
      2. Associate the custom field with the project
      3. Create a new issue
      4. PUT the below API call to set the End Date as "2040-01-01"

      PUT http://localhost:8080/rest/api/2/issue/BA-1

      {
      "fields":{
      "customfield_10700":"2040-01-01"
      }
      }
      

       

      In the UI, the representation is 01/Jan/40.  We cannot clearly identify if it is 2040 or 1940. 

      We also see the 19XX value when we export the issue to XML.

      <customfieldvalues>
      <customfieldvalue>Mon, 1 Jan 1940 00:23:20 +0553</customfieldvalue>
      </customfieldvalues>
      </customfield>
      

      But when you send a GET call for that issue, you get the result as customfield_10700": "1940-01-01",

      Expected Results

      Keep the correct date which was set.

      Actual Results

      It automatically set the wrong year. customfield_10700": "1940-01-01",

      Workaround

      None

      Currently, there is no known workaround for this behavior. A workaround will be added here when available

            Unassigned Unassigned
            spasha2@atlassian.com Shafath
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: