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

Forums emails not threading correctly for deeply nested forums

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Create a discussion like this and you receive 3 emails:

      1
      +- 2
      +- 3
      

      So far so good. If you add more comments then you get more threaded emails like this:

      1
      +- 2
         +- 4
      +- 3
         +- 5
      

      But if you delete the existing emails and then add #4 and #5 then you get two ungrouped emails which appear unrelated but duplicated:

      4
      5
      

      It's easy to keep on tacking more messages onto both reply branches, deleting the received emails, and then adding more comments.

      After the patch they should always be threaded. In a linear client like ios9 mail they will be grouped but then shown in time order, in a threaded client like thunderbird the results will depend on which emails have been deleted but it will always try to thread them somehow which is better than not threading them.

      Tested in: ios9, thunderbird, gmail (no effect), office365 outlook online

      Show
      Create a discussion like this and you receive 3 emails: 1 +- 2 +- 3 So far so good. If you add more comments then you get more threaded emails like this: 1 +- 2 +- 4 +- 3 +- 5 But if you delete the existing emails and then add #4 and #5 then you get two ungrouped emails which appear unrelated but duplicated: 4 5 It's easy to keep on tacking more messages onto both reply branches, deleting the received emails, and then adding more comments. After the patch they should always be threaded. In a linear client like ios9 mail they will be grouped but then shown in time order, in a threaded client like thunderbird the results will depend on which emails have been deleted but it will always try to thread them somehow which is better than not threading them. Tested in: ios9, thunderbird, gmail (no effect), office365 outlook online
    • Affected Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_29_STABLE, MOODLE_30_STABLE
    • Pull Master Branch:
      MDL-52997-email-threading

      Description

      In certain situations the forum emails do not appear threaded, this may affect multiple email clients but is at least an issue in the ios9 mail client and thunderbird.

      NOTE: In outlook and presumably all MS clients, threads have never worked.

      As far as I can tell the root cause is that each forum comment references it's parent's message id in the reply-to and references header, but if you are following a thread which has complex nesting and replies coming in from different people to different messages there is potentially actually no common message id's in the emails.

      So imagine you are watching a discussion like this and you receive 3 emails:

      1
      +- 2
      +- 3
      

      So far so good. You read them and delete them. Now another few replies come into to different comments:

      1
      +- 2
         +- 4
      +- 3
         +- 5
      

      So I will receive another 2 new emails, #4 will have a reference header of #2, and #5 will reference #3, because none of those 4 message id's match each other they won't get threaded. I think some email clients do handle it correctly purely because they remember the earlier emails and linkages, or possible some other heuristic from other headers.

      From my reading of:

      https://www.jwz.org/doc/threading.html

      http://www.ietf.org/rfc/rfc2822.txt

      This bug has existed since he beginning of time so should get cherry picked back everywhere

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/Mar/16