Merge lp:~stevenk/launchpad/kill-+viewstatus into lp:launchpad

Proposed by Steve Kowalik
Status: Merged
Approved by: Steve Kowalik
Approved revision: no longer in the source branch.
Merged at revision: 14090
Proposed branch: lp:~stevenk/launchpad/kill-+viewstatus
Merge into: lp:launchpad
Diff against target: 399 lines (+12/-255)
10 files modified
lib/canonical/launchpad/doc/textformatting.txt (+2/-2)
lib/canonical/launchpad/pagetests/basics/notfound-traversals.txt (+1/-1)
lib/lp/bugs/browser/bugtask.py (+2/-40)
lib/lp/bugs/browser/configure.zcml (+0/-6)
lib/lp/bugs/stories/bugs/xx-bug-obfuscation.txt (+0/-29)
lib/lp/bugs/stories/bugtask-management/xx-view-non-editable-bug-task.txt (+0/-16)
lib/lp/bugs/stories/standalone/xx-view-package-bug-task-anonymous.txt (+0/-8)
lib/lp/bugs/templates/bugtask-view.pt (+0/-141)
lib/lp/registry/stories/milestone/xx-create-milestone-on-distribution.txt (+0/-9)
lib/lp/registry/stories/person/xx-deactivate-account.txt (+7/-3)
To merge this branch: bzr merge lp:~stevenk/launchpad/kill-+viewstatus
Reviewer Review Type Date Requested Status
Gavin Panella (community) code Approve
Raphaël Badin (community) code* Approve
Review via email: mp+77460@code.launchpad.net

Commit message

[r=allenap,rvb][bug=125173] Consign BugTask:+viewstatus to The Great Bitbucket in the Sky.

Description of the change

Consign BugTask:+viewstatus to The Great Bitbucket in the Sky.

To post a comment you must log in.
Revision history for this message
Raphaël Badin (rvb) wrote :

