index > Team Foundation Server - Administration > Can i force developers to add comments at check-in ?

Can i force developers to add comments at check-in ?


I need developers to add comments at check-in time - probably i will need a custom check-in policy (how do i do that ?). I know i can force developers to asociate work items at check-in but in our case it would be much easier if i could force them to add only comments !

10x
Marius Onofrei
You are correct that you need a custom check-in policy - See this sample over at James Manning's Blog:-

http://blogs.msdn.com/jmanning/archive/2006/01/21/515858.aspx

Cheers,

Martin.



http://www.woodwardweb.com
Martin Woodward
This really works - 10x a lot.
A drawback i can see here is that i have to configure every workstation (okay i could build a setup & stuff) - but anyway it's too much work for too little :-P.

Bye !
Marius Onofrei
I know what you are saying, it would have been nice if this check-in policy was installed out the box... At least it is possible :-)


http://www.woodwardweb.com
Martin Woodward
Martin,

There seems to be many threads on this subject for which I am also seeking assistance, specifically adding the custom check-in policy to the Add Check-in Policy dialogue box. You are a regular responder to queries.

The required steps appear to be:
1) Create the Dll (subclassing PolicyBase or implementing the two interfaces) and deploying the Dll to each developer machine.
2) Register the custom check-in policy Dll on each machine.
3) Amend the Add Check-in Policy dialogue box to include the new custom check-in policy.
4) Select the custom check-in policy from the dialogue for the Team Project.

All the blog entries and threads deal sufficiently with steps 1 and 2 but not step 3. An MSDN Walkthrough points to downloading the Visual Studio SDK, which I have, and some thread entries talk of using the existing custom check-in policy example, which I have NOT found.

Would you be able to confirm the required steps and provide some more specific enlightenment on how one adds the created and deployed custom policy to the Add Check-in Dialogue to be able to select it for the Team Project.

Cheers,

Stephen



Aspiring agile developer trapped in the .NET space
Stephen S at APS

You don't need the SDK for steps 3 and 4.

Here are the steps you need to set the checkin policy on the team project (condensed from http://msdn2.microsoft.com/en-us/library/ms181459.aspx).

  1. From Team Explorer, right-click your team project, click Team Project Settings, and then click Source Control.

    The Source Control Settings dialog box appears.

  2. Click the Check-in Policy tab and the click Add.

    The Add Check-in Policy dialog box appears.

  3. In the Check-in Policy list, select the policy type you want and then click OK.

  4. When you are satisfied with the settings for the check-in policies, click OK; the new check-in policy now displays with future check-ins.

Buck




http://blogs.msdn.com/buckh
Buck Hodges
Buck,

Thanks for your reply. I suspect we are not talking about the same context. I wish to be able to add the created and registered custom check-in policy to the AddCheck-in Policy dialogue box so that it can be selectable for each of the Team Projects.

The most relevant MSDN URL appears to be
http://msdn2.microsoft.com/en-us/library/ms181281.aspx

It includes the following which references the Visual Studio SDK which I have downloaded but can not easily find the relevant area in the SDK 2006.04.

Creating Policy Plug-ins

You can create custom policy plug-ins that appear in the Add Checkin Policy dialog box by using the extensibility provided in the Visual Studio Team Foundation Server SDK. The Visual Studio Team Foundation Server SDK is available for download at http://go.microsoft.com/fwlink/?linkid=68586 as a part of Visual Studio SDK. For more information on policy plug-ins, search the Visual Studio SDK Help after you have installed the SDK.





Aspiring agile developer trapped in the .NET space
Stephen S at APS

Once the DLL is properly registered and the policy class inside the DLL is public, it will appear when in the UI automatically for "Add Checkin Policy", as when that dialog comes up, we scan the list of registered policies.

The most common problems I see with this are 1) not registering properly (eraniopub's reply with details is good) and 2) the policy class wasn't public.




Team Foundation Server - http://blogs.msdn.com/jmanning/
James Manning - MSFT

hello.

i developed custom check-in policy using info fron James Manning's Blog.

everything goes smooth and the code compiled, but i have few little questions:

1. you wrote: "Register the custom check-in policy Dll on each machine". where to register the dll?

i put it in the GAC and it didnt recognize it in the "add check-in policy". maybe i shuld put it

in the "E:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies"?

(i'm out of the office right now so i will try it asap)

2. i understand that i need to deploy this dll to each developer machine, and only in the server i need to Select the custom check-in policy from the dialogue for the Team Project.

is this correct?

thanks in advance.

eraniopub
http://blogs.vertigosoftware.com/teamsystem/archive/2006/02.aspx

The above URL is to another blog detailing with screen shots amongst other things creating, registering and selecting the custom check-in policy from the Add Check-in Policy dialogue.

Registering is in the local registry and the blog includes the required registry location.

The first two steps (creating the custom check-in policy and registering the Dll) are fairly well documented in blogs and books. It is the next step, getting the custom check-in policy name to be added to the Add Check-in Policy dialogue so that it can be selected for Team Projects that I am finding a black hole. This blog links to an MSDN entry

http://msdn2.microsoft.com/en-us/library/ms181281.aspx

which contains the following paragraph and the link to downloading the VSTF SDK which is where the trail of comprehensibility ends for me. If you discover where one finds the relevant part in the SDK and what one needs to specifically do, please add it to this thread so that there may be a sense of completion.

Creating Policy Plug-ins

You can create custom policy plug-ins that appear in the Add Checkin Policy dialog box by using the extensibility provided in the Visual Studio Team Foundation Server SDK. The Visual Studio Team Foundation Server SDK is available for download at http://go.microsoft.com/fwlink/?linkid=68586 as a part of Visual Studio SDK. For more information on policy plug-ins, search the Visual Studio SDK Help after you have installed the SDK.





Aspiring agile developer trapped in the .NET space
Stephen S at APS

ok i solve the problem and i want to share the steps involved:
(some of them "copy & paste" from different blogs and artivles).
-------------------------------------------------------------------------------------------

1. build the custom checkin policy dll. (as described in here)

2.
copy it to a path on thr local machine.
for example, c:\CheckinPolicies\MyPolicy.dll
(this dll shuld be in each developer machine, include the TFS.)

3.add registry key to HKLM\Software\Microsoft\VisualStudio\8.0TeamFoundation\SourceControl\Checkin Policies
of type REG_SZ.
The name should be the class of the policy, and the data is the absolute path to the .dll

4. once you've done that, This MSDN article describes how to add the policy in the UI

note: i created installation package for easy deployment to all machines, but i hope tha in the next TFS version MS will add the comment checkin policy as a build in policy.

eraniopub
Glad this topic was of such use - actually about step 3 - the name of the key should be the name of the dll (without extension) and the value is the absolute path to the dll.

The rest should go smooth - if you are interested i can post my solution (that was built after this thread); there's a setup project there too, so that you don't have to mess around with the registry.

Best of luck !

eraniopub wrote:

ok i solve the problem and i want to share the steps involved:
(some of them "copy & paste" from different blogs and artivles).
-------------------------------------------------------------------------------------------

1. build the custom checkin policy dll. (as described in here)

2.
copy it to a path on thr local machine.
for example, c:\CheckinPolicies\MyPolicy.dll
(this dll shuld be in each developer machine, include the TFS.)

3.add registry key to HKLM\Software\Microsoft\VisualStudio\8.0TeamFoundation\SourceControl\Checkin Policies
of type REG_SZ.
The name should be the class of the policy, and the data is the absolute path to the .dll

4. once you've done that, This MSDN article describes how to add the policy in the UI

note: i created installation package for easy deployment to all machines, but i hope tha in the next TFS version MS will add the comment checkin policy as a build in policy.

Marius Onofrei

i will be glad if you post your solution,

best regards,

eraniopub.

eraniopub

http://marius-ono.blogspot.com/index.html

Marius Onofrei
reply 14

You can use google to search for other answers

 

More Articles

proxy bypassed?????
tfs share point
How can I manege my project to becomes
Server not referred to by the FQDN
TFS Security for Multiple Projects
TFS App Pools shutting down
Upgrade problem - B3R to RTM
Rename my projects
Answering some user questions about TFS failures
Migrate Team Foundation Server from Server to Server?
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

RTM installation failure - error 3200 &q…
Reporting Serrvices Error
Question on UserId param in EventService…
TF53010 / TF14055 error
Team System Warehouse Problems
Strange Error - TF53005 Unable to retrie…
How to sort the Library name in Quick La…
How to record the process of examini…
User adding problem
Migrate to another server
Help with Team Foundation Server
Team Project Creation Failed
RootNode.Icons property
Problems when moving from Beta3 refresh …
Where i can see about what TFS Version i…

Hot Articles

Some users can not publish test result: …
Support for WSS Form Libraries in Team E…
Failed to create team project
Problem with one client connecting
Is there any place where I should set th…
Error 28002
Windows Server 2003 Client
TF30177: Team Project Creation Failed (t…
TFS Security for Multiple Projects
MOM Management Packs
In SQL SERVER 2005 need database, before…
Cannot connet to VMWare TFS from a other…
Service Account
Saving Document
Failed to create team project

Recommend Articles

RTM installation failure - error 3200 &q…
SharePoint instances are multiplying
Installing Teamserver 2005
TeamSystem access via HTTP and HTTPS
Windows Server 2003 Client
Restoring single TFS on a different server
Can't add /remove users to either some […
Restore of individual Team Projects
Team Foundation Server permissions not w…
Adding user from different domain to TFS…
Remote access to Team Foundation Work It…
TF30177: Team Project Creation Failed (t…
Date overflow rebuilding TfsWarehouse cu…
How do I change the port for Reporting S…
Where i can see about what TFS Version i…