Filter tickets by priority and labels

Sergio Herrero Querol February 3, 2020

Hello,

 

I want to get tickets with 30 days age, not updated in the last 7 days wit a priority = a Critical (without labels) and Major with a specific label.

Whit this filter only get the Critical. Can you help me?

project = FPFISSUPP AND status in (Open, "In Progress", Reopened) AND assignee is not EMPTY AND created > "-30d" AND updated <=endOfDay(-7d) AND priority >= Critical ORDER BY created ASC

2 answers

3 votes
Sergio Herrero Querol February 3, 2020

Dear @Pete Singleton  and @Jack Brickey ,

I am sorry to be a pain but I do not achieve my goal.

Matters related to priority is fine now but is not fine regarding dates. What I need is (first of all) to get last 30 days tickets and in this range the ones not commented in the last week, You need to know my aim, I want to follow these important tickets (for me) which are a bit abandoned.

It is supposed that with this filter only appear tickets with comments older than one week but I get tickets opened 20 days ago but with a  comment made today

project = FPFISSUPP AND status in (Open, "In Progress", Reopened) AND assignee is not EMPTY AND created > "-30d" AND Updated > "-7d" AND (priority = Critical OR (priority = Major and labels =xxxxxxx )) ORDER BY created ASC

Pete Singleton
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.
February 3, 2020

You have changed updated "<=" to ">"... so you are showing things that have been updated after 7 days ago.  To show those not updated you need to do "Updated <= -7d"

Like # people like this
0 votes
Pete Singleton
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.
February 3, 2020

Presumably "Critical" is your highest priority?  So your query of "Priority >= Critical" will not return those issues with Major priority.

Try (Priority = Major OR Priority = Critical)

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 3, 2020

Slight variation here. It seems like you want for Critical issues or Major issues that have a certain label so...

...And (Priority = critical role (priority = major and labels = xxxxx))

Sergio Herrero Querol February 3, 2020

Hello @Jack Brickey  and @Pete Singleton . Jack is following my point. I need to filter both but I did something wrong because with this new filter do not get tickets at all

This is my updated filter:

project = FPFISSUPP AND status in (Open, "In Progress", Reopened) AND assignee is not EMPTY AND created > "-30d" AND updated <=endOfDay(-7d) AND (priority = Critical OR (priority = Major and labels = xxxxxxx)) ORDER BY created DESC

 

If I sue a similar filter without managing priority a get tickets (major and critical) with the label

project = FPFISSUPP AND status in (Open, "In Progress", Reopened) AND assignee is not EMPTY AND labels = xxxxxxx ORDER BY created DESC

 

What I am doing wrong?

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 3, 2020

Your first filter looks ok I think. Your second filter isn’t a ‘fair’ test though. A better test of removing priority would be 

project = FPFISSUPP AND status in (Open, "In Progress", Reopened) AND assignee is not EMPTY AND created > "-30d" AND updated <=endOfDay(-7d) 

and then see if you have any Critical.

now, one question here - is the label only for Major or does it apply to Critical too? If so then use ...AND (priority in (critical, major) and labels = xxxxx)

Sergio Herrero Querol February 3, 2020

Dear @Jack Brickey . The label only is related to major tickets

Thanks.

Sergio Herrero Querol February 3, 2020

Dear @Jack Brickey ,

I found the problem in my filter. If I remove "AND updated <=endOfDay(-7d)" I get critical tickets and Major with label opened in the last 30 days.

project = FPFISSUPP AND status in (Open, "In Progress", Reopened) AND assignee is not EMPTY AND created > "-30d" AND (priority = Critical OR (priority = Major and labels = xxxxx )) ORDER BY created DESC

 

Now, What I will need is select from those tickets, the tickets not updated in the last 7 days ¿Amy ideas?

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 3, 2020

I would offer that your filter is correct. What I mean to say is that you don't have any Critical issues that currently meet the previous 7d update criteria.

Let's try this to verify my theory...

project = FPFISSUPP and priority = Critical and status in Open, "In Progress", Reopened)

add the updated column to your results, sort by that column and inspect the results.

Sergio Herrero Querol February 3, 2020

Dear, @Jack Brickey 

Running this filter:

project = FPFISSUPP and priority = Critical and status in (Open, "In Progress", Reopened)

I get 2 Critical tickets, both updated today. Updated:3/Feb/20 11:53

But, If I add to the filter "AND updated <=endOfDay(-7d)" I do not get any ticket.

project = FPFISSUPP and priority = Critical and status in (Open, "In Progress", Reopened) AND updated <=endOfDay(-7d)

Pete Singleton
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.
February 3, 2020

Don't use the "endOfDay"  function, just do "Updated <= -7d"

Andrew Laden
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.
February 3, 2020

Reading what you wrote. Without the date conditions, you only have 2 ticket, both updated today. That means you have no tickets that haven't been updated in the past 7 days. (like jack said.)

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 3, 2020

ah... remove the "-" as that is saying update before Jan 27th.

Suggest an answer

Log in or Sign up to answer