Udostępnij za pośrednictwem


What is GenCheckinNotesUpdateWorkitem task?

 

As a part of the standard build process, we first get the latest sources from the repository, apply the label, build, get the checkin details between last successful build and current build (change sets) and the work items that were resolved by these checkins.

GenCheckinNotesUpdateWorkitem (GCNUW) task is responsible for getting the checkin details (changesets) between the last successful build and current build and retrieve/update the work items associated with them.

The algorithm for the task is

1. Check/validate the current label and its scope, last label and its scope.

2. Retrieve the files and folders detailed, versioned by current label. They form the set of current items

3. Retrieve the files and folders detailed, versioned by last label. They form the set of last items. If the last label is not specifies (first build), then set the last item as empty (scoped by team project)

4. Categorize the items into three buckets. Note that we will consider only non deleted items (Item.DeletionId != 0). If the item belong to

a. last label (item list) and current label (item list), add it to ChangedItembucket

b. only last label (item list) then add it to DeleteItembucket

c. only current label (item list) then add it to AddedItembucket

5. Foreach (item) in (ChangedItembucket, DeleteItembucket, AddedItembucket)

a. Do VersionControlServer.QueryHistory on item to get the changesets and add them to the Dictionary<int, Changeset> changesets.

b. Note that we are ignoring the duplicate changesets

6. Foreach (changeset in Dictionary [populated in step 5])

a. Get the workitems associated with the changeset

b. If the UpdateWorkItems flag is set, then update the workitem with build details

7. Raise the event for each changeset in Dictionary (populated in step 5). The event will be captured by the msbuild logger and the information will be shown in the reports.

Other blogs on same topic by [Khushboo]

Comments

  • Anonymous
    August 28, 2006
    Carl Daniel (code) and Robert Downey (code) each wrote and posted code to show the changesets between...

  • Anonymous
    February 17, 2007
    can we desactivate this step for a build, cause it take long time for our build, (betwen 15min to 1 hour by build) and some days i have to do up to 5 builds for different test environments so this task "GenCheckinNotesUpdateWorkitem" took up to 5 hours. :-( . if you got any help please send me the solution by mail : hsahel@sqli.com

  • Anonymous
    July 27, 2007
    What is the solution to speed this up?  This step, "generating list of changesets" is taking 15-20 mins for us.  Most times we only have 1-2 changesets per build.

  • Anonymous
    January 27, 2011
    My question is with step 6b above. It seems that this is not granular enough. Based on TFS 2010 can you tell me how/what is updated? I understand that the association of workitems with changesets is done (aka..adding links to the work item from the changeset). Is this also where you set the "Integrated In Build" in the work item to match the build?

  • Anonymous
    January 27, 2011
    My question is with step 6b above. It seems that this is not granular enough. Based on TFS 2010 can you tell me how/what is updated? I understand that the association of workitems with changesets is done (aka..adding links to the work item from the changeset). Is this also where you set the "Integrated In Build" in the work item to match the build?