7

We have an organization within Azure DevOps and many projects within. I have started to tag projects. I'd like to be able to search tags and list the projects that have that specific tag in the project details.

I've found how to search for all the work items with a specific tag, but is there a way to search for projects specifically?

2
  • We kind have found a work around. I don't like it one bit, but it will kinda work. Add a dummy task to a project and add the tag there... then you can search that way, but it seems like a very shoddy solution.
    – Rob
    Commented Nov 19, 2018 at 12:28
  • Nearly a year and a half later, and this is still one of the top Google results for "devops project tags". Why do we have the ability to tag projects if we can't search or filter by those tags?! Unbelievable.
    – qJake
    Commented Jun 10, 2020 at 14:22

4 Answers 4

3

Navigate to the home screen of VSTS (https://your-organization.visualstudio.com/_projects)

From there, type in the tag you'd like to search in the "Search code in this organization"

You will be redirected to a page with three tabs: code, tags, and wiki

Click on the tags tab and every work item, regardless of project, will show up in a list for you to view.

From there, you should see a drop down on the far left with all the projects that include that tag, with the ability to toggle view on/off based on which projects you'd like to see in view.

Hope this helps!

1
  • This seems to only search work items. I'm wondering if you can search the projects that you've added tags to (in the Project-About section)
    – Rob
    Commented Oct 22, 2018 at 17:33
2

Create area paths that represent the workstreams you'll ultimately want to sort against. In this way you'll be able to look at a particular path, which will show all projects within.

1

The Azure DevOps extension Tags Manager may work for your needs. Docs declare you can perform the following operations with each Azure Devops Project:

  • CRUD tags
  • Search tags

If you don't want to install this extension into your Azure Devops instance, another alternative is the Visual Studio extension Tag Admin for Visual Studio 2017.

1
  • Docs for Yod Labs Tags Manager 2 also declare that the extension is for work item tags and build tags. Nothing is mentioned about project tags in text or screenshots.
    – bzlm
    Commented Sep 29, 2020 at 8:12
1

It is possible but its not particularly nice.

The project tags are actually just project properties and these can be accessed via Azure DevOps Services REST API1.

They have a property 'path' of:

/Microsoft.TeamFoundation.Project.Tag.YourTag

YourTag is tag as it appears, e.g. Owned By: Sebastian Rogers, and yes it can use punctuation and spaces.

So to get all the tags on a project you need to use the REST API directly and interpret the results:

curl -u USERNAME:PAT https://dev.azure.com/ORGANISATION_NAME/_apis/projects/PROJECT_ID/properties

where

  • USERNAME, your username
  • PAT, a valid PAT Token in Azure DevOps
  • ORGANISATION_NAME, the name of your Azure DevOps organisation
  • PROJECT_ID, the id associated with the desired Azure DEVOps project

this will give you something like this

{
"count": 15,
"value": [...
    {
        "name": "Microsoft.TeamFoundation.Project.Tag.CLI: Added",
        "value": "true"
    }
]

}

you can set tags as follows:

curl -u USERNAME:PAT  -X PATCH -H 'Content-Type: application/json-patch+json' https://dev.azure.com/ORGANISATION_NAME/_apis/projects/PROJECT_ID/properties?api-version=7.1-preview.1 -d '[{"op": "add", "path": "/Microsoft.TeamFoundation.Project.Tag.CLI: Added", "value": "true"}]'

you can also remove them

    curl -u USERNAME:PAT  -X PATCH -H 'Content-Type: application/json-patch+json' https://dev.azure.com/ORGANISATION_NAME/_apis/projects/PROJECT_ID/properties?api-version=7.1-preview.1 -d '[{"op": "remove", "path": "/Microsoft.TeamFoundation.Project.Tag.CLI: Added"}]'

So the tools exist to do it

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.