Merge lp://staging/~deryck/launchpad/remove-mentoring-templates-427928 into lp://staging/launchpad
- remove-mentoring-templates-427928
- Merge into devel
Proposed by
Deryck Hodge
Status: | Merged |
---|---|
Approved by: | Brad Crittenden |
Approved revision: | no longer in the source branch. |
Merged at revision: | not available |
Proposed branch: | lp://staging/~deryck/launchpad/remove-mentoring-templates-427928 |
Merge into: | lp://staging/launchpad |
Diff against target: | None lines |
To merge this branch: | bzr merge lp://staging/~deryck/launchpad/remove-mentoring-templates-427928 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brad Crittenden (community) | code | Approve | |
Review via email:
|
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Deryck Hodge (deryck) wrote : | # |
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Brad Crittenden (bac) wrote : | # |
These changes look good Deryck. Thanks for getting rid of the unused feature.
review:
Approve
(code)
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'lib/lp/blueprints/templates/specification-index.pt' |
2 | --- lib/lp/blueprints/templates/specification-index.pt 2009-07-17 17:59:07 +0000 |
3 | +++ lib/lp/blueprints/templates/specification-index.pt 2009-09-14 13:43:43 +0000 |
4 | @@ -188,29 +188,6 @@ |
5 | </tal:block> |
6 | </ul> |
7 | |
8 | - <tal:mentors define="mentoring_offers context/mentoring_offers" |
9 | - condition="mentoring_offers"> |
10 | - <p> |
11 | - <img src="/@@/mentoring" alt="Mentoring" |
12 | - title="People have offered to mentor this work" /> |
13 | - <b>Mentors:</b> |
14 | - <tal:block repeat="mentoring_offer mentoring_offers"> |
15 | - <a tal:replace="structure mentoring_offer/owner/fmt:link">foobar</a> |
16 | - </tal:block> |
17 | - </p> |
18 | - <tal:block condition="not: context/is_complete"> |
19 | - <p tal:condition="view/userIsMentor"> |
20 | - » |
21 | - <a href="+retractmentoring">Retract my offer of mentorship</a> |
22 | - </p> |
23 | - </tal:block> |
24 | - </tal:mentors> |
25 | - |
26 | - <p tal:condition="view/userCanMentor"> |
27 | - » <a href="+mentor">Offer to mentor someone implementing |
28 | - this blueprint</a> |
29 | - </p> |
30 | - |
31 | <h2>Whiteboard |
32 | <a tal:define="link context_menu/whiteboard" |
33 | tal:condition="link/enabled" |
34 | |
35 | === modified file 'lib/lp/bugs/browser/configure.zcml' |
36 | --- lib/lp/bugs/browser/configure.zcml 2009-09-12 01:57:22 +0000 |
37 | +++ lib/lp/bugs/browser/configure.zcml 2009-09-14 12:19:55 +0000 |
38 | @@ -888,58 +888,6 @@ |
39 | attribute_to_parent="bug" |
40 | rootsite="bugs"/> |
41 | <facet |
42 | - facet="overview"> |
43 | - <browser:pages |
44 | - for="canonical.launchpad.interfaces.IHasMentoringOffers" |
45 | - class="lp.registry.browser.mentoringoffer.HasMentoringOffersView" |
46 | - permission="zope.Public"> |
47 | - <browser:page |
48 | - name="+mentoring" |
49 | - template="../templates/hasmentoringoffers-mentoring.pt"/> |
50 | - </browser:pages> |
51 | - <browser:page |
52 | - name="+retractmentoring" |
53 | - for="canonical.launchpad.interfaces.ICanBeMentored" |
54 | - class="lp.registry.browser.mentoringoffer.MentoringOfferRetractView" |
55 | - permission="launchpad.AnyPerson" |
56 | - template="../templates/canbementored-retractmentoring.pt"/> |
57 | - <browser:page |
58 | - name="+mentor" |
59 | - for="canonical.launchpad.interfaces.ICanBeMentored" |
60 | - class="lp.registry.browser.mentoringoffer.MentoringOfferAddView" |
61 | - permission="launchpad.AnyPerson" |
62 | - template="../templates/canbementored-mentoringoffer.pt"> |
63 | - </browser:page> |
64 | - <browser:url |
65 | - for="canonical.launchpad.interfaces.IMentoringOfferSet" |
66 | - path_expression="string:+mentoring" |
67 | - parent_utility="canonical.launchpad.interfaces.ILaunchpadRoot"/> |
68 | - <browser:menus |
69 | - module="lp.registry.browser.mentoringoffer" |
70 | - classes=" |
71 | - MentoringOfferSetFacets |
72 | - MentoringOfferSetOverviewMenu"/> |
73 | - <browser:defaultView |
74 | - for="canonical.launchpad.interfaces.IMentoringOfferSet" |
75 | - name="+mentoring"/> |
76 | - <browser:pages |
77 | - for="canonical.launchpad.interfaces.IMentoringOfferSet" |
78 | - class="lp.registry.browser.mentoringoffer.MentoringOfferSetView" |
79 | - permission="launchpad.Admin"> |
80 | - |
81 | - <!-- this is repeated here from IHasMentoringOffers because it has a |
82 | - different (and stricter) permission. We want only admins to see the |
83 | - overall mentoring picture. --> |
84 | - |
85 | - <browser:page |
86 | - name="+mentoring" |
87 | - template="../templates/hasmentoringoffers-mentoring.pt"/> |
88 | - <browser:page |
89 | - name="+success" |
90 | - template="../templates/mentoringofferset-success.pt"/> |
91 | - </browser:pages> |
92 | - </facet> |
93 | - <facet |
94 | facet="bugs"> |
95 | <browser:menus |
96 | module="lp.bugs.browser.bug" |
97 | |
98 | === modified file 'lib/lp/bugs/templates/bugtask-index.pt' |
99 | --- lib/lp/bugs/templates/bugtask-index.pt 2009-08-12 11:49:59 +0000 |
100 | +++ lib/lp/bugs/templates/bugtask-index.pt 2009-09-14 12:19:55 +0000 |
101 | @@ -393,26 +393,6 @@ |
102 | </tal:comment-list-truncated> |
103 | </tal:comments> |
104 | |
105 | - <div id="mentoring" style="margin-top: 4em"> |
106 | - <tal:mentors define="mentoring_offers context/bug/mentoring_offers" |
107 | - condition="mentoring_offers"> |
108 | - <p> |
109 | - <b>Mentors:</b> |
110 | - <tal:block repeat="mentoring_offer mentoring_offers"> |
111 | - <a tal:replace="structure mentoring_offer/owner/fmt:link">foobar</a> |
112 | - </tal:block> |
113 | - </p> |
114 | - <tal:block condition="not: context/bug/is_complete"> |
115 | - <div tal:condition="view/userIsMentor" class="actions"> |
116 | - <img class="inlineLinkIcon sprite remove" alt=""/><a href="+retractmentoring">Retract my offer of mentorship</a> |
117 | - </div> |
118 | - </tal:block> |
119 | - </tal:mentors> |
120 | - <p tal:define="link context_menu/offermentoring" |
121 | - tal:condition="link/enabled" |
122 | - tal:content="structure link/render" |
123 | - /> |
124 | - </div> |
125 | <div class="related"> |
126 | <h2>What next?</h2> |
127 | <ul> |
128 | |
129 | === removed file 'lib/lp/bugs/templates/canbementored-mentoringoffer.pt' |
130 | --- lib/lp/bugs/templates/canbementored-mentoringoffer.pt 2009-07-17 17:59:07 +0000 |
131 | +++ lib/lp/bugs/templates/canbementored-mentoringoffer.pt 1970-01-01 00:00:00 +0000 |
132 | @@ -1,34 +0,0 @@ |
133 | -<html |
134 | - xmlns="http://www.w3.org/1999/xhtml" |
135 | - xmlns:tal="http://xml.zope.org/namespaces/tal" |
136 | - xmlns:metal="http://xml.zope.org/namespaces/metal" |
137 | - xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
138 | - xml:lang="en" |
139 | - lang="en" |
140 | - dir="ltr" |
141 | - metal:use-macro="context/@@main_template/master" |
142 | - i18n:domain="launchpad" |
143 | -> |
144 | - |
145 | -<body> |
146 | - |
147 | -<div metal:fill-slot="main"> |
148 | - |
149 | - <div tal:content="structure context/fmt:link" /> |
150 | - <h1>Offer to mentor this work</h1> |
151 | - |
152 | - <div metal:use-macro="context/@@launchpad_form/form"> |
153 | - |
154 | - <p metal:fill-slot="extra_info" class="documentDescription"> |
155 | - Select the team which would most benefit from this work being |
156 | - completed. People wishing to join this team will be able to see your |
157 | - offer in a list of similar ones, and thus be able to prove their |
158 | - suitability for team membership more efficiently. |
159 | - </p> |
160 | - |
161 | - </div> |
162 | - |
163 | -</div> |
164 | - |
165 | -</body> |
166 | -</html> |
167 | |
168 | === removed file 'lib/lp/bugs/templates/canbementored-retractmentoring.pt' |
169 | --- lib/lp/bugs/templates/canbementored-retractmentoring.pt 2009-07-17 17:59:07 +0000 |
170 | +++ lib/lp/bugs/templates/canbementored-retractmentoring.pt 1970-01-01 00:00:00 +0000 |
171 | @@ -1,43 +0,0 @@ |
172 | -<html |
173 | - xmlns="http://www.w3.org/1999/xhtml" |
174 | - xmlns:tal="http://xml.zope.org/namespaces/tal" |
175 | - xmlns:metal="http://xml.zope.org/namespaces/metal" |
176 | - xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
177 | - xml:lang="en" |
178 | - lang="en" |
179 | - dir="ltr" |
180 | - metal:use-macro="context/@@main_template/master" |
181 | - i18n:domain="launchpad" |
182 | -> |
183 | - |
184 | -<body> |
185 | - |
186 | -<div metal:fill-slot="main"> |
187 | - |
188 | - <div tal:content="structure context/fmt:link" /> |
189 | - |
190 | - <tal:are_mentor condition="view/userIsMentor"> |
191 | - <div metal:use-macro="context/@@launchpad_form/form"> |
192 | - |
193 | - <p metal:fill-slot="extra_info" class="documentDescription"> |
194 | - When you retract your offer of mentoring, it will disappear |
195 | - immediately from both project and team mentorship listings. |
196 | - </p> |
197 | - |
198 | - </div> |
199 | - </tal:are_mentor> |
200 | - |
201 | - <tal:not_mentor condition="not: view/userIsMentor"> |
202 | - |
203 | - <h1>You have not offered to mentor this work</h1> |
204 | - |
205 | - <p> |
206 | - You cannot retract an offer you have not yet made. |
207 | - </p> |
208 | - |
209 | - </tal:not_mentor> |
210 | - |
211 | -</div> |
212 | - |
213 | -</body> |
214 | -</html> |
215 | |
216 | === removed file 'lib/lp/bugs/templates/hasmentoringoffers-mentoring.pt' |
217 | --- lib/lp/bugs/templates/hasmentoringoffers-mentoring.pt 2009-07-17 17:59:07 +0000 |
218 | +++ lib/lp/bugs/templates/hasmentoringoffers-mentoring.pt 1970-01-01 00:00:00 +0000 |
219 | @@ -1,142 +0,0 @@ |
220 | -<html |
221 | - xmlns="http://www.w3.org/1999/xhtml" |
222 | - xmlns:tal="http://xml.zope.org/namespaces/tal" |
223 | - xmlns:metal="http://xml.zope.org/namespaces/metal" |
224 | - xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
225 | - xml:lang="en" |
226 | - lang="en" |
227 | - dir="ltr" |
228 | - metal:use-macro="view/macro:page/onecolumn" |
229 | - i18n:domain="launchpad" |
230 | -> |
231 | - |
232 | -<body> |
233 | - |
234 | -<div metal:fill-slot="help"> |
235 | - <p> |
236 | - Launchpad lets you keep track of offers of mentorship from members of |
237 | - your community. Anybody who is a member of a team can offer to mentor |
238 | - work on a bug or a blueprint. Launchpad then keeps track of those |
239 | - offers, and you can use its listings as a convenient starting place for |
240 | - new contributors. |
241 | - </p> |
242 | - |
243 | - <p> |
244 | - Read the |
245 | - <a href="https://help.launchpad.net/MentoringManagement/">mentoring |
246 | - management documentation</a> for more detailed information. |
247 | - </p> |
248 | -</div> |
249 | - |
250 | -<metal:leftportlets fill-slot="portlets_one"> |
251 | -</metal:leftportlets> |
252 | - |
253 | -<metal:rightportlets fill-slot="portlets_two"> |
254 | -</metal:rightportlets> |
255 | - |
256 | - |
257 | -<div metal:fill-slot="main"> |
258 | - |
259 | -<h1>Offers of help and mentoring</h1> |
260 | - |
261 | -<tal:def_batch define="batch view/batched_offers; |
262 | - total batch/batch/total"> |
263 | - |
264 | -<tal:mentoring_available condition="total"> |
265 | - |
266 | - <p tal:condition="view/is_pillar"> |
267 | - This list describes bugs and blueprints in |
268 | - <span tal:replace="context/displayname">Mozilla</span> |
269 | - that someone has offered to mentor. If you are a new contributor to |
270 | - <span tal:replace="context/displayname">Mozilla</span> |
271 | - and would like to know how to help, then this is a good place to start. |
272 | - Each of these items is likely to be a bite-sized piece of work which |
273 | - would be well-received by the community, and for which you know you will |
274 | - get good assistance and review. |
275 | - </p> |
276 | - <p tal:condition="view/is_person"> |
277 | - This list describes bugs and blueprints that |
278 | - <span tal:replace="context/displayname">Foo Bar</span> |
279 | - has offered to mentor. |
280 | - </p> |
281 | - <p tal:condition="view/is_team"> |
282 | - This list describes bugs and blueprints which people have offered to |
283 | - mentor. If you would like to join "<span |
284 | - tal:replace="context/title">Foo Bar</span>" then these would be |
285 | - good items to work on - they are likely to be bite-sized and you know |
286 | - who you can approach to discuss the implementation. |
287 | - </p> |
288 | - <p tal:condition="view/is_manager"> |
289 | - This is an overview of all mentorship offers currently outstanding in |
290 | - Launchpad. It shows only offers on incomplete work. You can also see a |
291 | - list of <a href="+success">recent successes</a> - items that are just |
292 | - recently completed and for which mentorship had been offered. |
293 | - </p> |
294 | - |
295 | - <tal:navigation replace="structure batch/@@+navigation-links-upper" /> |
296 | - <table class="listing" id="mentorships"> |
297 | - <thead> |
298 | - <tr> |
299 | - <th tal:condition="view/show_date">When</th> |
300 | - <th tal:condition="view/show_team">For</th> |
301 | - <th tal:condition="view/show_person">By</th> |
302 | - <th tal:condition="view/show_work">What</th> |
303 | - </tr> |
304 | - </thead> |
305 | - <tbody> |
306 | - <tr tal:repeat="offer batch/currentBatch"> |
307 | - <td tal:condition="view/show_date"> |
308 | - <span tal:content="offer/date_created/fmt:approximatedate" |
309 | - tal:attributes="title offer/date_created/fmt:datetime"> |
310 | - 2007-15-13 |
311 | - </span> |
312 | - </td> |
313 | - <td tal:condition="view/show_team"> |
314 | - <a tal:replace="structure offer/team/fmt:link">foobar</a> |
315 | - </td> |
316 | - <td tal:condition="view/show_person"> |
317 | - <a tal:replace="structure offer/owner/fmt:link">foobar</a> |
318 | - </td> |
319 | - <td tal:condition="view/show_work"> |
320 | - <div tal:replace="structure offer/target/@@+listing-column" /> |
321 | - </td> |
322 | - </tr> |
323 | - </tbody> |
324 | - </table> |
325 | - <tal:navigation replace="structure batch/@@+navigation-links-lower" /> |
326 | - |
327 | -</tal:mentoring_available> |
328 | - |
329 | -<tal:no_mentoring condition="not: total"> |
330 | - <p tal:condition="not:view/is_person"> |
331 | - Nobody has yet offered to mentor work for |
332 | - <span tal:replace="context/displayname">Mozilla</span>. |
333 | - </p> |
334 | - <p tal:condition="view/is_person"> |
335 | - <span tal:replace="context/title" /> has not offered to mentor work on |
336 | - any bugs or blueprints. |
337 | - </p> |
338 | - |
339 | - <p> |
340 | - You can <a href="https://help.launchpad.net/MentoringManagement">learn |
341 | - more about this capability in Launchpad</a>, which allows you to |
342 | - create an "onramp" of |
343 | - bite-sized chunks of work for new people who want to contribute or to |
344 | - prove their worth. |
345 | - </p> |
346 | - |
347 | - <p> |
348 | - In summary, you can encourage members of your teams to offer mentoring |
349 | - on bugs and blueprints that they know how to fix or implement, but which |
350 | - they don't have time to get to personally. This list then makes a good |
351 | - starting point for new community members who want to make a contribution |
352 | - but don't know where to start. |
353 | - </p> |
354 | - |
355 | -</tal:no_mentoring> |
356 | - |
357 | -</tal:def_batch> |
358 | -</div> |
359 | - |
360 | -</body> |
361 | -</html> |
362 | |
363 | === removed file 'lib/lp/bugs/templates/mentoringofferset-success.pt' |
364 | --- lib/lp/bugs/templates/mentoringofferset-success.pt 2009-07-17 17:59:07 +0000 |
365 | +++ lib/lp/bugs/templates/mentoringofferset-success.pt 1970-01-01 00:00:00 +0000 |
366 | @@ -1,79 +0,0 @@ |
367 | -<html |
368 | - xmlns="http://www.w3.org/1999/xhtml" |
369 | - xmlns:tal="http://xml.zope.org/namespaces/tal" |
370 | - xmlns:metal="http://xml.zope.org/namespaces/metal" |
371 | - xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
372 | - xml:lang="en" |
373 | - lang="en" |
374 | - dir="ltr" |
375 | - metal:use-macro="context/@@main_template/master" |
376 | - i18n:domain="launchpad" |
377 | -> |
378 | - |
379 | -<body> |
380 | - |
381 | -<metal:heading fill-slot="pageheading"> |
382 | - <h1>Successful mentorships</h1> |
383 | -</metal:heading> |
384 | - |
385 | -<div metal:fill-slot="main"> |
386 | - |
387 | -<tal:def_offers define=" |
388 | - batch view/batched_successes; |
389 | - offer_count context/recent_completed_mentorships/count"> |
390 | -<tal:mentoring_available condition="offer_count"> |
391 | - |
392 | - <p> |
393 | - This list describes bugs and features in |
394 | - <span tal:replace="context/displayname">Mozilla</span> |
395 | - which have been completed with the help of mentorship. |
396 | - </p> |
397 | - |
398 | - <h2>Mentorships</h2> |
399 | - |
400 | - <tal:navigation replace="structure batch/@@+navigation-links-upper" /> |
401 | - <table class="listing" id="mentorships"> |
402 | - <thead> |
403 | - <tr> |
404 | - <th>Date</th> |
405 | - <th>For</th> |
406 | - <th>By</th> |
407 | - <th>What</th> |
408 | - </tr> |
409 | - </thead> |
410 | - <tbody> |
411 | - <tr tal:repeat="offer batch/currentBatch"> |
412 | - <td> |
413 | - <span tal:content="offer/date_created/fmt:date" |
414 | - tal:attributes="title offer/date_created/fmt:time"> |
415 | - 2007-15-13 |
416 | - </span> |
417 | - </td> |
418 | - <td> |
419 | - <a tal:replace="structure offer/team/fmt:link">foobar</a> |
420 | - </td> |
421 | - <td> |
422 | - <a tal:replace="structure offer/owner/fmt:link">foobar</a> |
423 | - </td> |
424 | - <td> |
425 | - <div tal:replace="structure offer/target/@@+listing-column" /> |
426 | - </td> |
427 | - </tr> |
428 | - </tbody> |
429 | - </table> |
430 | - <tal:navigation replace="structure batch/@@+navigation-links-lower" /> |
431 | - |
432 | -</tal:mentoring_available> |
433 | - |
434 | -<tal:no_mentoring condition="not: offer_count"> |
435 | - <p> |
436 | - Nobody has yet completed any bug fixes or feature implementations |
437 | - in <span tal:replace="context/displayname">Mozilla</span> with the help |
438 | - of mentorship. |
439 | - </p> |
440 | -</tal:no_mentoring> |
441 | -</tal:def_offers> |
442 | - |
443 | -</div> |
444 | -</body> |
445 | -</html> |
446 | |
447 | === modified file 'lib/lp/registry/browser/configure.zcml' |
448 | --- lib/lp/registry/browser/configure.zcml 2009-09-12 01:57:22 +0000 |
449 | +++ lib/lp/registry/browser/configure.zcml 2009-09-14 12:55:10 +0000 |
450 | @@ -751,12 +751,10 @@ |
451 | PersonSetActionNavigationMenu |
452 | PersonSetContextMenu |
453 | PersonSpecsMenu |
454 | - TeamBugsMenu |
455 | TeamEditMenu |
456 | TeamIndexMenu |
457 | TeamOverviewMenu |
458 | TeamOverviewNavigationMenu |
459 | - TeamSpecsMenu |
460 | "/> |
461 | <browser:menus |
462 | module="lp.registry.browser.menu" |
463 | |
464 | === modified file 'lib/lp/registry/browser/distribution.py' |
465 | --- lib/lp/registry/browser/distribution.py 2009-09-10 18:53:09 +0000 |
466 | +++ lib/lp/registry/browser/distribution.py 2009-09-14 12:55:10 +0000 |
467 | @@ -292,7 +292,7 @@ |
468 | links = ['edit', 'branding', 'driver', 'search', 'allpkgs', 'members', |
469 | 'mirror_admin', 'reassign', 'addseries', 'series', 'milestones', |
470 | 'top_contributors', |
471 | - 'mentorship', 'builds', 'cdimage_mirrors', 'archive_mirrors', |
472 | + 'builds', 'cdimage_mirrors', 'archive_mirrors', |
473 | 'pending_review_mirrors', 'disabled_mirrors', |
474 | 'unofficial_mirrors', 'newmirror', 'announce', 'announcements', |
475 | 'ppas',] |
476 | @@ -322,10 +322,6 @@ |
477 | text = 'More contributors' |
478 | return Link('+topcontributors', text, icon='info') |
479 | |
480 | - def mentorship(self): |
481 | - text = 'Mentoring available' |
482 | - return Link('+mentoring', text, icon='info') |
483 | - |
484 | def cdimage_mirrors(self): |
485 | text = 'CD mirrors' |
486 | return Link('+cdmirrors', text, icon='info') |
487 | |
488 | === modified file 'lib/lp/registry/browser/person.py' |
489 | --- lib/lp/registry/browser/person.py 2009-09-12 01:57:22 +0000 |
490 | +++ lib/lp/registry/browser/person.py 2009-09-14 12:55:10 +0000 |
491 | @@ -82,7 +82,6 @@ |
492 | 'TeamOverviewNavigationMenu', |
493 | 'TeamOverviewMenu', |
494 | 'TeamReassignmentView', |
495 | - 'TeamSpecsMenu', |
496 | 'archive_to_person', |
497 | ] |
498 | |
499 | @@ -719,7 +718,7 @@ |
500 | usedfor = IPerson |
501 | facet = 'bugs' |
502 | links = ['assignedbugs', 'commentedbugs', 'reportedbugs', |
503 | - 'subscribedbugs', 'relatedbugs', 'softwarebugs', 'mentoring'] |
504 | + 'subscribedbugs', 'relatedbugs', 'softwarebugs'] |
505 | |
506 | def relatedbugs(self): |
507 | text = 'List all related bugs' |
508 | @@ -750,13 +749,6 @@ |
509 | % self.context.displayname) |
510 | return Link('+subscribedbugs', text, summary=summary) |
511 | |
512 | - def mentoring(self): |
513 | - text = 'Mentoring offered' |
514 | - summary = ('Lists bugs for which %s has offered to mentor someone.' |
515 | - % self.context.displayname) |
516 | - enabled = bool(self.context.mentoring_offers) |
517 | - return Link('+mentoring', text, enabled=enabled, summary=summary) |
518 | - |
519 | def commentedbugs(self): |
520 | text = 'List commented bugs' |
521 | summary = ('Lists bug reports on which %s has commented.' |
522 | @@ -770,7 +762,7 @@ |
523 | facet = 'specifications' |
524 | links = ['assignee', 'drafter', 'approver', |
525 | 'subscriber', 'registrant', 'feedback', |
526 | - 'workload', 'mentoring'] |
527 | + 'workload'] |
528 | |
529 | def registrant(self): |
530 | text = 'Registrant' |
531 | @@ -804,43 +796,12 @@ |
532 | self.context.displayname) |
533 | return Link('+specfeedback', text, summary, icon='info') |
534 | |
535 | - def mentoring(self): |
536 | - text = 'Mentoring offered' |
537 | - enabled = bool(self.context.mentoring_offers) |
538 | - return Link('+mentoring', text, enabled=enabled, icon='info') |
539 | - |
540 | def workload(self): |
541 | text = 'Workload' |
542 | summary = 'Show all specification work assigned' |
543 | return Link('+specworkload', text, summary, icon='info') |
544 | |
545 | |
546 | -class TeamSpecsMenu(PersonSpecsMenu): |
547 | - |
548 | - usedfor = ITeam |
549 | - facet = 'specifications' |
550 | - |
551 | - def mentoring(self): |
552 | - target = '+mentoring' |
553 | - text = 'Mentoring offered' |
554 | - summary = 'Offers of mentorship for prospective team members' |
555 | - return Link(target, text, summary=summary, icon='info') |
556 | - |
557 | - |
558 | -class TeamBugsMenu(PersonBugsMenu): |
559 | - |
560 | - usedfor = ITeam |
561 | - facet = 'bugs' |
562 | - links = ['assignedbugs', 'relatedbugs', 'softwarebugs', 'subscribedbugs', |
563 | - 'mentorships'] |
564 | - |
565 | - def mentorships(self): |
566 | - target = '+mentoring' |
567 | - text = 'Mentoring offered' |
568 | - summary = 'Offers of mentorship for prospective team members' |
569 | - return Link(target, text, summary=summary, icon='info') |
570 | - |
571 | - |
572 | class CommonMenuLinks: |
573 | |
574 | @property |
575 | @@ -901,9 +862,8 @@ |
576 | 'editemailaddresses', 'editlanguages', 'editwikinames', |
577 | 'editircnicknames', 'editjabberids', 'editpassword', |
578 | 'editsshkeys', 'editpgpkeys', 'editlocation', 'memberships', |
579 | - 'mentoringoffers', 'codesofconduct', 'karma', |
580 | - 'administer', 'projects', 'activate_ppa', 'maintained', |
581 | - 'view_ppa_subscriptions'] |
582 | + 'codesofconduct', 'karma', 'administer', 'projects', |
583 | + 'activate_ppa', 'maintained', 'view_ppa_subscriptions'] |
584 | |
585 | @enabled_with_permission('launchpad.Edit') |
586 | def edit(self): |
587 | @@ -972,12 +932,6 @@ |
588 | text = 'Show team participation' |
589 | return Link(target, text, icon='info') |
590 | |
591 | - def mentoringoffers(self): |
592 | - target = '+mentoring' |
593 | - text = 'Mentoring offered' |
594 | - enabled = bool(self.context.mentoring_offers) |
595 | - return Link(target, text, enabled=enabled, icon='info') |
596 | - |
597 | @enabled_with_permission('launchpad.Special') |
598 | def editsshkeys(self): |
599 | target = '+editsshkeys' |
600 | @@ -1199,12 +1153,6 @@ |
601 | text = 'Show team participation' |
602 | return Link(target, text, icon='info') |
603 | |
604 | - def mentorships(self): |
605 | - target = '+mentoring' |
606 | - text = 'Mentoring available' |
607 | - summary = 'Offers of mentorship for prospective team members' |
608 | - return Link(target, text, summary=summary, icon='info') |
609 | - |
610 | @enabled_with_permission('launchpad.View') |
611 | def mugshots(self): |
612 | target = '+mugshots' |
613 | @@ -1296,7 +1244,7 @@ |
614 | 'memberships', 'received_invitations', |
615 | 'editemail', 'configure_mailing_list', 'moderate_mailing_list', |
616 | 'editlanguages', 'map', 'polls', |
617 | - 'add_poll', 'join', 'leave', 'add_my_teams', 'mentorships', |
618 | + 'add_poll', 'join', 'leave', 'add_my_teams', |
619 | 'reassign', 'projects', 'activate_ppa', 'maintained', 'ppa'] |
620 | |
621 | |
622 | |
623 | === modified file 'lib/lp/registry/browser/product.py' |
624 | --- lib/lp/registry/browser/product.py 2009-09-08 12:30:13 +0000 |
625 | +++ lib/lp/registry/browser/product.py 2009-09-14 12:55:10 +0000 |
626 | @@ -377,7 +377,6 @@ |
627 | 'edit', |
628 | 'reassign', |
629 | 'top_contributors', |
630 | - 'mentorship', |
631 | 'distributions', |
632 | 'packages', |
633 | 'series', |
634 | @@ -399,10 +398,6 @@ |
635 | text = 'Packaging information' |
636 | return Link('+distributions', text, icon='info') |
637 | |
638 | - def mentorship(self): |
639 | - text = 'Mentoring available' |
640 | - return Link('+mentoring', text, icon='info') |
641 | - |
642 | def packages(self): |
643 | text = 'Show distribution packages' |
644 | return Link('+packages', text, icon='info') |
645 | |
646 | === modified file 'lib/lp/registry/browser/project.py' |
647 | --- lib/lp/registry/browser/project.py 2009-09-04 02:20:59 +0000 |
648 | +++ lib/lp/registry/browser/project.py 2009-09-14 12:55:10 +0000 |
649 | @@ -189,7 +189,7 @@ |
650 | usedfor = IProject |
651 | facet = 'overview' |
652 | links = [ |
653 | - 'branding', 'driver', 'reassign', 'top_contributors', 'mentorship', |
654 | + 'branding', 'driver', 'reassign', 'top_contributors', |
655 | 'announce', 'announcements', 'branch_visibility', 'rdf', |
656 | 'new_product', 'administer', 'milestones'] |
657 | |
658 | @@ -202,15 +202,6 @@ |
659 | text = 'More contributors' |
660 | return Link('+topcontributors', text, icon='info') |
661 | |
662 | - def mentorship(self): |
663 | - text = 'Mentoring available' |
664 | - |
665 | - # We disable this link if the project has no products. This is for |
666 | - # consistency with the way the overview buttons behave in the same |
667 | - # circumstances. |
668 | - return Link('+mentoring', text, icon='info', |
669 | - enabled=self.context.hasProducts()) |
670 | - |
671 | @enabled_with_permission('launchpad.Edit') |
672 | def announce(self): |
673 | text = 'Make announcement' |
674 | |
675 | === removed directory 'lib/lp/registry/stories/mentoring' |
676 | === removed file 'lib/lp/registry/stories/mentoring/mentoring.txt' |
677 | --- lib/lp/registry/stories/mentoring/mentoring.txt 2009-06-12 16:36:02 +0000 |
678 | +++ lib/lp/registry/stories/mentoring/mentoring.txt 1970-01-01 00:00:00 +0000 |
679 | @@ -1,601 +0,0 @@ |
680 | -= Mentorship = |
681 | - |
682 | -Launchpad allows people who are members of a team to offer to mentor anyone |
683 | -implementing a particular bug or blueprint. |
684 | - |
685 | -The menu text, and the links within a page to offer mentoring, should all |
686 | -use standardised text: |
687 | - |
688 | - >>> menu_mentoring_offer = 'Offer mentorship' |
689 | - >>> menu_mentoring_retract = 'Retract mentorship' |
690 | - >>> page_mentoring_offer = 'Offer to mentor someone' |
691 | - >>> page_mentoring_retract = 'Retract my offer of mentorship' |
692 | - |
693 | -You have to be logged in to see the offers of mentoring. Let's try viewing |
694 | -the bug and spec as an anonymous user. We should see neither the page link |
695 | -nor the menu link to offer mentoring. |
696 | - |
697 | - >>> anon_browser.open('http://bugs.launchpad.dev/tomcat/+bug/2') |
698 | - >>> anon_browser.getLink('Offer to mentor someone fixing this bug') |
699 | - Traceback (most recent call last): |
700 | - ... |
701 | - LinkNotFoundError |
702 | - >>> page_mentoring_offer not in anon_browser.contents |
703 | - True |
704 | - >>> anon_browser.open('http://blueprints.launchpad.dev/kubuntu/+spec/cluster-installation') |
705 | - >>> page_mentoring_offer not in anon_browser.contents |
706 | - True |
707 | - |
708 | -However, a person who is a member of any teams should have the ability to |
709 | -offer mentorship. Since they can offer mentorship, they should not be able |
710 | -to retract it at the same time. |
711 | - |
712 | - >>> browser = setupBrowser(auth="Basic one-membership@test.com:test") |
713 | - >>> browser.open('http://bugs.launchpad.dev/tomcat/+bug/2') |
714 | - >>> print browser.getLink(menu_mentoring_offer).url |
715 | - http://bugs.launchpad.dev/tomcat/+bug/2/+mentor |
716 | - >>> page_mentoring_retract in browser.contents |
717 | - False |
718 | - >>> browser.open('http://blueprints.launchpad.dev/kubuntu/+spec/cluster-installation') |
719 | - >>> page_mentoring_offer in browser.contents |
720 | - True |
721 | - >>> page_mentoring_retract in browser.contents |
722 | - False |
723 | - |
724 | -We confirm that a person who is not a member of any teams will not see the |
725 | -ability to offer mentorship: |
726 | - |
727 | - >>> browser = setupBrowser(auth="Basic no-team-memberships@test.com:test") |
728 | - >>> browser.open('http://bugs.launchpad.dev/tomcat/+bug/2') |
729 | - >>> page_mentoring_offer in browser.contents |
730 | - False |
731 | - >>> browser.open('http://blueprints.launchpad.dev/kubuntu/+spec/cluster-installation') |
732 | - >>> page_mentoring_offer in browser.contents |
733 | - False |
734 | - |
735 | - |
736 | -We should never see the ability to offer mentorship when the bug or |
737 | -spec is complete. For the bug, we will just take a look at Bug #8 which is |
738 | -complete. |
739 | - |
740 | - >>> browser = setupBrowser(auth="Basic one-membership@test.com:test") |
741 | - >>> browser.open('http://bugs.launchpad.dev/tomcat/+bug/8') |
742 | - >>> browser.getLink(menu_mentoring_offer) |
743 | - Traceback (most recent call last): |
744 | - ... |
745 | - LinkNotFoundError |
746 | - >>> page_mentoring_offer in browser.contents |
747 | - False |
748 | - |
749 | -Now let's look at a spec which is complete: |
750 | - |
751 | - >>> browser.open('http://blueprints.launchpad.dev/kubuntu/+spec/thinclient-local-devices') |
752 | - >>> page_mentoring_offer in browser.contents |
753 | - False |
754 | - |
755 | - |
756 | -In the case of bugs, we should not be able to offer mentorship on a bug |
757 | -which is a duplicate: |
758 | - |
759 | - >>> browser.open('http://bugs.launchpad.dev/tomcat/+bug/6') |
760 | - >>> browser.getLink(menu_mentoring_offer) |
761 | - Traceback (most recent call last): |
762 | - ... |
763 | - LinkNotFoundError |
764 | - >>> page_mentoring_offer in browser.contents |
765 | - False |
766 | - |
767 | -== Making offers of mentorship == |
768 | - |
769 | -So, we have established that a person who is a team member can offer |
770 | -membership in the right bugs and specs. Let's make sure those pages work all |
771 | -right. |
772 | - |
773 | -First, we will make an offer of mentorship on a bug. |
774 | - |
775 | - >>> browser = setupBrowser(auth="Basic one-membership@test.com:test") |
776 | - >>> browser.open('http://bugs.launchpad.dev/tomcat/+bug/2') |
777 | - >>> browser.getLink(menu_mentoring_offer).click() |
778 | - >>> print browser.url |
779 | - http://bugs.launchpad.dev/tomcat/+bug/2/+mentor |
780 | - >>> print browser.title |
781 | - Offer to mentor this work |
782 | - >>> browser.getControl('Offer Mentoring').click() |
783 | - >>> print browser.url |
784 | - http://bugs.launchpad.dev/tomcat/+bug/2 |
785 | - >>> 'Blackhole Trash folder' in browser.title |
786 | - True |
787 | - |
788 | -We should see the listing of mentors, now: |
789 | - |
790 | - >>> 'Mentors:' in browser.contents |
791 | - True |
792 | - |
793 | -And most importantly, we should no longer be able to offer mentoring on this |
794 | -bug, because we are ALREADY a mentor! |
795 | - |
796 | - >>> browser.getLink(menu_mentoring_offer) |
797 | - Traceback (most recent call last): |
798 | - ... |
799 | - LinkNotFoundError |
800 | - >>> page_mentoring_offer not in browser.contents |
801 | - True |
802 | - |
803 | -Similarly, because we are now a mentor, we should see a menu and page link |
804 | -which allow us to retract this offer of mentorship. |
805 | - |
806 | - >>> print browser.getLink('Retract my offer of mentorship').url |
807 | - http://bugs.launchpad.dev/tomcat/+bug/2/+retractmentoring |
808 | - >>> page_mentoring_retract in browser.contents |
809 | - True |
810 | - |
811 | -However, somebody ELSE should still be able to offer mentoring, and not yet |
812 | -retract mentoring: |
813 | - |
814 | - >>> browser = setupBrowser(auth="Basic test@canonical.com:test") |
815 | - >>> browser.open('http://bugs.launchpad.dev/tomcat/+bug/2') |
816 | - >>> print browser.getLink(menu_mentoring_offer).url |
817 | - http://bugs.launchpad.dev/tomcat/+bug/2/+mentor |
818 | - >>> browser.getLink('Retract my offer of mentorship') |
819 | - Traceback (most recent call last): |
820 | - ... |
821 | - LinkNotFoundError |
822 | - >>> page_mentoring_retract in browser.contents |
823 | - False |
824 | - |
825 | -Now, let's repeat the whole exercise with a Blueprint. |
826 | - |
827 | - >>> browser = setupBrowser(auth="Basic one-membership@test.com:test") |
828 | - >>> browser.open('http://blueprints.launchpad.dev/kubuntu/+spec/cluster-installation') |
829 | - >>> browser.getLink('Offer to mentor someone implementing this blueprint').click() |
830 | - >>> print browser.title |
831 | - Offer to mentor this work |
832 | - >>> back_link = browser.getLink('Facilitate mass installs') |
833 | - >>> back_link.url |
834 | - 'http://blueprints.launchpad.dev/kubuntu/+spec/cluster-installation' |
835 | - >>> browser.getControl('Offer Mentoring').click() |
836 | - >>> 'Facilitate mass installs' in browser.title |
837 | - True |
838 | - |
839 | -We should see the listing of mentors, now: |
840 | - |
841 | - >>> 'Mentors:' in browser.contents |
842 | - True |
843 | - |
844 | -And most importantly, we should no longer be able to offer mentoring on this |
845 | -Blueprint, because we are ALREADY a mentor! |
846 | - |
847 | - >>> 'Offer to mentor someone implementing this blueprint' not in browser.contents |
848 | - True |
849 | - |
850 | -Similarly, because we are now a mentor, we should see a menu and page link |
851 | -which allow us to retract this offer of mentorship. |
852 | - |
853 | - >>> 'Retract my offer of mentorship' in browser.contents |
854 | - True |
855 | - |
856 | -However, somebody ELSE should still be able to offer mentoring, and not yet |
857 | -retract mentoring: |
858 | - |
859 | - >>> browser = setupBrowser(auth="Basic test@canonical.com:test") |
860 | - >>> browser.open('http://blueprints.launchpad.dev/kubuntu/+spec/cluster-installation') |
861 | - >>> 'Offer to mentor someone implementing' in browser.contents |
862 | - True |
863 | - >>> 'Retract my offer of mentorship' in browser.contents |
864 | - False |
865 | - |
866 | - |
867 | -== Mentorship Listings == |
868 | - |
869 | -OK, now we have a bunch of mentorships in the system. Let's make sure all |
870 | -the listing pages are working. |
871 | - |
872 | -First, any offers should show up on the page of the person making the offer. |
873 | - |
874 | - >>> anon_browser.open('http://launchpad.dev/~one-membership/+mentoring') |
875 | - >>> print anon_browser.title |
876 | - Mentoring offered by One Membership |
877 | - >>> 'Blackhole Trash folder' in anon_browser.contents |
878 | - True |
879 | - >>> 'cluster-installation' in anon_browser.contents |
880 | - True |
881 | - |
882 | -They should also show up on the page for the team which is the beneficiary |
883 | -of this mentorship. |
884 | - |
885 | - >>> anon_browser.open('http://launchpad.dev/~simple-team/+mentoring') |
886 | - >>> print anon_browser.title |
887 | - Mentoring available for newcomers to Simple Team |
888 | - >>> 'Blackhole Trash folder' in anon_browser.contents |
889 | - True |
890 | - >>> 'cluster-installation' in anon_browser.contents |
891 | - True |
892 | - |
893 | - |
894 | -There is also a listing of mentorships available for a product: |
895 | - |
896 | - >>> anon_browser.open('http://launchpad.dev/tomcat/+mentoring') |
897 | - >>> print anon_browser.title |
898 | - Mentoring available in Tomcat |
899 | - >>> 'Blackhole Trash folder' in anon_browser.contents |
900 | - True |
901 | - |
902 | -And for a project: |
903 | - |
904 | - >>> anon_browser.open('http://launchpad.dev/apache/+mentoring') |
905 | - >>> print anon_browser.title |
906 | - Mentoring available in Apache |
907 | - >>> 'Blackhole Trash folder' in anon_browser.contents |
908 | - True |
909 | - |
910 | -And for a distribution |
911 | - |
912 | - >>> anon_browser.open('http://launchpad.dev/kubuntu/+mentoring') |
913 | - >>> print anon_browser.title |
914 | - Mentoring available in Kubuntu |
915 | - >>> 'cluster-installation' in anon_browser.contents |
916 | - True |
917 | - |
918 | - |
919 | -We also have the special Mentorship Manager. This is only acessible to |
920 | -launchpad Admins: |
921 | - |
922 | - >>> user_browser.open('http://launchpad.dev/+mentoring/') |
923 | - Traceback (most recent call last): |
924 | - ... |
925 | - Unauthorized:... |
926 | - |
927 | - |
928 | -When we login as an admin, we can see listed here all the outstanding |
929 | -mentorship offers: |
930 | - |
931 | - >>> admin_browser.open('http://launchpad.dev/+mentoring/') |
932 | - >>> print admin_browser.title |
933 | - Mentoring available in the Launchpad Mentorship Manager |
934 | - >>> 'Blackhole Trash folder' in admin_browser.contents |
935 | - True |
936 | - >>> 'cluster-installation' in admin_browser.contents |
937 | - True |
938 | - |
939 | - |
940 | -== Mentorships on private bugs == |
941 | - |
942 | -When a bug for which mentoring was offered is marked private, it |
943 | -will no longer show up on any of these listings. |
944 | - |
945 | -We are going to now poke into the back of the db's head, and "privatise" the |
946 | -bug we have been using. |
947 | - |
948 | - >>> from canonical.launchpad.interfaces import ( |
949 | - ... BugTaskStatus, IPersonSet, IBugSet, IDistributionSet, ILaunchBag) |
950 | - >>> from canonical.launchpad.ftests import login, logout, syncUpdate |
951 | - >>> from canonical.database.sqlbase import flush_database_updates |
952 | - >>> login('foo.bar@canonical.com') |
953 | - >>> from zope.component import getUtility |
954 | - >>> distroset = getUtility(IDistributionSet) |
955 | - >>> personset = getUtility(IPersonSet) |
956 | - >>> bugset = getUtility(IBugSet) |
957 | - >>> foo_bar = personset.getByEmail('foo.bar@canonical.com') |
958 | - >>> kubuntu = distroset.getByName('kubuntu') |
959 | - >>> bug_2 = bugset.get(2) |
960 | - >>> bug_2.private |
961 | - False |
962 | - >>> bug_2.setPrivate(True, getUtility(ILaunchBag).user) |
963 | - True |
964 | - >>> syncUpdate(bug_2) |
965 | - >>> bug_2.private |
966 | - True |
967 | - >>> logout() |
968 | - |
969 | -Right, brain surgery completed. The bug is now private. |
970 | - |
971 | -This bug should not show in the "mentorship available" listing: |
972 | - |
973 | - >>> admin_browser.open('http://launchpad.dev/+mentoring') |
974 | - >>> print admin_browser.title |
975 | - Mentoring available in the Launchpad Mentorship Manager |
976 | - >>> 'Blackhole Trash folder' in admin_browser.contents |
977 | - False |
978 | - |
979 | - #>>> 'cluster-installation' in admin_browser.contents |
980 | - #False |
981 | - |
982 | -Nor in any of the listings which previously showed the bug: |
983 | - |
984 | - >>> anon_browser.open('http://launchpad.dev/~one-membership/+mentoring') |
985 | - >>> print anon_browser.title |
986 | - Mentoring offered by One Membership |
987 | - >>> 'Blackhole Trash folder' in anon_browser.contents |
988 | - False |
989 | - |
990 | - #>>> 'cluster-installation' in anon_browser.contents |
991 | - #False |
992 | - |
993 | -Including on the page for the team which is the beneficiary |
994 | -of this mentorship. |
995 | - |
996 | - >>> anon_browser.open('http://launchpad.dev/~simple-team/+mentoring') |
997 | - >>> print anon_browser.title |
998 | - Mentoring available for newcomers to Simple Team |
999 | - >>> 'Blackhole Trash folder' in anon_browser.contents |
1000 | - False |
1001 | - |
1002 | - #>>> 'cluster-installation' in anon_browser.contents |
1003 | - #False |
1004 | - |
1005 | -Or the listing of mentorships available for a product: |
1006 | - |
1007 | - >>> anon_browser.open('http://launchpad.dev/tomcat/+mentoring') |
1008 | - >>> print anon_browser.title |
1009 | - Mentoring available in Tomcat |
1010 | - >>> 'Blackhole Trash folder' in anon_browser.contents |
1011 | - False |
1012 | - |
1013 | -Or for a project: |
1014 | - |
1015 | - >>> anon_browser.open('http://launchpad.dev/apache/+mentoring') |
1016 | - >>> print anon_browser.title |
1017 | - Mentoring available in Apache |
1018 | - >>> 'Blackhole Trash folder' in anon_browser.contents |
1019 | - False |
1020 | - |
1021 | -Or for a distribution: |
1022 | - |
1023 | - >>> anon_browser.open('http://launchpad.dev/debian/+mentoring') |
1024 | - >>> print anon_browser.title |
1025 | - Mentoring available in Debian |
1026 | - >>> 'Blackhole Trash folder' in anon_browser.contents |
1027 | - False |
1028 | - |
1029 | -Let's make this bug public again: |
1030 | - |
1031 | - >>> login('foo.bar@canonical.com') |
1032 | - >>> bug_2.setPrivate(False, getUtility(ILaunchBag).user) |
1033 | - True |
1034 | - >>> syncUpdate(bug_2) |
1035 | - >>> bug_2.private |
1036 | - False |
1037 | - >>> logout() |
1038 | - |
1039 | -== Completed mentorships == |
1040 | - |
1041 | -When a bug or blueprint, for which mentoring was offered, is complete, it |
1042 | -will no longer show up on any of these listings except for the "recent |
1043 | -successes" list (if the mentorship was offered less than a year ago). |
1044 | - |
1045 | -We are going to now poke into the back of the db's head, and "complete" the |
1046 | -bug and the blueprint we have been using. |
1047 | - |
1048 | - >>> from canonical.launchpad.interfaces import ( |
1049 | - ... ILaunchBag, SpecificationImplementationStatus) |
1050 | - >>> login('foo.bar@canonical.com') |
1051 | - >>> spec_1 = kubuntu.getSpecification('cluster-installation') |
1052 | - >>> bug_2.is_complete |
1053 | - False |
1054 | - >>> spec_1.is_complete |
1055 | - False |
1056 | - >>> for task in bug_2.bugtasks: |
1057 | - ... if task.conjoined_master is None: |
1058 | - ... task.transitionToStatus( |
1059 | - ... BugTaskStatus.FIXRELEASED, getUtility(ILaunchBag).user) |
1060 | - >>> flush_database_updates() |
1061 | - >>> bug_2.is_complete |
1062 | - True |
1063 | - >>> spec_1.implementation_status = \ |
1064 | - ... SpecificationImplementationStatus.IMPLEMENTED |
1065 | - >>> newstate = spec_1.updateLifecycleStatus(foo_bar) |
1066 | - >>> syncUpdate(spec_1) |
1067 | - >>> spec_1.is_complete |
1068 | - True |
1069 | - >>> logout() |
1070 | - |
1071 | -Right, brain surgery completed. The spec and the bug are now complete. |
1072 | - |
1073 | -So, first, these completed items should show up in the Mentorship Manager's |
1074 | -"recent successes" listing: |
1075 | - |
1076 | - >>> admin_browser.open('http://launchpad.dev/+mentoring/+success') |
1077 | - >>> print admin_browser.title |
1078 | - Successful mentorships over the past year. |
1079 | - >>> 'Blackhole Trash folder' in admin_browser.contents |
1080 | - True |
1081 | - >>> 'cluster-installation' in admin_browser.contents |
1082 | - True |
1083 | - |
1084 | -But not in the "mentorship available" listing: |
1085 | - |
1086 | - >>> admin_browser.open('http://launchpad.dev/+mentoring') |
1087 | - >>> print admin_browser.title |
1088 | - Mentoring available in the Launchpad Mentorship Manager |
1089 | - >>> 'Blackhole Trash folder' in admin_browser.contents |
1090 | - False |
1091 | - >>> 'cluster-installation' in admin_browser.contents |
1092 | - False |
1093 | - |
1094 | -Nor in any of the listings which previously showed these items: |
1095 | - |
1096 | - >>> anon_browser.open('http://launchpad.dev/~one-membership/+mentoring') |
1097 | - >>> print anon_browser.title |
1098 | - Mentoring offered by One Membership |
1099 | - >>> 'Blackhole Trash folder' in anon_browser.contents |
1100 | - False |
1101 | - >>> 'cluster-installation' in anon_browser.contents |
1102 | - False |
1103 | - |
1104 | -They should also show up on the page for the team which is the beneficiary |
1105 | -of this mentorship. |
1106 | - |
1107 | - >>> anon_browser.open('http://launchpad.dev/~simple-team/+mentoring') |
1108 | - >>> print anon_browser.title |
1109 | - Mentoring available for newcomers to Simple Team |
1110 | - >>> 'Blackhole Trash folder' in anon_browser.contents |
1111 | - False |
1112 | - >>> 'cluster-installation' in anon_browser.contents |
1113 | - False |
1114 | - |
1115 | - |
1116 | -There is also a listing of mentorships available for a product: |
1117 | - |
1118 | - >>> anon_browser.open('http://launchpad.dev/tomcat/+mentoring') |
1119 | - >>> print anon_browser.title |
1120 | - Mentoring available in Tomcat |
1121 | - >>> 'Blackhole Trash folder' in anon_browser.contents |
1122 | - False |
1123 | - |
1124 | -And for a project: |
1125 | - |
1126 | - >>> anon_browser.open('http://launchpad.dev/apache/+mentoring') |
1127 | - >>> print anon_browser.title |
1128 | - Mentoring available in Apache |
1129 | - >>> 'Blackhole Trash folder' in anon_browser.contents |
1130 | - False |
1131 | - |
1132 | -And for a distribution |
1133 | - |
1134 | - >>> anon_browser.open('http://launchpad.dev/kubuntu/+mentoring') |
1135 | - >>> print anon_browser.title |
1136 | - Mentoring available in Kubuntu |
1137 | - >>> 'cluster-installation' in anon_browser.contents |
1138 | - False |
1139 | - |
1140 | -== Retraction of mentoring == |
1141 | - |
1142 | -When an item is complete, the mentors will still be listed but you cannot |
1143 | -retract mentoring that you have offered. |
1144 | - |
1145 | - >>> browser = setupBrowser(auth="Basic one-membership@test.com:test") |
1146 | - >>> browser.open('http://blueprints.launchpad.dev/kubuntu/+spec/cluster-installation') |
1147 | - >>> 'Mentors:' in browser.contents |
1148 | - True |
1149 | - >>> 'Retract my offer of mentorship' in browser.contents |
1150 | - False |
1151 | - >>> browser.open('http://bugs.launchpad.dev/tomcat/+bug/2') |
1152 | - >>> 'Mentors:' in browser.contents |
1153 | - True |
1154 | - >>> browser.getLink('Retract my offer of mentorship') |
1155 | - Traceback (most recent call last): |
1156 | - ... |
1157 | - LinkNotFoundError |
1158 | - >>> page_mentoring_retract in browser.contents |
1159 | - False |
1160 | - |
1161 | - |
1162 | -Finally, though, we do want to test the retraction mechanism, so we will |
1163 | -re-open the bug and change the state of the spec so that neither is |
1164 | -complete. This should allow us to retract our offer of mentoring in both |
1165 | -cases. |
1166 | - |
1167 | - >>> login('foo.bar@canonical.com') |
1168 | - >>> for task in bug_2.bugtasks: |
1169 | - ... if task.conjoined_master is None: |
1170 | - ... task.transitionToStatus( |
1171 | - ... BugTaskStatus.CONFIRMED, getUtility(ILaunchBag).user) |
1172 | - >>> flush_database_updates() |
1173 | - >>> bug_2.is_complete |
1174 | - False |
1175 | - >>> spec_1.implementation_status = \ |
1176 | - ... SpecificationImplementationStatus.NOTSTARTED |
1177 | - >>> newstate = spec_1.updateLifecycleStatus(foo_bar) |
1178 | - >>> syncUpdate(spec_1) |
1179 | - >>> spec_1.is_complete |
1180 | - False |
1181 | - >>> logout() |
1182 | - |
1183 | - |
1184 | -Right. Let's retract the offer of mentorship from the specification. It |
1185 | -should take us back to the blueprint page, and we should be able to offer |
1186 | -mentoring again. |
1187 | - |
1188 | - >>> browser = setupBrowser(auth="Basic one-membership@test.com:test") |
1189 | - >>> browser.open('http://blueprints.launchpad.dev/kubuntu/+spec/cluster-installation') |
1190 | - >>> browser.getLink('Retract my offer of mentorship').click() |
1191 | - >>> print browser.title |
1192 | - Retract offer of mentorship |
1193 | - >>> back_link = browser.getLink('Facilitate mass installs') |
1194 | - >>> back_link.url |
1195 | - 'http://blueprints.launchpad.dev/kubuntu/+spec/cluster-installation' |
1196 | - >>> browser.getControl('Retract Mentoring').click() |
1197 | - >>> 'Facilitate mass installs' in browser.title |
1198 | - True |
1199 | - >>> 'Offer to mentor someone implementing' in browser.contents |
1200 | - True |
1201 | - |
1202 | -And finally let's do it on the bug. |
1203 | - |
1204 | - >>> browser.open('http://bugs.launchpad.dev/tomcat/+bug/2') |
1205 | - >>> browser.getLink('Retract my offer of mentorship').click() |
1206 | - >>> print browser.title |
1207 | - Retract offer of mentorship |
1208 | - >>> browser.getControl('Retract Mentoring').click() |
1209 | - >>> 'Blackhole Trash folder' in browser.title |
1210 | - True |
1211 | - >>> print browser.getLink(menu_mentoring_offer).url |
1212 | - http://bugs.launchpad.dev/tomcat/+bug/2/+mentor |
1213 | - |
1214 | - |
1215 | -Subscribing when offering mentorship |
1216 | -==================================== |
1217 | - |
1218 | -When you offer to mentor some work, you are offered the option to subscribe |
1219 | -to that bug or blueprint. We will demonstrate this in action. |
1220 | - |
1221 | - >>> browser = setupBrowser(auth="Basic one-membership@test.com:test") |
1222 | - >>> browser.open('http://blueprints.launchpad.dev/kubuntu/+spec/cluster-installation') |
1223 | - |
1224 | -First we show that 'One Membership' is not initially a subscriber to the |
1225 | -blueprint: |
1226 | - |
1227 | - >>> subs = find_portlet(browser.contents, 'Subscribers') |
1228 | - >>> print subs |
1229 | - None |
1230 | - |
1231 | -Now we offer mentoring, and along the way we request to be subscribed: |
1232 | - |
1233 | - >>> browser.getLink('Offer to mentor someone implementing this blueprint').click() |
1234 | - >>> browser.getControl(name='field.subscription_request').value = True |
1235 | - >>> browser.getControl('Offer Mentoring').click() |
1236 | - >>> browser.url |
1237 | - 'http://blueprints.launchpad.dev/kubuntu/+spec/cluster-installation' |
1238 | - |
1239 | -And now 'One Membership' is a subscriber: |
1240 | - |
1241 | - >>> subscribers = find_tags_by_class(browser.contents, 'subscriber') |
1242 | - >>> for subscriber in subscribers: |
1243 | - ... a_tags = subscriber.findAll('a') |
1244 | - ... img = a_tags[0].first('img') |
1245 | - ... print img['src'], |
1246 | - ... print a_tags[1].string |
1247 | - /@@/subscriber-inessential One Membership |
1248 | - |
1249 | - |
1250 | - |
1251 | -Now let's do the same with a bug. |
1252 | - |
1253 | - >>> browser = setupBrowser(auth="Basic one-membership@test.com:test") |
1254 | - >>> browser.open('http://bugs.launchpad.dev/ubuntu/+source/linux-source-2.6.15/+bug/10') |
1255 | - |
1256 | -First we show that 'One Membership' is not initially a subscriber to the |
1257 | -bug: |
1258 | - |
1259 | - >>> from lp.bugs.tests.bug import print_direct_subscribers |
1260 | - |
1261 | - >>> browser.open('http://launchpad.dev/bugs/10/+bug-portlet-subscribers-content') |
1262 | - >>> print_direct_subscribers(browser.contents) |
1263 | - Foo Bar (Subscribed by Launchpad Janitor) |
1264 | - |
1265 | -Now we offer mentoring, and along the way we request to be subscribed: |
1266 | - |
1267 | - >>> browser.open('http://bugs.launchpad.dev/ubuntu/+source/linux-source-2.6.15/+bug/10') |
1268 | - >>> browser.getLink(menu_mentoring_offer).click() |
1269 | - >>> browser.getControl(name='field.subscription_request').value = True |
1270 | - >>> browser.getControl('Offer Mentoring').click() |
1271 | - >>> browser.url |
1272 | - 'http://bugs.launchpad.dev/ubuntu/+source/linux-source-2.6.15/+bug/10' |
1273 | - |
1274 | -And now 'One Membership' is a subscriber: |
1275 | - |
1276 | - >>> browser.open('http://launchpad.dev/bugs/10/+bug-portlet-subscribers-content') |
1277 | - >>> print_direct_subscribers(browser.contents) |
1278 | - One Membership (Subscribed themselves) (Unsubscribe One Membership) |
1279 | - Foo Bar (Subscribed by Launchpad Janitor) |
1280 | - |
1281 | |
1282 | === modified file 'lib/lp/registry/stories/project/xx-project-index.txt' |
1283 | --- lib/lp/registry/stories/project/xx-project-index.txt 2009-09-10 20:12:12 +0000 |
1284 | +++ lib/lp/registry/stories/project/xx-project-index.txt 2009-09-14 13:07:55 +0000 |
1285 | @@ -101,10 +101,6 @@ |
1286 | Traceback (most recent call last): |
1287 | .. |
1288 | LinkNotFoundError... |
1289 | - >>> user_browser.getLink(url='+mentoring') |
1290 | - Traceback (most recent call last): |
1291 | - .. |
1292 | - LinkNotFoundError... |
1293 | |
1294 | Also, the bugs, blueprints, translations and answers facets will be disabled: |
1295 | |
1296 | |
1297 | === modified file 'lib/lp/registry/stories/teammembership/xx-private-membership.txt' |
1298 | --- lib/lp/registry/stories/teammembership/xx-private-membership.txt 2009-09-10 13:17:51 +0000 |
1299 | +++ lib/lp/registry/stories/teammembership/xx-private-membership.txt 2009-09-14 13:07:55 +0000 |
1300 | @@ -224,24 +224,6 @@ |
1301 | Other Team |
1302 | |
1303 | |
1304 | -== Restrict Mentorship == |
1305 | - |
1306 | -To prevent leaking information about a team's private membership, |
1307 | -no user can select that team when offering mentorship for a bug |
1308 | -or a blueprint. |
1309 | - |
1310 | -Even the owner of the team with private membership should not see |
1311 | -MyTeam as an option in the +mentor form. |
1312 | - |
1313 | - >>> owner_browser.open( |
1314 | - ... 'http://answers.launchpad.dev/firefox/+bug/1/+mentor') |
1315 | - >>> team_select = find_tag_by_id(owner_browser.contents, 'field.team') |
1316 | - >>> for option in team_select.findAll('option'): |
1317 | - ... print option['value'] |
1318 | - hwdb-team |
1319 | - otherteam |
1320 | - |
1321 | - |
1322 | == Preventing Private Team Information Leakage == |
1323 | |
1324 | To prevent leaking information about a team's private membership, |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
= Summary =
This branch removes the "Offer mentorship" link from the bug page. It
removes the mentoring zcml and templates, and also removes any other
remaining links to the feature in registry or blueprints (since the
pages would now error). This is bug #427928.
The diff is large here, but it's almost all removal of files or removal
of sections of code.
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: registry/ browser/ configure. zcml registry/ stories/ project/ xx-project- index.txt blueprints/ templates/ specification- index.pt registry/ browser/ product. py bugs/browser/ configure. zcml registry/ stories/ teammembership/ xx-private- membership. txt registry/ browser/ person. py registry/ browser/ distribution. py bugs/templates/ bugtask- index.pt registry/ browser/ project. py enigmail. mozdev. org
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkq v0AwACgkQ4glRK0 DaE8h0GgCcDxwga b0G8VUCWOP42pJX QssW XqfwlnECO47Uccm co
704AoJtMVjokpkD
=M4/s
-----END PGP SIGNATURE-----