English 中文(简体)
采用PT特派团指挥线工具,在TFS建立新的工作系统,说明外地的情况
原标题:Creating a new WorkItem in TFS using TFPT command line tool with line breaks in Description field

我如何在使用TFS 2010电力工具指挥线(TFPT)的新工作系统描述领域添加一条线性突破? 我试图这样做:

Z:>tfpt workitem /new "Project IpsumIssue" /collection:http://myserver:8080/tfs/test /fields:"Title=Testing Command Line 3;Description=Description of issue goes here<br /><br />I d like to have line breaks too"

为此:

Z:>tfpt workitem /new "Project IpsumIssue" /collection:http://myserver:8080/tfs/test /fields:"Title=Testing Command Line 3;Description=Description of issue goes here
I d like to have line breaks too"

页: 1

这里提出的任何建议?

================================================================================================================================================================================================================================================================

我实施的一个工作是,建立一个新的(实际延长的)工作项目,其性质是我最初在长篇描述中插入的。 因此,我现在将其分为以下几个不同的领域:

Z:>tfpt workitem /new "Project IpsumIssue" /collection:http://myserver:8080/tfs/test /fields:"Title=Testing Command Line 3;Description=Description of issue goes here;Field1=more info;Field2=even more data"

然后,我创立了显示它们的形式领域(一个新的表格小组)。 它使情况更加清洁。

还是要确定如何与警察工作队增加分界线。

感谢。

最佳回答

Hate to mark this answered but I did add a workaround that worked for me. Although I added the "solution" to my problem in my OP. Here it is for clarity (thanks for the notion pantelif)

我实施的一个工作是,建立一个新的(实际延长的)工作项目,其性质是我最初在长篇描述中插入的。 因此,我现在将其分为以下几个不同的领域:

Z:>tfpt workitem /new "Project IpsumIssue" /collection:http://myserver:8080/tfs/test /fields:"Title=Testing Command Line 3;Description=Description of issue goes here;Field1=more info;Field2=even more data"

然后,我创立了显示它们的形式领域(一个新的表格小组)。 它使情况更加清洁。

还是要确定如何与警察工作队增加分界线。

问题回答

Try this. In your case:

    Z:>set NLM=^
    Z:>set NL=^^^%NLM%%NLM%^%NLM%%NLM%
    Z:>tfpt workitem /new "Project IpsumIssue" /collection:http://myserver:8080/tfs/test /fields:"Title=Testing Command Line 3;Description=Description of issue goes here%NL%I d like to have line breaks too"

UPDATE: See thisLink。 • 寻求TtobyKraft解决方案。 他认为历史是超文本格式。 首先,你们必须增加新的工作项目,然后更新工作项目历史,以html格式,使用“带”;“彩色”和标签。

I wouldn t know how to help you out using tfpt.
You could construct a small console application that uses TFS-SDK instead and get the job done as follows:

using System;
using Microsoft.TeamFoundation.Client;
using Microsoft.TeamFoundation.WorkItemTracking.Client;

namespace GenerateWorkItem
{
    class Program
    {
        static void Main(string[] args)
        {
            TfsTeamProjectCollection tpc = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(new Uri("http://myserver:8080"));
            WorkItemStore workItemStore = (WorkItemStore)tpc.GetService(typeof(WorkItemStore));

            Project teamProject = workItemStore.Projects["Ipsum"];
            WorkItemType workItemType = teamProject.WorkItemTypes["Issue"];

            WorkItem Issue = new WorkItem(workItemType)
            {
                Title = "Testing Command Line 3",
                Description = "Description of issue goes here 
 I d like to have line breaks too"
            }
            ;
            Issue.Save();
        }
    }
}

This gets the job done. Now if you make it depend on your string[] args, I expect that the method @Ludwo presented shall be usable.

The above based on this





相关问题
Do I need to install TFS power tool if I use VS 2010

I m looking at the list here Team Foundation Server Power Tools March 2011 and I wonder if it is helpful for my case - I m using Visual Studio 2010 as a TFS client tool to connect to TFS servers; I ...

Get specific Version (@Label) for an old version tree

I m having some problem to get a specific Label version for an old tree path (moved, renamed, etc..) in TFS2008. The problem I have is the following: I renamed and moved some portion of tree ...

Running PSAKE script from the command line

I m creating a batch file to execute my psake builds while integrating with teamcity and the TFS Powershell commandlets from TFPT and have come up with the following: @ECHO OFF SET ...

Custom field in TFS 2010 does not appear in Team Web Access

I used the TFS 2010 Power Tools to create a custom field for a Task. The custom field shows nicely inside Visual Studio 2010 on my machine and a coworkers machine. However, when I go to Team Web ...

Forbidden Patterns Check-In Policy in TFS 2010

I ve been trying to use the Forbidden Patterns part of the TFS 2010 Power Tools and I m just not understanding something - I simply cannot get anything to change as I try to use this! I m using the ...

How to rollback in Visual Studio TFS?

I m working on one sub-module of a large project for which is use VSTS 2008. I have a need to rollback the module to an earlier version (about 4 check-ins previous). I tried to do this in the Visual ...

How does TFPT.exe find what workspace to work in?

In using tfpt from the command, I m getting the error: PS D:Main Line> tfpt uu /noget Unable to determine the workspace. Here I m trying to use the Undo Unchanged command, but I ve seen this ...

热门标签