Merge lp:~wgrant/launchpad/fix-team-unsubscription-bug-415229 into lp:launchpad
Proposed by
William Grant
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Graham Binns | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | not available | ||||
Proposed branch: | lp:~wgrant/launchpad/fix-team-unsubscription-bug-415229 | ||||
Merge into: | lp:launchpad | ||||
Diff against target: | None lines | ||||
To merge this branch: | bzr merge lp:~wgrant/launchpad/fix-team-unsubscription-bug-415229 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Graham Binns (community) | code js | Approve | |
Review via email: mp+10300@code.launchpad.net |
To post a comment you must log in.
= Summary =
Links in the subscribers portlet were previously just paths (/~someperson), but now include the mainsite domain (https:/ /launchpad. dev/~someperson). The inline unsubscription JS assumes the old style, so is broken.
Only the last revision is really in this branch; the others are in lp:~wgrant/launchpad/fix-ajax-subscription-bug-41516 which is approved for landing.
== Proposed fix ==
The URL is retrieved with get_user_ uri_from_ icon, so my fix strips the domain off there. This returns the behaviour of the function to the original, so the rest of the JS works as before.
== Pre-implementation notes ==
BjornT agreed that the correct fix was to strip the domain off, and suggested that it be done inside get_user_ uri_from_ icon.
== Implementation details ==
See above.
== Tests ==
There's just a somewhat flaky Windmill test:
$ ./bin/lp-windmill -e test=lib/ lp/bugs/ windmill/ tests/test_ bugs/test_ bug_inline_ subscriber. py firefox http:// bugs.launchpad. dev:8085
== Demo and Q/A ==
To Q/A:
* Log on as any user.
* Navigate to a bug.
* Subscribe a team of which you are a member.
* Without refreshing, click on the unsubscribe link next to it.
* Verify that you were unsubscribed via AJAX.
* Repeat the above, but refreshing before clicking the unsubscribe link.