How to create Azure DevOps wiki reports for sprints? - azure-devops

Sprint 146 in Azure DevOps introduced the possibility to embed queries in the Wiki. More info here: https://learn.microsoft.com/en-us/azure/devops/release-notes/2019/sprint-146-update#embed-azure-boards-query-results-in-wiki
In the image shown in the post:
It shows that you can, probably, create reports for each sprint. I have already some queries that are used to retrieve same data (for example active bugs), but are based on the current iteration like this:
Work Item Type = Bug
AND State Not In Done
AND Iteration Path Under #CurrentIteration
But I'd like to have a report I can see in the wiki for each of the sprint (both past and future ones) I have in the backlog, so how can I achieve that (if there's a way)?
I thought I could create and duplicate the same query replacing #CurrentIteration with the one that I'm interested in, but we're hundreds of sprints in the way, so I cannot create 100 copies of the same query just to replace a parameter.
Is there a simple way to do it? Am I missing something?

Related

Is there a way to filter an Azure DevOps board using dates?

On the Boards section of Azure DevOps, there's a nice filter bar. It contains filters for:
Type
Assigned to
Tags
Iteration
Area
Parent work item
As far as I can see, there's no way to use the section outlined in yellow to filter for work items (for example) created within the last seven days, or due within the next 14 days.
Things I've tried:
Creating a query and viewing results as a board (can't see an option to do that)
Finding a way to script work items into iterations based on date, and then filtering the board based on iteration
Is there a way to do this? It's specifically a board I'd like, as opposed to a Backlog-style list.
Just change the board's settings, Is this what you want?

How to make the sum of all completed times in the task at feature level in Azure DevOps

I need to calculate effort for each feature in my backlog.
Every sprint or iteration I must make the sum of all completed work time of the tasks and manually add to the parent feature.
I have not found anything can make it automatically. Do you know if something exists?
I am following this lisk:
https://learn.microsoft.com/en-us/azure/devops/boards/queries/query-numeric?view=azure-devops#sum-of-remaining-work-per-developer
But I cannot grouping either by User Story or Feature...
Here the query:
Among the other columns I added the parent:
I wanted to add the feature but I cannot find the correct Column
Then I created a chart:
But here I cannot find either the parent column or the feature.
Azure DevOps may sum only on the backlogs. Check this link: Display rollup progress or totals in Azure Boards. Additionally, you may try to use Excel integration or Power BI.

Increment Planning Query

Our teams are using Azure DevOps. We're using the Agile framework and an enterprise release management approach (essentially, SAFe). Our increments are based on the quarters of the year -- for us, this equals 6 sprints.
My goal is to be able to view work scheduled within the current increment as the sprints move along.
I currently have a query that displays current sprint plus the future 5, to give me 3 month's worth of work (see below).
The trouble with this is it has to be edited after each sprint so it only displays the current increment's work. (I have to change it to include the previous sprint and reduce the number of future sprints otherwise it doesn't display completed work in this increment, as well as showing upcoming work from the next increment.)
Increment Planning Query
Sorry for any inconvenience.
I am afraid there is no such increment planning query, that because the value of CurrentIteration will be different due to the change of the current date.
If you want use the #CurrentIteration macros, you have to modify this query after each sprint.
As workaround, you could specify the each Iteration value in the query, like:
With this workaround, we do not need modify the query after each sprint, just need update it after each quarter.
If above workaround not work for you, you could add your request for this feature on our UserVoice site (https://developercommunity.visualstudio.com/content/idea/post.html?space=21 ), which is our main forum for product suggestions. Thank you for helping us build a better Azure DevOps:
Hope this helps.

'Team context aware' query in Azure DevOps

Previously, in Azure DevOps, query macros like #CurrentIteration used the team context to return their results in the web portal.
Recent changes have changed this behaviour, so that specifying the #CurrentIteration macro now requires a specified team. Whilst i understand the reasons behind this (making the query more predictable, the ability to add multiple team based parameters in a single query), it does mean that it is more or less impossible to create queries that can be shared between teams. Each team has to make a copy, and plug in their own team name.
Is there any way to restore the previous behaviour?
You can create one query with "Or" operators for all the teams:

JIRA Agile REST-API: Can you query Sprints by name?

I'm trying to get the number of an active sprint onto a dashboard using JIRA agile api but there are multiple active sprints on the board and I'm only interested in the sprint named #{SomeNumber}. (the # is what I'm looking for)
I tried to add a query parameter to my request -
jira.acme.com/rest/agile/1.0/board/42/sprint?name=#69 - but it seems to be ignored and JIRA will answer with all existing sprints on that board.
However, doing the same thing with boards works and I can properly query sprints by state.
Am I doing something wrong or is querying sprints like this just not intended?
edit: I should add, that the doesn't seem to be caused by the # as querying with words that occur in sprint names doesn't work either.
I don't know of a way to directly find a sprint by name or regex on the name.
However, if you have a board associated with some sprints, you can go that route. I'm doing something similar where I use sprints() to grab the active sprints from my board (since we only have 1 active sprint at a time this ends up working for me). If you wanted to go by name you could grab all the sprints from the board and iterate over them to match by name.
python eg.
from jira import JIRA
from jira.resources import GreenHopperResource
def find_active_sprint_by_name(the_sprint_name_im_looking_for):
jira_options = {
'server':your_jira_server_url,
'agile_rest_path':GreenHopperResource.AGILE_BASE_REST_PATH
}
jira_api = JIRA(jira_options, basic_auth=(jira_username, jira_password))
active_sprints = jira_api.sprints(board_id=your_board_id, state='active')
for sprint in active_sprints:
if sprint.name == the_sprint_name_im_looking_for
return sprint
return None