Hello,
I hope someone got answer on my question. I need to create filter with multiple custom fields or one custom field with different tabs and sorting by months.
For example I have done this filter:
project = XXX AND created >= 2018-04-01 AND created <= 2018-04-30 AND "Primary Root Cause" = "RC1 – Human Error Slip or Lapse (Unintentional)" OR "Primary Root Cause" = "RC6 - Third Party Human Error (Unintentional)" ORDER BY updated DESC
Where is "Primary Root Cause" is custom field.
But my issue is because filter find much more dates instead of this range 2018-04-01 AND 2018-04-30.
This is working perfectly only if I use only one custom filed:
project = IG AND created >= 2018-04-01 AND created <= 2018-04-30 AND "Primary Root Cause" = "RC1 – Human Error Slip or Lapse (Unintentional)" ORDER BY updated DESC
I have been trying to replace "AND" to "OR" but this is still shows me more than date range.
Thank you
Hello,
your query finds "Primary Root Cause" = "RC1 – Human Error Slip or Lapse (Unintentional)" into date range but "Primary Root Cause" = "RC6 - Third Party Human Error (Unintentional)" without date range because of OR operator precedence.
Add parentheses for adjust precedence. This query works fine:
project = XXX AND created >= 2018-04-01 AND created <= 2018-04-30 AND ("Primary Root Cause" = "RC1 – Human Error Slip or Lapse (Unintentional)" OR "Primary Root Cause" = "RC6 - Third Party Human Error (Unintentional)") ORDER BY updated DESC
Greetings
Josef Pavelec
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.