Merge lp://qastaging/~julian-edwards/launchpad/sync-sponsored-widget into lp://qastaging/launchpad
Proposed by
Julian Edwards
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Julian Edwards | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 14545 | ||||
Proposed branch: | lp://qastaging/~julian-edwards/launchpad/sync-sponsored-widget | ||||
Merge into: | lp://qastaging/launchpad | ||||
Prerequisite: | lp://qastaging/~allenap/launchpad/sync-sponsored-widget | ||||
Diff against target: |
15 lines (+3/-2) 1 file modified
lib/lp/registry/templates/distroseries-localdifferences.pt (+3/-2) |
||||
To merge this branch: | bzr merge lp://qastaging/~julian-edwards/launchpad/sync-sponsored-widget | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gavin Panella (community) | Approve | ||
Review via email: mp+86051@code.qastaging.launchpad.net |
This proposal supersedes a proposal from 2011-12-14.
Commit message
[r=allenap][bug=827555] Add a person picker on the package sync pages so that the user can specify a user to sponsor.
Description of the change
Add a person picker on the package sync pages so that the user can specify a user to sponsor.
To post a comment you must log in.
Looks good, but I have a few questions.
[1]
+ sponsored = data.get( "sponsored_ person" ) ror("sponsored_ person" , "Invalid person")
+ if sponsored is None:
+ self.setFieldEr
This appears to enforce a sponsored user? I thought it was optional?
[2]
+ <span "sponsored_ person nocall: view/widgets/ sponsored_ person; person/ context/ __name_ _; view.getFieldEr ror(field_ name);" >
+ tal:define=
+ field_name sponsored_
+ error python:
+ <label>Person being sponsored (optional):</label>
+ <tal:sponsored replace="structure sponsored_person"/>
+ </span>
Where is the error displayed?
What might work better here is to refactor the widget_row macro from
launchpad-form.pt. It's a rather limited macro at the moment, because
it only ever produces a single table row containing a single table
cell. If you're fed up of UI stuff, I'd be interested in doing that
myself.
[3]
+ assert(
+ force_async or not sponsored,
+ "sponsored must be None for sync copies")
This will never fail. It could instead be written as:
assert force_async or not sponsored, (
"sponsored must be None for sync copies")
The original statement was asserting that a tuple (<bool>, <str>) was
truthy. Lint really ought to alert about these things.
[4]
The name "sponsored" is unfortunate because it's ambiguous. Is it being_sponsored ".
sponsored (boolean), person sponsored by, person being sponsored? It
might be better to use something like "person_