Filter JQL

lissandra.portella September 23, 2021

How would I create a syntax  for assignee attribute that I dont mind who but I want the results of all ticket assigned assignee = "automatic" AND "Agreed Deadline"= 2021 - but they say automatic does not exist.

2 answers

1 accepted

4 votes
Answer accepted
Max Foerster - K15t
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 23, 2021

Hey @lissandra.portella

you are not able to filter for "automatic" because that only means to the system that the specific order of possible assignment configurations is checked. Think of the project default assignee, component assignment options... So the issue will always either end up with a user as an assignee or unassigned. 

Best, Max

Max Foerster - K15t
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 23, 2021

@lissandra.portella

you simply can't. "Automatic" is not like a permanent field value. It only exists on the screen you select it and not afterward. Because then, like I tried to explain, Jira will check a few settings to determine the outcome of "automatic", which is either an issue is assigned or unassigned. If you don't care about the assignee at all, let me ask a general question why do you include it in the query? Then use that in your query. If not, skip it. At least that would be my suggestion. 

Does it matter whether it's assigned or unassigned? Maybe you can try to help me understand what you're looking for here. :) But I'm sure we will figure something out for you. :D 

Best, Max

lissandra.portella September 23, 2021

@Max Foerster - K15t 

Hey- I want to create a filter that show me all tasks assigned regardless whom AND Agreed deadline 2021? How do I translate this in JQL?

Like Max Foerster - K15t likes this
Max Foerster - K15t
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 23, 2021

Hey, that's easy, use this JQL:

assignee is not EMPTY AND "Agreed Deadline"= 2021

lissandra.portella September 23, 2021

@Max Foerster - K15t impressed by how quick the answers come!

Thank you very much.

BUT I have another issue, I created the filter the JQL is marked green, I can see the filter in the Kaban but I dont get any results and I know I have task assigned to someone to be expired in 2021 regardless the exact date. Do you know what I am doing wrongly?

Thx

Max Foerster - K15t
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 23, 2021

Haha, thank you. 😂 You caught me at a good time.

Did you try the query in the global search (Filters -> Advanced Issue search) and does it return issues there? If not, there's something we need to fix with the query.

If yes, check whether the issues are part of the project/filter used by the kanban. Add the specific project to the query for example that is included in the Kanban board filter and try to narrow it down where they could hide from you. Quick filters? Backlog? :D 

lissandra.portella September 23, 2021

@Max Foerster - K15t - how can I insert a filter from here? Before i did via quick filter maybe is because of this that did not work?image.png

Max Foerster - K15t
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 23, 2021

Hey, simply paste the above JQL query in the search. Or compose it on the fly because then you will also get some guidance while writing the query. And if you want to become more familiar with JQL, available fields, and functions, you should definitely have a look at the documentation. It's one of the best-documented features in my opinion :D What is advanced searching in Jira Cloud?

And now the most important question after typing all this already. What do you mean by "how can I insert a filter from here?"? 😅

lissandra.portella September 23, 2021

@Max Foerster - K15t -stuck in the search step

image.png

Max Foerster - K15t
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 23, 2021

Okay, so the "Agreed Deadline" field is the culprit here. I'm pretty sure that "2021" is not a valid value for the field. What type of field is that? Is it a date field? If yes, try something like this:

"Agreed Deadline" >= startOfYear() AND "Agreed deadline" <= endOfYear()

You have to use a time range. :)

lissandra.portella September 23, 2021

@Max Foerster - K15t ok, lets go step by step.

 

1)why is marked green in syntax if 2021 is not valid?

2)I dont understand why to create a filter i need to SEARCH for a new created filter? Because if i search for the name of the filter the jql I get is: ORDER BY created DESC

3)I used your jql suggestion but i still cannot proceed with the creation of this filterimage.png

Max Foerster - K15t
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 23, 2021

Hey,

1) the syntax may be valid but the syntax check is only a helper and not smarter than you. You need to talk to the fields correctly on your own. So please find out or show a screenshot of what type the field exactly is to know how to properly query for it. Or start slowly with composing the query and watch the auto-complete suggestions. That is also helpful. :)

2) I honestly don't understand what you mean. But "ORDER BY created DESC" is just the default ordering for a new search.

3) see point 1, you need to find out how to properly query the field. Is it a text field, a number field, a checklist, a date field. 

And secondly for 3), at the moment you are not creating a new filter. You are editing a saved filter called "Assignee 2021" (see the little "Edited" remark next to the name). And to be able to save those edits you have to perform the search to make sure you're saving a valid query without syntax errors.

lissandra.portella September 24, 2021

@Max Foerster - K15t - Hi Max- How are you? I hope you have time to continue our discussion.

I was able to create successfully the filter above but I include one more attribute: assignee. I need to do the same but not have all tasks assigned for 2022.

Then I tried this jql: assignee = 5e319a2ea834270cb0993387 OR assignee = 5b2788f347afa959b1479c16 OR assignee = 5c5996813949e914030470b4 AND "Agreed Deadline" >= endOfYear() OR

 

assignee = 5e319a2ea834270cb0993387 OR assignee = 5b2788f347afa959b1479c16 OR assignee = 5c5996813949e914030470b4 AND "Agreed Deadline" = 2021/12/31

but it did not work- any suggestions?

Thx

lissandra.portella September 24, 2021

actually for the last jql is >= 2021/12/31 but it does not work.

 

Also I am trying to create other filters but not successfully because the no existing text but the words used are options for the attributes chosen such as:

- assignee =unassigned

-assignee = empty

@Max Foerster - K15t 

Max Foerster - K15t
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 24, 2021

So many different things going on here. 😅 Hey today, I'm a little bit short but I will get back to you during the weekend. A few things:

  • for next year you can also try startOfYear(+1)
  • When working with OR, make sure to use parentheses around it. For a long time (not sure about the current state in cloud) OR would "break" a query when interpreted. So you have to encapsule it
  • (assignee = 5e319a2ea834270cb0993387 OR assignee = 5b2788f347afa959b1479c16 OR assignee = 5c5996813949e914030470b4) AND "Agreed Deadline" >= endOfYear() 
  • Or use the assignee IN (5e319a2ea834270cb0993387, 5b2788f347afa959b1479c16, 5c5996813949e914030470b4) way
  • One tip from me is, try the separate parts of your query alone to see if they return the correct results and then start combining them. This is helpful when you're new to JQL and trying out a lot so you only combine queries that work
  • I don't fully understand the last remark but "assignee = unassigned" will give you an error. It's not a valid option to query. "Empty" is okay with = and also IS and IS NOT for assignee.

When you provide a longer query and say "it's not working", it would be helpful to be more precise about what is not working (see my point above with testing parts of your query). Are you still trying to figure out the deadline field or is something like "Agreed Deadline" >= startOfYear() returning issues with an agreed deadline later than or equal to 2021/01/01? Have a great weekend!

Best, Max

0 votes
lissandra.portella September 23, 2021

but how i translate this jql language. so far this is what i have but it does not work

assignee = "automatic" AND "Agreed Deadline"= 2021

lissandra.portella September 23, 2021
Like Max Foerster - K15t likes this

Suggest an answer

Log in or Sign up to answer