assigning codereview resposnse

Jan 9, 2010 at 12:03 AM


I had a question regarding 'Contributor' and 'Project Administrator' being the only groups available for assigning. Our tfs admin modified these groups including names, so i don't see most of the names.

Is there a way to specifiy the groups declaratively?





Jan 9, 2010 at 12:21 AM

Hi -

Sorry, but at this time there is not a way to declare them. Changing those names is certainly not disallowed or even discouraged. In practice, however, it's an unusual occurrence so we haven't designed for it yet.

Hopefully the good news is that you can download the code, change it, and rebuild for your org.

In branch 1.1.2, in the TFSService.cs file, you want to change the GetCodeChangers() method here...


internal static List<String> GetCodeChangers(Uri projectUri)
List<String> codeChangers = new List<String>();
IGroupSecurityService gss = (IGroupSecurityService)tfs.GetService(typeof(IGroupSecurityService));

Identity[] projectGroups = gss.ListApplicationGroups(projectUri.ToString());
Identity serviceGroup = gss.ReadIdentity(SearchFactor.ServiceApplicationGroup, null, QueryMembership.None);
Identity[] serviceGroups = new Identity[1] { serviceGroup };
Identity[] groups = new Identity[projectGroups.Length + 1];
serviceGroups.CopyTo(groups, 0);
projectGroups.CopyTo(groups, 1);

SortedDictionary<MemberReader, System.Threading.Thread> threads = new SortedDictionary<MemberReader, System.Threading.Thread>();
foreach (Identity group in projectGroups)
if (!(group.DisplayName.Equals("Contributors") ||
group.DisplayName.Equals("Project Administrators") ||
group.DisplayName.Equals("Service Accounts")))

MemberReader memberReader = new MemberReader(group, gss);

threads.Add(memberReader, new System.Threading.Thread(new ThreadStart(memberReader.Read)));

foreach(MemberReader reader in threads.Keys)
foreach (string member in reader.MemberNames)
if (!codeChangers.Contains(member))

return codeChangers;


Jan 9, 2010 at 12:47 AM

thank jb,


I actually did exactly what you recommended and everything worked perfectly.