Merge lp:~sinzui/launchpad/question-emails-0 into lp:launchpad

Proposed by Curtis Hovey
Status: Merged
Approved by: Curtis Hovey
Approved revision: no longer in the source branch.
Merged at revision: 12915
Proposed branch: lp:~sinzui/launchpad/question-emails-0
Merge into: lp:launchpad
To merge this branch: bzr merge lp:~sinzui/launchpad/question-emails-0
Reviewer Review Type Date Requested Status
Curtis Hovey (community) code Approve
Review via email: mp+58862@code.launchpad.net

Description of the change

Answers email content fixes.

    Launchpad bug:
        https://bugs.launchpad.net/bugs/351136
        https://bugs.launchpad.net/bugs/239158
        https://bugs.launchpad.net/bugs/597982
    Pre-implementation: no one

Bug #351136 "Information request email has incorrect wording"
    At the end, "requested for more information" should read either "asked
    for more information" or "requested more information".

Bug #239158 "Mail rationale footer should have a "-- " separator"
    Most launchpad emails provide a footer explain why it was sent to the
    recipient, separated from the message body by a line "-- ". But some do
    not. In the provided example, there is no separator, though "--" occurs in
    the body text (to indicate an em dash).

Bug #597982 "emails about 'questions' have many different subject lines"
    muting in my mail client depends on the 'subject' line staying the same,
    and for some reason the questions module in Launchpad uses different
    subjects all the time.

--------------------------------------------------------------------

RULES

Bug #35113 "Information request email has incorrect wording"
    * Replace "requested for more information" with
      "requested more information"

Bug #239158 "Mail rationale footer should have a "-- " separator"
    * Correct the check for the separators in notifications.py, it is
      not checking for a leading newline.

Bug #597982 "emails about 'questions' have many different subject lines"
    * Changed question subject management is an ill-conceived feature. It
      attempts to rewrite the subject line from an email, but it is not
      rigorously tested. The tests show that "Re: " is supported. Replace
      the complex method is a simple one that is supported by the tests.

QA

Bug #35113 "Information request email has incorrect wording"
    * Add a comment to a bug and use the need information action.
    * Verify the email reads "requested more information".

Bug #239158 "Mail rationale footer should have a "-- " separator"
    * Make a comment with an mdash in it.
    * Verify the email has a "-- " newline separator

Bug #597982 "emails about 'questions' have many different subject lines"
    * This difficult since the broken subjects are only from incoming email
      to a question. Send an email to a question
    * Process the incoming email
    * Check the outbound queue and verify the subject was changed to the
      default.

LINT

    lib/lp/answers/notification.py
    lib/lp/answers/doc/notifications.txt
    lib/lp/answers/interfaces/questioncollection.py
    lib/lp/answers/interfaces/questionsperson.py
    lib/lp/answers/tests/test_question_notifications.py

TEST

    ./bin/test -vv -t test_question_notifications -t answers.*doc/notification

IMPLEMENTATION

Fixed grammar.
    lib/lp/answers/notification.py
    lib/lp/answers/doc/notifications.txt
    lib/lp/answers/interfaces/questioncollection.py
    lib/lp/answers/interfaces/questionsperson.py
    lib/lp/answers/tests/test_question_notifications.py

Ensure that the separator is correctly detect
    lib/lp/answers/notification.py
    lib/lp/answers/tests/test_question_notifications.py

Simplify the exceptional rules for question replies.
    lib/lp/answers/notification.py
    lib/lp/answers/doc/notifications.txt
    lib/lp/answers/tests/test_question_notifications.py

To post a comment you must log in.
Revision history for this message
Curtis Hovey (sinzui) wrote :

Self approve since this is trivial/mechanical fixes.

review: Approve (code)