Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-45995

jira.permission.create.clone workflow property denying ability to Create Issues using REST API

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Low Low
    • None
    • 6.4.10, 6.4.11, 7.1.2, 7.0.0
    • REST API

      Update as of 2018, July 25th

      Hi everyone,

      This is an update to inform you that this ticket is invalid and superseded by JRASERVER-67652.

      The key used here, jira.permission.create.clone, is invalid, and JIRA is just throwing a valid error:

      Unknown type 'clone' in meta attribute 'jira.permission.create.clone'. Valid permission types are defined in permission-types.xml
      

      JRASERVER-67652 is about a similar, valid bug when using the right key, and there is a Workaround. Please watch it for more details.

      Original Description

      Summary

      After adding the jira.permission.create.clone workflow property to a Status in JIRA, it's no longer possible to create issues in the related project via REST API.

      Environment

      • Using POSTMAN to test

      Steps to Reproduce

      1. Edit a project's workflow
      2. Add the following to the status just after the issue is created (eg. if a newly created issue goes to To Do status, add this property in To Do)
        • jira.permission.create.clone=denied
      3. Publish the workflow
      4. Try creating an issue in this project which uses this workflow via REST API

      Expected Results

      Issue is created fine

      Actual Results

      Issues doesn't get created with the following as the response

      {
        "errorMessages": [
          "Internal server error"
        ],
        "errors": {}
      }

      The below exception is thrown in the atlassian-jira.log file:

      2015-10-29 18:11:47,785 http-nio-7000-exec-12 ERROR admin 1091x451x1 y0l1x2 127.0.0.1 /rest/api/2/issue [c.a.j.rest.exception.ExceptionInterceptor] Returning internal server error in response
      java.lang.reflect.InvocationTargetException
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker$1.invoke(DispatchProviderHelper.java:234)
      	... 4 filtered
      	at com.atlassian.jira.rest.exception.ExceptionInterceptor.intercept(ExceptionInterceptor.java:59)
      	... 1 filtered
      	at com.atlassian.jira.rest.v2.issue.scope.RequestScopeInterceptor.intercept(RequestScopeInterceptor.java:43)
      	... 14 filtered
      	at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:178)
      	... 1 filtered
      	at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:73)
      	... 41 filtered
      	at com.atlassian.plugins.cors.CorsFilter.doFilter(CorsFilter.java:65)
      	... 64 filtered
      	at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:40)
      	... 73 filtered
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.RuntimeException: Unknown type 'clone' in meta attribute 'jira.permission.create.clone'. Valid permission types are defined in permission-types.xml
      	at com.atlassian.jira.permission.WorkflowPermissionFactory.createWorkflowPermission(WorkflowPermissionFactory.java:98)
      	at com.atlassian.jira.permission.WorkflowPermissionFactory.getWorkflowPermissions(WorkflowPermissionFactory.java:47)
      	at com.atlassian.jira.security.WorkflowBasedPermissionManager.workflowPermissionCheck(WorkflowBasedPermissionManager.java:143)
      	at com.atlassian.jira.security.WorkflowBasedPermissionManager.hasPermission(WorkflowBasedPermissionManager.java:89)
      	at com.atlassian.jira.security.DefaultPermissionManager.hasPermission(DefaultPermissionManager.java:102)
      	at com.atlassian.jira.security.ApplicationRequiredPermissionManager.lambda$hasPermission$482(ApplicationRequiredPermissionManager.java:77)
      	at com.atlassian.jira.security.ApplicationRequiredPermissionManager$$Lambda$296/624671521.getAsBoolean(Unknown Source)
      	at com.atlassian.jira.security.ApplicationRequiredPermissionManager.checkUserHasApplicationOrFalse(ApplicationRequiredPermissionManager.java:190)
      	at com.atlassian.jira.security.ApplicationRequiredPermissionManager.hasPermission(ApplicationRequiredPermissionManager.java:77)
      	... 2 filtered
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:83)
      	at com.atlassian.jira.config.component.SwitchingInvocationHandler.invoke(SwitchingInvocationHandler.java:28)
      	at com.sun.proxy.$Proxy11.hasPermission(Unknown Source)
      	... 2 filtered
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:30)
      	at com.sun.proxy.$Proxy11.hasPermission(Unknown Source)
      	... 2 filtered
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
      	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
      	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      	at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
      	at com.sun.proxy.$Proxy2373.hasPermission(Unknown Source)
      	at com.atlassian.jira.rest.v2.issue.CreateMetaFieldBeanBuilder.hasPermissionToPerformOperation(CreateMetaFieldBeanBuilder.java:107)
      	at com.atlassian.jira.rest.v2.issue.AbstractMetaFieldBeanBuilder.build(AbstractMetaFieldBeanBuilder.java:91)
      	at com.atlassian.jira.rest.v2.issue.CreateMetaFieldBeanBuilder.build(CreateMetaFieldBeanBuilder.java:66)
      	at com.atlassian.jira.rest.v2.issue.IssueInputParametersAssembler$IssueInputParametersBuilder.getValidFieldsForCreate(IssueInputParametersAssembler.java:556)
      	at com.atlassian.jira.rest.v2.issue.IssueInputParametersAssembler$IssueInputParametersBuilder.buildForCreate(IssueInputParametersAssembler.java:311)
      	at com.atlassian.jira.rest.v2.issue.IssueInputParametersAssembler.makeCreateAssembler(IssueInputParametersAssembler.java:139)
      	at com.atlassian.jira.rest.v2.issue.CreateIssueResource.createIssue(CreateIssueResource.java:53)
      	at com.atlassian.jira.rest.v2.issue.IssueResource.createIssue(IssueResource.java:695)
      	... 213 more
      
      

      Notes

      It is possible to create issue via the UI

      Workaround

      No known workaround

              Unassigned Unassigned
              ywoo Yit Wei
              Votes:
              20 Vote for this issue
              Watchers:
              25 Start watching this issue

                Created:
                Updated:
                Resolved: