Core_F
Core_F

Reputation: 3442

Plugin for TFS 2012 is missing events when saving multiple work items?

we have are using a plugin for TFS 2012, it gets triggered whenever a WorkItem changed:

class WorkItemChangedEventHandler : ISubscriber

public EventNotificationStatus ProcessEvent(
        TeamFoundationRequestContext requestContext,
        NotificationType notificationType, object notificationEventArgs,
        out int statusCode, out string statusMessage, out ExceptionPropertyCollection properties)
{
// ...
}

That works fine, if I save one work item at a time. But if I change multiple work items in Visual Studio 2012 and press the "Save All" button, then I only get one event for the work item with the highest ID. The events for all other work items never get triggered.

Am I doing anything wrong? Are all work items processed in one event and I just can't find the others?

Upvotes: 3

Views: 801

Answers (1)

Core_F
Core_F

Reputation: 3442

Looks like my automation is just too time consuming, I found a solution in a blog:

http://blogs.microsoft.co.il/blogs/assafstone/archive/2011/07/29/how-to-write-a-robust-tfs-server-plugin-with-job-extensions.aspx

Guess I need to implement a job service and finish the event as fast as possible.

Upvotes: 2

Related Questions