-
Suggestion
-
Resolution: Unresolved
-
1
-
NOTE: This suggestion is for JIRA Cloud. Using JIRA Server? See the corresponding suggestion.
Problem:
The JIRA REST API is peculiar and picky about date and time strings. It's almost ISO 8601 compliant, but slightly different:
- It demands time zone offsets in the form [+-]hhmm instead of the ISO format, [+-]hh:mm.
- It fails to parse if there is no fractional seconds, even if that fraction is 0 (e.g. 2016-06-08T23:44:57+0000 is not accepted while 2016-06-08T23:44:57.00+0000 is).
These differences, while subtle, break compatibility with standard date/time libraries, requiring the user to "fix up" library-provided strings before POSTing them to JIRA. Even worse, instead of returning HTTP 400 and indicating the error as some message (as the API docs say JIRA should), POSTs to /rest/api/2/issue/{issueIdOrKey}/worklog (and possibly other endpoints) return HTTP 500 if JIRA is unsatisfied with the date, giving no indication of what went wrong.
To Reproduce:
POST to /rest/api/2/issue/{issueIdOrKey}/worklog to a "started" value of some ISO 8601 date and time, e.g. 2016-06-08T23:44:57+00:00
Desired Fixes:
- The JIRA API should accept date and time strings in standard ISO 8601 formats.
- When times cannot be parsed, HTTP 400 should be returned instead of a HTTP 500 "Internal Server Error"
- is related to
-
JRACLOUD-80353 [Tracking in issue links] Date time format issues (system, custom, all views and inputs)
- Gathering Interest
-
JRASERVER-61378 REST API parses date/time strings poorly
- Gathering Interest
Form Name |
---|
Shocking that Jiracant do valid timestamps.