Add Issue Manager to Reviewer role
Hi,
I am trying to add the issue manager to the reviewer role on an asset.I currently have it to where the current user gets added as the reviewer.But I want the issue manager as the reviewer as well.Ho can I get the issue manager added to the reviewer role as well?My code is below.Any feedback provided would be great.Thanks.
import com.collibra.dgc.core.api.dto.instance.responsibility.AddResponsibilityRequest;
import com.collibra.dgc.core.api.model.ResourceType;
def userIssueManagerId = userApi.getCurrentUser().get().getId()
def roleIssueManagerId = users.getRoleId(“Issue Manager”)
def roleReviewerId = users.getRoleId(“Reviewer”)
responsibilityApi.addResponsibility(AddResponsibilityRequest.builder()
.resourceId(item.id)
.resourceType(item.type)
.roleId(roleReviewerId)
.ownerId(userIssueManagerId)
.build())
Former User
OP5 years ago · EditedHi Stijn,
The main thing I want to do is add the Issue Manager as the Reviewer.Not the current user.I ended up using that to try to get the Issue manager added as the reviewer.
Former User
OP5 years ago · Edited@jamar.johnson If you’d like some more information on our Coaching Services, check out: https://community.collibra.com/coaching-services/. Hope that helps! --Bridget, Collibra Team
Former User
OP5 years ago · EditedHi Stijn,
The main thing I want to do is add the Issue Manager as the Reviewer.Not the current user.I ended up using that to try to get the Issue manager added as the reviewer.
Stijn Waegemans
·5 years ago · Editedin that case do first a responsibilityApi. findResponsibilities(FindResponsibilitiesRequest findResponsibilitiesRequest)
Then go through the result with a getResults() .each{} and for each responsibility found with the right role get the ownerId
These owners need to be assigned to the new responsibilities with the reviewer role
If this doesn’t work for you I’m sure our coaching team can help out!
Stijn Waegemans
·5 years ago · EditedHi Jamar,
A few remarks:
I hope that helps a bit