TFS Query to get blank (or) no entries in Acceptance Criteria field of Feature or User Story - tfs

I want to write a TFS Query to get blank (or) no entries in Acceptance Criteria field/box for Features or User Story's in project.
How can I write Query as I can't see any = or <> operators against 'Acceptance Criteria'. Only I can see 'Contains Words' & 'Does Not Contains Words', from these how can we get blank entries?

Starting with Azure DevOps 2019 Server (TFS 2019) there is a new operator for HTML fields "IsEmpty" that does what you want to do. Prior to that version you cannot do this in a query.
See: https://learn.microsoft.com/en-us/azure/devops/boards/queries/query-operators-variables?view=azure-devops#query-operators

There is no way to do this search.
you can make a full search then export the results to excel then filter there :(

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 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

Crystal Reports parameterized queries

The company I work for is using MacolaES for an ERP system. The SQL Server database is structured such that when things are no longer considered active, they are moved from a set of "active" tables to a set of "history" tables. This helps to keep the "active" tables small enough that queries return quickly. On the flip side, the history tables are enormous. The appropriate columns are indexed in these tables, and if you query for something specific it returns quickly.
The problem is when you make a Crystal Report, which is prompting the user for a parameter. For reasons not known to me, Crystal parameters are not translated into SQL parameters, so you end up with queries selecting everything from the order header history table inner joined to everything in the order lines history table, which results in over 8 million rows.
Is there a way to get Crystal Reports to use the parameters in the SQL query instead of loading all the records and filtering after the fact? I read somewhere that a stored procedure should work, but I'm curious if an ordinary parameterized query is possible in the interest of saving my time.
Here is the selection formula:
(
trim({Orderheader.ord_no}) = {?Order No}
)
and
(
{Orderheader.ord_type} = 'O'
)
and
(
{orderlines.ord_type} = 'O'
)
In Crystal Reports top menu go to Report / Selection Formulas / Record... There you can add a formula similar to:
{table.field1} = {?Parameter1} and {table.field2} = {?Parameter2}
That will add the condition to the where statement of the SQL query that the report will use to pull the rows.
To verify what is the condition in the where statement that the report is using to pull the data you can go to the menu database / Show SQL Statement. That way you can verify that the report is using the parameters in the filter.
Crystal Reports 8.5 User Guide mention the following tips:
To push down record selection, you
must select “Use Indexes or Server for
Speed” in the Report Options dialog
box (available on the File menu).
In record selection formulas, avoid data
type conversions on fields that are
not parameter fields. For example,
avoid using ToText( ) to convert a
numeric database field to a string
database field.
You are able to push down some record selection formulas
that use constant expressions.
Your formula has a TRIM function on a field. The function against the field does not allow Crystal to push the formula to the database because is not a constant expression.
If you really need to trim the order number field you should do it using SQL Expressions.
References:
Check out this article.

Resources