Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Filter tickets by priority and labels

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

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 Community Leader Feb 03, 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))

Hello @Jack  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 Community Leader Feb 03, 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)

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

Thanks.

Dear @Jack ,

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 Community Leader Feb 03, 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.

Dear, @Jack 

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)

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

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 Community Leader Feb 03, 2020

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

Dear @Pete Singleton  and @Jack ,

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

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

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you