Merge lp:~bac/launchpad/bug-237722 into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Brad Crittenden on 2010-09-09 |
| Approved revision: | 11489 |
| Merged at revision: | 11521 |
| Proposed branch: | lp:~bac/launchpad/bug-237722 |
| Merge into: | lp:launchpad |
| Diff against target: |
261 lines (+190/-18) 3 files modified
lib/lp/registry/browser/person.py (+2/-5) lib/lp/registry/browser/team.py (+45/-13) lib/lp/registry/browser/tests/test_team_view.py (+143/-0) |
| To merge this branch: | bzr merge lp:~bac/launchpad/bug-237722 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Matthew Revell (community) | text | 2010-09-08 | Approve on 2010-09-09 |
| Leonard Richardson (community) | 2010-09-07 | Approve on 2010-09-07 | |
|
Review via email:
|
|||
Commit Message
Catch CyclicalTeamMem
Description of the Change
= Summary =
If a cycle of team membership could be created by accepting proposed
teams then the model will throw a CyclicalTeamMem
error needs to be caught in the UI and transformed into a pleasing
message to the user.
== Proposed fix ==
Catch it and create a notification message.
== Pre-implementation notes ==
None.
== Implementation details ==
As above.
== Tests ==
bin/test -vvm lp.registry -t test_team_view
== Demo and Q/A ==
Follow the QA outlined in the test:
1) Create Team A.
2) Create Team B.
3) Go to https:/
4) Select 'Add one of my teams' and choose Team B.
5) Go to https:/
6) Select 'Add one of my teams' and choose Team A.
7) Go to https:/
8) Accept Team B
9) Go to https:/
10) Accept Team A
11) Note message. Verify you stayed on the +editproposedme
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
- 11489. By Brad Crittenden on 2010-09-08
-
Added another test and refactored the common parts.
| Brad Crittenden (bac) wrote : | # |
Hi Leonard, thanks for the review. I have done the refactoring and added another test.
Your suggested word change was good. I've reworded and am asking Matthew Revell for a text review.
- 11490. By Brad Crittenden on 2010-09-09
-
Merge from devel

"These teams should be declined." is ambiguous, as often happens with "should". Is it referring to something the end-user ought to do, or something that should have just happened automatically? I'm pretty sure it's the former, but you should reword it.
Can you refactor lines 152-183? (It might not be worth it.)
This is just a suggetion, but I'd kind of like to see a more general final test. Create team C and team D as
well as A and B. Team C is just like team A: team C is a member of B, and B has an outstanding invitation to C. Team D also has an outstanding invitation to B, but no current memberships.
Attempt to approve all three team memberships. Then demonstrate that A and C could not be added to B (with error message), but that D was added to B. I think this will make your coverage a little better, but not so much that I'll insist on you making this change.
(If you do this, call team B "Everyone wants to join this team" or something more memorable--it took me a while to get those last two paragraphs right, and I'm still not sure it's right.)