none
TFS API - How do I get the Build Name or Number of what Build(s) a ChangeSet checkin will trigger?

    Question

  • Hello,

    I'm looking to get the Build Number or Build Name of what Builds a particular ChangeSetID will trigger.  I see there's a TfsWarehouse.dbo.[Build Changeset] table, but the TfsWarehouse DB is only populated every so often, I need this information after a ChangeSet is checked in.  I've created a Check In Service that creates Code Review Work Items based on Application and assigns them to their Application Owner.  This service is called by CheckIn SOAP alert. 

    Is there a way to get at what Build will kickoff based on a ChangeSetId? 

    I'm ok with using the TFS API or querying the DB directly. 

    Thanks,
    Tim
    Tuesday, August 11, 2009 12:53 AM

Answers

  • Hi Tim,

    When a changeset is checked in, the build is not triggered yet. So the build data (Number and Name) are not even existing in the database. It is not possible to know its build number or name cause they are affected by which build definition triggered. 

    The only way possible but not stable is to get the next build id after changeset checked in. Usually, team build increment tbl_Build table's ID column by 1. So maybe we can get the max value of the ID and add 1 to get the next build id which should include the latest changesets.

    Hongye Sun [MSFT]

    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact msdnmg@microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Tuesday, August 11, 2009 8:28 AM
    Moderator