Automatically Take Away and Give Back Edit Permission
Access take away
Find the name/code of the initiator
- Go to action set on the first task and copy the “partyName” value from the top entity
- e.g. task-d4ee3e89-c50b-54c6-b7af-e5d45a4da5f7
—
Add an update invite activity on the first task
—
Close the advanced editor and reopen it
—
Have the navigation panel open so that it shows the update invite activity but don’t click on it yet, then go into another page and swap into raw JSON view and only then click into the update invite activity (this gets around some validations errors)
—
Then make these changes
- “Initiator”: “task-d4ee3e89-c50b-54c6-b7af-e5d45a4da5f7”
- The “partyName” of the initiator from before
- “removePermissionAndSkipSendingInvite”: false (should be false by default but double check this value)
—
But we also need to change it so that the initiator doesn’t get work item owner
- In raw JSON on the properties tab
- Search for ‘”partyName": "Owner”’
- And then change these properties
- “partyName”: ItemInitiator (previously “Owner”)
- Remove “Owner” from the list of “permissions”: []
- “Role”: “Initiator” (previously “Owner”)
- “dataPath”: “$.invites.ItemInitiator” (previously “$.invites.owner”)
Give access back
In the advanced editor navigate to the first task and copy the value from the “name” property
—
Add another action button on the second task
—
Make these changes to the action button configuration
- “displayName”: “{Example button text}” (change this text to be the text you want to show on the button in work items)
- “destinationType”: “ByStepName”
- “target”: “UntitledTask/Generated-4eb0dd4d-f58c-4511-94b4-fb9b7ad4307c” (the task name for the task you are sending back to)
—
Add an update invite activity to the newly added action button
—
Close the advanced editor and reopen it
—
Have the navigation panel open so that it shows the update invite activity but don’t click on it yet, then go into another page and swap into raw JSON view and only then click into the update invite activity (this gets around some validations errors)
—
Then make these changes
- "targetDataPath": "$.users.ItemInitiator", (similar to “dataPath” from before but replacing “invites” with “users”)
- "initiator": "task-d4ee3e89-c50b-54c6-b7af-e5d45a4da5f7" (the “partyName” from before)
✅ Done!
Note that if you are testing this you need to test it with an account that doesn’t have ecosystem orchestrator or workflow owner permission because both of those roles give owner access to any work items created by someone in your company. To test this I registered a new account using the email and password option on Rise-X and used the test email first.last+test@rise-x.io (just add “+{anyText}” onto your email, just before the @). Use this account to start the work item to test the functionality