• Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Medium Medium (View bug fix roadmap)
    • None
    • None
    • None

      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
      

            [JSWSERVER-12506] Internal server error updating Epic Link field

            Owen made changes -
            Workflow Original: JAC Bug Workflow v2 [ 2851900 ] New: JAC Bug Workflow v3 [ 2936925 ]
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]
            Owen made changes -
            Workflow Original: JIRA Bug Workflow w Kanban v7 - Restricted [ 2541603 ] New: JAC Bug Workflow v2 [ 2851900 ]
            Ignat (Inactive) made changes -
            Workflow Original: JIRA Bug Workflow w Kanban v6 - Restricted [ 1552145 ] New: JIRA Bug Workflow w Kanban v7 - Restricted [ 2541603 ]
            Owen made changes -
            Workflow Original: JIRA Bug Workflow w Kanban v6 [ 950330 ] New: JIRA Bug Workflow w Kanban v6 - Restricted [ 1552145 ]

            Hi bob.swift@charter.net,

            This was fixed in JIRA Software 7.1.4.

            Regards,

            Oswaldo Hernández.
            JIRA Bugmaster.
            [Atlassian].

            Oswaldo Hernandez (Inactive) added a comment - Hi bob.swift@charter.net , This was fixed in JIRA Software 7.1.4. Regards, Oswaldo Hernández. JIRA Bugmaster. [Atlassian] .

            Bob Swift added a comment -

            Thanks for fixing this. What is the fix version?

            Bob Swift added a comment - Thanks for fixing this. What is the fix version?
            Adam Horvath (Inactive) made changes -
            Resolution New: Duplicate [ 3 ]
            Status Original: In Progress [ 3 ] New: Resolved [ 5 ]
            Adam Horvath (Inactive) made changes -
            Status Original: Technical Review [ 10028 ] New: In Progress [ 3 ]
            Adam Horvath (Inactive) made changes -
            Link New: This issue duplicates JSW-10333 [ JSW-10333 ]

            After the fix the following JSON payloads will work:
            To add:

             {"fields":{"customfield_10420":"EPIC-1"}}
            

            To remove:

             {"fields":{"customfield_10420":""}}
            

            Adam Horvath (Inactive) added a comment - - edited After the fix the following JSON payloads will work: To add: { "fields" :{ "customfield_10420" : "EPIC-1" }} To remove: { "fields" :{ "customfield_10420" :""}}

              ahorvath@atlassian.com Adam Horvath (Inactive)
              bob.swift Bob Swift
              Affected customers:
              31 This affects my team
              Watchers:
              15 Start watching this issue

                Created:
                Updated:
                Resolved: