Subscribe/Unsubscribe link doesn't work correctly with multiple subscriptions

Bug #377935 reported by William Grant
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Deryck Hodge

Bug Description

The AJAX subscription UI just very successfully confused me. It does things horribly wrong if I have both an implicit subscription and one via a duplicate.

I browsed to bug #109153, where the subscribers portlet showed correctly showed that I had an implicit subscription (via launchpad-project). It didn't, however, show what was causing the confusing behaviour - my additional subscription through a duplicate.

The green link at the top of the portlet said 'Unsubscribe'; I didn't think it was meant to do that for implicit subscriptions. I click on it, to see what happens - it immediately says 'Subscribing' (not 'Unsubscribing'), and... directly subscribes me to the bug. It even correctly JavaScripts me into the list of subscribers.

The link still says 'Unsubscribe'. If I click it, it unsubscribes me from the bug, removes me from the portlet, and the link changes to 'Subscribe', as expected. I can click that, and it will resubscribe me as normal.

If I now refresh the page, I have three subscriptions to the bug - one direct, one through a duplicate, and one through launchpad-project. The link is 'Unsubscribe', as expected.

On one occasion, clicking the 'Unsubscribe' link on the refreshed page caused it to try to subscribe me again, so it added me to the portlet a second time. I was only able to reproduce this twice.

Other times, clicking the link successfully unsubscribes me, removes me from the portlet, and changes the link to 'Subscribe'. But when I refresh the page, it goes straight back to 'Unsubscribe'.

Confused yet? I am. To add to the confusion, the portlet doesn't show me as being subscribed through a duplicate unless I'm also subscribed directly. But once I am subscribed directly, the subscription through launchpad-project vanishes.

William Grant (wgrant)
description: updated
Revision history for this message
Deryck Hodge (deryck) wrote :

I can confirm all this. To summarize, if you are directly subscribed to a duplicate of a bug but not the main bug, when you look at the main bug, your name is not listed in either direct subscribers or duplicate subscribers. However, the Subscribe/Unsubscribe link says "Unsubscribe" as if you are listed. On clicking the "Unsubscribe" link you are then directly subscribed and listed as a subscriber. After a page reload, the portlet now lists your name in both direct and duplicate subscribers, which is actually correct now.

To fix this, the portlet should correctly list you as subscribed via a duplicate and the Subscribe/Unsubscribe link you offer a "Subscribe" link, not "Unsubscribe."

Changed in malone:
assignee: nobody → Deryck Hodge (deryck)
importance: Undecided → Medium
status: New → Triaged
Deryck Hodge (deryck)
Changed in malone:
importance: Medium → High
milestone: none → 2.2.6
tags: added: story-inline-subscribed-via-dupes
Deryck Hodge (deryck)
tags: added: duplicate-subscribing
Deryck Hodge (deryck)
Changed in malone:
status: Triaged → In Progress
Revision history for this message
Deryck Hodge (deryck) wrote :

After looking into the inline subscribed via duplicate bugs, I don't think my earlier comment was correct. We want to preserve the old behavior, especially when JavaScript is disabled, so the Unsubscribe link should remain and be hooked up to unsubscribeFromDupes. See bug 387311.

Deryck Hodge (deryck)
Changed in malone:
milestone: 2.2.6 → 2.2.7
Revision history for this message
Diogo Matsubara (matsubara) wrote : Bug fixed by a commit

Fixed in devel r8845.

Changed in malone:
status: In Progress → Fix Committed
Revision history for this message
Deryck Hodge (deryck) wrote :

QA'ing for this bug fix revealed we don't correctly list duplicate subscriptions when someone is subscribed via an implicit team subscription. The JavaScript should be correct now, but I filed bug 401779 about needing to list the dupe subscription.

summary: - AJAX subscription UI confused when a person has multiple subscriptions
+ Subscribe/Unsubscribe link doesn't work correctly with multiple
+ subscriptions
Deryck Hodge (deryck)
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.