Community
Participate
Working Groups
Investigate if dates in FilterDefinitionConverter.addDateFilter() need to be formatted according to the server locale and date format. Current implementation: private static final String DATE_FORMAT = "d/MMM/yy" SimpleDateFormat df = new SimpleDateFormat(DATE_FORMAT, Locale.US);
We definitely need to localize that, as queries will fail. The JiraUtil methods dateToString as well as stringToDate should be passed the locale, and calls like FilterDefinitionConverter.addDateFilter() should call the JiraUtil method and pass the locale (from the repository settings - user needs to configure)
Created attachment 147462 [details] patch v1 * test case for query with localized date * added a local field to FilterDefinitionConverter * changed date conversion in JiraTaskDataHandler (Steffen, was that what you meant? not too sure about this one)
Created attachment 147463 [details] mylyn/context/zip
That looks good. Shouldn't we also be using the date format returned by JiraConfiguration.getDateFormat() in FilterDefinitionConverter?
sounds like a plan ;)
Created attachment 147506 [details] patch v2.1 added dateFormat field
Created attachment 147507 [details] mylyn/context/zip
Created attachment 147508 [details] patch v2.2 same patch, but using DateFormat as parameter (not splitting locale and datePattern)
Created attachment 147509 [details] mylyn/context/zip
Great! Just one minor nit: The null check in FilterDefinitionConverter seems unnecessary, just add an Assert.isNull(...) in the constructor so we avoid duplicating the constant for the default format which is already in JiraConfiguration. Can you make that change and re-cut the patch? I currently get a conflict.
Created attachment 147513 [details] patch v3 alright, I hope I didn't screw up while merging in the other patch that you committed :D
Created attachment 147514 [details] mylyn/context/zip
Great stuff. I have done some minor cleanup and applied the patch.