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

Ordering of comments returned by get_comments is unpredictable when timestamps match

    XMLWordPrintable

    Details

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/Nov/19

                  Time Tracking

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