Get, "Specify the work item type name in the format <project>\<type>" using tfpt workitem /new

已锁定 Get, "Specify the work item type name in the format <project>\<type>" using tfpt workitem /new

  • Tuesday, December 06, 2011 5:49 PM
     
     

    Hi.

    I'm trying to create a work item in a build script but first, I'm trying to work out the syntax on the command line.  The command I'm running is:

     

    tfpt workitem /new /collection:http://SERVER:8080/tfs/TPC PName\"PName Build" /fields:Title=Test;Deployed To=Dev Int.;Release Number=6.6.6.6.6"

    The error I get is:  Specify the work item type name in the format <project>\<type>

     

    The WI I'm trying to create "PName Build" does have a space in it, and I've read this post (http://social.msdn.microsoft.com/Forums/en-US/tfspowertools/thread/57a67cb5-b525-4c31-b32c-b7b32ee2869b) and also tried quoting as follows:

     

    tfpt workitem /new /collection:http://SERVER:8080/tfs/TPC PName\"PName Build" /fields:Title=Test;Deployed To=Dev Int.;Release Number=6.6.6.6.6"

    and

    tfpt workitem /new /collection:http://SERVER:8080/tfs/TPC "PName\PName Build" /fields:Title=Test;Deployed To=Dev Int.;Release Number=6.6.6.6.6"

     

    I've tried using the exact syntax above (with the title field only), and was successfully able to create a "task" WI, but no matter what I do I cannot seem to get around the space issue for my custom "PName Build" WI.

    I really would like to understand what I've done wrong with the quoting because this is not the first time I'm going to encounter spaces.

    Thanks in advance.

     

All Replies

  • Thursday, December 08, 2011 4:41 AM
    Moderator
     
     Answered

    Hi Logan,

    Did you miss starting quote sign for /fields? I can created workitem of type with space in type name.

    tfpt workitem /new /collection:http://SERVER:8080/tfs/TPC "PName\PName Build" /fields:"Title=Test;Deployed To=Dev Int.;Release Number=6.6.6.6.6"

    Best Regards,


    Forrest Guo | MSDN Community Support | Feedback to us

    • Marked As Answer by Logan Therrion Thursday, December 08, 2011 11:46 AM
    • Unmarked As Answer by Logan Therrion Thursday, December 08, 2011 11:47 AM
    • Marked As Answer by Logan Therrion Thursday, December 08, 2011 11:47 AM
    •  
  • Thursday, December 08, 2011 11:47 AM
     
     
    As always, it's something silly that I missed.  Thanks Forrest. 
  • Thursday, December 08, 2011 2:08 PM
    Moderator
     
     

    I'm so glad that the problem is resolved.

    Best Regards,


    Forrest Guo | MSDN Community Support | Feedback to us