This branch looks good to land (+5/-247: that's just great ;)).

review: Approve (code*)
Revision history for this message
Gavin Panella (allenap) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/canonical/launchpad/doc/textformatting.txt'
2--- lib/canonical/launchpad/doc/textformatting.txt 2011-03-11 00:04:26 +0000
3+++ lib/canonical/launchpad/doc/textformatting.txt 2011-10-03 03:02:25 +0000
4@@ -126,13 +126,13 @@
5
6 >>> long_word = (
7 ... "This paragraph includes a long URL, "
8- ... "https://launchpad.net/greenishballoon/+bug/1733/+viewstatus. "
9+ ... "https://launchpad.net/greenishballoon/+bug/1733/+subscriptions. "
10 ... "Even though it's longer than 56 characters, it stays on a "
11 ... "single line.")
12 >>> wrapped_text = mailwrapper.format(long_word)
13 >>> print wrapped_text #doctest: -NORMALIZE_WHITESPACE
14 This paragraph includes a long URL,
15- https://launchpad.net/greenishballoon/+bug/1733/+viewstatus.
16+ https://launchpad.net/greenishballoon/+bug/1733/+subscriptions.
17 Even though it's longer than 56 characters, it stays on
18 a single line.
19
20
21=== modified file 'lib/canonical/launchpad/pagetests/basics/notfound-traversals.txt'
22--- lib/canonical/launchpad/pagetests/basics/notfound-traversals.txt 2011-09-01 05:09:54 +0000
23+++ lib/canonical/launchpad/pagetests/basics/notfound-traversals.txt 2011-10-03 03:02:25 +0000
24@@ -316,7 +316,7 @@
25 bugtask is also assigned to a milestone (a corner case, but one that was causing
26 OOPS's all the same!):
27
28->>> check("/debian/sarge/+source/mozilla-firefox/+bug/3/+viewstatus")
29+>>> check("/debian/sarge/+source/mozilla-firefox/+bug/3")
30
31 The bug filing pages.
32
33
34=== modified file 'lib/lp/bugs/browser/bugtask.py'
35--- lib/lp/bugs/browser/bugtask.py 2011-09-30 06:31:35 +0000
36+++ lib/lp/bugs/browser/bugtask.py 2011-10-03 03:02:25 +0000
37@@ -29,7 +29,6 @@
38 'BugTasksAndNominationsView',
39 'BugTaskSearchListingView',
40 'BugTaskSetNavigation',
41- 'BugTaskStatusView',
42 'BugTaskTableRowView',
43 'BugTaskTextView',
44 'BugTaskView',
45@@ -84,14 +83,10 @@
46 from zope.app.form import CustomWidgetFactory
47 from zope.app.form.browser.itemswidgets import RadioWidget
48 from zope.app.form.interfaces import (
49- IDisplayWidget,
50 IInputWidget,
51 InputErrors,
52 )
53-from zope.app.form.utility import (
54- setUpWidget,
55- setUpWidgets,
56- )
57+from zope.app.form.utility import setUpWidget
58 from zope.component import (
59 ComponentLookupError,
60 getAdapter,
61@@ -1737,36 +1732,6 @@
62 self.updateContextFromData(data)
63
64
65-class BugTaskStatusView(LaunchpadView):
66- """Viewing the status of a bug task."""
67-
68- page_title = 'View status'
69-
70- def initialize(self):
71- """Set up the appropriate widgets.
72-
73- Different widgets are shown depending on if it's a remote bug
74- task or not.
75- """
76- field_names = [
77- 'status', 'importance', 'assignee']
78- if not self.context.target_uses_malone:
79- field_names += ['bugwatch']
80- self.milestone_widget = None
81- else:
82- field_names += ['milestone']
83- self.bugwatch_widget = None
84-
85- if self.context.distroseries or self.context.distribution:
86- field_names += ['sourcepackagename']
87-
88- self.assignee_widget = CustomWidgetFactory(AssigneeDisplayWidget)
89- self.status_widget = CustomWidgetFactory(DBItemDisplayWidget)
90- self.importance_widget = CustomWidgetFactory(DBItemDisplayWidget)
91-
92- setUpWidgets(self, IBugTask, IDisplayWidget, names=field_names)
93-
94-
95 class BugTaskListingView(LaunchpadView):
96 """A view designed for displaying bug tasks in lists."""
97 # Note that this right now is only used in tests and to render
98@@ -3559,10 +3524,8 @@
99 def initialize(self):
100 super(BugTaskTableRowView, self).initialize()
101 link = canonical_url(self.context)
102- edit_link = link + '/+editstatus'
103- view_link = link + '/+viewstatus'
104+ task_link = edit_link = link + '/+editstatus'
105 can_edit = check_permission('launchpad.Edit', self.context)
106- task_link = edit_link if can_edit else view_link
107 bugtask_id = self.context.id
108 launchbag = getUtility(ILaunchBag)
109 is_primary = self.context.id == launchbag.bugtask.id
110@@ -3575,7 +3538,6 @@
111 is_conjoined_slave=self.is_conjoined_slave,
112 task_link=task_link,
113 edit_link=edit_link,
114- view_link=view_link,
115 can_edit=can_edit,
116 link=link,
117 id=bugtask_id,
118
119=== modified file 'lib/lp/bugs/browser/configure.zcml'
120--- lib/lp/bugs/browser/configure.zcml 2011-09-29 07:12:45 +0000
121+++ lib/lp/bugs/browser/configure.zcml 2011-10-03 03:02:25 +0000
122@@ -687,12 +687,6 @@
123 permission="launchpad.Edit"
124 template="../templates/bugtask-edit-form.pt" />
125 <browser:page
126- name="+viewstatus"
127- for="lp.bugs.interfaces.bugtask.IBugTask"
128- class="lp.bugs.browser.bugtask.BugTaskStatusView"
129- permission="launchpad.View"
130- template="../templates/bugtask-view.pt"/>
131- <browser:page
132 name="+listing-view"
133 for="lp.bugs.interfaces.bugtask.IBugTask"
134 class="lp.bugs.browser.bugtask.BugTaskListingView"
135
136=== modified file 'lib/lp/bugs/stories/bugs/xx-bug-obfuscation.txt'
137--- lib/lp/bugs/stories/bugs/xx-bug-obfuscation.txt 2010-07-15 08:38:19 +0000
138+++ lib/lp/bugs/stories/bugs/xx-bug-obfuscation.txt 2011-10-03 03:02:25 +0000
139@@ -18,18 +18,6 @@
140 >>> description.renderContents()
141 '...<p>Shirtpkdf user@domain.org lkjd hlkjfds...'
142
143-Using the +viewstatus page, he can also see the email address.
144-
145- >>> user_browser.open(
146- ... 'http://bugs.launchpad.dev'
147- ... '/debian/sarge/+source/mozilla-firefox/+bug/3/+viewstatus')
148- >>> print user_browser.title
149- View status : Bug #3 : ...
150-
151- >>> description = find_main_content(user_browser.contents).p
152- >>> description.renderContents()
153- 'Shirtpkdf user@domain.org lkjd hlkjfds...'
154-
155 An anonymous cannot see the email address anywhere in the page.
156
157 >>> anon_browser.open(
158@@ -44,20 +32,3 @@
159 >>> description = find_tag_by_id(anon_browser.contents, 'edit-description')
160 >>> description.renderContents()
161 '...<p>Shirtpkdf &lt;email address hidden&gt; lkjd hlkjfds...'
162-
163-Nor can the anonymous user see the email address in the +viewstatus
164-page.
165-
166- >>> anon_browser.open(
167- ... 'http://bugs.launchpad.dev'
168- ... '/debian/sarge/+source/mozilla-firefox/+bug/3/+viewstatus')
169- >>> print anon_browser.title
170- View status : Bug #3 : ...
171-
172- >>> 'user@domain.org' in anon_browser.contents
173- False
174-
175- >>> description = find_main_content(anon_browser.contents).findAll('p')[1]
176- >>> description.renderContents()
177- 'Shirtpkdf &lt;email address hidden&gt; lkjd hlkjfds...'
178-
179
180=== removed file 'lib/lp/bugs/stories/bugtask-management/xx-view-non-editable-bug-task.txt'
181--- lib/lp/bugs/stories/bugtask-management/xx-view-non-editable-bug-task.txt 2009-09-18 15:24:30 +0000
182+++ lib/lp/bugs/stories/bugtask-management/xx-view-non-editable-bug-task.txt 1970-01-01 00:00:00 +0000
183@@ -1,16 +0,0 @@
184-If someone views a bug task without logging in, they should see the task but
185-not be able to edit it.
186-
187- >>> anon_browser.open('http://launchpad.dev/firefox/+bug/6/+viewstatus')
188- >>> print extract_text(find_main_content(anon_browser.contents))
189- Mozilla Firefox Bug #6
190- ...
191- To change this information, you must be logged in.
192- ...
193-
194- >>> anon_browser.open('http://launchpad.dev/evolution/+bug/7/+viewstatus')
195- >>> print extract_text(find_main_content(anon_browser.contents))
196- Evolution Bug #7
197- ...
198- To change this information, you must be logged in.
199- ...
200
201=== removed file 'lib/lp/bugs/stories/standalone/xx-view-package-bug-task-anonymous.txt'
202--- lib/lp/bugs/stories/standalone/xx-view-package-bug-task-anonymous.txt 2009-06-12 16:36:02 +0000
203+++ lib/lp/bugs/stories/standalone/xx-view-package-bug-task-anonymous.txt 1970-01-01 00:00:00 +0000
204@@ -1,8 +0,0 @@
205-Anonymous users can view bug tasks on public bugs.
206-
207- >>> print http(r"""
208- ... GET /debian/+source/mozilla-firefox/+bug/3/+viewstatus HTTP/1.1
209- ... """) #doctest: -NORMALIZE_WHITESPACE
210- HTTP/1.1 200 Ok
211- ...Package...
212- ...mozilla-firefox...
213
214=== removed file 'lib/lp/bugs/templates/bugtask-view.pt'
215--- lib/lp/bugs/templates/bugtask-view.pt 2011-09-08 22:50:59 +0000
216+++ lib/lp/bugs/templates/bugtask-view.pt 1970-01-01 00:00:00 +0000
217@@ -1,141 +0,0 @@
218-<html
219- xmlns="http://www.w3.org/1999/xhtml"
220- xmlns:tal="http://xml.zope.org/namespaces/tal"
221- xmlns:metal="http://xml.zope.org/namespaces/metal"
222- xml:lang="en"
223- lang="en"
224- dir="ltr"
225- metal:use-macro="view/macro:page/main_only"
226->
227- <body>
228- <div metal:fill-slot="main">
229- <p tal:condition="context/bug/duplicateof" class="informational message">
230- This bug is a duplicate of
231- <a href="#"
232- tal:attributes="href context/bug/duplicateof/fmt:url">bug
233- #<span tal:replace="context/bug/duplicateof/id">42</span></a>
234- </p>
235-
236- <p tal:condition="not: context/required:launchpad.Edit"
237- class="informational message">
238- <span tal:condition="not: request/lp:person">
239- To <a href="+editstatus">change this information</a>,
240- you must be logged in.
241- </span>
242- </p>
243-
244- <div metal:define-macro="editform">
245- <div metal:define-macro="formbody">
246- <p class="error message"
247- tal:define="status view/update|nothing"
248- tal:condition="status"
249- tal:content="status" />
250- <p tal:define="errors view/errors|nothing"
251- tal:condition="errors"
252- class="error message">
253- There are <strong
254- tal:content="view/errors/count:len"
255- >6</strong>
256- problems with the information you entered.
257- Please correct them and try again.
258- </p>
259- </div>
260-
261- <h2>Status in
262- <tal:target replace="context/bugtargetname">Firefox</tal:target>
263- </h2>
264-
265- <div class="field">
266- <table>
267- <tr>
268- <td style="padding-right: 1em">
269- <label tal:attributes="for view/status_widget/name"
270- tal:content="view/status_widget/label">
271- Status
272- </label>
273- </td>
274- <td>
275- <label tal:attributes="for view/importance_widget/name"
276- tal:content="view/importance_widget/label">
277- Importance
278- </label>
279- </td>
280- <td tal:condition="python:context.milestone and view.milestone_widget">
281- <label tal:attributes="for view/milestone_widget/name"
282- tal:content="view/milestone_widget/label">
283- Target
284- </label>
285- </td>
286- </tr>
287- <tr>
288- <td tal:content="structure view/status_widget" />
289- <td tal:content="structure view/importance_widget" />
290- <td tal:condition="python:context.milestone and view.milestone_widget"
291- tal:content="context/milestone/name"
292- id="milestone">
293- </td>
294- </tr>
295- <tr tal:condition="python:context.distribution or
296- context.distroseries">
297- <td colspan="0">
298- <label tal:attributes="for view/sourcepackagename_widget/name"
299- tal:content="view/sourcepackagename_widget/label">
300- Status
301- </label>
302- </td>
303- </tr>
304- <tr tal:condition="python:context.distribution or
305- context.distroseries">
306- <td colspan="0"
307- tal:content="context/sourcepackagename/name|nothing"
308- style="white-space : nowrap;" />
309- </tr>
310- <tr>
311- <td colspan="2">
312- <label tal:attributes="for view/assignee_widget/name"
313- tal:content="view/assignee_widget/label">
314- Assignee
315- </label>
316- </td>
317- <td colspan="2">
318- <tal:block condition="view/bugwatch_widget">
319- <label tal:attributes="for view/bugwatch_widget/name"
320- tal:content="view/bugwatch_widget/label"
321- style="white-space: nowrap">
322- Remote Watch
323- </label>
324- </tal:block>
325- </td>
326- </tr>
327- <tr>
328- <td style="white-space : nowrap;" colspan="2">
329- <span tal:replace="structure view/assignee_widget">
330- Scott James Remnant
331- </span>
332- </td>
333- <td style="white-space : nowrap;" colspan="2"
334- tal:content="structure view/bugwatch_widget" />
335- </tr>
336- </table>
337- </div>
338-
339- <tal:user condition="view/user">
340- <tal:description
341- define="global description context/bug/description/fmt:text-to-html" />
342- </tal:user>
343- <tal:not-user condition="not:view/user">
344- <tal:description
345- define="global description context/bug/description/fmt:obfuscate-email/fmt:text-to-html" />
346- </tal:not-user>
347-
348- <h2>Bug description</h2>
349- <tal:description
350- content="structure description"
351- >
352- $Bug.description
353- </tal:description>
354-
355- </div>
356- </div>
357- </body>
358-</html>
359
360=== modified file 'lib/lp/registry/stories/milestone/xx-create-milestone-on-distribution.txt'
361--- lib/lp/registry/stories/milestone/xx-create-milestone-on-distribution.txt 2009-09-14 15:03:45 +0000
362+++ lib/lp/registry/stories/milestone/xx-create-milestone-on-distribution.txt 2011-10-03 03:02:25 +0000
363@@ -49,12 +49,3 @@
364 ... name='ubuntu_mozilla-firefox.milestone')
365 >>> milestone_control.value = [str(milestone.id)]
366 >>> name12_browser.getControl('Save Changes').click()
367-
368-Verify that the bug now has the milestone set on the view page:
369-
370- >>> anon_browser.open(
371- ... 'http://launchpad.dev/ubuntu/+source/mozilla-firefox/+bug/1/'
372- ... '+viewstatus')
373- >>> milestone_tag = find_tag_by_id(anon_browser.contents, 'milestone')
374- >>> print str(extract_text(milestone_tag))
375- sounder01
376
377=== modified file 'lib/lp/registry/stories/person/xx-deactivate-account.txt'
378--- lib/lp/registry/stories/person/xx-deactivate-account.txt 2010-03-16 12:45:53 +0000
379+++ lib/lp/registry/stories/person/xx-deactivate-account.txt 2011-10-03 03:02:25 +0000
380@@ -54,12 +54,16 @@
381 assignee.
382
383 >>> browser.open('http://launchpad.dev/debian/+source/'
384- ... 'mozilla-firefox/+bug/3/+viewstatus')
385+ ... 'mozilla-firefox/+bug/3')
386 >>> print extract_text(find_main_content(browser.contents))
387+ Bug Title Test
388 Debian
389- ...
390+ “mozilla-firefox” package
391 Bug #3
392- ...Assigned to unknown...
393+ ...
394+ Assigned to
395+ Milestone
396+ ...
397
398 Although teams have NOACCOUNT as their account_status, they are teams and so
399 it makes no sense to say they don't use Launchpad.