M
Melih Öztürk
Hi to all,
When a WBS is approved by PMO, resources can't make any changes to this WBS.
The most importang change in Project Server
is deleting a task which is assigned to a resource by resource. Since I
can't handle this permission through 'Team Members'
groups global or category permission, the best way is to write an Event
Receiver.
I wrote a class which inherits from StatusingEventReceiver and override the
OnAssignmentDeleting method. Method contains only
e.CancelReason = "SampleReason";
e.Cancel = true;
base.OnAssignmentDeleting(contextInfo, e);
lines. When a resource tries to delete an assignment, Project Server shows
the event receiver cancellation message and ULS logs
shows the cancellation and its reason. But the problem is, assignment still
shown as strikethrough and resource can send it
to PM. When PM opens the project, he sees the delete request and he can
approve it. When it got published, everyone can see it.
So it is obvious that cancel operation does nothing but showing a
cancellation message.
My problem is, how can I make it possible to cancel assignment delete
requests in every situation. Is the code I wrote does
something wrong or is it not possible to do it with Project Server?
When a WBS is approved by PMO, resources can't make any changes to this WBS.
The most importang change in Project Server
is deleting a task which is assigned to a resource by resource. Since I
can't handle this permission through 'Team Members'
groups global or category permission, the best way is to write an Event
Receiver.
I wrote a class which inherits from StatusingEventReceiver and override the
OnAssignmentDeleting method. Method contains only
e.CancelReason = "SampleReason";
e.Cancel = true;
base.OnAssignmentDeleting(contextInfo, e);
lines. When a resource tries to delete an assignment, Project Server shows
the event receiver cancellation message and ULS logs
shows the cancellation and its reason. But the problem is, assignment still
shown as strikethrough and resource can send it
to PM. When PM opens the project, he sees the delete request and he can
approve it. When it got published, everyone can see it.
So it is obvious that cancel operation does nothing but showing a
cancellation message.
My problem is, how can I make it possible to cancel assignment delete
requests in every situation. Is the code I wrote does
something wrong or is it not possible to do it with Project Server?