Welcome to Team System Rocks Sign in | Join | Help
in
Home Blogs Forums Photos Tutorials Files Roller
Notion Solutions Main Site

Build Failure

Last post 08-06-2008, 9:07 AM by shai_rai. 10 replies.
Sort Posts: Previous
  •  07-17-2008, 1:22 PM

    Build Failure

    Hi Everyone,

    Is the a way if the build while running fails, the work item for build failure can be assined back to the same user who started theit in TFS 2005.

    If yes, then how can we automate that, please any ideas.?

     

  •  07-18-2008, 2:45 PM

    Re: Build Failure

    Hello Anand,

    Using this property, you can specify the field values of the bug(or any wit you want to create).

    </ItemGroup>
        <PropertyGroup>
            <WorkItemFieldValues>
                Priority =1; Severity=High; Assigned To =$(RequestedBy) ; Title = Build Task
            </WorkItemFieldValues>
            <WorkItemType>Task</WorkItemType>
        </PropertyGroup>

    For more information- Create Work Item After Build Success / Failure

    Hope I Helped.


    Developer & Senior Consultant
    http://blogs.microsoft.co.il/blogs/shair
  •  07-19-2008, 12:26 PM

    Re: Build Failure

    Hi Shai,

    Thanks for your support, It looks you are the only one who listens and help on this blog, I really appreciate your time. Well i will try this today and see wht can i do abt my problem and will hollar at you aoon ill know something.

    Thanks Dear.

  •  07-21-2008, 10:45 AM

    Re: Build Failure

    Hi Shai,

    I am Able to Create new work Item , but facing trouble with Assigned To Feild Value.

    If  is use complete user name it works , if i give Assigned To =$(RequestedBy)  then it gives an error message because its not able to resole this Property.

    If i do Message with this property , even then its coming blank.

    Any thing m doing wrong? i have tried diffrent combinations.

     

  •  07-21-2008, 11:42 AM

    Re: Build Failure

    Also I am not able to use, $(WorkItemType) as Task , gives me error "

    error : TF42092: A Work Item could not be created for failures in build 'TestBuild_Dev_20080721.25'. Please verify that the work item type 'Task' is supported in team project 'TEST_PROJ' and it has field 'Microsoft.VSTS.Build.FoundIn' defined.

    , if i use Bug it works.

    So i went to command line and run this command;

    "witfields view Microsoft.VSTS.Build.FoundIn /s:<ServerName>"  it gives me a

    Field: Microsoft.VSTS.Build.FoundIn
    Name: Found In
    Type: String
    Reportable As: dimension
    Use: TEST_PROJ(Bug, Risk),.........

    But i am able to create taks in my Team explorer. How can we fix this.?

  •  07-21-2008, 3:37 PM

    Re: Build Failure

    Hello Anand,

    Its seems that Microsoft.VSTS.Build.FoundIn field is missing in the Task definition.
    Also Microsoft.VSTS.Build.IntegrationBuild should be inside Task definition.

    Please add it into the Task.

    You need that your work item will contains those fields to complete the build process.

     


    Developer & Senior Consultant
    http://blogs.microsoft.co.il/blogs/shair
  •  07-22-2008, 7:17 AM

    Re: Build Failure

    Hi Shai,

    I am able to get the value of RequestedBY anywhere else. but not able to assess for Assigned To , when it excutes Nothing comes in front of Assigned To = and it gives an error. I dont know if we can access a value of Property in a PropertyGroup while assigning like this.

     

    <WorkItemFieldValues>
                Priority =1; Severity=High; Assigned To =$(RequestedBy) ; Title = Build Task 
    </WorkItemFieldValues>
    Please help

    Thanks

  •  07-22-2008, 9:17 AM

    Re: Build Failure

    Hi Shai,

    NEVER MIND I found another Work Around for this. Did the Following:-

    <CreateNewWorkItem TeamFoundationServerUrl="$(TeamFoundationServerUrl)"

    BuildId="$(BuildNumber)"

    Description="Build Log : $(DropLocation)$(BuildNumber)\BuildLog.txt."

    TeamProject="$(TeamProject)"

    Title="Build - $(BuildNumber) completed successfully"

    WorkItemFieldValues="Title = Build Task Completed;Assigned To=$(RequestedBy)"

    WorkItemType="$(WorkItemType)"

    ContinueOnError="false" />

    And now it resolves a Property $(RequestedBy)

    But Now i am Facing Another Problem , GetRequestedBy is Resolving Username as "Server\Username" eg:- "TFSSERVER\sd3445" But I am only able to assign the Value to Assigned To Feild is this way

    "Anand Manra (sd3445)" because this is how this feild is accepting the usenames.

    How can i do this.?

  •  07-22-2008, 1:16 PM

    Re: Build Failure

    Hi Shai,

    Finally Fixced it Man.  I actually updated the Template. Bug.xml and Updated the <Feild> assigned to , removed the <Validated /> and now it accepts the username with this Pattern as well,

     

    Thanks Buddy.. just wanted to keep this blog posted.... Hope some one will get help from this Post

    Cheers

  •  08-06-2008, 7:20 AM

    Re: Build Failure

    Hi Shair,

    In one of above replies, you said that

    Microsoft.VSTS.Build.FoundIn field is missing in the Task definition.
    Also Microsoft.VSTS.Build.IntegrationBuild should be inside Task definition

    Can you direct me where can I find Task definition? Can you explain the above steps in detail?

    Regards,

    Habeeb.

  •  08-06-2008, 9:07 AM

    Re: Build Failure

    Hello Habeeb,

    Read this on my post: http://blogs.microsoft.co.il/blogs/shair/archive/2007/12/05/exceptions-while-exporting-wit.aspx


    Developer & Senior Consultant
    http://blogs.microsoft.co.il/blogs/shair
View as RSS news feed in XML
Powered by Community Server, by Telligent Systems