Merge lp:~sinzui/launchpad/bugtask-create-question-1 into lp:launchpad
Status: | Merged | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Approved by: | Brad Crittenden | ||||||||||||
Approved revision: | no longer in the source branch. | ||||||||||||
Merged at revision: | 12914 | ||||||||||||
Proposed branch: | lp:~sinzui/launchpad/bugtask-create-question-1 | ||||||||||||
Merge into: | lp:launchpad | ||||||||||||
Diff against target: |
291 lines (+115/-27) 6 files modified
lib/lp/answers/doc/notifications.txt (+8/-4) lib/lp/answers/model/question.py (+12/-7) lib/lp/answers/notification.py (+17/-10) lib/lp/answers/tests/test_question_notifications.py (+32/-1) lib/lp/answers/tests/test_questiontarget.py (+42/-1) lib/lp/bugs/tests/test_bugtarget.py (+4/-4) |
||||||||||||
To merge this branch: | bzr merge lp:~sinzui/launchpad/bugtask-create-question-1 | ||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brad Crittenden (community) | code | Approve | |
Review via email: mp+58826@code.launchpad.net |
Description of the change
Send the first and last messages only when converting a bug to a question.
Launchpad bugs:
https:/
https:/
https:/
Pre-
BugTask:
There are two principle issues described in this bug: sending multiple emails
to users, and sending them in proc. The later issue is also the cause of bug
608037, bug 618390, and bug 618385. Fixing this bug will only be about
addressing the unpredictable number of messages.
While reading the CreateQuestionF
more emails than we want. I also saw that there are two other bugs that
can be fixed while tuning this method.
-------
RULES
bugs #438116 "Timeout when converting bug into question "
* Convert only the last bug message to a question message.
* Do not send emails about the implicit bug link (create it directly?)
bug #247685 "Email for a question converted from a bug has the wrong sender"
* Ensure the sender of the first message is the user who actually sent
the message. The sender comes from the user in the event...this
needs to be corrected.
bug #304960 "Bug converted to Question lost subscribers"
* Ensure direct subscribers to the bug are added as direct subscribers
to the question.
QA
* Convert a bug with more than two comments and at least two subscribers
to a question.
* Verify each contact gets two messages, the first from the user
who reported the bug, and a second from the user who converted the
bug to a question.
* Verify the question has the same direct subscribers as the bug.
LINT
lib/
lib/
lib/
lib/
lib/
TEST
./bin/test -vv -t TestQuestionTar
-t QuestionCreated
IMPLEMENTATION
The bug link is directly created instead of using the helper method. The
method sends an duplicate email about the bug to the answer contacts, and
it is subscribing the question owner to a bug hie is already subscribed too.
The message loop is replaced with a single message pulled from the end of
the bug messages. The direct bug subscribers are subscribed to the question
so that they can learn the answer.
lib/
lib/
Added a property to select the correct user when sending emails. Since
Questions can be created for users, the question owner is the real sender
of the email (bug #247685). The test is somewhat arcane. The use of fakes
allows the tests to run on the lowest layer and does not send emails.
lib/
lib/
Run the bugtarget doctests on the correct layer.
lib/
Hi Curtis,
Thanks for tackling this really old problem. Our users will be glad to get this fixed.
* s/recieve/receive
The tests look good and the code makes sense.