We’ve launched a new Help Center!

Visit the new Documentation space for Azure DevOps, monday.com, and Jira. Or, if you require any assistance or have any questions, please visit the new Customer Support Portal for Azure DevOps, monday.com and Jira.

Hours by parent work item type

Officially Answered

Comments

6 comments

  • Avatar
    Vanja Pletikosić

    Hello Bruce,

    Thank you for reaching out to us. Instead of using the workItemsFilter to filter for the CompanyProject type, could you please try using just $filter and let me know if you are getting the desired results. Using $filter should only filter out the results and not the data, whereas using the workItemsFilter will filter the data as well.

    Best regards,
    Vanja

    0
    Comment actions Permalink
  • Avatar
    Bruce Suitt

    Actually, I have to use workItemsHierarchyAllLevels to get all of the records, which is requiring a workItemsFilter.  I was finally able to get it working, using just a flat table for the widget.  I don't quite understand why the workItemsHierarchy endpoint doesn't give the desired results, but at least I got it working.

    0
    Comment actions Permalink
  • Avatar
    Vanja Pletikosić

    Hi Bruce,

    The workItemsHierarchy endpoint returns only the root items as explained here, so maybe this is why you were not getting the desired results.
    For the workItemsHierarchyAllLevels endpoint workItemsFilter requirement, you could use a kind of hack filter in case you wish to bypass it. You can just set the filter to filter out any work items where the work item type is empty, as such:

    &workItemsFilter=System_WorkItemType ne ''

    I hope this helps, but I am glad to hear that you were able to get your widget working.

    Best regards,
    Vanja

    0
    Comment actions Permalink
  • Avatar
    Liz Williams | FluidOne

    Hello, I am trying to solve almost exactly the same problem. I would like a flat table report of features, with total time on logged on all child items. Can you provide the solution you implemented Bruce?

    0
    Comment actions Permalink
  • Avatar
    Vanja Pletikosić

    Hello Liz,

    We haven't shared anything with Bruce other than my reply above. Please submit a ticket by emailing support@7pace.com so that we can assist you.

    Best regards,
    Vanja

    0
    Comment actions Permalink
  • Avatar
    Bruce Suitt

    Hi.  I was able to accomplish what I needed with the following widget:

    {"type":"FlatTable","id":"","query":"$select=System_Id,System_WorkItemType,System_Title,TrackedTotal,CustomStringField1,CustomStringField2&customFields=Custom.ServiceNowID,Custom.Cap&workItemsFilter=System_WorkItemType ne ''&$filter=System_WorkItemType eq 'Project' and TrackedTotal gt 0&$orderby=TrackedTotal desc","endpoint":"workItemsHierarchyAllLevels","title":"Hours By Project","w":5,"h":3,"columns":[{"field":"System_Id","title":"ID","formatter":"WorkItemId","width":60},{"field":"System_Title","title":"Project","width":350},{"field":"CustomStringField1","title":"SNOW ID","width":100},{"field":"CustomStringField2","title":"CapEx","width":100},{"field":"TrackedTotal","title":"Hours","width":100,"formatter":"TimeLength"}],"autoSubtitle":false,"timeframeFilter":null,"y":0,"x":3,"odataVersion":"v3.1"}

    We have a custom work item type called "Project" (not to be confused with a native project in ADO).  You can see that I am also returning some custom fields.  This example demonstrates how to roll up work to a particular work item level.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk