How I can select workitems with specific changes in history in last some days? - tfs

I want to select only workitems which have been changed with some specific comments in last 14 days.
Something like this:
SELECT [System.Id]
FROM workitems
WHERE [System.History] CONTAINS WORDS 'Tyry-pyry'
ASOF #today - 14

Update
We do not have this kind of operate with editor date for a specific filed such as system.history.
There is no such build-in feature from a query or wiql.
You may have to first use query [System.History] CONTAINS WORDS 'Tyry-pyry' to list all work items which history contain such word.
Then use Rest API to query all above work item's detail history information. Use conditional statements or export them in excel to filter time of the comment which contain word "Tyry-pyry" added in 14 days.

You can go in queries -> new
and make a filter like this

Related

How to search for TFS items that are in still in Refinement?

I am trying to create a search query to search for TFS items that are in Refinement from a TFS board and am stuck with that.
Basically I want to be able to add a badge of amount of work items that are currently being displayed in the Refinement column in our dashboard:
When I open the relevant TFS item from the Board I can see that there is a column with value as Refinement but am not able to create a search query for that column or value:
Please help me with search query column that I can use or help write a WIQL query to lookup "in refinement" items from a TFS board.
Use "Board Column" in the search:
In WIQL you can search for the same thing like this:
[Source].[System.BoardColumn] = 'Refinement'

Sort TFS Query By Itaration Start Date

I have TFS/AzureDevOps query which is sorted by Iteration Path .
I need to sort it by Iteration Start Date.
I dont see any option on the Sorting Page or in the query page to sort like this.
I tried sorting by iteration ID but the iteration were not created in order .
WIQL Code
SELECT
[System.IterationPath],
[Prod.Versions],
[System.Id],
[Prod.Territory],
[Prod.Customer],
[System.Title],
[System.AssignedTo],
[System.State]
FROM workitems
WHERE
[System.TeamProject] = #project
AND [System.WorkItemType] = 'Feature'
AND [Prod.Versions] >= '9.0'
AND [System.IterationPath] <> 'Machine'
AND [System.AreaPath] UNDER 'Machine\Development'
ORDER BY [System.IterationId],
[System.Id]
i would like it to be ordered like the following (this is from the setting page of the project in AzureDevops Server 2019 ):
We have adopted a naming convention for our iterations that uses the start date of the iteration as the name in order to achieve this.
So the iterations are named like:
2019.08.12
2019.08.26
not ideal, and I would love to see a option to include the iteration's start date a column for this very reason. Hopefully we will see a better answer soon.
Sorry, TFS work item query not support to filter Iteration using Start/End Dates.
There is a similar question here: TFS show iteration Start and End Date on PBI
Since using a name contain iteration date is not a solution for you. As another workaround, you could try get Iterations in specific Start/End dates using TFS API. Some thing maybe helpful for your reference.
Besides, in each collection database there is a table called "tbl_nodes" that holds the start-date and the end-date.
Writing a warehouse adapter that actually picks up these dates and saves them to the warehouse. Note do not write or change anything directly in database which may lose official support.
For query work item using Iteration Start/End Dates scenario, please submit it to User Voice site at: https://developercommunity.visualstudio.com/spaces/21/visual-studio-team-services.html?type=idea Microsoft engineers will evaluate any feature request seriously.

How can I query customized board column change date in TFS 2017

I know you can query by state change date instead of column change date if you are using the default columns that match the state. But our TFS board columns are custom. I can see the board column changes in the work item history, so they are clearly stored somewhere. I'm happy with help on a query or if there is some way to do it through the query tool that I haven't figured out.
Thanks.
You can only list work items with Kanban query fields, but can't get column change date.
You need to use TFS api to get work items revisions, and check whether System.BoardColumn field is changed in any revision.

How to get TFS query result but for a previous date

Is it possible to execute a TFS query and get the results not for today but for a previous date?
I just want to see the results that were available in that date.
To clarify: I need to see the state of the work items on a give date to see their evolution over time.
According to your clarification, you need see the state of the work items on a give date. There is not a direct way to achieve it in Work Item Query.
You can only use Was Ever in Work Item Query to list items based on State past assignments, like:
state Was Ever Active
Or you can use State Change Date <= YYYY-MM-DD and State Change Date > YYYY-MM-DD to list all work items that changed State on YYYY-MM-DD. (Need to check whether TFS 2010 has State Change Date field)
Of course you can combine other clauses to narrow down the query.
What you want is actually the work item history. You need to get the work item history programmatically using TFS API. You can check this blog below to use the API:
http://www.codeproject.com/Articles/243653/TFS-SDK-Work-Item-History-Visualizer-using-TFS-API
I think you can create pivot table report to connect to TFS cube. For your requirement to see work items' evolution over time, you can define the pivot table as:
Check these two links for the details: https://msdn.microsoft.com/en-us/library/ms244678 and https://msdn.microsoft.com/en-us/library/ms244710.aspx

How to query for TFS work items with or without tags

TFS supports querying on tags, but I can't find a way to create a TFS work item query to return results that have no tags or any tag.
It is not possible to sort the Tag column in the TFS web access, so I can't even return all work items and then sort on the column to focus on those with tags and those without tags.
For example, I was hoping to see a wild card or any for the Tags value below:
I'm about a year too late, but I just accomplished this by doing Tags, Does Not Contain, "". I know that makes no sense, but it worked. I was able to pull in a task that had no tag.
This is not exactly helpful in the tool, but works to get the information. I select all, copy, paste into a worksheet. I can format as table and sort the results to get what I need. It is not very helpful for in tool info, but it works. Another option is to install the TFS Plugin with Excel, you can create and modify items using an existing query, sort items, add items, filter to show only items that do not have a tag, etc.
https://msdn.microsoft.com/en-us/library/ms181675.aspx?f=255&MSPPError=-2147217396
Can you do Tags=""?
I am not sure I understand the use case, but you can sugest new features on http://visualstudio.uservoice.com

Resources