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

Report schedules with no recurrence are sending too frequently

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.0
    • 4.0
    • Report builder
    • MOODLE_400_STABLE
    • MOODLE_400_STABLE
    • Hide

      Note: testing requires functional email configuration for your site, along with a user whose email you can check (use Mailhog or similar for local testing). Cron should also be running on the recommended frequency (every minute)

      1. Log in as admin
      2. Create new user
      3. Navigate to Reports > Report builder > Custom reports in site administration
      4. Create new report from Users report source
        • Ensure Include default setup is checked
        • Save
      5. In report editor, click Audience tab
      6. Choose Manually added users audience
        • Select your test user
        • Save
      7. Click Schedules tab
      8. Press New schedule
        • Choose a name
        • Set Starting from to be some time in the near future (so you don't have to wait too long)
        • Select the audience you just created
        • Add a subject & message
        • Save
      9. Once the time you set the schedule to begin has passed, confirm that your test user received an email containing the message content with the report content attached as a file
      10. Wait for a few more cron cycles (or execute manually)
      11. Confirm schedule was not sent again
      Show
      Note: testing requires functional email configuration for your site, along with a user whose email you can check (use Mailhog or similar for local testing). Cron should also be running on the recommended frequency (every minute) Log in as admin Create new user Navigate to Reports > Report builder > Custom reports in site administration Create new report from Users report source Ensure Include default setup is checked Save In report editor, click Audience tab Choose Manually added users audience Select your test user Save Click Schedules tab Press New schedule Choose a name Set Starting from to be some time in the near future (so you don't have to wait too long) Select the audience you just created Add a subject & message Save Once the time you set the schedule to begin has passed, confirm that your test user received an email containing the message content with the report content attached as a file Wait for a few more cron cycles (or execute manually) Confirm schedule was not sent again

      The should_send_schedule(...) helper doesn't take into account those schedules that are set to No recurrence, leading to them getting sent on every subsequent task execution after their initial Starting from date (because their next send time isn't incremented after they are sent)

      Discovered in MDLQA-16724

        1. Step No. 9_Screenshot.PNG
          33 kB
          Gladys Basiana
        2. Step No. 11_Screenshot.PNG
          20 kB
          Gladys Basiana

            pholden Paul Holden
            pholden Paul Holden
            David Carrillo David Carrillo
            Victor Déniz Falcón Victor Déniz Falcón
            Gladys Basiana Gladys Basiana
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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