Azure Dev Ops Search Capability Limited Compared to TFS - tfs

We've just moved from on-premise TFS 2019 to a local install of Azure Dev Ops. The upgrade has gone well, but the search functionality in Azure Dev Ops is VERY limited.
Whereas in TFS 2019 I could use search to filter by any field and use operators like NOT or AND, the available fields in Azure Dev Ops is limited to just Assigned To, Created By, State or Work Item Type. The 'classic' search results panel also allowed me to filter by work item type, state, project but all of that has gone too. Azure Dev Ops just seems to create a query, which I then need to amend to filter by project/type/state etc...
This is all I see at the moment:
How do I configure Azure Dev Ops so that it will allow searching across any field? Can I restore the previous search functionality?

Go to Azure DevOps Server Administration Console, to check whether the Search is configured.
If the Search is configured, Check indexing status for the collection.
If the status is normal, reindex the repository or collection where the files are located.

Related

Azure DevOps API - Retrieve global lists

We are currently using an on premise TFS 2018 installation and there are a couple of custom applications that use the Microsoft.TeamFoundationServer.ExtendedClient in order to communicate with TFS. Now since some assemblies in the extended client are going to be deprecated (link) and a move to Azure DevOps services is a possibility I have started checking the replacement (link)
In our current implementation we are using global lists and extendedClient WorkItemStore had the ExportGlobalLists/ImportGlobalLists methods that were handy
The problem is that I cannot find an equivalent method in the new client
is witadmin the only option?
I have found this in the REST API (link) but it doesn't seem to work for on-premise so I could test it out
Any ideas would be welcome
As far as I know, there is no concept of a global list any more in Azure DevOps Services. If you want to customize the fields, it is usually defining the available list on the field.
We are utilizing the lists on-premise Azure DevOps Server 2019, but only ever interact to get them from witadmin.
According the comment in this case:
https://developercommunity.visualstudio.com/content/problem/312980/cannot-edit-existing-global-lists.html?childToView=338672#comment-338672
Global lists are now part of a specific work item. To edit the list
you should 1) export the process 2) look into the xml for the work
items. Global lists are usually added to the bug or task wit 3) make
the global list changes in the xml 4) zip up the process and import
back into Azure DevOps.

How can I identify which work items/user stories are in a selected build in Azure DevOps?

I am new to Azure DevOps, so perhaps this is a really simple question. When selecting a build (there are many) to deploy to production, it would be great if I could identify the user stories or tasks were included in that build. I want to be able to say what work is being deployed before it is live, or tell customers who are waiting for new features when that feature is live.
I have tried to write a script using the Azure DevOps API and can see my builds and pull requests. But how do I link them? Is there an existing tool to do this maybe? It would also be great to say given a user story id (e.g. 171171), you could say which build it appears in. Is this possible or do this without saving all of the data from the API and reading this cached version?
You can specify work items (Bugs, User Storys, ...) when commiting to the Git-Repo. This is done by Hashtag and the work item number (e.g. #1234). Visual Studio also has a UI support for this, which does the same.
The linked work items will automatically be display at the Build summery page.
Just add work items into commit. Here is different options: Linking Work Items to Git Branches, Commits, and Pull Requests

Is it possible to disable merging on master at a given date on TFS

I have a special need. In my organization we have a specific workflow, and it would be great to disable merging on master one day before we pass everything in production, and after everything is passed on production we can allow merging again.
We use Team Foundation Server. Are there any settings that would allow us to do that?
There are no settings that will lock a branch on a specific date, but you could do so manually. You could use branch security to make the branch read-only for the day, or you could use branch policies to set a policy that cannot pass. The following sets the required viewers to be more members than are in your team...
The following may be slightly different based on the version of TFS that you are working with;
Go to Code | Branches for your repository
Hover over the master branch until you see the three dots ... and click on them.
Click on Branch Policies
Click on Protect this branch
Click on Require a minimum number of reviewers
Set the minimum number of reviewers to a number higher than are on your team. 10 is the max.
After the release, set it back.
You could automate this in Azure DevOps (formerly VSTS) or possibly in newer versions of TFS on-premise (I only have access to the initial release of TFS 2017), by creating an external service that returns false on specific days and setting it as required to merge to master. Here is a tutorial on creating a status server with Node.Js.

TFS 2015 Prevent Checkin via Web Portal

The Code tab in a Team Project's TFS web portal allows users to check in/out items. Is there a way other than assigning users to the Stakeholder access level to prevent them from being able to check things in via the Web Portal if they have the permissions to actually check into a Team Project? It seems like you cannot explicitly exclude the Code tab form the Default or Advanced access levels, nor can you define a custom access level.
Our issue with the check in of an item from the Web Portal is that it does not evaluate any check in polices, nor can you associate the object you are checking in with a Work Item. We to want enforce developers using only Visual Studio to check in items into source control.
TFS doesn't provide the feature to stop users from checking in at web page. The workaround it to give the access level for your users.
Here is an user voice about your issue that you could vote and add comments: https://visualstudio.uservoice.com/forums/330519-team-services/suggestions/19026091-prevent-users-to-check-in-changes-from-tfs-web-pag
Maybe that you could consider to user Git version control in TFS. In Git repository of TFS, it provide git branch policies that may solved your issue. This is much similar to the check in policies.
Here is a document about move from TFVC to Git: https://www.visualstudio.com/learn/migrate-from-tfvc-to-git/

TFS Environment replication from one site to another

we are a team who would like to replicate the TFS from one site into another site. Both are in different domain and cannot communicate in any means. Please suggest the best practices of the same.In addition I am also looking for a standalone tool to give me a detailed report of the TFS environment(which includes the work-items, etc) along with the SQL server attached to it. The intention is to replicate the same environment so that a full backup goes through fine.
You want to setup a complete clone of your environment in another site, disconnnected from your. Some key points follows:
You need a proper backup of the current TFS data, see Backup TFS
Size the target environment in terms of disk, memory, network, etc.
Install on the new site a compatible SQL Server version
Install on the new site the same (or newer) TFS version
Study the instruction to Clone TFS and apply them on the new site
Plan for changed environment: Active Directory domain, user accounts
Topology could be different, you have to rebuild you Build and Test infrastructure or, at least, properly remove the old references from the new site
What you are wanting to do is not possible.
You will need to put your TFS server somewhere accessible to both locations. I would recommend either VSO (TFS.visualstudio.com) or a custom IAAS instance and domain.

Resources