Attempting to configure a rule to update/set the work item/issue restriction in Team managed projects results in error when saving changes

XMLWordPrintable

    • Minor

      Issue Summary

      Attempting to configure a rule to update/set the work item/issue restriction in Team managed projects results in error when saving changes

      Steps to Reproduce

      1. Go to any work item of a Team-managed project and set any restriction on it, and then obtain the IDs for each of the roles from the REST API using https://<SITE NAME>.atlassian.net/rest/api/3/issue/<ISSUE KEY>?expand=names, for example:
      2. Take note of the ids for the roles
      3. Go to a Team-managed project settings and create a new automation rule, set the trigger to anything like manual or issue updated add an action "Edit issue" and, in it, expand the "More options" panel to enter Advanced edit mode.
      4. Add the JSON that would be used to update the restriction via REST API Edit issue, replacing the hashtags with the ID of the role you got in the previous step:
         {
        "fields": {"issuerestriction": {"projectrole": [{"restrictionValue": "#####"}]}}
        }
      5. Attempt to save changes in the automation.

      Expected Results

      The changes are saved and the automation can now be used to update the restriction just like through the issue edit REST API.

      Actual Results

      When trying to save, an error is displayed and the changes are not saved:

      "An unknown error occurred. Please reload and try again."

      Workaround

      Instead of an Edit issue action, add a Send web request action and send a web request to the REST API Edit issue.. This will work as expected, even using the say payload format:

      • Remember to add the authorization header, in the same way you would when sending a standard web request through cURL or any other web request tool.

            Assignee:
            Unassigned
            Reporter:
            Rene C. [Atlassian Support] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: