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

Getting the "java.lang.IllegalArgumentException: Invalid format:" error when trying to release a version

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 9.12.0, 9.17.0, 9.12.12, 9.12.11
    • None

      Issue Summary

      When trying to release a Jira version using the Release button after clicking on a specific version from the Project Settings > Versions page, the error below is thrown in the UI:

      Sorry, we had some technical problems during your last operation.
      
      Technical details
      Log's referral number: XXXXXXXX
      
      Cause
      Referer URL: <JIRA_BASE_URL>/projects/SCRUM/versions/10000
      
      java.lang.IllegalArgumentException: Invalid format: "2024-08-08" is malformed at "24-08-08"
      	at org.joda.time.format.DateTimeFormatter.parseLocalDateTime(DateTimeFormatter.java:900) [joda-time-2.10.5.jar:2.10.5]
      	at com.atlassian.jira.datetime.JodaDateTimeFormatter.parse(JodaDateTimeFormatter.java:42) [classes/:?]
      	at com.atlassian.jira.datetime.DateTimeDatePickerFormatter.parse(DateTimeDatePickerFormatter.java:28) [classes/:?]
      	at com.atlassian.jira.datetime.DateTimeFormatterImpl.parse(DateTimeFormatterImpl.java:51) [classes/:?]
      	at com.atlassian.jira.util.DateFieldFormatImpl.parseDatePicker(DateFieldFormatImpl.java:42) [classes/:?]
      	at jdk.internal.reflect.GeneratedMethodAccessor1133.invoke(Unknown Source) [?:?]
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [?:?]
      	at java.base/java.lang.reflect.Method.invoke(Method.java:569) [?:?]
      	at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) [atlassian-plugins-core-7.1.9.jar:?]
      	at jdk.proxy3/jdk.proxy3.$Proxy246.parseDatePicker(Unknown Source) [?:?]
      	at jdk.internal.reflect.GeneratedMethodAccessor1133.invoke(Unknown Source) [?:?]
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [?:?]
      	at java.base/java.lang.reflect.Method.invoke(Method.java:569) [?:?]
      
      

      Notes

      • This issue only occurs if there is a mismatch in the Date format between the 2 configurations below:
        • ⚙ > System > Look and feel > Day/Month/Year Format
        • ⚙ > System > General Configuration > Advanced Settings > jira.date.picker.java.format
      • This issue does not occur when releasing a version directly from the page Project Settings > Versions and without clicking on the version, but by navigating to ... > Release instead
      • Depending on the date formate set in either the "Look and feel" or the "Advanced Settings" page, the error in the UI might be slightly different:
        • Instead of this error
          java.lang.IllegalArgumentException: Invalid format: "2024-08-08" is malformed at "24-08-08"
          
        • This error might be thrown
          java.lang.IllegalArgumentException: Invalid format: "2024-05-16" is too short
          
      • While this bug might be related to JRASERVER-75894, it is not exactly the same:
        • The path that leads to the error is different
        • The bug JRASERVER-75894 was fixed in 9.17.0, but this bug still occurs in 9.17.0

      Environment

      • This issue was observed in Jira Data Center 9.12.12, but we suspect that any Jira 9.x version might be impacted.
      • The bug was also replicated in 9.17.0.

      Steps to replicate

      1. Go to the page ⚙ > System > Look and feel
        • Set Day/Month/Year Format to yyyy-MM-dd
      2. ⚙ > System > General Configuration > Advanced Settings
        • Make sure that the default value d/MMM/yy is set for jira.date.picker.java.format
      3. For any Jira project that has version, go to Project Settings > Versions
      4. Set a release date for any version
      5. Click on this version, you will be redirected to a new page
      6. Click on the Relase button, and then click again on Release from the pop-up window

      Expected behavior

      The version should be released successfully, despite the date format set in ⚙ > System > General Configuration > Advanced Settings > jira.date.picker.java.format.

      Observed behavior

      The error "Sorry, we had some technical problems during your last operation." is thrown in the UI along with the "java.lang.IllegalArgumentException: Invalid format:" exception:

      Workaround

      Workaround 1 (Recommended)

      Instead of releasing the version via the specific version page, release this version directly from the Project Settings > Versions page, by navigating to ... > Release next to this version, as illustrated below:

      Workaround 2 (Less Recommended)

      An alternative workaround is to make sure that the date format matches in the 2 configurations below:

      • ⚙ > System > Look and feel > Day/Month/Year Format
      • ⚙ > System > General Configuration > Advanced Settings > jira.date.picker.java.format

      However, please note that, as a side effect of using this workaround, you might run into the other bug JRASERVER-78027, if the date formate used in both places is not the default one.

        1. ObservedBehavior.png
          893 kB
          Julien Rey
        2. Step1.png
          168 kB
          Julien Rey
        3. Step2.png
          150 kB
          Julien Rey
        4. Step3.png
          266 kB
          Julien Rey
        5. Step4.png
          299 kB
          Julien Rey
        6. Workaround.png
          293 kB
          Julien Rey

              Unassigned Unassigned
              jrey Julien Rey
              Votes:
              4 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: