Merge lp:~wgrant/launchpad/fix-ajax-subscription-bug-415166 into lp:launchpad
Proposed by
William Grant
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~wgrant/launchpad/fix-ajax-subscription-bug-415166 |
Merge into: | lp:launchpad |
Diff against target: | None lines |
To merge this branch: | bzr merge lp:~wgrant/launchpad/fix-ajax-subscription-bug-415166 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Henning Eggers (community) | Approve | ||
Review via email: mp+10297@code.launchpad.net |
To post a comment you must log in.
= Summary =
fmt:link and fmt:url were recently changed to always return links to the mainsite for people and pillars. This change broke an untested formatter -- fmt:api_url -- in a way which causes LP.client. links[' me'] to be a full webapp URL with domain, instead of the previous path-only URL. This breaks inline bug subscription (bug #415166).
== Proposed fix ==
The change causing problems changed the default value of rootsite from None to 'mainsite' in {Person, Team,Pillar} FormatterAPI. {url,link} . The proposed fix is to change ObjectFormatter API.api_ url to force a rootsite of None, which causes URLs to be path-only again.
== Pre-implementation notes ==
This was discussed with BjornT and deryck. They agreed with the change as described above.
== Implementation details ==
See above.
== Tests ==
There were previously no tests of fmt:api_url, so I added a new section to lib/canonical/ launchpad/ doc/tales. txt. This also required modification of a later test in that file to not depend on the order in which factory objects are created.
$ bin/test -vv -t tales.txt
== Demo and Q/A ==
To Q/A:
* Log on as any user.
* Navigate to a bug.
* Click on 'Subscribe'.
* Verify that you were subscribed via AJAX.