Filtering between particular time slot

I have created chart ‘Xray Overall Test Run results’ that presents overall test executions - per Xray test plan.

But I want to present daily test executions but for the ones that were created/finished only between eg 5:00-7:00 CET
how to introduce such a restriction?

Filtering rows is not working
I have tried to that it like here:

Thank you.

Hi @tom.ki122,

Unfortunately, there isn’t a good option to address your requirement. To access each test execution start/finish date and filter the results requires iterating through all tests. That could lead to a significant performance hit for the report. Therefore, I don’t recommend this route.

One other option I can think of is accessing a Test plan test run with the Xray REST API - v2.0 - Xray Server + DC - Xray. With the additional data import, you can map the last start/finish date to the Xray Test, Xray Test Execution, and Xray Test Execution dimensions. With custom JavaScript code, you can check whether the dates fall into the desired daytime range and import the data as a measure, property and tie to the Time dimension. See an example of the custom JavaScript code for the REST API import options below:

let lastDate;
let lastHour;

if (doc.finish) {
  lastDate = new Date(doc.finish);
} else {
  lastDate = new Date(doc.start);

lastHour = lastDate.getHours();

if (5 <= lastHour && lastHour < 7) {
  doc.lastExDate = lastDate;

Please note that I tested it only with a limited data set. However, javaScript is common knowledge. Therefore, you should be able to adjust the code on your own or with the help of a colleague if necessary.

The eazyBI data mapping then could look similar to the one below:

Unfortunately, the REST API endpoint doesn’t return the Test Plan key and works for a single Test Plan at a time. You can either adjust the report to work without the Test Plan dimension or add the Test plan key with custom JavaScript code and tie it to the Xray Test Plan dimension.

The report then could look similar to the one below:

Roberts //