Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago

Priority Open Bug Pull

Hi, 

 

I am trying to create a data pull for the number of "New" and "Active" bugs that are priority 1 and or have been tagged "blocking" from DevOps. How would I go about this succinctly? 

 

Thanks 

5 Replies

  • Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

    Do not include sensitive information. Do not include anything that is unrelated to the issue or question.

    Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216

    Please show the expected outcome based on the sample data you provided.

    Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,
    If you want to get the eligible data from Azure DevOps in a power query, you can try the following code

    let
        Source = OData.Feed("https://analytics.dev.azure.com/{organization}/{project}/_odata/v3.0-preview/WorkItems"),
        Bugs = Table.SelectRows(Source, each ([Work Item Type] = "Bug")),
        NewAndActiveBugs = Table.SelectRows(Bugs, each List.Contains({"New", "Active"}, [State])),
        Priority1OrBlockingBugs = Table.SelectRows(NewAndActiveBugs, each ([Priority] = 1 or Text.Contains([Tags], "blocking")))
    in
        Priority1OrBlockingBugs

    This will return all “New” and “Active” state bugs with priority 1 or marked as “blocking”.

    Best regards,
    Albert He


    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi I tried both the blow and neither has worked:

      Source = ('Bugs - Resolved')
      NewAndActiveBugs = ('Bugs - Resolved'[State]="New","Active"),
      Priority1OrBlockingBugs = ('Bugs - Resolved'[Priority]="1") or ('Bugs - Resolved'[Tags]="Blocking")
       
      Or
       
      Open Bugs =
      VAR _ACTIVEBUGS = CALCULATE(COUNTROWS('Bugs - Resolved'),KEEPFILTERS('Bugs - Resolved'[State]="Active"))
      VAR _NEWBUGS = CALCULATE(COUNTROWS('Bugs - Resolved'),KEEPFILTERS('Bugs - Resolved'[State]="New"))
      RETURN CALCULATE((_NEWBUGS)+(_ACTIVEBUGS))
      RETURN KEEPFILTERS('Bugs - Resolved'[Priority]="1") OR KEEPFILTERS('Bugs - Resolved'[Tags]="Blocking")
       
      Any ideas?
  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi I tried both the below and neither has worked:

    Source = ('Bugs - Resolved')
    NewAndActiveBugs = ('Bugs - Resolved'[State]="New","Active"),
    Priority1OrBlockingBugs = ('Bugs - Resolved'[Priority]="1"or ('Bugs - Resolved'[Tags]="Blocking")
     
    Or
     
    Open Bugs =
    VAR _ACTIVEBUGS = CALCULATE(COUNTROWS('Bugs - Resolved'),KEEPFILTERS('Bugs - Resolved'[State]="Active"))
    VAR _NEWBUGS = CALCULATE(COUNTROWS('Bugs - Resolved'),KEEPFILTERS('Bugs - Resolved'[State]="New"))
    RETURN CALCULATE((_NEWBUGS)+(_ACTIVEBUGS))
    RETURN KEEPFILTERS('Bugs - Resolved'[Priority]="1"OR KEEPFILTERS('Bugs - Resolved'[Tags]="Blocking")
     
    Any ideas?