The update issue type REST API returns 500 when trying to edit issue type in team-managed project

XMLWordPrintable

    • Severity 3 - Minor

      Issue Summary

      The bug reported by vendors.

      Steps to Reproduce

      1. Create next-gen (team-managed) project
      2. Pick one issue type
      3. Try to rename it via `PUT /rest/api/3/issuetype/{id}`

      Expected Results

      The edit issue type REST API should respond with 400 Bad requests (if we wouldn't like to support renaming next-gen issue types or 200 if we want, I don't know) when trying to edit team-managed issue types.

      Actual Results

      The edit issue type REST API (`PUT /rest/api/3/issuetype/{id}`) returns a 500 status when is called on a team-managed project. The below exception is thrown:

      Caused by: com.atlassian.jira.scope.IllegalScopedEntityArgumentException: Illegal Entity Scope for Entity class (ISSUE_TYPE). Expected entity scope 'GLOBAL' but has scope 'PROJECT'
      	at com.atlassian.jira.scope.EntityScopeUtil.assertGlobalScope(EntityScopeUtil.java:136)
      	at com.atlassian.jira.scope.EntityScopeUtil.assertGlobalScope(EntityScopeUtil.java:124)
      	at com.atlassian.jira.config.DefaultIssueTypeManager.assertGlobalIssueType(DefaultIssueTypeManager.java:1119)
      	at com.atlassian.jira.config.DefaultIssueTypeManager.updateIssueType(DefaultIssueTypeManager.java:681)
      	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:498)
      	at com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:50)
      	at com.sun.proxy.$Proxy185.updateIssueType(Unknown Source)
      	at com.atlassian.jira.config.DefaultIssueTypeService.updateIssueType(DefaultIssueTypeService.java:238)
      	at com.atlassian.jira.rest.v2.issue.IssueTypeResource.updateIssueType(IssueTypeResource.java:355)
      

      Workaround

      Currently, there is no known workaround for this behavior.

            Assignee:
            Unassigned
            Reporter:
            Beata Szturemska
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: