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

Sort ad-hoc tasks by "nextruntime"

    XMLWordPrintable

Details

    Description

      Currently, there is no sorting in `get_next_adhoc_task()` method:

      https://github.com/moodle/moodle/blob/2c0b08c5a7e8c682f0621abb74a5eaf3817b0114/lib/classes/task/manager.php#L562-L564

      Therefore, database engine returns unsorted set of records and under some circumstances records with more recent `nextruntime` can go ahead of records with later `nextruntime`.

      In scenario when we are catching up with some ad-hoc tasks we want the latest tasks to be processed first.

      To guarantee this we should add explicit sorting by `nextruntime`.

      Attachments

        Issue Links

          Activity

            People

              mikhailgolenkov Misha Golenkov
              mikhailgolenkov Misha Golenkov
              Brendan Heywood Brendan Heywood
              Jun Pataleta Jun Pataleta
              CiBoT CiBoT
              Votes:
              0 Vote for this issue
              Watchers:
              4 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 - 30 minutes
                  30m

                  Clockify

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