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

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

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.0
    • Component/s: Report builder
    • Labels:
    • Affected Branches:
      MOODLE_400_STABLE
    • Fixed Branches:
      MOODLE_400_STABLE
    • Pull Master Branch:
    • Testing Instructions:
      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

          Issue Links

            Activity

              People

              Assignee:
              pholden Paul Holden
              Reporter:
              pholden Paul Holden
              Peer reviewer:
              Ferran Recio Ferran Recio
              Integrator:
              Andrew Lyons Andrew Lyons
              Tester:
              Angelia Dela Cruz Angelia Dela Cruz
              Participants:
              Component watchers:
              David Matamoros, Paul Holden
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

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