Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Excluding groups with S-JQL

Andrey Tyupov September 7, 2018

Hello,

I am getting a little stuck trying excluding some of the groups I have in my structure. 

 

Let's say I have the following automation set:

 

  • Group By Labels
  • Insert Issues with a JQL-query

 

and the resulting structure looks as follows

 

  • > Label1
  • > Label2
  • > Label3

 

Now let's say I want to exclude the 'Label3' group from my structure. How do I do that?

 

Based on the https://wiki.almworks.com/display/structure/S-JQL+Reference I tried placing the following S-JQL query Filter on top of all the automation:

  • item(group, 'Label1, Label2')

 

I also tried

  • item(label, 'Label1, Label2')

and

  • item(*, 'Label1, Label2')

 

But all of the queries removed everything from the structure.

 

Am I missing something here?

2 answers

1 accepted

2 votes
Answer accepted
Vlad Lessage
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 13, 2018

Hi Andrey,

I'm not sure if you got my response from the ticket you submitted to our Support Team, therefore I wanted to update my post here as well, just in case.

My previous response was not detailed enough nor was it the accurate method to truly accomplish the exclusion of desired Groups and for that, I apologize.

One way to exclude "Label3" as in your example, is to use the following Query as a Transformation, which you will be able to save as a Quick Transformation for future use:

not self_or_descendants of item (*, Label3)

or conversely, you can include "Label1" and "Label2" only:

self_or_descendants of (item(*, Label1) or item(*, Label2))

 

The reason we’re using a Transformation instead of a Generator here is that Filters are executed before Groupers. Therefore, when the Filter Generator is run, there are no Groups yet, which won't produce the desired results. The Transformation allows you to apply the Filter after the Grouper has been applied to the structure.

Transformations use the same type of functions as Generators. The main difference is that Transformations can only be applied to the whole structure (while Generators can be inserted under a Folder or under a manually added issue) and you cannot use Insert Generators as you already have a set of issues to work with.

With that said, if you prefer to use a Filter Generator instead, you can Insert your current structure that already contains your Inserted issues along with your Labels Grouper into a new structure and then apply the Filter Generator with one of the S-JQL Queries above. You will get the same results.

I hope this clarifies things. Otherwise, please let me know if you need further assistance.

 

Best Regards,

Vlad

ALM Works

Mya.Hauck
Contributor
June 7, 2021

Hi ALM- is there a way to do this in Structure Cloud?

0 votes
Vlad Lessage
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 7, 2018

Hi Andrey,

Thanks for posting and for using Structure for Jira. In this case, to exclude the "Label3" Group from your structure, you can use the following Basic Constraint

not [labels = label3]

Please let me know if you have any other questions or if you need further assistance. You can also email me directly at vlad@almworks.com or reach out to our Support Team at support@almworks.com. We are always ready to help!

 

Best Regards,

Vlad

ALM Works

Suggest an answer

Log in or Sign up to answer