Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I delete shared steps in VSTS

Tags:

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?

like image 772
Assaf Stone Avatar asked Jan 17 '18 20:01

Assaf Stone


1 Answers

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.0\Common7\IDE)

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
like image 146
PatrickLu-MSFT Avatar answered Sep 21 '22 13:09

PatrickLu-MSFT