Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
665 views
in Technique[技术] by (71.8m points)

tfs - How do I delete shared steps in VSTS

I’m trying to programmatically delete shared steps (I am experimenting with export/import, and am generating a large amount, and want to be able to delete them – not manually, one at a time).

Shared steps, like all “hidden” category work item types, cannot be deleted with the delete work item API. Test cases, test plans, and test suites have special APIs to allow their deletion, but I cannot find a similar API for the shared steps.

Does any one know what the API is, or whether there is one, or whether there will be?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Yes, a shared step is actually a work item type under the covers.

Unlike test plan/suite, there is no related Rest API could directly delete them. Expect deleting manually through web portal. It can only be destroyed by using witadmin destroywi command which is the only available option right now.

Also works with VSTS, you just have to install any edition of VS , the command located at (%programfiles(x86)%Microsoft Visual Studio 1x.0Common7IDE)

To run the witadmin command-line tool, open a Command Prompt window where Visual Studio is installed. The witadmin command-line tool installs with any version of Visual Studio.

You can access this tool by installing the free version of Visual Studio Community.

You'll need to know the ID of the Shared Steps Work Item you want to get rid of.

witadmin destroywi /collection:https://xxx.visualstudio.com /id:123

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...