none
TFS Project Alerts sending to user specified in field

    Question

  • So here's a scenario that I find to be extremely common yet no one has asked this question yet.

    Lets say I want everyone in my group to be alerted anytime their name is selected in the Assigned To field but only to alert the selected user and not the whole group. It seems as though I need to set up a new alert for each scenario for each user? Other products I've seen have a simple "Current User" selection where it will send the alert to whoevers name is selected in the field specified. I find it hard to believe that the TFS alert system was this poorly designed as to provide such limited capability. Please tell me I'm overlooking something.

    Tuesday, November 24, 2009 8:57 PM

Answers

  • Hi Shauncho,

    You can use Web service to subscribe the event.

    When a work item changed, TFS will call the webservice ans send eventXml as a parameter which contains the ID of the workitem, then you can use TFS API to get the workitem instance by the ID. After you get the workitem, you can obtain the value of specified field, at last send email to the user.

    Here is some articles about

    How TO Subscribe TFS Event Using Web Service
    Get TFS Model and TFS Service Using TFS SDK

    Best Regards,
    Ruiz
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Sincerely, Ruiz Yi
    Thursday, November 26, 2009 3:02 AM
    Moderator

All replies

  • Hi Shauncho,

    You can use Web service to subscribe the event.

    When a work item changed, TFS will call the webservice ans send eventXml as a parameter which contains the ID of the workitem, then you can use TFS API to get the workitem instance by the ID. After you get the workitem, you can obtain the value of specified field, at last send email to the user.

    Here is some articles about

    How TO Subscribe TFS Event Using Web Service
    Get TFS Model and TFS Service Using TFS SDK

    Best Regards,
    Ruiz
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Sincerely, Ruiz Yi
    Thursday, November 26, 2009 3:02 AM
    Moderator
  • I completely don't understand what you just said at all. I don't even think your answer has anything to do with my question. I know how to set up an event to notify a user when an item has been assigned to them without having to setup a similar event for each user. Rigth now, it feels like I have to tell TFS:

    "When the assigned to field contains Tom send an email to Tom"
    "When the assigned to field contains Mark send an email to Mark"

    Is there any way to tell the TFS event system this"

    "When the assigned to field contains someone from this group send an email to that same user from the group"
    Monday, November 30, 2009 5:38 PM
  • Hi Shauncho,

    Have you found a solution to your problem. If yes, can you please share the solution with me.
    I am also struggling to do the same.
    Wednesday, December 16, 2009 10:11 AM
  • R Mishra,

    Unfortunately I have no solution yet for this issue. I don't think this issue has gotten the attention it deserves. The admin/management capabilities with the alerts feature is very poor. It assumes every user is responsible for setting up their own alerts, it assumes everyone who needs to setup advanced alert scenarios also have Visual Studio with Team Explorer installed leaving users who only use the Web Access with very minimal options for setting up alerts. There's no real way to control the alert environment. If you have two admins, and each are setting up alerts, the system can send two emails to a user if each admin sets up the same alert. Then you have to hope you remember which admin setup which alerts or else you'll have alerts setup by some user and you have no idea who you need to login as in order to delete them. There needs to be some sort of central administration point for the project alerts. This is BY FAR the worst notification system ever created in the history of computerized communication.

    Shaun
    Wednesday, December 16, 2009 6:11 PM
  • Ruiz actually did answer your question.  The key point he made is "After you get the workitem, you can obtain the value of specified field, at last send email to the user."
    Thursday, March 11, 2010 10:37 PM
  • Ruiz actually did answer your question.  The key point he made is "After you get the workitem, you can obtain the value of specified field, at last send email to the user."
    Not quite. He provided a work around. And not a great one (circumvents using the built in smtp feature and transforms and requires the API and a new program to do all the work. That's a lot to ask for what is a relatively common task. To a real answer. I'm looking into using the @me macro but isn't really working out. As such I have written a program that allows me to select the users and which alert to assign them. As a result it effectivlu loops through. Ensures the user doesn't have the alert and creates a new subscription. I'll let you know if I get more
    Wednesday, May 26, 2010 10:38 PM
  • The only way I found to do this is create own web service, which received work item change notification from TFS, extract the user name and any other field, determine user email id and send email to the user.

    I have created this service and its working well. In my case requirment was to notify story owner (custom field) and assignee for any change in the story. If someone want more help on this please let me know.

    Thursday, May 27, 2010 4:32 PM
  • I agree with you, this looks the only way going forward.
    Friday, May 28, 2010 4:10 PM
  • Hi,

    This is exactly the kind of notification I need to create. Is there any chance taht you share what you did ?

     

    Thanks,

    Kriss

    Monday, June 21, 2010 1:46 PM
  • Can you please help me i am looking for exactly same solution. I will need to extract user from diferent csutom created filed.

    Thursday, October 28, 2010 6:47 PM
  • I also am baffled that there doesn't seem to be a way to just have the system send project alerts to just the person that was impacted.  We have to give all of our emails in the project alerts.. how come it doesn't have different emails per user?  Like, Why would the whole team of 30 people be notified if I transferred a bug to a teammate?
    Thursday, June 16, 2011 9:38 PM
  • Ravendra,

     

    Can you share the details on what the webservice does and how to register them?  Is this depend on 'workitemchanged' event itself?

     

    What i am looking for is:

     

    1. Need to send email to 'created by' user upon changing a workitem state and/or other fields

    2. Need to have custom 'cc' field  in which the users can enter multiple email ids.  upon creating or changing a workitem, if the email ids entered on that custom field then emails must be sent to those users.

     

    Our user base is 100+, so using TFS power tool alert explorer to setup these per user basis is not the optimal solution for us, also our users vary from techinical and non-technical so training and support them on those custom alerts will also become a full time for TFS admin.

     

    Any help and tips appreciated and thanks for that. 

     

    Thanks

    Priya


    Priya
    Wednesday, July 13, 2011 6:13 PM
  • I'm in the same situation. I would like to set up an Alert that is generic for the entire group when the Assigned To filed changes and only the Assigned To person gets the email. Out of the box that is not available in the Project Alerts. Power Tool's Alert Explorer offers a bit more options but it's too specific to who creates the rules. I don't want everyone in my team to have to create their own notification rules. As a Project Admin I would like to be able to create Alerts for my team.

    Is the WebService option the only solution available here or is there another option?

     

    Tks,

    jcysneiros


    J. Cysneiros
    Friday, July 22, 2011 6:16 PM