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

Move get_name from scheduled tasks up to tasks so adhoc tasks have a name too

XMLWordPrintable

    • MOODLE_401_STABLE
    • MOODLE_401_STABLE
    • Hide

      To manually test, we'll execute an adhoc task and confirm it's appearance in the task log:

      1. Log in as admin
      2. Navigate to Reports in user menu
      3. Create new report
      4. In editor, press Audience tab
      5. Add All users audience
      6. Press Schedules tab
      7. Create new schedule
      8. In scheduled list, press Actions > Send schedule
      9. Confirm you want to set it immediately
      10. Run cron (or wait for it to run)
      11. Navigate to Server > Task > Task logs in site administration
      12. Confirm Name column is populated with name of each task
      13. Open Filters
        • Set Type is equal to: Ad hoc
        • Press Apply
      14. Confirm the Send report schedule task name is displayed in report

      Automated test

      1. Confirm the following passes:

        $ vendor/bin/phpunit --filter core_adhoc_task_testcase
        

      Show
      To manually test, we'll execute an adhoc task and confirm it's appearance in the task log: Log in as admin Navigate to Reports in user menu Create new report In editor, press Audience tab Add All users audience Press Schedules tab Create new schedule In scheduled list, press Actions > Send schedule Confirm you want to set it immediately Run cron (or wait for it to run) Navigate to Server > Task > Task logs in site administration Confirm Name column is populated with name of each task Open Filters Set Type is equal to: Ad hoc Press Apply Confirm the Send report schedule task name is displayed in report Automated test Confirm the following passes: $ vendor/bin/phpunit --filter core_adhoc_task_testcase

      When the task api was created for some unknown reason scheduled tasks have a concept of a name but adhoc tasks for not:

      https://github.com/moodle/moodle/blob/master/lib/classes/task/scheduled_task.php#L566-L571

      I'm proposing to move this up a level so all tasks get it, and also to make it backward compatible the default name for an adhoc task will be inferred from its class.

      Adhoc tasks have been second class citizens for too long but will be first class when MDL-70975, MDL-68407 land.

        1. MDL-75256_testing_1.png
          180 kB
          Angelia Dela Cruz
        2. MDL-75256_testing_2.png
          87 kB
          Angelia Dela Cruz

            pholden Paul Holden
            brendanheywood Brendan Heywood
            Brendan Heywood Brendan Heywood
            Jun Pataleta Jun Pataleta
            Angelia Dela Cruz Angelia Dela Cruz
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 10 minutes
                3h 10m

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