Reputation: 3551
I'm working on notifying users who have work items (e.g. user stories, tasks) assigned in ADO with no assigned story points.
I found on another post that there is no setting like that in Azure Devops directly and may have to resort to either power automate (logic apps) or the ADO REST API, which is fine.
I have the following script so far that returns fields from a work item. However, I don't see story points as one of the fields from the output.
$Url = [string]::Format("https://dev.azure.com/{0}/{1}/_apis/wit/workitems/{2}?api-version=6.0", $Org, $Project, $WrokItemID)
Write-Output $Url
$output = Invoke-RestMethod -Uri $Url -Method Get -ContentType "application/json; charset=utf-8; api-version=6.0" -Headers $API_Header -MaximumRedirection 10 #|Format-Table -Property Title
Write-Output $output.fields
Output:
> $output.fields
System.AreaPath : Project1
System.TeamProject : Project1
System.IterationPath : Project1
System.WorkItemType : User Story
System.State : New
System.Reason : New
System.CreatedDate : 2022-10-14T03:45:12.58Z
System.CreatedBy : @{displayName=User1; url=https://spsprodweu1.vssps.visualstudio.com/A...2/_apis/Identities/4
3...9; _links=; id=438...ed9; [email protected]; imageUrl=ht
tps://dev.azure.com/orgname/_apis/GraphProfile/MemberAvatars/aad.N...5;
descriptor=aad.N...5}
System.ChangedDate : 2022-10-14T03:45:12.58Z
System.ChangedBy : @{displayName=User1; url=https://spsprodweu1.vssps.visualstudio.com/Ad5..b2/_apis/Identities/4
38ce6; _links=; id=43c-0f7ca; [email protected]; imageUrl=ht
tps://dev.azure.com/orgname/_apis/GraphProfile/MemberAvatars/aad....5;
descriptor=aad.N...5}
System.CommentCount : 0
System.Title : ADO_WI_Test
System.BoardColumn : New
System.BoardColumnDone : False
Microsoft.VSTS.Common.StateChangeDate : 2022-10-14T03:45:12.58Z
Microsoft.VSTS.Common.Priority : 2
Microsoft.VSTS.Common.ValueArea : Business
WEF_70E13435C052470DBE88ACE53A03C356_Kanban.Column : New
WEF_70E13435C052470DBE88ACE53A03C356_Kanban.Column.Done : False
WEF_C59C4331514542BD8FF08D9FF8E61A92_Kanban.Column : New
WEF_C59C4331514542BD8FF08D9FF8E61A92_Kanban.Column.Done : False
WEF_440176F1D1854ABE94FA40D2A944E6BE_Kanban.Column : New
WEF_440176F1D1854ABE94FA40D2A944E6BE_Kanban.Column.Done : False
WEF_FDB767168B6C49C2BAB0BAFEAF9ED11C_Kanban.Column : New
WEF_FDB767168B6C49C2BAB0BAFEAF9ED11C_Kanban.Column.Done : False
Upvotes: 0
Views: 691
Reputation: 2216
The GET work item API will not output the Story Points value: https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/work-items/get-work-item?view=azure-devops-rest-6.0&tabs=HTTP
You could refer to this official doc for more details about Story Points: https://learn.microsoft.com/en-us/azure/devops/boards/work-items/guidance/agile-process-workflow?view=azure-devops#define-user-stories
Im working on notifying users who have work items (e.g. user stories, tasks) assigned in ADO with no assigned story points.
A good option for this could be using Query.
You could add "Story Points" as query filed and filter work items with no assigned story points. And send emails directly on the query page.
Upvotes: 1