Merge lp:~jcsackett/launchpad/private-bugs-open-teams-and-delegate-teams-oh-my into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Brad Crittenden |
Approved revision: | no longer in the source branch. |
Merged at revision: | 14334 |
Proposed branch: | lp:~jcsackett/launchpad/private-bugs-open-teams-and-delegate-teams-oh-my |
Merge into: | lp:launchpad |
Diff against target: |
22 lines (+8/-2) 1 file modified
lib/lp/app/javascript/subscribers/subscribers_list.js (+8/-2) |
To merge this branch: | bzr merge lp:~jcsackett/launchpad/private-bugs-open-teams-and-delegate-teams-oh-my |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brad Crittenden (community) | code | Approve | |
Review via email: mp+82703@code.launchpad.net |
Commit message
[r=bac][bug=878531] Provides a better error message to webapp user when they try to subscribe open/delegated teams to private bugs.
Description of the change
Summary
=======
You can no longer add open or delegated teams as a subscriber on a private
bug. This is implemented on the model/API level, and handled by try/except on
the view level. However, subscription in the webapp is actually managed by
javascript, which was simply returning the 400 BAD REQUEST data as an error
msg.
This branch updates the subscriber error handler to show response text error
msg, if it exists.
Preimplementation
=================
None
Implementation
==============
In the _subscribe function's error handling, we now check if an error
condition occurred (response code of 400) and if response text exists. If
those conditions are met, we know we're getting an error message from the API,
which we should display. We pass that along as the error msg instead of the
bad request data.
Tests
=====
bin/test -vvc --layer=YUI
QA
==
Attempt to add an open/delegated team to a private bug. You will receive an
error message saying that open and delegated teams can't be subscribed to
private bugs, as you would via an API call.
Lint
====
This branch is lint free.
Looks good Jonathan.