Merge lp:~jcsackett/launchpad/assertion-error-697294 into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | j.c.sackett | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 12334 | ||||
Proposed branch: | lp:~jcsackett/launchpad/assertion-error-697294 | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
258 lines (+68/-53) 4 files modified
lib/lp/answers/configure.zcml (+0/-6) lib/lp/answers/model/question.py (+30/-5) lib/lp/answers/model/questionreopening.py (+18/-32) lib/lp/answers/tests/emailinterface.txt (+20/-10) |
||||
To merge this branch: | bzr merge lp:~jcsackett/launchpad/assertion-error-697294 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Henning Eggers (community) | code | Approve | |
Review via email: mp+47911@code.launchpad.net |
Commit message
[r=henninge]
Description of the change
Summary
=======
In bug 697294, an assertion error would popup from a question in a bad state hitting question reopen (see bug 709816 about the bad state error). While the bad state is of low importance, question reopen was erroneously being called and attempting to do work it shouldn't do.
To handle this, create_
Preimplementation
=================
Spoke with Curtis Hovey.
Proposed Fix
============
Refactor the reopening method into a helper rather than a notification listener.
Implementation
==============
lib/lp/
-------
Removed create_
lib/lp/
-------
Altered reopen and setStatus to call create_
lib/lp/
-------
create_
Tests
=====
bin/test -t answers.*workflow
Demo & QA
=========
Run through a workflow on answers with any question you can reopen and declare solved. All transitions should work as expected.
Lint
====
make lint output:
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
Thanks for doing this! All I really miss is a test that triggers the assertion error (without the fix), all in the spirit of TDD. ;-) Can you please add that test or explain why it is not needed?
Also, I am not sure if formatting one parameter per line always increases readability or just length.
Cheers,
Henning