How to restore the system default query "Assigned to me" setting in TFS (TFS 2013)

Source: Internet
Author: User

This is how the story started, one day the developer turned to say that after modifying the system default work item query "Assigned to me" in the browser, it was found that the query timed out every time and there was no way to revert to the initial setting state because the query editor could not be used after the timeout prompt, such as:

Searched all the tools that can edit work item queries, Visual Studio, Eclipse does not see the ability to edit system default queries. Even if you use Save as in your browser to save assigned to me as another query, you cannot restore the default state of the system. Already feel out of hand, and because this happened in the production system, there are thousands of developers working on the platform every day, do not dare directly in the database to do the action, finally had to contact the Microsoft TFS Product group, to the developer for help.

TFS Product group developers soon got an echo and offered a fix, which seems to be a good mix of MVP groups.

Here is a fix for the solution, hoping to be able to meet the same problem of friends to help:

Microsoft Developer's reply is this, in TFS 2013, in the work item query process, if there is a time-out phenomenon, the query Editor is forbidden to use, fortunately, this very inconvenient user experience in the latest version of TFS 2017 has been improved, users can modify the query. In TFS 2013, you must modify the related records in the database directly by following the scenario below:

--The query needs to run on the same collection database where the project lives. Change the database name if it is different

Use [tfs_defaultcollection]

--The Find user ID from the DataTable based on its domain and username. It is recommended to double check the data to make sure we are selecting the right user

DECLARE @userId nvarchar (50);

SELECT @userId = Teamfoundationid from [dbo]. [Constants] WHERE Domainpart = ' <domain name> ' and Namepart = ' <domain username> '

--Find Project ID from the DataTable based on its name. It is recommended to double check the data to make sure we are selecting the right project

DECLARE @projectId nvarchar (50);

SELECT @projectId = project_id from [dbo]. [Tbl_projects] WHERE project_name = ' <project name> '

--This would reset the ' Assigned to me ' query on the selected user

DELETE from [dbo]. [Tbl_registryitems]

WHERE Parentpath = ' #\users\ ' + @userId + ' \webaccess\projects\ ' + @projectId + ' \queries\a2108d31-086c-4fb0-afda-097e4cc 46df4\ '

How to restore the system default query "Assigned to me" setting in TFS (TFS 2013)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.