From d8bcefffe2ea40fba754810a5b7205871e5f6bf1 Mon Sep 17 00:00:00 2001 From: vinod404 Date: Mon, 25 Aug 2025 11:50:55 +0530 Subject: [PATCH] MDL-86396 reportbuilder: Add DB read/write filters to Task logs report --- .../local/systemreports/task_logs.php | 2 ++ public/admin/tests/behat/task_logs.feature | 20 +++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/public/admin/classes/reportbuilder/local/systemreports/task_logs.php b/public/admin/classes/reportbuilder/local/systemreports/task_logs.php index caaf33057c4..12e437a3e30 100644 --- a/public/admin/classes/reportbuilder/local/systemreports/task_logs.php +++ b/public/admin/classes/reportbuilder/local/systemreports/task_logs.php @@ -134,6 +134,8 @@ class task_logs extends system_report { 'task_log:result', 'task_log:timestart', 'task_log:duration', + 'task_log:dbreads', + 'task_log:dbwrites', ]); } diff --git a/public/admin/tests/behat/task_logs.feature b/public/admin/tests/behat/task_logs.feature index 78a95d69359..92a262a12df 100644 --- a/public/admin/tests/behat/task_logs.feature +++ b/public/admin/tests/behat/task_logs.feature @@ -48,3 +48,23 @@ Feature: View task logs report and use its filters | operator | shouldornotsee | | Less than | should not see | | Greater than | should see | + + @javascript + Scenario Outline: Verify task logs report includes and applies filter + Given I log in as "admin" + And I change window size to "large" + And I navigate to "Server > Tasks > Task logs" in site administration + When I click on "Filters" "button" + Then I should see "" in the "[data-region='report-filters']" "css_element" + + # Verify the filter can be applied + And I set the following fields in the "" "core_reportbuilder > Filter" to these values: + | operator | Greater than | + | value | 0 | + And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element" + And I should see "Filters applied" + And I should see "Filters (1)" in the "#dropdownFiltersButton" "css_element" + Examples: + | filtername | + | Database reads | + | Database writes |