Atlassian JIRA | Matheus Fernandes | 1 year ago
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    h3. Summary JIRA Software allows the *Epic Status* field to be edited, which causes a *NullPointerException* when running calling: * {code:none}GET /rest/agile/1.0/board/{boardId}/epic/{epicId}/issue{code} * {code:none}GET /rest/agile/1.0/board/{boardId}/sprint/{sprintId}/issue{code} as {{EpicServiceImpl.getEpicStatusValue(issue)}} expects an *Epic Status* to exist. h3. Steps to Reproduce # Create an Epic and browse to it. # Select 'Edit'; _alternatively, Select 'Admin > Add Field'_ # Edit the *Epic Status* to none h3. Expected Results * It would not be possible to change the *Epic Status* to {{none}}; * Or the endpoints wouldn't return a 500 error when parsing Epics with no statuses. h3. Actual Results The below exception is thrown in the {{atlassian-jira.log}} file or as a response on the API call: {noformat} 2015-10-12 17:32:04,109 ajp-nio-8077-exec-2 ERROR matheus 1052x9377x1 13woces /rest/agile/1.0/board/1/epic/10107/issue [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: null java.lang.NullPointerException at com.atlassian.greenhopper.service.issuelink.EpicServiceImpl.getEpicStatusValue( at com.atlassian.greenhopper.service.issuelink.EpicServiceImpl.getEpic( at$2.apply( at$1.apply( at at at ... 3 filtered at java.lang.reflect.Method.invoke( ... 19 filtered at$JerseyOsgiServletContainer.doFilter( ... 1 filtered at ... 41 filtered at com.atlassian.plugins.cors.CorsFilter.doFilter( ... 64 filtered at ... 72 filtered at java.util.concurrent.ThreadPoolExecutor.runWorker( at java.util.concurrent.ThreadPoolExecutor$ at org.apache.tomcat.util.threads.TaskThread$ at {noformat} h3.Workaround # Search for all Epics with no status: {code:SQL} type = 'Epic' and "Epic Status" is EMPTY {code} # Manually (or bulk) edit those and add a value for the *Epic Status* field.

    Atlassian JIRA | 1 year ago | Matheus Fernandes

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.atlassian.greenhopper.service.issuelink.EpicServiceImpl.getEpicStatusValue()
    2. com.atlassian.greenhopper
      1. com.atlassian.greenhopper.service.issuelink.EpicServiceImpl.getEpicStatusValue(
      2. com.atlassian.greenhopper.service.issuelink.EpicServiceImpl.getEpic(
      7 frames