•  
      epic #32276 Filter on Artifact Links with TQL
    Summary
    Filter on Artifact Links with TQL
    Trackers

    Overview

    This epic aims to bring the ability to filter artifact based on the existence (or not) of links of a certain type. Here are the kind of questions that we want to have answers:

    • Get all the Epics that don't have User stories attached yet
    • Get all User Stories that are not linked to an Epic
    • Get all stories not covered by tests
    • Get all tests not connected to a story
    • ...

    This will be done with enhancement of TQL

    Syntax

    The syntax should

    1. be easy to use for people with a bit of technical background
    2. allow to express all the link related constraints without having to know the difference between hard coded links (like _is_child) and platform links (like fixed_in)
    3. allow to workaround the clumsy _is_child
    4. be forward compatible with possible future more complex filters (like looking for epics whose child are ready).
    5. parsable using pour grammar/parser (pegjs).

    The syntax shall not try to abstract the fact that artifact links is an oriented graph (ie the notion of forward and reverse links remains).

    Forward links

    • Find all "fixed in" requests: … IS LINKED TO WITH TYPE 'fixed_in'
    • Find requests "fixed in" artifact #123: … IS LINKED TO ARTIFACT = 123 WITH TYPE 'fixed_in'
    • Find requests "fixed in" an artifact of 'release' tracker: … IS LINKED TO TRACKER = 'release' WITH TYPE 'fixed_in'
    • Find requests "fixed in" another tracker than 'release': IS LINKED TO TRACKER != 'release' WITH TYPE 'fixed_in'
    • Find request not "fixed in": … IS NOT LINKED TO WITH TYPE 'fixed_in'
    • Find request not linked to anything: IS NOT LINKED TO
    • Find epics that don't have children IS NOT LINKED TO WITH TYPE '_is_child'
    • Find requirements not covered by any tests: IS NOT LINKED TO WITH TYPE '_covered_by'
    • Find request not "fixed in" artifact #123: … IS NOT LINKED TO ARTIFACT = 123 WITH TYPE 'fixed_in'
    • Find request not "fixed in" an artifact of "release" tracker: … IS NOT LINKED TO TRACKER = 'release' WITH TYPE 'fixed_in'

    Reverse links

    • Find releases in which requests are "fixed in": … IS LINKED FROM TRACKER = 'request' WITH TYPE 'fixed_in'
    • Find releases that doesn't fix anything: … IS LINKED FROM WITH TYPE 'fixed_in'
    • Find user stories that don't have parents: ... IS NOT LINKED FROM WITH TYPE '_is_child'
    • Find tests that doesn't cover anything: ... IS NOT LINKED FROM WITH TYPE ' _covered_by'

    Combination

    • Find which bugs are fixed but not already associated to a release: IS LINKED FROM TRACKER = 'release' WITH TYPE 'reported_in' AND IS NOT LINKED FROM TRACKER = 'release' WITH TYPE 'fixed_in'

    Special case of parent

    As _is_child is difficult to understand for most users, the generic syntax is abstracted with a dedicated

    • Find user stories that don't have parents: WITHOUT PARENT (alias of IS NOT LINKED FROM WITH TYPE '_is_child')
    • Find user stories that have parents: WITH PARENT (alias of IS LINKED FROM WITH TYPE '_is_child')
    • Find epics that don't have children: WITHOUT CHILDREN (alias of IS NOT LINKED TO WITH TYPE '_is_child')
    • Find epics that have children: WITH CHILDREN (alias of IS LINKED TO WITH TYPE '_is_child')

    It's possible to do the same things with the simplified syntax than with the complete one:

    • Find user stories that have parent "artifact #123" as parent: WITH PARENT ARTIFACT = 123 (alias of IS LINKED FROM ARTIFACT = 123 WITH TYPE '_is_child'
    • Find user stories that have parent in epic tracker: WITH PARENT TRACKER = 'epic' (alias of IS LINKED FROM TRACKER = 'epic' WITH TYPE '_is_child')

    Special case of test coverage

    Looking for test coverage is another common use case that will benefit of a dedicated syntax:

    • Find user stories that are covered by tests: IS COVERED (alias of IS LINKED TO WITH TYPE '_covered_by')
    • Find user stories that covered by test 123: IS COVERED BY artifact = 123 (alias of IS LINKED TO ARTIFACT = 123 WITH TYPE '_covered_by')
    • Find user stories that are not covered by any test: IS NOT COVERED (alias of IS NOT LINKED TO WITH TYPE '_covered_by')
    • Find tests that are covering user stories: IS COVERING (alias of IS LINKED FROM WITH TYPE '_covered_by')
    • Find tests that are covering user story 123: IS COVERING artifact = 123 (alias of IS LINKED FROM ARTIFACT = 123 WITH TYPE '_covered_by')
    • Find tests that doesn't cover any stories: IS NOT COVERING (alias of IS NOT LINKED FROM WITH TYPE '_covered_by')

    Edge cases and limitations

    When looking for something in a given tracker (WITH PARENT TRACKER = 'epic' or IS LINKED TO TRACKER = 'user_story' WITH TYPE '_is_child') in the contexte of cross tracker search, we don't have the mean to verify that the tracker can be accessed (due to the cross project nature & project related permissions). It's a potential leak of information (you can know that a tracker of a given name exists and is linked to an artifact) but we consider it acceptable. In order to be consistent, the same applies for TQL in (not cross) tracker search as well.

    Progress
    Empty
    Empty
    Closed
    Details
    #32276
    Manuel Vacelet (vaceletm)
    2023-06-26 16:01
    2023-05-26 10:40
    Attachments
    Empty
    References

    Follow-ups

    User avatar
    • Description
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    • Status changed from On going to Closed
    User avatar
    • Description
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    • Description
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    • Description
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    • Description
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    • Description
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    • Description
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    • Description
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    • Description
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes