Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-73292

Report builder urls with filters, sort, pagination should be bookmarkable / deep linkable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • Future Dev
    • Report builder
    • Hide
      1. Encode and Apply Filter (with URL update) – Single Filter
        1. Log in as site admin.
        2. Browse to Site administration ▸ Server ▸ Task logs.
        3. Ensure cron has run recently, so some log data exists.
        4. Confirm the filter drawer is available (right-hand side “Filters” button).
        5. Encode and Apply Filter (with URL update) – Single Filter
        6. Open filter drawer.
        7. Select a value for the Class name Type (Ad hoc)
        8. Click Apply
        9. Confirm see a toast indicating “Filters applied”
        10. Confirm the URL is updated from [+http://moodle.local/admin/tasklogs.php?+] To [+http://moodle.local/admin/tasklogs.php?task_log:type=1+]
        11. Confirm the Filter UI reflects applied values.
        12. Confirm the table only shows Ad hoc tasks.
        13. Click the "Reset all" button
        14. Confirm the Filter fields reset to defaults ( “Is any value”)
        15. Confirm the URL no longer contains any filter parameters and is updated from [+http://moodle.local/admin/tasklogs.php?task_log:type=1+] to [+http://moodle.local/admin/tasklogs.php?+]
        16. Confirm A toast appears: “Filters reset”
        17. Confirm the report content resets accordingly.
      2. Encode and Apply Filter (with URL update) – Multiple Filters
        1. Log in as a site admin.
        2. Go to Site administration > Server > Task logs
        3. Ensure multiple task logs exist
        4. Open the filter drawer
        5. Apply all the following filters:
        6. Class name: Background processing for scheduled allocation
        7. Type: Ad hoc
        8. Task output: Contains → Background
        9. o Result: Fail
        10. o Start time: Range from 6 September 2024 to 9 September 2024
        11. o Duration: Less than → 1 second
        12. • Click Apply.
        13. • You should observe:
        14. o A toast indicating “Filters applied”.
          o The browser URL is updated and contains all six encoded tokens, i.e. URL is updated from [+http://moodle.local/admin/tasklogs.php?+] To [+http://moodle.local/admin/tasklogs.php?task_log:name=workshopallocation_scheduled\task\cron_task&task_log:type=0&task_log:output=Background&task_log:result=0&task_log:timestart~1725544800-1725804000&task_log:duration%3C=1s+]
          o Filter UI shows all the selected values with visible fields.
          o The table shows only records matching all six conditions.
          • Click the Reset all button in the filter drawer.
          • You should observe:
          o Filter fields reset to defaults ("Is any value").
          o The URL is updated, and all query parameters are removed, i.e. URL is updated to [+http://moodle.local/admin/tasklogs.php+]
          o A toast appears: “Filters reset”.
          o The table refreshes to show unfiltered results.
      Show
      Encode and Apply Filter (with URL update) – Single Filter Log in as site admin. Browse to Site administration ▸ Server ▸ Task logs. Ensure cron has run recently, so some log data exists. Confirm the filter drawer is available (right-hand side “Filters” button). Encode and Apply Filter (with URL update) – Single Filter Open filter drawer. Select a value for the Class name Type (Ad hoc) Click Apply Confirm see a toast indicating “Filters applied” Confirm the URL is updated from [+http://moodle.local/admin/tasklogs.php?+]  To  [+http://moodle.local/admin/tasklogs.php?task_log:type=1+] Confirm the Filter UI reflects applied values. Confirm the table only shows Ad hoc tasks. Click the "Reset all" button Confirm the Filter fields reset to defaults ( “Is any value”) Confirm the URL no longer contains any filter parameters and is updated from [+http://moodle.local/admin/tasklogs.php?task_log:type=1+]  to  [+http://moodle.local/admin/tasklogs.php?+] Confirm A toast appears: “Filters reset” Confirm the report content resets accordingly. Encode and Apply Filter (with URL update) – Multiple Filters Log in as a site admin. Go to Site administration > Server > Task logs Ensure multiple task logs exist Open the filter drawer Apply all the following filters: Class name: Background processing for scheduled allocation Type: Ad hoc Task output: Contains → Background o Result: Fail o Start time: Range from 6 September 2024 to 9 September 2024 o Duration: Less than → 1 second • Click Apply. • You should observe: o A toast indicating “Filters applied”. o The browser URL is updated and contains all six encoded tokens, i.e. URL is updated from  [+http://moodle.local/admin/tasklogs.php?+]  To  [+http://moodle.local/admin/tasklogs.php?task_log:name=workshopallocation_scheduled\task\cron_task&task_log:type=0&task_log:output=Background&task_log:result=0&task_log:timestart~1725544800-1725804000&task_log:duration%3C=1s+] o Filter UI shows all the selected values with visible fields. o The table shows only records matching all six conditions. • Click the Reset all button in the filter drawer. • You should observe: o Filter fields reset to defaults ("Is any value"). o The URL is updated, and all query parameters are removed, i.e. URL is updated to  [+http://moodle.local/admin/tasklogs.php+] o A toast appears: “Filters reset”. o The table refreshes to show unfiltered results.
    • Show
      Fails against automated checks. Checked MDL-73292 using repository: https://github.com/QT204/moodle main (92 errors / 1 warnings) [branch: MDL-73292 | CI Job ] overview (0/0) , phplint (0/0) , phpcs (90/1) , js (0/0) , css (0/0) , phpdoc (1/0) , commit (0/0) , savepoint (0/0) , thirdparty (0/0) , externalbackup (0/0) , grunt (1/0) , shifter (0/0) , mustache (0/0) , gherkin (0/0) , Should these errors be fixed? Built on: Mon May 12 06:00:11 UTC 2025

      When you dynamically add filters to report builder the url doesn't change, it's fixed eg like:

      /reportbuilder/view.php?id=4

      When you add filters it should use history.replaceState to update the url to include the filters as query params. Something roughly like:

      /reportbuilder/view.php?id=4&username=contains:heywood&firstname=startswith:brendan

       

      If params are present in the url then they should take precedence over any params stored in the session.

            brendanheywood Brendan Heywood
            brendanheywood Brendan Heywood
            Votes:
            7 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.