Team unsubscription broken

Bug #415229 reported by William Grant
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Undecided
William Grant

Bug Description

The change to make person/team fmt:links point to the mainsite has broken team unsubscription. This is quite a separate issue from bug #415166, although the same change triggered both.

The JavaScript works out the API URL to unsubscribe by looking at the href of the link in the subscriber's portlet. This was previously something like "/~someperson", but is now "https://launchpad.net/~someperson".

This causes a couple of obvious problems:
 - Subscriber.initializer in subscriber.js trims off the first two characters to get the username. That doesn't work any more.
 - unsubscribe_user_via_icon in bugtask-index.js assumes that giving LP.client.get_absolute_uri the href URL will return a path including the API root (eg. "/api/beta/~someperson"). But get_absolute_uri explicitly avoids adding the root to URLs with domains, so it now just returns "/~someperson".

A related problem is that inline subscriptions are inserted into the subscribers portlet with a href of just "/~someperson". I suspect that fixing that will be required to fix this.

I've attached a diff resulting from my poking around. It seems to solve all the problems, but with an utterly awful and useless hack.

Tags: lp-bugs

Related branches

Revision history for this message
William Grant (wgrant) wrote :
William Grant (wgrant)
Changed in malone:
status: New → In Progress
assignee: nobody → William Grant (wgrant)
milestone: none → 2.2.8
Revision history for this message
Diogo Matsubara (matsubara) wrote : Bug fixed by a commit

Fixed in devel r9154.

Changed in malone:
status: In Progress → Fix Committed
Revision history for this message
Steve Kowalik (stevenk) wrote :

This seems to have broken again, but I'd like confirmation.

Revision history for this message
William Grant (wgrant) wrote :

After chatting on IRC, this is still fixed.

William Grant (wgrant)
Changed in malone:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.