Viewing Tasks, Checking In Files, and Checkin Policies...
Covered In This Post:
- Checking Files In
- Violating Checkin Policy
- Associating Checkin Files with Tasks
- Viewing Tasks
Previous Posts That Tie Into This One:
Remember, I am going to be following, kind of loosely, the MSDN Article "A Unit Testing Walkthrough with Visual Studio Team Test".
I started my VPCs back up and open VSTS. At the Start Page, I click the VSTSDemo1 project that I created in my previous post. Following the instructions and screen shots in the walkthrough, I open up the LogonInfo.cs class, and make the required changes. Basically, I add a constructor function with two parameters, but no actual code in the function.
I want to see if I can pull up the Task I added in my previous post. I go to the Team Explorer window, and select VSTSDemo1->Team Project->Work Items->Project Queries. This lists all the different pre-built queries that come standard with Team System:
Project Queries In Team Explorer
I double-click the My Work Items query, and it returns a list of all the work items that are assigned to me. If you scroll through the list, you can see Task #28, which we created last time:
My Work Items Query Results
Having proven to myself that the task is still there, I close out of the query.
I press CNTRL+SHFT+B, to compile my application. It compiles, no problem, as it should, because there is nothing there, really. At this point, I'm ready to check the code back in.
In the Pending Checkin window, there are three files, one of which is my class file. I add the comment "created stub of LogonInfo class file". If I click the Policy Warnings button, it tells me that the following policies have not been satisfied:
"You must associate this checkin with one or more work items".
I decide to ignore this warning and check the code in anyway, so I click the Checkin button. This opens up the Policy Failure window:
Policy Failure Window
I click the Cancel button, deciding not to override the policy at this time. If I double-click the failed checkin policy, it takes me, still in the Pending Checkin window, to the list of tasks assigned to me, so I can pick one to associate with this checkin.
I click the checkbox bext to Task 28. I then have to pick a CheckIn Action. My two choices are Associate or Resolve. I'm guessing Resolve probably closes the task, while Associate does not. I pick Associate:
Selecting A Task In Pending CheckIn Window
Now when I click the Policy Warnings button, it tells me all checkin policies are satisfied. So I click the Checkin button, and everything checks in successfully.
If we run the My Work Items Report again, and view Task 28, we'll notice some changes:
Task 28 After Checkin
Notice in the detailed description and history, it says that we have associated this task with Changeset 4. If we click the links tab, we see the following:
Task 28 Links Tab
If you click the listed link, and then click the Open button, you can see the details for this changeset:
Changeset Details
You can view the comments, files, associate work items, checkin notes, and policy warnings related to this changeset.