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

Reload report filter form via fragment when resetting, avoid page reload

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.0
    • 4.0
    • Report builder
    • MOODLE_400_STABLE
    • MOODLE_400_STABLE
    • Hide

      Manual test

      1. Navigate to Server > Tasks > Task logs in site administration
      2. Press Filters
      3. Set Result is equal to: Fail and press apply
      4. Confirm filters are applied
      5. Press Reset all
      6. Confirm you see a notification stating "Filters reset"
      7. Confirm the page didn't reload
      8. Confirm the report reloaded without any applied filters
      9. Confirm filters form is still visible
      10. Confirm filters form Result filter is reset to "Is any value"

      Automated test

      $ bin/moodle-docker-compose exec --user www-data webserver php admin/tool/behat/cli/run.php --name="Reset task log filters"
      

      Show
      Manual test Navigate to Server > Tasks > Task logs in site administration Press Filters Set Result is equal to: Fail and press apply Confirm filters are applied Press Reset all Confirm you see a notification stating "Filters reset" Confirm the page didn't reload Confirm the report reloaded without any applied filters Confirm filters form is still visible Confirm filters form Result filter is reset to "Is any value" Automated test $ bin/moodle-docker-compose exec --user www-data webserver php admin/tool/behat/cli/run.php --name="Reset task log filters"

    Description

      When resetting a report filters, the current implementation performs a page reload in order for the form itself to be reset when the page is next rendered

      This is problematic because it means the filter form is closed on page load, so effectively disappears after the button is pressed, and also presents a problem in the custom report editor MDL-70795 when transitioning between screens

      We can use the Fragment API to just re-render the form after resetting, therefore loading it in it's initial/blank state and not requiring a page reload

      Attachments

        1. MDL-72545_filtered.png
          70 kB
          Angelia Dela Cruz
        2. MDL-72545_reset.png
          67 kB
          Angelia Dela Cruz

        Issue Links

          Activity

            People

              pholden Paul Holden
              pholden Paul Holden
              Ferran Recio Ferran Recio
              Andrew Lyons Andrew Lyons
              Angelia Dela Cruz Angelia Dela Cruz
              Carlos Castillo, David Matamoros, Mikel Martín Corrales, Paul Holden
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                19/Apr/22

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours, 25 minutes
                  2h 25m