Merge lp:~deryck/launchpad/allow-reporter-fixed-released-unsetting-664096 into lp:launchpad
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Gavin Panella on 2010-11-01 | ||||
| Approved revision: | no longer in the source branch. | ||||
| Merged at revision: | 11849 | ||||
| Proposed branch: | lp:~deryck/launchpad/allow-reporter-fixed-released-unsetting-664096 | ||||
| Merge into: | lp:launchpad | ||||
| Prerequisite: | lp:~deryck/launchpad/lock-fix-released-status-126516 | ||||
| Diff against target: |
98 lines (+52/-8) 2 files modified
lib/lp/bugs/model/bugtask.py (+8/-5) lib/lp/bugs/model/tests/test_bugtask_status.py (+44/-3) |
||||
| To merge this branch: | bzr merge lp:~deryck/launchpad/allow-reporter-fixed-released-unsetting-664096 | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Gavin Panella (community) | 2010-11-01 | Approve on 2010-11-01 | |
|
Review via email:
|
|||
Commit Message
Allow the bug reporter to transition away from Fix Released bug task status.
Description of the Change
This is the final branch required to completely fix bug 664096. Previously, the tests were updated in a branch and then the status was locked so that only bug supervisor or owner could transition away from Fix Released. This branch adds the ability for the bug reporter to transition away from fix released, so that the bug can be reopened by the reporter if it is not fixed.
Thanks for the review!
| Robert Collins (lifeless) wrote : | # |
On Tue, Nov 2, 2010 at 5:46 AM, Gavin Panella
<email address hidden> wrote:
> Review: Approve
> Cool :) A few trivial comments, that's it.
> [2]
>
> + user == self.bug.owner):
>
> Here (and elsewhere) inTeam() is not used. Works but seems odd to not
> use inTeam() because it will DTRT for individuals and teams.
It would be better to write this as
+ user.id == self.bug.ownerID):
Using the ID column avoids doing a dereference-
don't want here. We've had timeouts fixed by little tweaks like this.
-Rob
| Gavin Panella (allenap) wrote : | # |
> It would be better to write this as
>
> + user.id == self.bug.ownerID):
>
> Using the ID column avoids doing a dereference-
> don't want here. We've had timeouts fixed by little tweaks like this.
For bug owner it's okay, because I think it will only ever be an
individual. However, for assignee it can be a team, and comparing ID
won't work. Something like the following might be an okay compromise
for now:
user.id == self.bug.assigneeID or
user.
inTeam() could be changed to accept an ID and encapsulate this (and
perhaps also short-circuit to a query - instead of dereference first -
in the case of a team).
| Robert Collins (lifeless) wrote : | # |
On Tue, Nov 2, 2010 at 6:21 AM, Gavin Panella
<email address hidden> wrote:
> For bug owner it's okay, because I think it will only ever be an
> individual. However, for assignee it can be a team, and comparing ID
> won't work. Something like the following might be an okay compromise
> for now:
>
> user.id == self.bug.assigneeID or
> user.inTeam(
>
> inTeam() could be changed to accept an ID and encapsulate this (and
> perhaps also short-circuit to a query - instead of dereference first -
> in the case of a team).
Something like that might be nice.
-Rob
| Gavin Panella (allenap) wrote : | # |
> > inTeam() could be changed to accept an ID and encapsulate this (and
> > perhaps also short-circuit to a query - instead of dereference first -
> > in the case of a team).
>
> Something like that might be nice.
Bug 669643 for anyone that's interested.
| Deryck Hodge (deryck) wrote : | # |
Thanks for the comments guys. I'm fixing things up and also adding a test for the corner case of bug reporter being a team, which can happen in bug imports. Gavin remembered this on IRC this morning.

Cool :) A few trivial comments, that's it.
[1]
+ elif (user.inTeam( self.pillar. bug_supervisor) or
user. inTeam( self.pillar. owner) or
user. id == celebrities. bug_watch_ updater. id or
user. id == celebrities. bug_importer. id or
Not your code, but the following lines don't line up.
[2]
+ user == self.bug.owner):
Here (and elsewhere) inTeam() is not used. Works but seems odd to not
use inTeam() because it will DTRT for individuals and teams.
[3]
+ layer = LaunchpadFuncti onalLayer
You might be able to get away with DatabaseFunctio nalLayer here.
[4]
+ self.assertEqual( canTransitionTo Status( CONFIRMED, self.reporter),
+ self.task.
+ BugTaskStatus.
+ True)
self.assertTrue() would work here too.