Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-13517

Creating Epic via API without Epic Link or Sprint value generates error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a bug
    • Medium
    • None
    • 2016-03-21 Cloud
    • None
    • None
    • JIRA v7.2.0-OD-05-030

    Description

      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

      1. Create new software project
      2. Include the Epic or Sprint fields on your Create Issue screen
      3. 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

      Attachments

        Activity

          People

            Unassigned Unassigned
            mlavender mlavender (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: