Retrieve user which perform a change-state action
I'd like to catch the user which requires a change-state action using a pre-condition plugin on save work item operation.
I can't find a way to catch an IContributorHandle, because I've tried IWorkItem.getModifiedBy() but on pre-condition it has not been set yet.
I was looking for some ISaveParameter methods, but none can give IContributor...
Does someone tried it??
I can't find a way to catch an IContributorHandle, because I've tried IWorkItem.getModifiedBy() but on pre-condition it has not been set yet.
I was looking for some ISaveParameter methods, but none can give IContributor...
Does someone tried it??
2 answers
Hi
You can get the user that is executing the operation from:
saveParameter.getSaveOperationParameter().getAuditableCommon().getUser()
The saveparameter is passed in as 'operation.getOperationData()'; you can just cast (after an instanceof check) to ISaveParameter.
Regards
Marcel
Jazz Work Item team
You can get the user that is executing the operation from:
saveParameter.getSaveOperationParameter().getAuditableCommon().getUser()
The saveparameter is passed in as 'operation.getOperationData()'; you can just cast (after an instanceof check) to ISaveParameter.
Regards
Marcel
Jazz Work Item team