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

Add ability to duplicate a custom report

XMLWordPrintable

    • MOODLE_311_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_500_STABLE
    • MOODLE_500_STABLE
    • Hide

      Covered by tests

      Manual steps:

      1. Log in as admin
      2. create two users (user1, user2)
      3. Go to Site administration > Reports > Report Builder > Custom reports
      4. Create a new report using the 'Users' datasource:
        1. Report name: My users report
      5. Go to 'Audience" tab
      6. Add "All users" audience
      7. Add "Manually added users" audience using user1 and user2
      8. Go to 'Schedules' tab
      9. Add a new Schedule (My schedule) and select both audiences
      10. Go back to the Custom reports list
      11. Click on 'Duplicate report' action on your new 'My users report' report
      12. Confirm a new modal form has opened
      13. Change name to 'My duplicated report'
      14. Confirm 'Duplicate Audiences' and 'Duplicate schedules' checkboxes are not checked, and 'Duplicate schedules' checkbox is disabled
      15. Check 'Duplicate Audiences' checkbox
      16. Confirm Schedules checkbox now is enabled
      17. Check 'Duplicate schedules' checkbox
      18. Press 'Save' button
      19. Confirm:
        1. You are inside the new duplicated report
        2. The report name on top is "My duplicated report"
        3. It contains all columns/conditions/filters from the original report
      20. Click on Audience tab
      21. Confirm it has "All users" audience
      22. Confirm it has "Manually added users" audience set to user1 and user2
      23. Click on Schedules tab
      24. Confirm the schedule name is "My schedule"
      25. Click on "Edit schedule details" for the schedule
      26. Confirm it contains both audiences
      27. Go to Site administration > Reports > Report Builder > Custom reports
      28. Confirm you have both reports: "My users report" and "My duplicated report"
      Show
      Covered by tests Manual steps: Log in as admin create two users (user1, user2) Go to Site administration > Reports > Report Builder > Custom reports Create a new report using the 'Users' datasource: Report name: My users report Go to 'Audience" tab Add "All users" audience Add "Manually added users" audience using user1 and user2 Go to 'Schedules' tab Add a new Schedule (My schedule) and select both audiences Go back to the Custom reports list Click on 'Duplicate report' action on your new 'My users report' report Confirm a new modal form has opened Change name to 'My duplicated report' Confirm 'Duplicate Audiences' and 'Duplicate schedules' checkboxes are not checked, and 'Duplicate schedules' checkbox is disabled Check 'Duplicate Audiences' checkbox Confirm Schedules checkbox now is enabled Check 'Duplicate schedules' checkbox Press 'Save' button Confirm : You are inside the new duplicated report The report name on top is "My duplicated report" It contains all columns/conditions/filters from the original report Click on Audience tab Confirm it has "All users" audience Confirm it has "Manually added users" audience set to user1 and user2 Click on Schedules tab Confirm the schedule name is "My schedule" Click on "Edit schedule details" for the schedule Confirm it contains both audiences Go to Site administration > Reports > Report Builder > Custom reports Confirm you have both reports: "My users report" and "My duplicated report"
    • Hide

      Code verified against automated checks.

      Checked MDL-77270 using repository: https://github.com/dravek/moodle.git

      More information about this report

      Built on: Mon 21 Oct 2024 04:49:51 PM UTC

      Show
      Code verified against automated checks. Checked MDL-77270 using repository: https://github.com/dravek/moodle.git main (0 errors / 0 warnings) [branch: MDL-77270 | CI Job ] More information about this report Built on: Mon 21 Oct 2024 04:49:51 PM UTC
    • Show
      Launching automatic jobs for branch MDL-77270 https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/17071/ PHPUnit (sqlsrv) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/58122/ Behat (NonJS - boost and classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/58123/ Behat (Firefox - boost) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/58124/ Behat (Firefox - classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/58125/ App tests (stable app version) Built on: Mon Oct 21 04:25:17 PM UTC 2024

      It would be great to be able to duplicate a report you've built.

      Specification

      1. Create a new system report action to duplicate given report
        • Ensure we add appropriate permission class method for this (checking the ability to both edit the selected report, and create a new report)
      2. This should show a new modal_form instance for configuration:
        • Name of the report
        • Audiences [Checkbox]
        • Schedules [Checkbox] (dependent on whether audiences are also selected)
        • Note, asking for specifics of what to duplicate (other than the above) is really unnecessary, just copy the report and all it's persistents as is (columns, filters, conditions, sorting, aggregation, card view) - these are the elements that comprise the report, omitting them is pointless
      3. Upon saving the form, it should redirect to the editor for the duplicated report (much like creating a new report does)

            davidcarrillo David Carrillo
            zswan@earlychildhood.org.au Zoe Swan
            Paul Holden Paul Holden
            Jun Pataleta Jun Pataleta
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            25 Vote for this issue
            Watchers:
            19 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 19 minutes
                4h 19m

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