-
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/