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

Ordering of comments returned by get_comments is unpredictable when timestamps match

XMLWordPrintable

    • MOODLE_36_STABLE, MOODLE_37_STABLE
    • MOODLE_36_STABLE, MOODLE_37_STABLE
    • Hide

      Unit tests cover this change.

      Show
      Unit tests cover this change.

      This issue is about backporting the 69d50e2 commit patched in the improvement issue, MDL-64588.

      The issue is that when several comments have the same exact timestamp (in seconds, which is possible), the get_comments() web service may return these in an unreliable way (the ordering of results when an explicit sort has not been declared is unknown). One call might return a before b and the next may return b before a. We should include the id in the sorting to make sure this is predictable.

      This issue should include that change, and adjustments to the unit tests in order to confirm that change.

            jaked Jake Dallimore
            jaked Jake Dallimore
            Peter Dias Peter Dias
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 26 minutes
                26m

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