How to modify this query? JQL help

 

Hi

Following is the scrum board query and I need to convert the following "OR" part  to something aligned with scrum board :

"OR "Assign to" = Name OR "Fix by" = Name 

Full query:

---

project in (Project1,Project2) AND "Nodes" in ("Nodes from project 1") AND "Project Drop Delivery" not in (D1, D2) AND "Go To Market Phase" in ("R1, R2") and ("HLDs" != "xyz" or "HLDs" is EMPTY) OR "Assign to" = Name OR "Fix by" = Name ORDER BY Rank ASC

 

Unable to create or start sprints? (Thanks Andre for clarifying what was causing the issue)

1 answer

2 votes

I don't see what you want when you say "something aligned with scrum board".  What do you want to have this filter actually do?

I am trying to look at 2 projects but the filter is looking at all the projects on our JIRA space because of the "OR" statement in my query.

2 Issues:

1) I can't be the project admin for all the projects.

2) When I change this (OR "Assign to" = Name OR "Fix by" = Name ) to (AND "Assign to" = Name OR "Fix by" = Name ) it doesn't pull any issues since the first project doesn't have "assign to or fix by custom fields. Please let me know if this clarified the issues I am facing.

 

Ok, the filter side sounds a little odd.

If the first project does not have the custom fields, then you can knock them out of the filter. I Think what you need might be:

( (project = project1) OR (project = project2 and ( "assign to" = name or "fix by" = name) ) )

That first half should get you the right list from the two projects, so you then add

AND "Nodes" in ("Nodes from project 1") AND "Project Drop Delivery" not in (D1, D2) AND "Go To Market Phase" in ("R1, R2") and ("HLDs" != "xyz" or "HLDs" is EMPTY)  ORDER BY Rank ASC


Not being a board admin won't affect your ability to use the filter

Thank you Nic, I will test it out and let you know if it worked. Thanks again!

Nic unfortunately it's not picking project 2 only picking  project 1 stuff:                   

  • AND "Nodes" in ("Nodes from project 1") AND "Project Drop Delivery" not in (D1, D2) AND "Go To Market Phase" in ("R1, R2") and ("HLDs" != "xyz" or "HLDs" is EMPTY)  ORDER BY Rank ASC 

I'm afraid I can't tell you what your data is like.

The query I've given you will select from project 1, and project 2 (where those two fields are set to the values you choose) and then, from both of those,with the second block of "ands"

The best thing you can do is build the query up one clause at a time.  i.e. try:

project = project1

(project = project1) OR (project = project2 )

(project = project1) OR (project = project2 and ( "assign to" = name or "fix by" = name) ) )
 

and so on.

(Although, I've just noticed the "nodes" clause - that might be the problem if project2 doesn't have any nodes from project1)

Thank you Nik, the following query worked:

(project = project1 AND "Nodes" in ("Nodes from project 1") AND "Project Drop Delivery" not in (D1, D2) AND "Go To Market Phase" in ("R1, R2") and ("HLDs" != "xyz" or "HLDs" is EMPTY) ) OR (project = project2 and ( "Assign to" = Name OR "Fix by" = Name ) ORDER BY Rank ASC 

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

74 views 0 5
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you