Merge lp:~henninge/launchpad/bug-753387-ajax-bug-subscription into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Данило Шеган |
Approved revision: | no longer in the source branch. |
Merged at revision: | 13118 |
Proposed branch: | lp:~henninge/launchpad/bug-753387-ajax-bug-subscription |
Merge into: | lp:launchpad |
Diff against target: |
32 lines (+9/-6) 1 file modified
lib/lp/bugs/javascript/bugtask_index_portlets.js (+9/-6) |
To merge this branch: | bzr merge lp:~henninge/launchpad/bug-753387-ajax-bug-subscription |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Данило Шеган (community) | Approve | ||
Review via email: mp+62256@code.launchpad.net |
Commit message
[r=danilo][bug=753387] Fix js bug when subscribing w/o structural bug subscriptions feature.
Description of the change
= Summary =
Even without the new "mute" feature enabled (part of structural bug
subscriptions), subscribing and unscribing tried to update the "mute
subscription" node. This failed because that node does not exist if
the feature is not enabled.
== Proposed fix ==
Check if the node exists before doing stuff with it.
== Pre-implementation notes ==
None, all my own thinking.
== Implementation details ==
The check had only to be added in two places although the function that
eventually fails (update_
often. Those other call sites are only reached when the feature is
enabled and therefore when the node is actually on the page.
The two affected call sites can easily be spotted because they are the
only ones that call get_mute_
== Tests ==
None, this is transitional anyway.
== Demo and Q/A ==
Open any bug when the feature is not enabled, open a javascript
console. Click on "Subscribe" and watch that you *don't* see an
error message on the console.
The second callsite is in "Subscribe someone else" but is only
triggered when the user has permissions to also unsubscribe that
other person. I could not (easily) figure out how to get into that
position.
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
I wonder what would be the correct way to trigger a removal of the conditions once the feature flag is removed. Any hints? Add an XXX?