Azure / azure-devops-cli-extension

Azure DevOps Extension for Azure CLI
https://docs.microsoft.com/en-us/cli/azure/ext/azure-devops/?view=azure-cli-latest
MIT License
617 stars 239 forks source link

[Feature Request] Add possibility to remove work-item links to commits/repos #1297

Open kevtk opened 1 year ago

kevtk commented 1 year ago

It is not possible to remove links to e.g. Commits with the command az boards work-item relation remove. Seems like this command aims on removing relations with other work items, but not relations of the type ArtifactLink.

Best solution would be to hand over the relation type and the value of WorkItemsJSON["relations"][...]["attributes"]["id"] as an extra (optional) argument. Very best solution would be to add optional removal filters such as "remove all relations to this repo" or "remove all relations to this commit", but its maybe overloaded.

Also discussed in This SOF thread

Additional Information: This is an example JSON node to remove:

"relations" : [
   {
        "attributes": {
          "authorizedDate": "2018-04-14T13:51:14.53Z",
          "id": 35***,
          "name": "Fixed in Commit",
          "resourceCreatedDate": "2018-04-14T13:51:14.53Z",
          "resourceModifiedDate": "2018-04-14T13:51:14.53Z",
          "revisedDate": "9999-01-01T00:00:00Z"
        },
        "rel": "ArtifactLink",
        "url": "vstfs:///Git/Commit/<.......>"
   }
]