locked
How to create a TFS alert for when the "Assigned To" field is changed to blank

    Question

  • I am trying to create a TFS Alert that will alert/email me when a work item's "Assigned To" field changes from any value to empty.  When I use "Changes To" as the Operator and leave the Value field empty, it will not notify me.

    Is it possible to create such an alert?

    Thanks in advance,

    Wes

    Friday, September 07, 2012 7:06 PM

Answers

  • Hi Wes,

    Thanks for your feedback!

    From the description, which seems that the email alert is not supported to assinged to empty in TFS 2010.

    So I thinks you need to write a TFS Server Plugin. This plugin will fire whenever a certain event occurs. In your case, you will want to catch the WorkItemChangedEvent. In the notification, you will find old and new values of each field. By checking whether the assigned to field changed, you will know whether the WI has been reassigned.

    Once you determined that the WI has been reassigned, you can take the New Value, and go to Active Directory (assuming you're using it), and get the email address. Finally, send a message.

    For a code example of writing a robust server plugin (that happens to target the WorkItemChangedEvent, check out this blog post:How to Write a Robust TFS Server Plugin

    http://social.msdn.microsoft.com/Forums/en-US/tfsworkitemtracking/thread/f9ebaeaf-0d2d-4cda-a48d-b8969142b1b7

    Hope it helps!

    Best Regards,


    Cathy Kong [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, September 11, 2012 2:01 AM
    Moderator

All replies

  • Hi Wes,

    Thanks for your post!

    I tested this on TFS 2012, and set Assinged To Changes To empty, and I can receive the email.

    Could you perform the followings and see if the Email Alerts is configred right or not.

    Please "Assigned To" someone and see if you can receive the email. If you receive the email, which shows that the email alert configure is set correctly. If you cannot receive the email. Please refer this article for more information.

    Best Regards,


    Cathy Kong [MSFT]
    MSDN Community Support | Feedback to us

    Monday, September 10, 2012 8:43 AM
    Moderator
  • Hi Cathy,

    I'm actually using TFS 2010, and I know upgrading to TFS 2012 is some time off.  I tried your suggested test and I did receive an email alert when the work item was assigned to that person.

    Any ideas for the next step?

    Thanks for your help!

    Wes


    Wes

    Monday, September 10, 2012 2:45 PM
  • Hi Wes,

    Thanks for your feedback!

    From the description, which seems that the email alert is not supported to assinged to empty in TFS 2010.

    So I thinks you need to write a TFS Server Plugin. This plugin will fire whenever a certain event occurs. In your case, you will want to catch the WorkItemChangedEvent. In the notification, you will find old and new values of each field. By checking whether the assigned to field changed, you will know whether the WI has been reassigned.

    Once you determined that the WI has been reassigned, you can take the New Value, and go to Active Directory (assuming you're using it), and get the email address. Finally, send a message.

    For a code example of writing a robust server plugin (that happens to target the WorkItemChangedEvent, check out this blog post:How to Write a Robust TFS Server Plugin

    http://social.msdn.microsoft.com/Forums/en-US/tfsworkitemtracking/thread/f9ebaeaf-0d2d-4cda-a48d-b8969142b1b7

    Hope it helps!

    Best Regards,


    Cathy Kong [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, September 11, 2012 2:01 AM
    Moderator