Queries and dashboards
Find and run the Queries your Project already has, write and save your own, chart what they find, and keep your Project's and Teams' dashboards up to date, all in the same Queries and dashboards the website shows.
Find a Query
Queries live under Queries in the sidebar. The Queries you've pinned are listed there, a click away. To find any other, click Browse Queries… (or the folder button beside Queries) to open the Query browser.
- Project at the top chooses whose Queries are shown.
- My Queries are your own. Shared Queries are everyone's, in their folders; a folder's Queries load as you open it.
- Type in Find a Query by name… to narrow the tree to Queries whose names have those words.
- Click a Query, or choose it with ↑ ↓ and Enter, to run it.
Each folder and Query has a … menu. A folder's has New Query here and New folder…; Queries and folders you can change have Rename…, Move to folder… and Delete…; and in Shared Queries, Permissions…. My Queries and Shared Queries themselves can't be renamed, moved or deleted.
Queries are in the command palette too: type part of a Query's name and press Enter.
Pin a Query to the sidebar
With a Query open, click the pin in its header (Pin to sidebar). It's then listed under Queries in the sidebar; click the pin again (Unpin from sidebar) to take it off.
Run a Query and read its results
A Query runs as soon as it opens and shows its results with the columns it was saved with, in the order it sorts them. Every Query shows at least each Work Item's ID and title. The header says when it last ran; click Run again to run it again now.
A Query is one of three types, and its results show it:
- Flat list: the Work Items it finds, one per row.
- Tree: Work Items with their children under them, indented. A tree Query can show rollup columns from each Work Item's descendants (Rollup in the header), as the Team Backlog does; Boards and planning describes them.
- Direct links: Work Items and the ones linked to them.
The results are a list like any other: click a row to open its Work Item in a panel beside them, and use the keyboard to move through and edit them (J K to move, X to select, S A I P T to edit). A Work Item you change is changed straight away; run the Query again to see whether it still matches.
Columns
The columns button in the header adds a column for any Field (Add a column…), removes one, or moves it left or right. In a Query, the columns are part of the Query, so changing them changes the Query: save it to keep them. In other lists, such as My Work and Search, the columns you choose are kept on this computer for that list, and Back to the default columns puts them back.
When Azure DevOps can't be reached
A Query runs in Azure DevOps. Offline, it shows the results from the last time it ran, and says so.
Write and change a Query
Click the pencil in a Query's header (Edit the Query) to open its editor above the results, or start a new one with New Query: the + beside Queries in the sidebar, or New Query here on a folder in the Query browser.
- Choose the type of Query: Flat list, Tree or Direct links. Tick Query across projects to look beyond this Project.
- Under Filters, each row is a clause: And or Or, a Field, an operator and a value. Add a clause adds one at the end; the + at a row's end inserts one below it, and the × removes it.
- To group clauses in brackets, tick two or more next to each other and click Group. A group can hold another group. Click a bracket to ungroup it.
- Under Sort by, Add a Field to sort by; click a sort to switch between ascending and descending, or its × to remove it. With none, the results are in Azure DevOps's default order.
- Click Run (⌘↵) to see the results of what you've written, before you save anything.
A tree Query also has Filters for linked Work Items, and chooses which Work Items to match first: Match top-level Work Items first or Match linked Work Items first. A Direct links Query chooses which top-level Work Items to return: Return all top-level Work Items, Only those with matching links or Only those without matching links, and which link type.
Macros
A value can be a macro, worked out when the Query runs: @Me, @Today,
@CurrentIteration, @project and the others the website has. Click the
@ at the end of a value to choose one. For dates, the picker also takes an offset
(One less, One more) and a modifier, and says what the macro
means today before you use it.
WIQL
The WIQL tab shows the Query as Azure DevOps' query language. Edit it there if you prefer; switching back to Editor shows your changes as clauses. A Query the editor can't show as clauses says so, and can still be changed in the WIQL tab.
Save it
While a Query differs from the one saved, its header says Modified and the results are the results of the unsaved changes.
- Save (⌘S) saves it over the Query. A new Query asks for a name and a folder.
- Save as…, beside Save, saves it as a new Query and leaves the original as it was.
- Revert (Go back to the saved Query) throws your changes away.
The header's … menu has Rename…, Move to folder…, Save a copy…, Open in Azure DevOps, Permissions… (for a shared Query) and Delete….
A Query saved offline waits to be sent, and is marked as saved offline. When it's sent it goes over the version you opened; if someone else saved it in the meantime, it's listed under Conflicts, where you choose Keep mine, Keep theirs or Save mine as a new Query. Organizations, offline and Preferences says more.
Permissions
A Shared Queries folder or Query has Permissions…, in its … menu in the Query browser or the Query's header. It lists the people and groups with a say, and for each whether they may Read, Contribute, Delete and Manage permissions: Allow or Deny. What you may change depends on your own permissions in Azure DevOps.
Make a Query from a search
A search you'd like to run again can become a Query. In Search, after typing what to find and choosing its filters, click Save as Query. It opens as a new Query, not saved yet, with clauses for the filters; change it in the editor if you like, then Save it, giving it a name and a folder.
Chart a Query's results
Every Query has a Charts tab beside Results. Its charts are of the Work Items the Query finds, grouped by a Field.
- Open the Charts tab. The first time, it offers a start: By State, By Assigned To or Trend by State.
- Click New chart and pick its kind: Pie, Bar, Column, Pivot table or Trend.
- Choose the Field it groups by (its slices, bars or rows), and optionally a second Field to split them by (stacked by, or a pivot table's columns).
- Under Measure, count the Work Items or add up a number Field, such as Remaining Work or Story Points.
- Give it a name, and click Add chart.
A Trend shows how the Work Items stood on each day over a period of 7 to 90 days. It comes from Analytics, or from each Work Item's history when Analytics isn't allowed or can't split by the Field you chose. Rest the pointer on a chart to see its numbers.
Click a slice, a bar or a pivot table's cell to list just those Work Items below the chart. Each chart's … menu has Edit chart…, Pin to Home (to show it as a tile on Home) and Delete chart.
Charts are kept on this computer, for each Query. Azure DevOps doesn't offer a way to share them, so the website's own Query charts aren't shown here, and yours aren't shown there.
A Trend from Analytics needs Analytics: Read. Without it, the trend is worked out from the Work Items' history.
Export the results
The download button in a Query's header exports its results to CSV or Excel, with the Query's columns in their order. Export and import says more, and how to import changes from a CSV file.
Dashboards
Each Project's dashboards are under Dashboards beneath the Project in the sidebar (and in the command palette). The list has the Project's own dashboards first, then each Team's, your Teams first. Filter dashboards finds one by words in its name, description or Team. Click the star beside a dashboard to put it in the sidebar, under its Project.
A dashboard shows its widgets where the website's grid has them. Click a Work Item in a widget, such as a row of a Query's results, to open it in a panel. Refresh reads the dashboard and every widget again, and a dashboard set to refresh itself does so every 5 minutes. In a narrow window the widgets go one under another, in reading order. Offline, a dashboard shows as it was when last read, marked as such.
A widget ADO Local doesn't draw says so, with a link to see it on the website. A widget that embeds another web page shows a link to it instead.
New dashboard
- Click New dashboard in the Project's list of dashboards, or choose New dashboard… in the command palette.
- Choose whether it's the Project's or one of your Teams', and give it a name and a description.
- It opens empty, in Edit mode, ready for its first widgets.
Edit a dashboard
Click Edit in a dashboard's header, or press E. The dashboard shows the website's grid, and you can lay it out:
- Move a widget by dragging it by its title bar.
- Resize one by dragging its bottom-right corner. It keeps to the sizes its kind comes in.
- Remove one with Remove in its … menu, which also has Settings….
Widgets snap to the grid's cells and never overlap: a move that won't fit is shown refused, and the widget stays where it was.
From the keyboard
| Keys | In Edit mode |
|---|---|
| Tab | Go from widget to widget |
| ← → ↑ ↓ | Move the widget |
| ⇧ with an arrow | Make it wider, narrower, taller or shorter |
| ⌫ | Remove it |
| Enter | Open its settings |
| Esc | Cancel editing |
Done or Cancel
Moves, resizes and removals stay here until you click Done, which saves the layout in one go. Cancel throws them away, asking first; so does leaving the dashboard with changes made. Widgets you added, and settings you saved, stay on the dashboard either way.
If someone changed the dashboard, here or on the website, after you started editing, Done asks whose to keep: Keep theirs, or Apply mine on top to put your moves and removals on top of their version.
The layout can only be edited in a window wide enough for the grid; a narrower one says to make it wider.
Dashboard settings, copy and delete
A dashboard's … menu, and each row's in the list, has:
- Dashboard settings…: its name, its description, and whether it refreshes itself every 5 minutes.
- Copy…: a copy, with every widget, for the Project or one of your Teams.
- Delete…: deletes it, for everyone. Azure DevOps can't bring it back.
Azure DevOps is asked first what you may change. Without permission, or offline, Edit and Delete are off and say why. A Personal Access Token needs Dashboards: Read & manage.
Widgets
In Edit mode, click Add widget. It lists the widgets ADO Local draws, grouped as the website groups them: Boards, Repos, Information and links, and from the Marketplace, Query Tile Extended and Sprint Goal where the organization has them. Each says what it shows and its size in the grid.
- Type to find a widget, and choose it with ↑ ↓ and Enter, or click it.
- It goes in the first free space, at the website's size for it, and its settings open straight away.
- Set it up and click Save (⌘S). Until its settings are saved, it says Not configured yet, with Configure….
A widget's settings
Select a widget and press Enter, or choose Settings… in its … menu. They open beside the dashboard, with the widget drawn above them as it will look, redrawn as you change anything. Every widget has a name and a size (only the sizes Azure DevOps allows it). The rest depends on the kind:
- Query Results: a Query, and the columns to show, in order.
- Query Tile: a Query, a background, and rules that colour the tile by how many Work Items it finds.
- Query Tile Extended: a count or a Field added up, with factors, a unit and colours.
- Chart for Work Items: a Query, the chart type, its grouping, measure, order and a colour for each value.
- Markdown: the text, with the Markdown toolbar and a preview.
- Team charts (burndown, burnup, sprint burndown, velocity, cumulative flow, cycle and lead time): the Team, the backlog level, and the Iteration or period.
- Pull Requests: which pull requests, and in which repositories.
- Sprint Goal: its colours and font size. It shows the Team's goal for its current Iteration, as the extension does.
Saving writes the settings into the widget's own, so anything ADO Local doesn't know about them is kept as it was. A setting that isn't right, such as a rule's number that isn't one, is marked, and Save waits for it. A widget ADO Local can't set up says Configure on the website.