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

    • Icon: Bug Bug
    • Resolution: Not a bug
    • Icon: Medium 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

      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

            [JSWSERVER-13517] Creating Epic via API without Epic Link or Sprint value generates error

            Owen made changes -
            Workflow Original: JAC Bug Workflow v2 [ 2851029 ] New: JAC Bug Workflow v3 [ 2934227 ]
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]
            Owen made changes -
            Workflow Original: JIRA Bug Workflow w Kanban v7 - Restricted [ 2543708 ] New: JAC Bug Workflow v2 [ 2851029 ]
            Ignat (Inactive) made changes -
            Workflow Original: JIRA Bug Workflow w Kanban v6 - Restricted [ 1545937 ] New: JIRA Bug Workflow w Kanban v7 - Restricted [ 2543708 ]
            Owen made changes -
            Workflow Original: JIRA Bug Workflow w Kanban v6 [ 1278291 ] New: JIRA Bug Workflow w Kanban v6 - Restricted [ 1545937 ]
            Kiran (Inactive) made changes -
            Resolution New: Not a bug [ 12 ]
            Status Original: Open [ 1 ] New: Resolved [ 5 ]
            mlavender (Inactive) created issue -

              Unassigned Unassigned
              mlavender mlavender (Inactive)
              Affected customers:
              1 This affects my team
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: