问题
I want to be able to provide a default comment template when developers check in items into TFS.
e.g.
"Description: Code Reviewer: Incident #: "
I know there's a policy with Power Tools that checks if any text has been entered at all, but I'd like some predefined text to be presented ready for the developer to fill in the rest.
I know there's also a 'Check-in Notes' section, but I'm trying to avoid this to make the process as streamlined as possible.
The comments are also the first thing a user sees in the history list. That's why I want to use the comments box over the other options that are available.
回答1:
I don't think you can do that the way you want. Check-in policy are one-way only in the sense you can only read the data and validate but you can't update what's in the Pending Changes dialogs.
You're not supposed to directly interact with the pending changes dialog of Visual Studio (which has been revamped in the 2012 version anyway), so I don't think there's a solution.
来源:https://stackoverflow.com/questions/11203543/team-foundation-server-checkin-comment-template