Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question: get all my features + stories from all AND all my stories connected to other features #40

Closed
JamborJan opened this issue Feb 15, 2021 · 2 comments
Labels
wontfix This will not be worked on

Comments

@JamborJan
Copy link

JamborJan commented Feb 15, 2021

There is one thing, I stumbled over while setting up things with qbb. I know it's not directly related to qbb, it0s rather a thing how queries work in Azure DevOps. But maybe you know a better way round this thats why I dre to post this question here too.

My use case is:

  • I have different projects set up
  • epics and features are maintained in a global planning project
  • stories life in the product projects
  • the final setup will be quite huge that’s why this separation has been introduced we will have to ensure the system is maintainable (permissions etc.)
  • association from the planning project to others works with area paths which are set up in the planning project and represent the structure of all projects
  • some features need support from other projects so I setup one parent-child-linked story in the other project
  • I want now a single hop query which shows me all features and the child stories
  • the rules should be:
    • show all the features I have associated to my project plus all the stories connected to them, this includes stories which are in other projects and teams
    • show also all my stories, including those which I’m doing for other features in other projects

For more visual people an example diagram below. In queries which are saved as shared queries in all 3 projects there should be this result:

  • Project "Product 1" sees both product features and its stories as one is the own feature and the other contains a story which is linked to the own project / team
  • Project "Product 2" has the same vice versa
  • The Project Platform sees also both of these product features as it has a story of each plus it has a third feature which is not in the queries of the products as it only contains Platform stuff

Features Stories cross Project

I want to see that because the dependencies are important and each project team should see, where they have dependencies to other products and where they have to deliver or are waiting for things.

Bildschirmfoto 2021-02-15 um 07 49 13
(example of the query one below "give me all stories belonging to my features")

The only way I found so far is to have two separate queries which apply the two mentioned rules and combine them. A UNION (without duplicates, so no UNION ALL) would do the trick in one go. Here are my current two test queries.

/** give me all stories belonging to my features **/
SELECT
    [System.Id],
    [System.WorkItemType],
    [System.Title],
    [System.AssignedTo],
    [System.State],
    [System.Tags]
FROM workitemLinks
WHERE
    (
        [Source].[System.WorkItemType] = 'Feature'
        AND [Source].[System.AreaPath] UNDER 'PI-Planning\Plattform'
    )
    AND (
        [System.Links.LinkType] = 'System.LinkTypes.Hierarchy-Forward'
    )
    AND (
        [Target].[System.WorkItemType] <> ''
    )
ORDER BY [System.Id]
MODE (MayContain)
/** give me all features belonging to my stories **/

SELECT
    [System.Id],
    [System.WorkItemType],
    [System.Title],
    [System.AssignedTo],
    [System.State],
    [System.Tags]
FROM workitemLinks
WHERE
    (
        [Source].[System.WorkItemType] = 'Feature'
    )
    AND (
        [System.Links.LinkType] = 'System.LinkTypes.Hierarchy-Forward'
    )
    AND (
        [Target].[System.WorkItemType] <> ''
        AND [Target].[System.AreaPath] = 'Plattform'
    )
ORDER BY [System.Id]
MODE (MustContain)

As I know that this doesn't belong to qbb natively, I also opened a feature request at Microsoft but until someone replies there, we get old and grey ...

WIQL: allow UNION of queries

Update: I also posted a stackoverflow question, maybe I get some infos there: https://stackoverflow.com/questions/66203920/get-all-my-features-stories-from-all-and-all-my-stories-connected-to-other-fea

I hope this is useful also for others using Azure DevOps and Query Based Boards.

@edtro edtro added the wontfix This will not be worked on label Feb 15, 2021
@edtro
Copy link
Owner

edtro commented Feb 15, 2021

Dear @JamborJan

The two queries are actually really alike... and I understand that your want to add condititions just on the Feature level, so I think that you should be a little bit creative using the 'OR' clauses (and nesting them). I am not aware of if the UNION clause is available or will be. But in my experience, you generally use this clause when you are querying multiple tables and you want to output the results as one resultset.

I think I would have really have to deep dive into this issue, to be able to help you with this. But I really do not have the time to do this. My appologies... (my employer is running a consultancy company and we has got a number of consultants that are specialised in using tools like Azure DevOps, so maybe this could be an option)

This extension is just about displaying the query results as-is... so I am closing this issue.

Kr
Edward

@edtro edtro closed this as completed Feb 15, 2021
@edtro
Copy link
Owner

edtro commented Feb 15, 2021

Btw: you can take a look at an extension, that is specialized in building WIQL queries, see: https://marketplace.visualstudio.com/items?itemName=ottostreifel.wiql-editor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants