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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,458,389
Community Members
 
Community Events
176
Community Groups

Please help me with this:

category = DEV and Assignee = currentUser() OR status changed AND project = CERT AND issueTypein standardissueTypes() AND due< endOfWeek(-1)

 

This is an example within my exam prep. 

2 answers

1 accepted

1 vote
Answer accepted
Samuel Community Leader Nov 29, 2022

Hello @Michael Gold , we aren't sure what you are specifically asking for here. If you want to know how to read this query let's break it down:

  1. category = DEV - You can categorize projects by setting the project category field at the project level. In this case, look for all Jira projects categorized as "Dev"
  2. Assignee = currentUser() - Query issues that are assigned to the currently logged in user
  3. status changed - checks to see if the status changed
  4. project = CERT - look for the CERT project only
  5. issueType in standardissueTypes() - excludes subtasks, only includes standard issue types such as epics, stories, bugs, tasks, and any custom standard issue types you've created
  6. due< endOfWeek(-1) - checks if this was due before the end of last week

The "OR" is definitely something to be careful of, especially if you do not see parentheses. Without parentheses, you could easily get different results than what you were expecting. 

But what does the "OR" represent in the query?  What does it speak to in the example I placed in the discussion?

0 votes

Humans are very bad at logic, and we tend not to understand how our language around logic is poor and hence when we ask a computer to answer a logic question, we often fail to understand what we're actually saying to them.

My bet is that your query is working fine, but because you have used both and and or to join clauses, you don't actually understood what you have asked of the computer.  (If you were using all "and", then you're asking "show me issues that match all the criteria", if it were all "or", the question would be "show me issues that match any of the criteria")

The computers simply read left to right when they get a query, so I'm 99% certain that you're not meaning to use the or in the middle as it has been.  In fact, because it's so hard to grasp what you've actually said to the computer, I've never learned to read them, I always write clarified JQL.

You clarify with parentheses.  I can't tell what your query is actually supposed to be asking, but one of the easy to explain ones would be

( category = DEV and Assignee = currentUser() ) OR ( status changed AND project = CERT AND issueTypein standardissueTypes() AND due< endOfWeek(-1) )

This would be : list all the issues that are either

  • In Dev and assigned to the current user
  • have had status changed, are in project cert, and are base issues (not sub-tasks), and are due before the end of last week

The parenthesis make how the clauses join up crystal clear to humans and the computers.

Suggest an answer

Log in or Sign up to answer