Merge lp:~cjohnston/launchpad/part-essential into lp:launchpad

Proposed by Chris Johnston
Status: Work in progress
Proposed branch: lp:~cjohnston/launchpad/part-essential
Merge into: lp:launchpad
Diff against target: 125 lines (+7/-63)
2 files modified
lib/lp/blueprints/stories/standalone/subscribing.txt (+3/-58)
lib/lp/security.py (+4/-5)
To merge this branch: bzr merge lp:~cjohnston/launchpad/part-essential
Reviewer Review Type Date Requested Status
Curtis Hovey (community) code Approve
Review via email: mp+124559@code.launchpad.net

Commit message

Change to the wording of a blueprints participation essential to reflect changes that landed in Summit.

Description of the change

This changes the wording for participation essential of a blueprint to remove the part of the text that states that the scheduler will try to work around the persons availability. This has been changed in Summit to where a user will no longer be marked as required due to too much spam of people marking themselves required when they aren't actually required.

To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) wrote :

Wait, so it won't be used at all? Why not remove the option entirely then?

Revision history for this message
Curtis Hovey (sinzui) wrote :

The permission-level change to launchpad.Admin has no effect because the definition of who can make the change has not changed. Project drivers, blueprint goal drivers, the subscriber, and the people working on the blueprint can edit the essential flag.

Revision history for this message
Curtis Hovey (sinzui) wrote :

thank you.

review: Approve (code)
Revision history for this message
Curtis Hovey (sinzui) wrote :

The proper way to balance the parens was to add back the one at the start of the OR clause instead of removing the one for isOneOf(). I will fix this now.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/blueprints/stories/standalone/subscribing.txt'
--- lib/lp/blueprints/stories/standalone/subscribing.txt 2011-12-23 22:27:40 +0000
+++ lib/lp/blueprints/stories/standalone/subscribing.txt 2012-09-17 23:49:19 +0000
@@ -38,16 +38,6 @@
38 >>> back_link.url38 >>> back_link.url
39 'http://blueprints.launchpad.dev/firefox/+spec/e4x'39 'http://blueprints.launchpad.dev/firefox/+spec/e4x'
4040
41There should be a control to set whether or not participation in
42discussions of this feature is essential. We will say we want to be
43essential to this feature planning:
44
45 >>> essential = browser.getControl('essential')
46 >>> essential.selected
47 False
48
49 >>> essential.selected = True
50
51Now, we'll POST the form. We should see a message that we have just41Now, we'll POST the form. We should see a message that we have just
52subscribed.42subscribed.
5343
@@ -55,7 +45,7 @@
55 >>> 'You have subscribed to this blueprint' in browser.contents45 >>> 'You have subscribed to this blueprint' in browser.contents
56 True46 True
5747
58 >>> 'subscriber-essential' in browser.contents48 >>> 'subscriber-inessential' in browser.contents
59 True49 True
6050
61Now the link should say "Update subscription" in the actions menu.51Now the link should say "Update subscription" in the actions menu.
@@ -64,53 +54,6 @@
64 >>> submod_link is not None54 >>> submod_link is not None
65 True55 True
6656
67OK. Now, let's say we want to change the essential field. Let's follow
68the link to modify the subscription. It should currently be checked.
69
70 >>> submod_link.click()
71 >>> essential = browser.getControl('essential')
72 >>> essential.selected
73 True
74
75We will unset the essential flag and resubmit:
76
77 >>> essential.selected = False
78 >>> browser.getControl('Change').click()
79 >>> 'Your subscription has been updated' in browser.contents
80 True
81
82 >>> 'subscriber-inessential' in browser.contents
83 True
84
85It's also possible to change the essential flag clicking on the star
86icon in the Subscribers portlet.
87
88 >>> browser.getLink(url='/+subscription/carlos').click()
89 >>> browser.getControl('Participation essential').selected = True
90 >>> browser.getControl('Change').click()
91 >>> browser.url
92 'http://blueprints.launchpad.dev/firefox/+spec/e4x'
93
94 >>> 'subscriber-essential' in browser.contents
95 True
96
97We don't really want to be subscribed, so lets unsubscribe from that
98spec. We click the remove icon in the subscribers list, and now the
99unsubscribe confirmation page loads.
100
101 >>> unsubit = browser.getLink(id='unsubscribe-subscriber-13')
102 >>> unsubit.click()
103 >>> confirm = browser.getControl('Unsubscribe')
104 >>> confirm.click()
105 >>> 'You have unsubscribed from this blueprint.' in browser.contents
106 True
107
108 >>> 'subscriber-inessential' in browser.contents
109 False
110
111 >>> 'subscriber-essential' in browser.contents
112 False
113
11457
115Subscribing other users58Subscribing other users
116-----------------------59-----------------------
@@ -165,6 +108,7 @@
165 ... img = a_tags[0].first('img')108 ... img = a_tags[0].first('img')
166 ... print img['src'],109 ... print img['src'],
167 ... print a_tags[1].string110 ... print a_tags[1].string
111 /@@/subscriber-inessential Carlos ...
168 /@@/subscriber-essential Stuart Bishop112 /@@/subscriber-essential Stuart Bishop
169113
170When we change a user's subscription, they get notified by email. Teams114When we change a user's subscription, they get notified by email. Teams
@@ -190,6 +134,7 @@
190 ... img = a_tags[0].first('img')134 ... img = a_tags[0].first('img')
191 ... print img['src'],135 ... print img['src'],
192 ... print a_tags[1].string136 ... print a_tags[1].string
137 /@@/subscriber-inessential Carlos ...
193 /@@/subscriber-inessential Stuart Bishop138 /@@/subscriber-inessential Stuart Bishop
194139
195And check the email notification too.140And check the email notification too.
196141
=== modified file 'lib/lp/security.py'
--- lib/lp/security.py 2012-09-07 20:33:10 +0000
+++ lib/lp/security.py 2012-09-17 23:49:19 +0000
@@ -640,8 +640,8 @@
640640
641641
642class EditSpecificationSubscription(AuthorizationBase):642class EditSpecificationSubscription(AuthorizationBase):
643 """The subscriber, and people related to the spec or the target of the643 """The people related to the spec or the target of the
644 spec can determine who is essential."""644 spec who can determine who is essential."""
645 permission = 'launchpad.Edit'645 permission = 'launchpad.Edit'
646 usedfor = ISpecificationSubscription646 usedfor = ISpecificationSubscription
647647
@@ -652,10 +652,9 @@
652 else:652 else:
653 if user.isOneOfDrivers(self.obj.specification.target):653 if user.isOneOfDrivers(self.obj.specification.target):
654 return True654 return True
655 return (user.inTeam(self.obj.person) or655 return user.isOneOf(
656 user.isOneOf(
657 self.obj.specification,656 self.obj.specification,
658 ['owner', 'drafter', 'assignee', 'approver']) or657 ['owner', 'drafter', 'assignee', 'approver'] or
659 user.in_admin)658 user.in_admin)
660659
661660