Report Of Work Items & Their Parents - azure-devops

Hey Folks my org recently migrated from TFS 2017 to VSTS online. Our IT Finance team has a report that show work items along with their parents and your grandparents. It was built around a SQL query that looked at the backend SQL database. Is there a way to create a report of all work items and their parents in VSTS online?

Yes, it’s possible to show all the work items as parent/child relation in VSTS. Detail steps as below:
Create a new query with Tree of work items type.
Add the filter Work Item Type = [Any] both for top level work items and linked work items. And select Parent/Child Type of tree, then save the query.
Run the query and you will get all the work items with tree view relations.

Related

WIQL or query to get all related work-item, but NOT listing the parents

I have a query listing all features and their child/related work-items.
Is there a way not to display the features (parents) itself? Just a flat list of all work-items having a link with a feature in this project.
I am afraid you cannot use the flat list of work items to query the work items with links.
You can have a try using a Work items and direct links type of query to show the children work items of the Features on the top level. See below:
If you want to add a query result account widget on dashboards, you can check out the Query Tile PRO tool.

Azure DevOps reorder work items in query result

Is there a way I can reorder work items from a query results as I would normally do with backlog work items?
I'm using the order of work items in the backlog to set the order of issues to address, I would like to use queries to view work items by certain criteria (cross-project) so the backlog board is not a good choice for me.
thank
The description is little confusing, but if you just want to order your query result(according to the title of this thread) by specific condition, the wiql would be very helpful.
Add the Wiql Editor extension to your organization, then create a query with the other conditions you need, click the "Edit query wiql" and update the query wiql.
For information about wiql syntax, please check Syntax for the Work Item Query Language (WIQL), the order by would be the one you are looking for.

Azure DevOps Boards - display query result on a board

how to develop the extension to display query result on a board? Such thing is not possible in the Azure Devops unfortunatelly. I've found two extensions on the marketplace which are doing what I need:
AA Query Board
Query based boards
but this extensions are not updated for a long time and I couldn't contact the authors (I need to change few things in order to be able to use it internally in my company).
I've found also this topic Add tabs on query result pages, so it looks like it's quite easy to add new tab to the query result menu, but I have no idea and I can't find any info how to get data (work items) from query result to display them?
Rest of the extension is just to display this data in grid, so that would be also quite easy, but getting this query result data is blocking me.
There is a Query Results Widget that you can use to display the query results on the Dashboards under Overview.
1, First you need to create a shared query if not exist, and save query to the shared queries folder shown as below screenshot. (You can click the Column options from the Editor page to add and remove columns to be shown on the results)
Or drag and drop the query from My Queries folder to Shared Queries folder.
2, Go to Dashboards under Overview, and Click Edit, then search and add widget Query results
3, Click the gear icon on the Query Results widget to configure it and select the query you want to display. Then the query result will be display on the Dashboards
Update:
There are some other ways to show the query results on the dashboards, For below example:
you can select your shared query and click more actions(3dots) and click Add to dashboards. This will display simple total number of query results.
you can also create different Charts for the query results and add it to Dashboards.
Select your shared query and go to Charts tab, the choose New Chart, select a Chart type, After you configured the chart, you can click the 3dots on the chart and add it to dashboards, check below screenshot:
Eventually I managed to contact the author of the "AA Query Board" extension and it turns out that he has a public repository on GitHub with the source code of the extension, so basically everyone can lookup how it's done or base on it.
Link to the repository: https://github.com/staticnz/aa_query_board

Can I see the backlog as a treeview when filtering out done items on Azure Boards?

I'm using the basic work item process in Azure DevOps.
If I look at my backlog without any filters, then it shows me a hierarchy, with epics as the top-level items, then issues and then work items.
If I filter this to only show items that are to do or doing, it shows them as a flat list, not a hierarchy.
Is there any way to see the items as a hierarchy, but filter out done items?
Update following Shayki Abramczyk's comment
The options button doesn't include an option to show parents...
Go to the Work Item Query tab and create a work item query. Configure it to Tree view and let it follow the parent/child relation.
You can filter on the top level (top part of the query editor) and the lower levels (bottom part of the query editor). Use the State in filter to select multiple states. You can't multi-select them in the UI, so typing is required:
PS: The , is the list separator in most languages, but sometimes you need to use ;.
If you want to see parents when ANY child leaf is still open, set the Filter: Match top-level items first to Filter: Match child-level items first.
To specify the order, add the Backlog Priority field to the query and use the table header to sort by it:
Or use the Sorting option in the "Choose Columns" fly-out:
Note: The exact field name differs per Process template. Backlog Priority is for the Scrum Template, Stackrank for CMMI and Agile and Basic:
An easy way to get started is to take the board view closest to what you want and save it as a work item query.

Can you add a column to show the Parent of a Work Item in a flat list Azure DevOps query?

In DevOps, I'd like to have a flat list query of work list items, and the parent of that work item in a separate column. While tree view works in retrieving a hierarchy of parent items filtered by the child item, I'd simply like a flat list of tasks with a User Story/Bug column to the right (possibly even the feature of that User Story/Bug in another adjacent column). I can't find anything in the DevOps documentation to accomplish this. Can someone push me in the right direction?
Can you add a column to show the Parent of a Work Item in a flat list DevOps query?
I am afraid you could not add a column to show the Parent of a Work Item in a flat list DevOps query. That because there is no Parent id column in the column options.
You can custom a field (like Parent Id) in the work item when parent was assigned, like:
We can sort via the custom fields and get a list of all the parent work items first.
Besides, there is a similar user voice about it, you can vote and add your comments for this feedback. When there are enough communities vote and add comments for this feedback, the product team member will take this feedback seriously:
~~"Parent ID" as Column Option in Queries~~
The feedback suggestion that has the most votes is this one: Add “Parent” column to Queries as well
Hope this helps.