Uploaded image for project: 'Jira Software Server and Data Center'
  1. Jira Software Server and Data Center
  2. JSWSERVER-12506

Internal server error updating Epic Link field

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Medium
    • Resolution: Duplicate
    • None
    • None
    • None

    Description

      This has been reported by a Cloud customer and I can reproduce on the EAP driver (m01).

      Trying to update an issue with the following results in a internal server error. The same json format for the Epic Link custom field works correctly on a create, just not the update.

      {"fields":{"customfield_11261":"ZAGILE-1"}}
      
      java.lang.reflect.InvocationTargetException
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [?:1.8.0_45]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [?:1.8.0_45]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [?:1.8.0_45]
      	at java.lang.reflect.Method.invoke(Method.java:497) [?:1.8.0_45]
      	at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker$1.invoke(DispatchProviderHelper.java:234) [atlassian-rest-module-3.0.0-m012_1437952492000.jar:?]
      	... 4 filtered
      	at com.atlassian.jira.rest.exception.ExceptionInterceptor.intercept(ExceptionInterceptor.java:59) [jira-rest-plugin-7.0.0-m01.jar:?]
      	... 1 filtered
      	at com.atlassian.jira.rest.v2.issue.scope.RequestScopeInterceptor.intercept(RequestScopeInterceptor.java:43) [jira-rest-plugin-7.0.0-m01.jar:?]
      	... 15 filtered
      	at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:178) [atlassian-rest-module-3.0.0-m012_1437952492000.jar:?]
      	... 1 filtered
      	at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:73) [atlassian-rest-module-3.0.0-m012_1437952492000.jar:?]
      	... 32 filtered
      	at com.atlassian.plugins.cors.CorsFilter.doFilter(CorsFilter.java:65) [atlassian-whitelist-api-plugin-1.13_1437952360000.jar:?]
      	... 64 filtered
      	at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:40) [atlassian-rest-module-3.0.0-m012_1437952492000.jar:?]
      	... 73 filtered
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_45]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_45]
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.0.17]
      	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45]
      Caused by: java.lang.ClassCastException: com.atlassian.jira.issue.IssueImpl cannot be cast to java.lang.String
      	at com.atlassian.jira.issue.customfields.impl.rest.TextCustomFieldOperationsHandler.getInitialValue(TextCustomFieldOperationsHandler.java:46) [jira-api-7.0.0-m01.jar:?]
      	at com.atlassian.jira.issue.customfields.impl.rest.TextCustomFieldOperationsHandler.getInitialValue(TextCustomFieldOperationsHandler.java:17) [jira-api-7.0.0-m01.jar:?]
      	at com.atlassian.jira.issue.customfields.impl.rest.AbstractCustomFieldOperationsHandler.updateIssueInputParameters(AbstractCustomFieldOperationsHandler.java:78) [jira-api-7.0.0-m01.jar:?]
      	at com.atlassian.jira.rest.v2.issue.IssueInputParametersAssembler$IssueInputParametersBuilder.finalizeIssueInputParams(IssueInputParametersAssembler.java:470) [jira-rest-plugin-7.0.0-m01.jar:?]
      	at com.atlassian.jira.rest.v2.issue.IssueInputParametersAssembler$IssueInputParametersBuilder.buildForEdit(IssueInputParametersAssembler.java:221) [jira-rest-plugin-7.0.0-m01.jar:?]
      	at com.atlassian.jira.rest.v2.issue.UpdateIssueResource.editIssue(UpdateIssueResource.java:37) [jira-rest-plugin-7.0.0-m01.jar:?]
      	at com.atlassian.jira.rest.v2.issue.IssueResource.editIssue(IssueResource.java:894) [jira-rest-plugin-7.0.0-m01.jar:?]
      	... 205 more
      

      The meta data is incorrect/ambiguous in this case. I reported the general problem of custom field metadata to Dave Meyer earlier.

      Let me know if there is a different format required for the update of this field compared to the create case.

      Here is the metadata:

      Id  . . . . . . . . . . . . . : customfield_11261
      Name  . . . . . . . . . . . . : Epic Link
      Description . . . . . . . . . : 
      Required  . . . . . . . . . . : false
      Has default . . . . . . . . . : false
      Has allowed values  . . . . . : false
      Type  . . . . . . . . . . . . : array
      Item type . . . . . . . . . . : string
      Custom  . . . . . . . . . . . : true
      Custom type . . . . . . . . . : com.pyxis.greenhopper.jira:gh-epic-link
      Custom id . . . . . . . . . . : 11261
      

      Attachments

        Issue Links

          Activity

            People

              ahorvath@atlassian.com Adam Horvath (Inactive)
              bob.swift Bob Swift
              Votes:
              31 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: