You need to add a precondition before the Approve (and Reject?) actions that limits who is able to see the action.
If you simply want to limit it to the person who the Request is assigned to, you can do a normal condition so it looks at the Current Assignment.User= CurrentUser
Or perhaps you want to limit it so that anybody who is a member of the Group it is assigned to can see the action - I explained how in this post Calc to check whether current user is member of assigned group
It depends on who you want to be able to see the action
Thank you simply when you know the answer. Much appreciated.
Few questions - I am looking at using the calculation
1) Which object has the calculation added to it in the process? (Never used calculations so not sure how they sit in the process)
2) The code example is for Change management so shows syntax of Change. do I change this to Request. or Software Request.
3) I also need do similar calc further down for ROLEs not groups, so would the syntax change from GetCurrentGroupName() to GetCurrentRoleName()? for example?
I think I have answered 1) and 2) myself.
One issue related a created a precondition and added the calculation it worked, but I can't edit the precondition once created, is that normal? very annoying as that means I get one chance to get the calc correct.!
Not sure if you can help the calc works for group is there a way to get this working for Role? the OOTB process uses Roles and groups in the software request.
Ignore request found this;
- import System
- static def GetAttributeValue(User):
- CurrentUserName = User.GetCurrentUserName()
- CurrentUserTitle = User.GetObjectByAttribute("System.User", "Name", CurrentUserName)
- for item in CurrentUserTitle.UserRoles:
- if item.Role.Title == 'SD Change Manager':
- return true
- return false
Seems to work for roles.