Dashboard Gadget results not matching JQL filter

Colin Davidson April 18, 2023

I wrote an Issue query and it works perfectly for my Jira board but when I select this same query for my dashboard gadget, I get results that are not related to my query.  The query I wrote is very specific in the project, issue and feature team.  When I select this same query in the dashboard gadget, it returns other Feature Teams that are not visible in my Project or Board.  Why?

1 answer

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 18, 2023

Hello @Colin Davidson 

Welcome to the community!

Can you please share the query with us, and provide examples of items that are getting included that you think should not be included?

It really is not possible for us to help debug the query without that information.

You can change the values you show us to non-confidential example values if necessary.

Colin Davidson April 19, 2023

thank you.. here is a mock query.. 

project = "My Project" AND issuetype = Story AND status not in (Closed, Done, Resolved, Inactive) AND "Feature Team" = "Feature Team 1" OR project = "My Project" AND issuetype = Story AND status not in (Closed, Done, Resolved, Inactive) AND "Feature Team" = "Feature Team 2" OR project = "My Project" AND issuetype = Story AND status not in (Closed, Done, Resolved, Inactive) AND "Feature Team" = "Feature Team 3" OR project = "My Project 2" AND issuetype = Story AND status not in (Closed, Done, Resolved, Inactive) ORDER BY "Feature Team" DESC, assignee ASC

 

and I just realized the last statement may be the issue as I have not specified AND "Feature Team" = "".. This refers back to my issue not being able to create a Feature Team.. https://community.atlassian.com/t5/Jira-Software-questions/Cannot-create-Feature-Team-for-my-Project/qaq-p/2335672#M262019

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 19, 2023

Hello Colin,

You said you are getting results that are not related to your query. In what way are they not related, specifically?

Are you getting issues for a project other than "My Project" or "My Project 2"?

Are you getting issues that are in one of the excluded statuses (i.e. Closed, Done, Resolved, or Inactive)?

Are you getting issues that are not of type Story?

Are you getting issues that have a different value for Feature Team than Feature Team 1, Feature Team 2, or Feature Team 3?

Colin Davidson April 19, 2023

The results I am getting are related to other Feature Teams.. In "My Project 2", there should only be one Feature Team.. that's why I am concerns I am not receiving the correct results.  I have specific Feature Teams for "My Project 1" in my query.. I should not receive any other Feature Team info.. and I do not when executing the query in Jira.. it is only when I execute the filter query in the the Dashboard Gadget that my results are incorrect.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 19, 2023

So, if I understand correctly you want issue from 4 sets of criteria:

  1. project = "My Project" AND issuetype = Story AND status not in (Closed, Done, Resolved, Inactive) AND "Feature Team" = "Feature Team 1"
  2. project = "My Project" AND issuetype = Story AND status not in (Closed, Done, Resolved, Inactive) AND "Feature Team" = "Feature Team 2"
  3. project = "My Project" AND issuetype = Story AND status not in (Closed, Done, Resolved, Inactive) AND "Feature Team" = "Feature Team 3"
  4. project = "My Project 2" AND issuetype = Story AND status not in (Closed, Done, Resolved, Inactive)

As you correctly noted earlier, the last set of criteria does not include a constraint for the "Feature Team" field, so that would retrieve all issues from "My Project 2" that match the other criteria (type and status) regardless of the value for "Feature Team".

It sounds like you need to add that "Feature Team" criteria to the last part of the statement.

I would also like to suggest a way to make this statement a little easier to read.

The first three sets of criteria are almost all the same. The only difference is that you are picking up issues for another value of "Feature Team". You can simplify the first three sets into one set thus:

project = "My Project" AND issuetype = Story AND status not in (Closed, Done, Resolved, Inactive) AND "Feature Team" in ("Feature Team 1", "Feature Team 2", "Feature Team 3")

Additionally you are getting only Story issues from both projects, and only issues not in the same 4 statuses from both projects. You could collapse those two items into a single clause also, thus:

issuetype = Story AND status not in (Closed, Done, Resolved, Inactive) AND (project = "My Project" AND "Feature Team" in ("Feature Team 1", "Feature Team 2", "Feature Team 3") or project = "My Project 2" AND "Feature Team" ="<appropriate value>")

Colin Davidson April 19, 2023

exactly... and I concatenated/optimized all those queries but Jira kept spitting them back at me that I could not combine information because the "operator" did not support the function.  Secondly, "My Project 2" only has no Team attached to it, so there should be no additional returns.. why I need to create a Feature Team for this Project... but from this question posed to the Community: https://community.atlassian.com/t5/Jira-Software-questions/Cannot-create-Feature-Team-for-my-Project/qaq-p/2335672?utm_source=atlcomm&utm_medium=email&utm_campaign=immediate_general_reply&utm_content=topic, I am unable to create a Feature Team for this Project.. I'm in a Catch 22. :)

Colin Davidson April 19, 2023

Thank you for the syntax.. that helped quite a bit.. I modified my query to match what you provided and it worked in Jira and in the gadget.. I needed to add 'literals' to the query to force it to not include what I did not want...

issuetype = Story AND status not in (Closed, Done, Resolved, Inactive) AND (project = "My Project" AND "Feature Team" in ("Feature Team 1", "Feature Team 2", "Feature Team 3") AND "Feature Team" not in ("Feature Team X", "Feature Team Y", "Feature Team Z") or project = "My Project 2")

Until I can gain permissions to create a new Feature Team for my Project, then this will work for now. 

Thank you Trudy!

Suggest an answer

Log in or Sign up to answer