Uploaded image for project: 'SR for Jira - Development'
  1. SR for Jira - Development
  2. SRJIRA-4264

Custom Script Field with template GroupField blocks issues creation

    Details

    • Type: Bug
    • Status: Triage (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Scripted Fields
    • Labels:
      None
    • Critical Points:
      0

      Description

      Steps to reproduce:

      1 - Create a new Custom Script Field and select Group Picker as template

      2 - Add the following code:

      import com.atlassian.jira.security.groups.GroupManager 
      import com.atlassian.sal.api.component.ComponentLocator 
      def groupManager = ComponentLocator.getComponent(GroupManager) 
      groupManager.getGroup("jira-administrators")
      

       

      3 - Add the field in the appropriate screen and try to create a new issue using that screen

      4 - The below error is displayed when trying to create new issues:

      Error thrown in debugger:

      2020-04-23 16:03:01,196 http-nio-8080-exec-10 DEBUG admin [onresolve.scriptrunner.customfield.GroovyCustomField] Field GroupPicker has no searcher or searcher null not supported
      2020-04-23 16:03:01,196 http-nio-8080-exec-10 DEBUG admin [onresolve.scriptrunner.customfield.GroovyCustomField] Field GroupPicker has no searcher or searcher null not supported
      2020-04-23 16:03:01,202 http-nio-8080-exec-10 DEBUG admin [onresolve.scriptrunner.customfield.GroovyCustomField] Field GroupPicker has no searcher or searcher null not supported2020-04-23 16:03:01,582 http-nio-8080-exec-10 ERROR admin [jira.quickedit.action.QuickCreateIssue] com.atlassian.plugins.rest.common.json.JsonMarshallingException: org.codehaus.jackson.map.JsonMappingException: No serializer found for class com.atlassian.crowd.embedded.impl.ImmutableGroup and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: com.atlassian.jira.quickedit.rest.api.field.QuickEditFields["createdIssueDetails"]->com.atlassian.jira.rest.v2.issue.IssueBean["fields"]->java.util.HashMap["customfield_10014"])com.atlassian.plugins.rest.common.json.JsonMarshallingException: org.codehaus.jackson.map.JsonMappingException: No serializer found for class com.atlassian.crowd.embedded.impl.ImmutableGroup and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: com.atlassian.jira.quickedit.rest.api.field.QuickEditFields["createdIssueDetails"]->com.atlassian.jira.rest.v2.issue.IssueBean["fields"]->java.util.HashMap["customfield_10014"]) at com.atlassian.plugins.rest.common.json.DefaultJaxbJsonMarshaller.marshal(DefaultJaxbJsonMarshaller.java:57) at com.atlassian.jira.quickedit.action.JsonActionSupport.marshal(JsonActionSupport.java:88) at com.atlassian.jira.quickedit.action.JsonActionSupport.asJson(JsonActionSupport.java:70) at com.atlassian.jira.quickedit.action.JsonActionSupport.asJson(JsonActionSupport.java:48) at com.atlassian.jira.quickedit.action.QuickCreateIssue.doDefault(QuickCreateIssue.java:241) at com.atlassian.jira.quickedit.action.QuickCreateIssue.doExecute(QuickCreateIssue.java:356) ... 1 filtered at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:63) ... 7 filtered at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) ... 15 filtered at javax.servlet.FilterChain$doFilter.call(Unknown Source) at com.onresolve.scriptrunner.test.TestsServletFilter.doFilter(TestsServletFilter.groovy:40) ... 36 filtered at com.atlassian.servicedesk.internal.web.ExternalCustomerLockoutFilter.doFilter(ExternalCustomerLockoutFilter.java:56) ... 4 filtered at com.atlassian.greenhopper.jira.filters.ClassicBoardRouter.doFilter(ClassicBoardRouter.java:62) ... 12 filtered at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21) ... 58 filtered at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:66) ... 1 filtered at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:64) ... 39 filtered at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30) ... 5 filtered at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.lambda$invokeFilterChain$0(CustomerContextSettingFilter.java:181) at com.atlassian.servicedesk.internal.api.util.context.ReentrantThreadLocalBasedCodeContext.rteInvoke(ReentrantThreadLocalBasedCodeContext.java:136) at com.atlassian.servicedesk.internal.api.util.context.ReentrantThreadLocalBasedCodeContext.runOutOfContext(ReentrantThreadLocalBasedCodeContext.java:89) at com.atlassian.servicedesk.internal.utils.context.CustomerContextServiceImpl.runOutOfCustomerContext(CustomerContextServiceImpl.java:47) at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.outOfCustomerContext(CustomerContextSettingFilter.java:174) at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilterImpl(CustomerContextSettingFilter.java:130) at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilter(CustomerContextSettingFilter.java:121) ... 4 filtered at com.atlassian.jwt.internal.servlet.JwtAuthFilter.doFilter(JwtAuthFilter.java:37) ... 8 filtered at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21) ... 4 filtered at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36) ... 26 filtered at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25) ... 24 filtered at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748)Caused by: org.codehaus.jackson.map.JsonMappingException: No serializer found for class com.atlassian.crowd.embedded.impl.ImmutableGroup and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: com.atlassian.jira.quickedit.rest.api.field.QuickEditFields["createdIssueDetails"]->com.atlassian.jira.rest.v2.issue.IssueBean["fields"]->java.util.HashMap["customfield_10014"]) at org.codehaus.jackson.map.ser.impl.UnknownSerializer.failForEmpty(UnknownSerializer.java:52) at org.codehaus.jackson.map.ser.impl.UnknownSerializer.serialize(UnknownSerializer.java:25) at org.codehaus.jackson.map.ser.std.MapSerializer.serializeFields(MapSerializer.java:262) at org.codehaus.jackson.map.ser.std.MapSerializer.serialize(MapSerializer.java:186) at org.codehaus.jackson.map.ser.std.MapSerializer.serialize(MapSerializer.java:23) at org.codehaus.jackson.map.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:150) at org.codehaus.jackson.map.ser.BeanSerializer.serialize(BeanSerializer.java:112) at org.codehaus.jackson.map.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:446) at org.codehaus.jackson.map.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:150) at org.codehaus.jackson.map.ser.BeanSerializer.serialize(BeanSerializer.java:112) at org.codehaus.jackson.map.ser.StdSerializerProvider._serializeValue(StdSerializerProvider.java:610) at org.codehaus.jackson.map.ser.StdSerializerProvider.serializeValue(StdSerializerProvider.java:256) at org.codehaus.jackson.map.ObjectMapper.writeValue(ObjectMapper.java:1613) at org.codehaus.jackson.jaxrs.JacksonJsonProvider.writeTo(JacksonJsonProvider.java:559) ... 1 filtered ... 274 more2020-04-23 16:06:00,728 http-nio-8080-exec-7 INFO admin [scriptrunner.runner.classloading.ScriptClassLoadersFactory] Initialising script class loader with these roots: [file:/Users/bcarlosdacunha/scriptrunner/jira/../shared/src/main/resources/, file:/Users/bcarlosdacunha/scriptrunner/jira/../test/src/main/groovy/, file:/Users/bcarlosdacunha/scriptrunner/jira/../test/src/main/resources/, file:/Users/bcarlosdacunha/scriptrunner/jira/src/main/resources/, file:/Users/bcarlosdacunha/scriptrunner/jira/src/test/resources/, file:/Users/bcarlosdacunha/scriptrunner/jira/build/home/scripts/, bundle://210.0:1/]2020-04-23 16:07:10,900 http-nio-8080-exec-8 INFO admin [scriptrunner.runner.classloading.ScriptClassLoadersFactory] Initialising script class loader with these roots: [file:/Users/bcarlosdacunha/scriptrunner/jira/../shared/src/main/resources/, file:/Users/bcarlosdacunha/scriptrunner/jira/../test/src/main/groovy/, file:/Users/bcarlosdacunha/scriptrunner/jira/../test/src/main/resources/, file:/Users/bcarlosdacunha/scriptrunner/jira/src/main/resources/, file:/Users/bcarlosdacunha/scriptrunner/jira/src/test/resources/, file:/Users/bcarlosdacunha/scriptrunner/jira/build/home/scripts/, bundle://210.0:1/]2020-04-23 16:07:13,849 http-nio-8080-exec-1 INFO admin [scriptrunner.runner.classloading.ScriptClassLoadersFactory] Initialising script class loader with these roots: [file:/Users/bcarlosdacunha/scriptrunner/jira/../shared/src/main/resources/, file:/Users/bcarlosdacunha/scriptrunner/jira/../test/src/main/groovy/, file:/Users/bcarlosdacunha/scriptrunner/jira/../test/src/main/resources/, file:/Users/bcarlosdacunha/scriptrunner/jira/src/main/resources/, file:/Users/bcarlosdacunha/scriptrunner/jira/src/test/resources/, file:/Users/bcarlosdacunha/scriptrunner/jira/build/home/scripts/, bundle://210.0:1/]2020-04-23 16:07:16,234 http-nio-8080-exec-3 INFO admin [scriptrunner.runner.classloading.ScriptClassLoadersFactory] Initialising script class loader with these roots: [file:/Users/bcarlosdacunha/scriptrunner/jira/../shared/src/main/resources/, file:/Users/bcarlosdacunha/scriptrunner/jira/../test/src/main/groovy/, file:/Users/bcarlosdacunha/scriptrunner/jira/../test/src/main/resources/, file:/Users/bcarlosdacunha/scriptrunner/jira/src/main/resources/, file:/Users/bcarlosdacunha/scriptrunner/jira/src/test/resources/, file:/Users/bcarlosdacunha/scriptrunner/jira/build/home/scripts/, bundle://210.0:1/]2020-04-23 16:07:30,673 http-nio-8080-exec-7 DEBUG admin [onresolve.scriptrunner.customfield.GroovyCustomField] Field GroupPicker has no searcher or searcher null not supported2020-04-23 16:07:30,681 http-nio-8080-exec-7 DEBUG admin [onresolve.scriptrunner.customfield.GroovyCustomField] Field GroupPicker has no searcher or searcher null not supported2020-04-23 16:07:30,733 http-nio-8080-exec-7 ERROR admin [jira.quickedit.action.QuickCreateIssue] com.atlassian.plugins.rest.common.json.JsonMarshallingException: org.codehaus.jackson.map.JsonMappingException: No serializer found for class com.atlassian.crowd.embedded.impl.ImmutableGroup and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: com.atlassian.jira.quickedit.rest.api.field.QuickEditFields["createdIssueDetails"]->com.atlassian.jira.rest.v2.issue.IssueBean["fields"]->java.util.HashMap["customfield_10014"])com.atlassian.plugins.rest.common.json.JsonMarshallingException: org.codehaus.jackson.map.JsonMappingException: No serializer found for class com.atlassian.crowd.embedded.impl.ImmutableGroup and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: com.atlassian.jira.quickedit.rest.api.field.QuickEditFields["createdIssueDetails"]->com.atlassian.jira.rest.v2.issue.IssueBean["fields"]->java.util.HashMap["customfield_10014"]) at com.atlassian.plugins.rest.common.json.DefaultJaxbJsonMarshaller.marshal(DefaultJaxbJsonMarshaller.java:57) at com.atlassian.jira.quickedit.action.JsonActionSupport.marshal(JsonActionSupport.java:88) at com.atlassian.jira.quickedit.action.JsonActionSupport.asJson(JsonActionSupport.java:70) at com.atlassian.jira.quickedit.action.JsonActionSupport.asJson(JsonActionSupport.java:48) at com.atlassian.jira.quickedit.action.QuickCreateIssue.doDefault(QuickCreateIssue.java:241) at com.atlassian.jira.quickedit.action.QuickCreateIssue.doExecute(QuickCreateIssue.java:356) ... 1 filtered at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:63) ... 7 filtered at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) ... 15 filtered at javax.servlet.FilterChain$doFilter.call(Unknown Source) at com.onresolve.scriptrunner.test.TestsServletFilter.doFilter(TestsServletFilter.groovy:40) ... 36 filtered at com.atlassian.servicedesk.internal.web.ExternalCustomerLockoutFilter.doFilter(ExternalCustomerLockoutFilter.java:56) ... 4 filtered at com.atlassian.greenhopper.jira.filters.ClassicBoardRouter.doFilter(ClassicBoardRouter.java:62) ... 12 filtered at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21) ... 58 filtered at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:66) ... 1 filtered at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:64) ... 39 filtered at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30) ... 5 filtered at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.lambda$invokeFilterChain$0(CustomerContextSettingFilter.java:181) at com.atlassian.servicedesk.internal.api.util.context.ReentrantThreadLocalBasedCodeContext.rteInvoke(ReentrantThreadLocalBasedCodeContext.java:136) at com.atlassian.servicedesk.internal.api.util.context.ReentrantThreadLocalBasedCodeContext.runOutOfContext(ReentrantThreadLocalBasedCodeContext.java:89) at com.atlassian.servicedesk.internal.utils.context.CustomerContextServiceImpl.runOutOfCustomerContext(CustomerContextServiceImpl.java:47) at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.outOfCustomerContext(CustomerContextSettingFilter.java:174) at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilterImpl(CustomerContextSettingFilter.java:130) at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilter(CustomerContextSettingFilter.java:121) ... 4 filtered at com.atlassian.jwt.internal.servlet.JwtAuthFilter.doFilter(JwtAuthFilter.java:37) ... 8 filtered at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21) ... 4 filtered at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36) ... 26 filtered at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25) ... 24 filtered at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748)Caused by: org.codehaus.jackson.map.JsonMappingException: No serializer found for class com.atlassian.crowd.embedded.impl.ImmutableGroup and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: com.atlassian.jira.quickedit.rest.api.field.QuickEditFields["createdIssueDetails"]->com.atlassian.jira.rest.v2.issue.IssueBean["fields"]->java.util.HashMap["customfield_10014"]) at org.codehaus.jackson.map.ser.impl.UnknownSerializer.failForEmpty(UnknownSerializer.java:52) at org.codehaus.jackson.map.ser.impl.UnknownSerializer.serialize(UnknownSerializer.java:25) at org.codehaus.jackson.map.ser.std.MapSerializer.serializeFields(MapSerializer.java:262) at org.codehaus.jackson.map.ser.std.MapSerializer.serialize(MapSerializer.java:186) at org.codehaus.jackson.map.ser.std.MapSerializer.serialize(MapSerializer.java:23) at org.codehaus.jackson.map.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:150) at org.codehaus.jackson.map.ser.BeanSerializer.serialize(BeanSerializer.java:112) at org.codehaus.jackson.map.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:446) at org.codehaus.jackson.map.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:150) at org.codehaus.jackson.map.ser.BeanSerializer.serialize(BeanSerializer.java:112) at org.codehaus.jackson.map.ser.StdSerializerProvider._serializeValue(StdSerializerProvider.java:610) at org.codehaus.jackson.map.ser.StdSerializerProvider.serializeValue(StdSerializerProvider.java:256) at org.codehaus.jackson.map.ObjectMapper.writeValue(ObjectMapper.java:1613) at org.codehaus.jackson.jaxrs.JacksonJsonProvider.writeTo(JacksonJsonProvider.java:559) ... 1 filtered
      

       

        Attachments

          Structure

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              bcarlosdacunha Bruno Carlos da Cunha
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:

                  Structure Helper Panel