I need help setting up a Jira filter that will always show the most recently created ticket, no matter when it was made. Right now, I’m using this filter:
project = "MyProject" AND reporter = JohnDoe AND created >= -1d ORDER BY created DESC
But it only shows tickets from the last day. If no tickets were made yesterday, it comes up empty. I want it to always show the newest ticket, even if it’s older than a day.
I’m trying to make a test result summary chart on my Jira dashboard. We use a tool called jira-xray for test run results. It makes test executions as Jira tickets. There are templates for making test result summaries, but I need to give it a filter that finds the newest test_execution_id.
Any ideas on how to change my filter to always get the latest ticket, no matter how old it is? Thanks for any help!
hey dave, i think i got a solution for ya. try this filter:
project = “MyProject” AND reporter = JohnDoe ORDER BY created DESC
this should always show the most recent ticket, no matter when it was created. hope it helps with ur test result summary chart!
I’ve encountered a similar issue when setting up dashboard charts. The key is to remove the date constraint entirely. Your current filter limits results to the last day, which isn’t necessary for finding the most recent ticket. Instead, try this:
project = “MyProject” AND reporter = JohnDoe AND issuetype = “Test Execution” ORDER BY created DESC
This will always return the most recently created Test Execution, regardless of its age. You can then limit the results to 1 in your dashboard configuration to ensure you’re only seeing the latest. Remember to adjust the issuetype if Xray uses a different name for test executions in your instance.
As someone who’s worked extensively with Jira and Xray, I can offer a slightly different approach that might be more robust for your needs. Instead of using a specific reporter, try this filter:
project = “MyProject” AND issuetype = “Test Execution” ORDER BY created DESC
This filter will always return the most recent Test Execution, regardless of who created it or when. It’s more flexible if different team members run tests. You can then use JQL functions in your dashboard to extract the test_execution_id from the top result.
For the dashboard, you might need to use a ScriptRunner custom script to parse the results properly. It’s a bit more complex, but it gives you full control over how the data is presented in your summary chart.