Merge lp://qastaging/~bac/launchpad/bug-32618 into lp://qastaging/launchpad
Status: | Merged |
---|---|
Approved by: | Curtis Hovey |
Approved revision: | no longer in the source branch. |
Merged at revision: | 11331 |
Proposed branch: | lp://qastaging/~bac/launchpad/bug-32618 |
Merge into: | lp://qastaging/launchpad |
Diff against target: |
320 lines (+91/-90) 5 files modified
lib/canonical/launchpad/utilities/gpghandler.py (+6/-6) lib/lp/registry/browser/person.py (+42/-31) lib/lp/registry/interfaces/jabber.py (+1/-2) lib/lp/registry/stories/person/xx-person-edit-jabber-ids.txt (+29/-29) lib/lp/registry/templates/person-editjabberids.pt (+13/-22) |
To merge this branch: | bzr merge lp://qastaging/~bac/launchpad/bug-32618 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Curtis Hovey (community) | code | Approve | |
Review via email: mp+32145@code.qastaging.launchpad.net |
Commit message
Do not allow editing of jabberids in place. Convert to be a real LaunchpadFormView.
Description of the change
= Summary =
Multiple Jabberids can be edited in place with confusing results. The
UI is confusing. Simplifying the UI makes the problem impossible to
recreate.
== Proposed fix ==
Only display the jabberids, don't show them in editable fields. Need to
change a jabberid? Delete it and add it back correctly.
== Pre-implementation notes ==
Chit chat with Curtis.
== Implementation details ==
None
== Tests ==
bin/test -vvt xx-person-
== Demo and Q/A ==
http://
= Launchpad lint =
Will fix these.
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
./lib/lp/
0: narrative uses a moin header.
4: narrative uses a moin header.
32: source exceeds 78 characters.
45: narrative uses a moin header.
Hi Brad.
I love your proposed soltution that made this issue a trival problem. I see your editor converted a tab into a spaces :).
I have an optional request. I see that the save() method is doing validation /after/ it starts making changes to the jabber ids. I think we should move the validation code to a validate mthod and make the save() method only do changes. I see there are already tests showing the expected behaviour, and I expect this proposed refactoring to pass:
def validate(self, data): 'newjabberid' )
jabberset = getUtility( IJabberIDSet)
existingja bber = jabberset. getByJabberID( jabberid) person != self.context:
self. request. response. addErrorNotific ation(
structure d(
'The Jabber ID %s is already registered by '
'<a href="%s">%s</a>.',
jabberid, canonical_ url(existingjab ber.person) ,
existingjabb er.person. displayname) )
self. request. response. addErrorNotific ation(
' The Jabber ID %s already belongs to you.' % jabberid) 'newjabberid' )
jabberset. new(self. context, jabberid)
jabberid = data.get(
if jabberid is not None:
if existingjabber.
else:
...
@action(_("Save Changes"), name="save")
def save(self, action, data):
...
jabberid = form.get(
if jabberid is not None: