Merge lp:~gmb/launchpad/reschedule-button-qafix-bug-558415 into lp:launchpad/db-devel
| Status: | Merged |
|---|---|
| Approved by: | Graham Binns on 2010-04-20 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | not available |
| Proposed branch: | lp:~gmb/launchpad/reschedule-button-qafix-bug-558415 |
| Merge into: | lp:launchpad/db-devel |
| Diff against target: |
475 lines (+173/-112) 8 files modified
lib/lp/bugs/browser/bugwatch.py (+2/-41) lib/lp/bugs/browser/tests/bugwatch-views.txt (+0/-55) lib/lp/bugs/configure.zcml (+4/-1) lib/lp/bugs/doc/bugwatch.txt (+84/-0) lib/lp/bugs/interfaces/bugwatch.py (+15/-0) lib/lp/bugs/model/bugwatch.py (+55/-2) lib/lp/bugs/stories/bugwatches/xx-edit-bugwatch.txt (+11/-11) lib/lp/bugs/templates/bugwatch-portlet-activity.pt (+2/-2) |
| To merge this branch: | bzr merge lp:~gmb/launchpad/reschedule-button-qafix-bug-558415 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Brad Crittenden (community) | code | 2010-04-19 | Approve on 2010-04-20 |
|
Review via email:
|
|||
Commit Message
Bug watches can now be rescheduled by any user rather than just administrators.
Description of the Change
This branch fixes a bug with the orignal fix for bug 558415 whereby the
reschedule button would be shown on a bug watch page but nobody but an
admin could click it without it OOPSing.
To fix this I've added a setNextCheck() method to IBugWatch. This can be
called by any user. The upshot of this is that users have a way of
rescheduling a watch, which we can control, without changing next_check
directly.
== lib/lp/
- I've modified the BugWatchActivit
BugWatch.
== lib/lp/
- I've moved the tests from this file into doc/bugwatch.txt since the
logic for determining whether a watch can be updated is now part of
the watch, not the view.
== lib/lp/
- I've updated the ZCML as appropriate.
== lib/lp/
- I've moved the test from bugwatch-views.txt here and updated them as
appropriate.
- I've added tests for BugWatch.
== lib/lp/
- I've added a setNextCheck() method and can_be_rescheduled and
failed_activity properties to IBugWatch.
== lib/lp/
- I've moved the implementation of userCanReschedule() here from the
BugWatchActi
- I've added implementations of IBugWatch.
IBugWatch.
== lib/lp/
- I've updated the test to use the user_browser rather than the admin
browser. This demonstrates that any user can use the reschedule
button.
== lib/lp/
- I've updated the template to use the failed_activity and activity
properties of the BugWatch rather than using view properties.
| Brad Crittenden (bac) wrote : | # |
Graham I forgot to mention there were some valid lint issues with this branch, like unneeded imports.
| Graham Binns (gmb) wrote : | # |
On 20 April 2010 18:25, Brad Crittenden <email address hidden> wrote:
> Graham I forgot to mention there were some valid lint issues with this branch, like unneeded imports.
Thanks Brad, I'll take care of those now.
--
Graham Binns | PGP Key: EC66FA7D

Hi Graham this branch looks good. You have one typo of 'wathc'.
Also I know you just copied it from the existing code, but I'd expect to see
return failure_ratio < WATCH_RESCHEDUL E_THRESHOLD
So that 6/10 failures would still return true.