Rally Software

  • 1.  Custom query for a single, specific tag

    Posted Aug 09, 2018 06:04 PM

    I am trying to build a custom query to filter user stories with a specific tag and no other tags.

     

    Use Case

    User Story 1 - "My Tag"

    User Story 2 - "My Tag" "Other Tag"

     

    The custom query would return only User Story 1, the pseudo query code would look something like below (but I know the count attribute is not a valid one).  Any thoughts?

     

    ( (Tags.Name = "My Tag") AND (Tags.Count = 1) 



  • 2.  Re: Custom query for a single, specific tag
    Best Answer

    Broadcom Employee
    Posted Aug 10, 2018 12:36 AM

    Hi Stephen,

     

    It's unfortunately is impossible in a single query filter. The reason being is (as you pointed out) that the 'Count' is not a field that can be queried and we can't get the size of how many tags are part of the artifact. We can find a specific value, we can also know if there are tags or not, but there isn't a way to query what you are asking.

     

    Furthermore, you can't query the Tag endpoint either cause it doesn't point at the artifacts. The artifacts include the tags but the tag doesn't keep references to the artifacts it belongs to (otherwise, we might have worked it out this way).

     

    You will probably need to break it to a few queries, or write a program using any of our tool kits where you can get and extract all the tag values and then use in-memory computation to figure out the tags size etc...

     

     

    If you don't mind: can you let us know what is the use-case of this ask (perhaps we can find an alternative way to achieve it)?  In other words: Why does it matter if a tag is exclusive or not?

     

    Thanks,

    Sagi



  • 3.  Re: Custom query for a single, specific tag

    Posted Aug 20, 2018 10:41 AM

    I believe I found a way to handle the filtering.  Below is the use case and my filtering solution.  The solution pretty much works as expected.  The one gap is Kanban Board 1 shows user stories that have the specific tag whether or not it is the only tag.

     

    Use Case:

    Two unique streams of work are going to the same team.  There are two groups on the business side managing the user story creation and refinement for each of those work streams.  The two work streams want to manage the definition and refinement of their stories on two unique Kanban boards.  The refined stories then hit the team's backlog for prioritization across both work streams.

     

    Kanban Board 1 - shows user stories with a specific tag.

    (Tags.Name = "MA Activation")

     

    Kanban Board 2 - shows user stories without tags and any other story that has tags that is not the specific tag only.

    ((Tags.Name != null) or (Tags.Name != "MA Activation"))



  • 4.  Re: Custom query for a single, specific tag

    Broadcom Employee
    Posted Aug 20, 2018 10:52 AM

    Thanks Stephen for sharing this use case with us.

     

    Sagi