-
Bug
-
Resolution: Not a bug
-
Medium (View bug fix roadmap)
-
None
-
2016-03-21 Cloud
-
None
-
None
-
JIRA v7.2.0-OD-05-030
Summary
When creating a new issue via JIRA API using the Epic issue type along with the Epic Link and/or Sprint fields, an error is generated if those fields are left with no value.
Environment
Cloud
Steps to Reproduce
- Create new software project
- Include the Epic or Sprint fields on your Create Issue screen
- Reference the custom field in your API call with no value e.g., " "customfield_10000: "" "
Expected Results
A new issue should be created
Actual Results
JIRA reports an error respectively based on the field you are attempting to reference with an empty value
{"errorMessages":["gh.epic.error.not.found"],"errors":{}}
{"errorMessages":["Number value expected as the Sprint id."],"errors":{}}
Notes
The following combinations were tried with the API
API call with generic single line text field and Bug issue type
curl -D- -u sysadmin:sysadmin -X POST --data '{"fields": {"project":{"id":"10401"},"summary": "No REST","description": "Creation","issuetype":{"id": "10102","reporter": "sysadmin","customfield_10301":""}}}' -H "Content-Type: application/json" https://beherenow.atlassian.net/rest/api/2/issue/
API call with Sprint field and Bug issue type
curl -D- -u sysadmin:sysadmin -X POST --data '{"fields": {"project":{"id":"10401"},"summary": "No REST","description": "Creation","issuetype":{"id": "10102","reporter": "sysadmin","customfield_10010":""}}}' -H "Content-Type: application/json" https://beherenow.atlassian.net/rest/api/2/issue/
API call with Epic Link field and Bug issue type
curl -D- -u sysadmin:sysadmin -X POST --data '{"fields": {"project":{"id":"10401"},"summary": "No REST","description": "Creation","issuetype":{"id": "10102","reporter": "sysadmin","customfield_10006":""}}}' -H "Content-Type: application/json" https://beherenow.atlassian.net/rest/api/2/issue/
API call with Epic Link field and Epic issue type
curl -D- -u sysadmin:sysadmin -X POST --data '{"fields": {"project":{"id":"10401"},"summary": "No REST","description": "Creation","issuetype":{"id": "10000","reporter": "sysadmin","customfield_10006":""}}}' -H "Content-Type: application/json" https://beherenow.atlassian.net/rest/api/2/issue/
Workaround
[JSWSERVER-13517] Creating Epic via API without Epic Link or Sprint value generates error
Workflow | Original: JAC Bug Workflow v2 [ 2851029 ] | New: JAC Bug Workflow v3 [ 2934227 ] |
Status | Original: Resolved [ 5 ] | New: Closed [ 6 ] |
Workflow | Original: JIRA Bug Workflow w Kanban v7 - Restricted [ 2543708 ] | New: JAC Bug Workflow v2 [ 2851029 ] |
Workflow | Original: JIRA Bug Workflow w Kanban v6 - Restricted [ 1545937 ] | New: JIRA Bug Workflow w Kanban v7 - Restricted [ 2543708 ] |
Workflow | Original: JIRA Bug Workflow w Kanban v6 [ 1278291 ] | New: JIRA Bug Workflow w Kanban v6 - Restricted [ 1545937 ] |
Resolution | New: Not a bug [ 12 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |