Two-digit date inputs are accepted but should not be!

onkeldom
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 26, 2012

Hi everybody,

hope you all had a wonderful X-Mas ... I'm really sorry to bother you again, but this issue is urgent. Our big Go-Live for JIRA and Confluence is nearing and I've found a behavior of JIRA's date/time handling which is wrong to the bone (or shouldn't be accepted ... or turned off ... or whatever ... )

Our current advanced settings for date/time related stuff are matching ISO 8601:

jira.date.picker.java.format - yyyy-MM-dd

jira.date.picker.javascript.format - %Y-%m-%e

jira.date.time.picker.java.format - yyyy-MM-dd HH:mm

jira.date.time.picker.javascript.format - %Y-%m-%e %H:%M

So do the user interface settings:

Complete Date/Time Format - yyyy-MM-dd HH:mm - 2012-12-27 15:47

Day/Month/Year Format - yyyy-MM-dd - 2012-12-27

The BIG (!) problem: JIRA is still accepting manual date/time entries like 12-12-12 13:14, which all users refer to as 12th of December 2012 ... but it's saved as 12th December 0012. I know, this is related to Java ... but it should be forbidden/possible to disable. JIRA should ONLY accept dates formatted like the given settings, nothing else.

How can I disable this behavior in JIRA?

This is - as I said - a really big issue which could screw up the whole Go-Live.

1 answer

1 accepted

0 votes
Answer accepted
pschaff01
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 17, 2013

Hi Dominic

To fix this, you'll have to do the following:

  1. Log in to JIRA as an Administrator;
  2. Browse through Administration -> System -> General Configuration -> Advanced;
  3. On the jira.date.picker.java.formatfield you have the following info configured:
    yyyy/MM/dd
    
  4. Change this format to the following:
    yy/MM/dd
    
  5. This will solve your problem with the date format and the new issues created will appear normal ("/13" will be "2013").
  6. If the problem persists with the existent issues just click on "Edit" on the issue and insert the "Due Date" field again.

I hope this helps. ;)

Cheers

onkeldom
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 30, 2013

Thanks Pietro,

I already tried that setting before. Sadly changing the date picker fields in that way screws up the excel export options. The system date fields get exported in a different way than the custom date fields ... so I switched back.

Atlassian should just implement a check routine to forbid inputs different from the configured date formats. But I guess that never happens. Thanks anyway ...

Cheers,

Dom

Suggest an answer

Log in or Sign up to answer