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

Using jira.permission.createclone.denied on Initial Workflow Status breaks Issue Creation via REST API

    XMLWordPrintable

Details

    Description

      Summary

      If no one has permission to clone an issue when it's in the initial workflow status (the status the issue will be upon being created), it's not possible to create a new issue via REST API, if the issue to be created uses the same workflow.

      Steps to reproduce

      1. Edit the workflow of issue type T in project P
      2. Click View Properties at the initial step e.g. Open
      3. Add this property:
        Key: jira.permission.createclone.denied
        Value: true
        
      4. Publish the workflow
      5. Create a new issue P-1 via GUI using issue type T in project P

      Expected behavior

      1. No one can clone P-1
      2. A new issue P-2 can be created via REST API using issue type T in project P (similar to how P-1 can be created via GUI)

      Actual behavior

      1. No one can clone P-1
      2. A new issue P-2 can't be created via REST API using issue type T in project P

      The following 400 Bad Request error is thrown:

      {
          "errorMessages": [],
          "errors": {
              "summary": "Field 'summary' cannot be set. It is not on the appropriate screen, or unknown."
          }
      }
      

      This error is invalid because:

      1. Summary field is a known, required system field
      2. It's available on the Create Issue screen of issue type T in project P

      Workaround

      Grant the REST API user (e.g. admin) the permission to clone issues in the initial workflow status, by adding this property (keeping the other so that no one else can clone issues):

      Key: jira.permission.createclone.user
      Value: admin
      

      Then use admin for the REST API call to create issues.

      The permission can also be granted to a specific group:

      Key: jira.permission.createclone.group.1
      Value: jira-administrators
      

      Notes

      This ticket supersedes JRASERVER-45995, JRASERVER-59487, and JRASERVER-62200, because incorrect keys are used there:

      • jira.permission.create.clone
      • jira.permission.create.clone.denied

      When using these incorrect keys, JIRA throws these valid errors:

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

      Using the right keys as mentioned in this ticket:

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              vdung Andy Nguyen (Inactive)
              Votes:
              15 Vote for this issue
              Watchers:
              27 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: