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

Creating issue with epic link field through REST causes 500 Internal Error

      Summary

      Setting the epic link field to null or a specific value causes the failure. The issue affect both remove and add issue (during the issue creation) to the Epic via the REST API.

      Steps to Reproduce

      Run REST call, eg:

      curl -v -uuser:pass -X POST -H 'Content-Type: application/json' -d '{"fields":{"summary":"test","issuetype":{"id":"1"},"project":{"id":"10300","key":"AG"},"customfield_10401":"AG-3" }}' http://127.0.0.1:8080/rest/api/latest/issue
      

      note, call with payload without EpicLink (customfield_10401) is fine:

      '{"fields":{"summary":"test","issuetype":{"id":"1"},"project":{"id":"10300","key":"AG"} }}'
      

      Expected Results

      Works fine

      Actual Results

      .../rest/api/latest/issue?
      Request type: POST
      Content type: application/json
      Post data: {"fields":{"summary":"xxx","issuetype":{"id":"1"},"customfield_11261":"XXX-123","project":{"id":"51125","key":null}}}
      Response code: 500, message: Internal Server 
      {"errorMessages":["Internal server error"],"errors":{}}
      

      Exception in logs:

      2016-08-16 18:18:42,000 http-bio-8080-exec-11 ERROR admin 1098x560x1 4v7btn 127.0.0.1 /rest/api/latest/issue [jira.rest.exception.ExceptionInterceptor] Returning internal server error in response
      java.lang.reflect.InvocationTargetException
      ...
      Caused by: java.lang.NullPointerException
              at com.atlassian.greenhopper.service.issuelink.EpicServiceImpl.addIssuesToEpic(EpicServiceImpl.java:86)
              at com.atlassian.greenhopper.customfield.epiclink.EpicLinkRestFieldOperationsHandler.update(EpicLinkRestFieldOperationsHandler.java:104)
              at com.atlassian.greenhopper.customfield.epiclink.EpicLinkRestFieldOperationsHandler.handleOperation(EpicLinkRestFieldOperationsHandler.java:76)
              at com.atlassian.greenhopper.customfield.epiclink.EpicLinkRestFieldOperationsHandler.updateIssueInputParameters(EpicLinkRestFieldOperationsHandler.java:64)
              at com.atlassian.jira.rest.v2.issue.IssueInputParametersAssembler$IssueInputParametersBuilder.finalizeIssueInputParams(IssueInputParametersAssembler.java:470)
      ...
      

      Notes

      Looks like a regression caused by JSW-10333. Works ok on JIRA Agile 6.7.12.

      Fixed in JIRA 7.1.4 - see https://jira.atlassian.com/browse/JSW-13407

          Form Name

            [JSWSERVER-14623] Creating issue with epic link field through REST causes 500 Internal Error

            Edson Araujo made changes -
            Remote Link Original: This issue links to "JSB-25 (JIRA Server (Bulldog))" [ 189175 ] New: This issue links to "RAID-25 (JIRA Server (Bulldog))" [ 189175 ]
            Edson Araujo made changes -
            Remote Link Original: This issue links to "JSB-137 (JIRA Server (Bulldog))" [ 210146 ] New: This issue links to "RAID-137 (JIRA Server (Bulldog))" [ 210146 ]
            Edson Araujo made changes -
            Remote Link Original: This issue links to "JSEV-212 (JIRA Server)" [ 189174 ] New: This issue links to "JSEV-212 (JIRA Server (Bulldog))" [ 189174 ]
            Bugfix Automation Bot made changes -
            Minimum Version New: 6.07
            Owen made changes -
            Workflow Original: JAC Bug Workflow v2 [ 2851276 ] New: JAC Bug Workflow v3 [ 2936749 ]
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]
            Owen made changes -
            Workflow Original: JIRA Bug Workflow w Kanban v7 - Restricted [ 2543936 ] New: JAC Bug Workflow v2 [ 2851276 ]
            Ignat (Inactive) made changes -
            Workflow Original: JIRA Bug Workflow w Kanban v6 - Restricted [ 1522738 ] New: JIRA Bug Workflow w Kanban v7 - Restricted [ 2543936 ]
            Ignat (Inactive) made changes -
            Remote Link New: This issue links to "JSB-137 (JIRA Server (Bulldog))" [ 210146 ]
            Taiwo Akindele (Inactive) made changes -
            Link New: This issue is duplicated by JSW-13981 [ JSW-13981 ]
            Jacek Jaroczynski (Inactive) made changes -
            Resolution New: Duplicate [ 3 ]
            Status Original: Open [ 1 ] New: Resolved [ 5 ]

              Unassigned Unassigned
              bob.swift@charter.net Bob Swift
              Affected customers:
              10 This affects my team
              Watchers:
              14 Start watching this issue

                Created:
                Updated:
                Resolved: