TFS email notification
Asked Answered
L

4

17

When I add a bug (Work Item) in TFS, and assign it to a user, I want an email sent to that user.

Also if an existing bug has the "Assigned To" changed, I want that user to get an email. Is it possible to send Alerts to users when they're assigned changed bugs in TFS 2008?

Longford answered 17/11, 2009 at 1:38 Comment(0)
G
11

In VS 2005 at least, on the Team menu you will find a Project Alerts... item which allows users to specify an email address that will be notified when My work items are changed by others, which covers both the situations you mention. I imagine VS 2008 will have a similar thing.

Gi answered 18/11, 2009 at 8:32 Comment(2)
just checked and VS2008 does indeed have the same dialog, although the alert options appear to be limited to "my work items are changed by others", "anything is checked in", "a build quality changes" and "a build completes".Feathercut
I don't know if it's our deployment, but any notifications via Project Alerts are heavily delayed. Sometimes it takes more than 24 hours for the notifications to arrive which defeats the purpose...Sporophyll
L
2

Unfortunately, TFS doesn't have anything built out of the box for this to be done without recipient intervention. Richard Ev comment can work, but is not really sustainable. Each person needs to create this or you need to do it for them and continue doing it for all new team members.

Instead, you're better off creating an Event Subscriber. Here's a very helpful post http://www.codeproject.com/Articles/110292/Team-Foundation-Server-2010-Event-Handling-with-Su.

You'll want to use the IIdentityManagementService to retrieve the corresponding users' email. An example:

using (var projectCollection = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(collectionUri, new UICredentialsProvider()))
            {
                var gss = projectCollection.GetService<IGroupSecurityService>();
                var ims = projectCollection.GetService<IIdentityManagementService>();

                var validUsersId = ims.ReadIdentity(IdentitySearchFactor.AccountName, "Team Foundation Valid Users", MembershipQuery.Expanded, ReadIdentityOptions.IncludeReadFromSource);

                var validUsers = gss.ReadIdentities(SearchFactor.Sid, validUsersId.Members.Select(x => x.Identifier).ToArray(), QueryMembership.None);

                foreach (var member in validUsers)
                {
                    Console.WriteLine("{0}: {1}", member.AccountName, member.MailAddress);
                }
            }
Lothario answered 17/7, 2012 at 3:33 Comment(0)
C
1

In VS 2010, if you have the TFS 2010 Power Tools installed you can go to the Team menu and select Alerts Explorer. That will allow you to create new alerts.

Convention answered 16/7, 2012 at 13:42 Comment(1)
You're correct Richard, the problem is that those alerts are mostly availble to a limited few conditions, as well as specific "assigned to me / username" rules. It will need to be setup for each user. This has it's benefits for self-managed alerts, but if you want to push customized alerts to multiple users I'd still suggest the CodePlex - Team Alert solution linked above.Dewyeyed
D
1

I know your post is for 2008, but it's an old post and hopefully you're on 2010 now. For TFS 2010 there is an easy solution for you now, via a plugin which can be downloaded from CodePlex - Team Alert

It's a simple copy-paste solution which can take you 5 minutes to put in place using the configuration extract listed in the post below:

This post will show the exact configuration you need to perform what you want. Notify AssignedTo user of new work (for a specific TFS project)

Dewyeyed answered 31/7, 2012 at 3:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.