In TFS how do I link a changeset with a work item? In other issue trackers, you can do this through the comments (for instance JIRA):
"Fix for bug-1234. Had to add document ready."
The issue tracker will then add this changeset to the history for work item bug-1234, and the changeset history can be viewed in the issue tracker UI.
Does TFS support anything like this? I haven't been able to find any clear links. Note that I am looking to link a TFS work item to a changeset and not to link source to a work item. I am aware of a Product SourceLinks that does and have already started using it.
When you check in code the check-in dialog allows you to select a Work Item (Task, Bug, etc. ) That Work Item will be associated with that check-in/changeset. [every check in creates a changeset]
Then when you view the Bug details you can see all the links/associations:
Related
Disclosure: Newbie with TFS and couldn't find useful SO answers
A coworker submitted a bunch of changesets to source control -- Can I just get the most recent one to get all of his changes? Or would I need to get each one individually? In other words, do changesets compound?
And more generally, what's the easiest way to ensure my local repo is identical to the server repo (minus the new things I'm working on).
I'm much more familiar with Git if that would help explain this
With your source control set to TFS in VS (Tools > Options...) just right click on your project file in Solution Explorer and select Source Control > Get Latest Version (Recursive). I do it twice just to make sure I get a message saying "up to date".
You can also use Source Control Explorer and get a specific changeset by right clicking the change set and selecting a similar option, and yes, these will get all changes up to the one you clicked.
Edit:
A little confused rereading your title it sounds like you want the server to match local, then your question is about matching your local to the server. So let me address both.
To get the server to match your local this would be most like a "Check in" (or 'push' in Git) this will merge your files into the server. You can perform a check in by clicking the Team Explorer tab and selecting "Pending Changes" then type a description and click "Check In". Where there are conflicts your will be notified and asked how to proceed, but in most cases following best practices this will not be the case.
Then you will want to match your local with the server (basically a 'pull' in Git) by right clicking the project file and selecting 'Get Latest Version (Recursive)'
Hope this helps.
Is there any recommendable solution to integrate SVN with TFS 2013 in a sense that SVN is being used for source control and TFS for work item tracking?
For example, it should be possible to link commits in SVN to work items in TFS.
You can use Integration with Bug Tracking Systems / Issue Trackers: http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-bugtracker.html
It is very common in Software Development for changes to be related to
a specific bug or issue ID. Users of bug tracking systems (issue
trackers) would like to associate the changes they make in Subversion
with a specific ID in their issue tracker. Most issue trackers
therefore provide a pre-commit hook script which parses the log
message to find the bug ID with which the commit is associated. This
is somewhat error prone since it relies on the user to write the log
message properly so that the pre-commit hook script can parse it
correctly.
TortoiseSVN can help the user in two ways:
When the user enters a log message, a well defined line including the
issue number associated with the commit can be added automatically.
This reduces the risk that the user enters the issue number in a way
the bug tracking tools can't parse correctly.
Or TortoiseSVN can highlight the part of the entered log message which
is recognized by the issue tracker. That way the user knows that the
log message can be parsed correctly.
When the user browses the log messages, TortoiseSVN creates a link out
of each bug ID in the log message which fires up the browser to the
issue mentioned.
Go through mentioned URL for detailed description.
https://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-bugtracker.html describes how to configure folders in TortoiseSVN to do a one-way integration between file versions committed in TortoiseSVN, and work items in TFS. When a developer commits the file version, he/she is prompted for the TFS work item number (which works fine if the developer knows the number). It even creates a link to the TFS work item in the Revision Log of the file in TortoiseSVN. However, it does not display a list of work items for the developer to choose from, nor is there any link in the TFS work item going back to the committed file version in TortoiseSVN. (It is possible to write an issue tracker plug-in for TFS to do this, but all the plug-ins I have found on the internet seem to be for older versions of TFS.)
This integration will insert the bug number into the Revision Log of committed source files, and will add a link from the log to the selected bug in TFS. Although you make this change inside your working copy, it will apply to the same folder in other working copies once those working copies have been updated.
To associate a folder tree in TortoiseSVN to TFS:
1. Right-click on the folder in your working copy. This should be at the apex of the folder tree you want to associate with a project in TFS. Select TortoiseSVN > Properties.
2. On the Properties - TortoiseSVN window, check to see whether there are any bugtraq properties for this folder. If not, click New > Bugtraq (issue tracking integration).
3. The Edit Bugtraq Properties - TortoiseSVN window opens.
a. For Issue tracker URL, specify the URL to your work items:
http://tfs_server_name:8080/tfs/DefaultCollection/TFS_Project_Name/_workitems?id=%BUGID%&_a=edit
b. Next, place a check in the "Remind me to enter a bug-ID" checkbox.
c. For Message Pattern, specify something like:
TFS Work Item: %BUGID%
d. For Message Label, specify something like:
TFS Work Item:
e. For "Bug-id is", specify Numeric.
f. At the bottom of the window, place a check next to "Apply property recursively". Click OK.
4. Back on the Properties - TortoiseSVN window, verify that the bugtraq properties have been added and click OK.
5. Remember to perform an SVN Update and SVN Commit on the folder after changing its bugtraq properties.
The bugtraq properties that implement this one-way integration between SVN and TFS are built into Apache Subversion and so should work for SVN even if you are not using the TortoiseSVN user interface.
I want to use the TFS 2013 Code Review system to ask a colleague to have a look at the current or latest version of one specific file. I cannot seem to find an option to do so. Is this possible?
I've tried:
Right-clicking the file in Solution Explorer, checking the Source Control context menu, but the option to ask for a review is not there;
This solution from a blog where you request the review from a file's "View History" overview, but this ended up sending a review for the entire changeset instead of that one file;
Opening the file and right-clicking the tab header, but no Source Control options are available in that context menu;
Check out the options in the Team Explorer, but I couldn't find an option to do what I want;
Is it even possible to request a Code Review of one specific file?
Check the file out and in Pending Changes exclude everything else, leaving just the one file. Then from Pending Changes window => Actions => Request Review but this obviously won't highlight your changes as I'm assuming they have already been committed.
I need to find my recent changesets so I can add something to each one.
I tried doing a View History in source control explorer, but I don't see a way to filter that by user. (If I use this approach, I can open a changeset and successfully change the comment. However, this is a pain because it's not filtered by user.)
I also tried right-clicking on a team project and doing Find -> Find changesets. That brings up a dialog where I can find changesets just for me. However, the save button is disabled? Why?
How can I get the save button enabled? Or, if that can't happen, how can I find just my changesets and add some data to each comment?
I see this in Visual Studio 2012, not sure about 2013. The Save button is disabled, but I know a workaround - if I type in the Comment area by adding a space and then removing it (from anywhere), then select a file below to take focus off the Comment box, then go back to type in the Comment area again, it is enabled. Visual Studio bug.
This is Visual Studio bug. Workaround is even simpler than suggested above. Type at the end of comment [Space], [Backspace], [Space] and Save button is enabled.
To use the changeset command you must have the Read permission set to Allow for any files or folders in the changeset for which you wish to display full information. The only users who can modify the notes and comments that are associated with a changeset are the users who created the changeset or a user who has the Revise other user's changes global permission.
Check in - Users who have this permission can check in items and revise any committed changeset comments. Pending changes are committed at check-in.
As per 1 & 2 you should be able to edit your changeset comments without any special permissions, I verified this in our TFS server. I am able to edit and save the comments (since am an admin I can revise others changes too). I also locked (took out check-in permissions for my ID) for an entire branch and then tried to edit my changeset comments and it worked too. I use VS 2010 and TFS 2010.
Update: Check if you have the "Edit project-level information" set to allow. I noticed that when I remove this access my "save" button also gets disabled when I go through the Find -> Find changeset route. You can get there by VS -> Team -> Team project Settings -> Security
Source Link: LINK1
Source Link: LINK2
I'm currently trying to eliminate the need for check in comments in TFS 2010 as the information about each change we make is already documented within an associated work item. The only issue with this is when you look at the file change history, the "Comments" column is blank thus making it difficult to find the change you are looking for.
To resolve this we enter the name of the work item in the check in comments but I am wondering if there is a way that I can have TFS automatically do this.
For example:
If I have a Change Request work item called "Add New Feature 1" and I check in the changes against this, I would like the check in comments to automatically have "Add New Feature 1" included in them.
Anyone know if this is possible and if so how I can accomplish this?
Thanks
You'd need to either write a Server Plugin or maybe a policy (not sure if policies can change the checkin comment though).
Checkout the following plugin which associates workitems based on the checkin comment.
http://embeddedworkitems.codeplex.com/ It's the reverse of what you want but should be adaptable.