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
=== modified file 'lib/canonical/launchpad/doc/textformatting.txt'
--- lib/canonical/launchpad/doc/textformatting.txt 2011-03-11 00:04:26 +0000
+++ lib/canonical/launchpad/doc/textformatting.txt 2011-10-03 03:02:25 +0000
@@ -126,13 +126,13 @@
126126
127 >>> long_word = (127 >>> long_word = (
128 ... "This paragraph includes a long URL, "128 ... "This paragraph includes a long URL, "
129 ... "https://launchpad.net/greenishballoon/+bug/1733/+viewstatus. "129 ... "https://launchpad.net/greenishballoon/+bug/1733/+subscriptions. "
130 ... "Even though it's longer than 56 characters, it stays on a "130 ... "Even though it's longer than 56 characters, it stays on a "
131 ... "single line.")131 ... "single line.")
132 >>> wrapped_text = mailwrapper.format(long_word)132 >>> wrapped_text = mailwrapper.format(long_word)
133 >>> print wrapped_text #doctest: -NORMALIZE_WHITESPACE133 >>> print wrapped_text #doctest: -NORMALIZE_WHITESPACE
134 This paragraph includes a long URL,134 This paragraph includes a long URL,
135 https://launchpad.net/greenishballoon/+bug/1733/+viewstatus.135 https://launchpad.net/greenishballoon/+bug/1733/+subscriptions.
136 Even though it's longer than 56 characters, it stays on136 Even though it's longer than 56 characters, it stays on
137 a single line.137 a single line.
138138
139139
=== modified file 'lib/canonical/launchpad/pagetests/basics/notfound-traversals.txt'
--- lib/canonical/launchpad/pagetests/basics/notfound-traversals.txt 2011-09-01 05:09:54 +0000
+++ lib/canonical/launchpad/pagetests/basics/notfound-traversals.txt 2011-10-03 03:02:25 +0000
@@ -316,7 +316,7 @@
316bugtask is also assigned to a milestone (a corner case, but one that was causing316bugtask is also assigned to a milestone (a corner case, but one that was causing
317OOPS's all the same!):317OOPS's all the same!):
318318
319>>> check("/debian/sarge/+source/mozilla-firefox/+bug/3/+viewstatus")319>>> check("/debian/sarge/+source/mozilla-firefox/+bug/3")
320320
321The bug filing pages.321The bug filing pages.
322322
323323
=== modified file 'lib/lp/bugs/browser/bugtask.py'
--- lib/lp/bugs/browser/bugtask.py 2011-09-30 06:31:35 +0000
+++ lib/lp/bugs/browser/bugtask.py 2011-10-03 03:02:25 +0000
@@ -29,7 +29,6 @@
29 'BugTasksAndNominationsView',29 'BugTasksAndNominationsView',
30 'BugTaskSearchListingView',30 'BugTaskSearchListingView',
31 'BugTaskSetNavigation',31 'BugTaskSetNavigation',
32 'BugTaskStatusView',
33 'BugTaskTableRowView',32 'BugTaskTableRowView',
34 'BugTaskTextView',33 'BugTaskTextView',
35 'BugTaskView',34 'BugTaskView',
@@ -84,14 +83,10 @@
84from zope.app.form import CustomWidgetFactory83from zope.app.form import CustomWidgetFactory
85from zope.app.form.browser.itemswidgets import RadioWidget84from zope.app.form.browser.itemswidgets import RadioWidget
86from zope.app.form.interfaces import (85from zope.app.form.interfaces import (
87 IDisplayWidget,
88 IInputWidget,86 IInputWidget,
89 InputErrors,87 InputErrors,
90 )88 )
91from zope.app.form.utility import (89from zope.app.form.utility import setUpWidget
92 setUpWidget,
93 setUpWidgets,
94 )
95from zope.component import (90from zope.component import (
96 ComponentLookupError,91 ComponentLookupError,
97 getAdapter,92 getAdapter,
@@ -1737,36 +1732,6 @@
1737 self.updateContextFromData(data)1732 self.updateContextFromData(data)
17381733
17391734
1740class BugTaskStatusView(LaunchpadView):
1741 """Viewing the status of a bug task."""
1742
1743 page_title = 'View status'
1744
1745 def initialize(self):
1746 """Set up the appropriate widgets.
1747
1748 Different widgets are shown depending on if it's a remote bug
1749 task or not.
1750 """
1751 field_names = [
1752 'status', 'importance', 'assignee']
1753 if not self.context.target_uses_malone:
1754 field_names += ['bugwatch']
1755 self.milestone_widget = None
1756 else:
1757 field_names += ['milestone']
1758 self.bugwatch_widget = None
1759
1760 if self.context.distroseries or self.context.distribution:
1761 field_names += ['sourcepackagename']
1762
1763 self.assignee_widget = CustomWidgetFactory(AssigneeDisplayWidget)
1764 self.status_widget = CustomWidgetFactory(DBItemDisplayWidget)
1765 self.importance_widget = CustomWidgetFactory(DBItemDisplayWidget)
1766
1767 setUpWidgets(self, IBugTask, IDisplayWidget, names=field_names)
1768
1769
1770class BugTaskListingView(LaunchpadView):1735class BugTaskListingView(LaunchpadView):
1771 """A view designed for displaying bug tasks in lists."""1736 """A view designed for displaying bug tasks in lists."""
1772 # Note that this right now is only used in tests and to render1737 # Note that this right now is only used in tests and to render
@@ -3559,10 +3524,8 @@
3559 def initialize(self):3524 def initialize(self):
3560 super(BugTaskTableRowView, self).initialize()3525 super(BugTaskTableRowView, self).initialize()
3561 link = canonical_url(self.context)3526 link = canonical_url(self.context)
3562 edit_link = link + '/+editstatus'3527 task_link = edit_link = link + '/+editstatus'
3563 view_link = link + '/+viewstatus'
3564 can_edit = check_permission('launchpad.Edit', self.context)3528 can_edit = check_permission('launchpad.Edit', self.context)
3565 task_link = edit_link if can_edit else view_link
3566 bugtask_id = self.context.id3529 bugtask_id = self.context.id
3567 launchbag = getUtility(ILaunchBag)3530 launchbag = getUtility(ILaunchBag)
3568 is_primary = self.context.id == launchbag.bugtask.id3531 is_primary = self.context.id == launchbag.bugtask.id
@@ -3575,7 +3538,6 @@
3575 is_conjoined_slave=self.is_conjoined_slave,3538 is_conjoined_slave=self.is_conjoined_slave,
3576 task_link=task_link,3539 task_link=task_link,
3577 edit_link=edit_link,3540 edit_link=edit_link,
3578 view_link=view_link,
3579 can_edit=can_edit,3541 can_edit=can_edit,
3580 link=link,3542 link=link,
3581 id=bugtask_id,3543 id=bugtask_id,
35823544
=== modified file 'lib/lp/bugs/browser/configure.zcml'
--- lib/lp/bugs/browser/configure.zcml 2011-09-29 07:12:45 +0000
+++ lib/lp/bugs/browser/configure.zcml 2011-10-03 03:02:25 +0000
@@ -687,12 +687,6 @@
687 permission="launchpad.Edit"687 permission="launchpad.Edit"
688 template="../templates/bugtask-edit-form.pt" />688 template="../templates/bugtask-edit-form.pt" />
689 <browser:page689 <browser:page
690 name="+viewstatus"
691 for="lp.bugs.interfaces.bugtask.IBugTask"
692 class="lp.bugs.browser.bugtask.BugTaskStatusView"
693 permission="launchpad.View"
694 template="../templates/bugtask-view.pt"/>
695 <browser:page
696 name="+listing-view"690 name="+listing-view"
697 for="lp.bugs.interfaces.bugtask.IBugTask"691 for="lp.bugs.interfaces.bugtask.IBugTask"
698 class="lp.bugs.browser.bugtask.BugTaskListingView"692 class="lp.bugs.browser.bugtask.BugTaskListingView"
699693
=== modified file 'lib/lp/bugs/stories/bugs/xx-bug-obfuscation.txt'
--- lib/lp/bugs/stories/bugs/xx-bug-obfuscation.txt 2010-07-15 08:38:19 +0000
+++ lib/lp/bugs/stories/bugs/xx-bug-obfuscation.txt 2011-10-03 03:02:25 +0000
@@ -18,18 +18,6 @@
18 >>> description.renderContents()18 >>> description.renderContents()
19 '...<p>Shirtpkdf user@domain.org lkjd hlkjfds...'19 '...<p>Shirtpkdf user@domain.org lkjd hlkjfds...'
2020
21Using the +viewstatus page, he can also see the email address.
22
23 >>> user_browser.open(
24 ... 'http://bugs.launchpad.dev'
25 ... '/debian/sarge/+source/mozilla-firefox/+bug/3/+viewstatus')
26 >>> print user_browser.title
27 View status : Bug #3 : ...
28
29 >>> description = find_main_content(user_browser.contents).p
30 >>> description.renderContents()
31 'Shirtpkdf user@domain.org lkjd hlkjfds...'
32
33An anonymous cannot see the email address anywhere in the page.21An anonymous cannot see the email address anywhere in the page.
3422
35 >>> anon_browser.open(23 >>> anon_browser.open(
@@ -44,20 +32,3 @@
44 >>> description = find_tag_by_id(anon_browser.contents, 'edit-description')32 >>> description = find_tag_by_id(anon_browser.contents, 'edit-description')
45 >>> description.renderContents()33 >>> description.renderContents()
46 '...<p>Shirtpkdf &lt;email address hidden&gt; lkjd hlkjfds...'34 '...<p>Shirtpkdf &lt;email address hidden&gt; lkjd hlkjfds...'
47
48Nor can the anonymous user see the email address in the +viewstatus
49page.
50
51 >>> anon_browser.open(
52 ... 'http://bugs.launchpad.dev'
53 ... '/debian/sarge/+source/mozilla-firefox/+bug/3/+viewstatus')
54 >>> print anon_browser.title
55 View status : Bug #3 : ...
56
57 >>> 'user@domain.org' in anon_browser.contents
58 False
59
60 >>> description = find_main_content(anon_browser.contents).findAll('p')[1]
61 >>> description.renderContents()
62 'Shirtpkdf &lt;email address hidden&gt; lkjd hlkjfds...'
63
6435
=== removed file 'lib/lp/bugs/stories/bugtask-management/xx-view-non-editable-bug-task.txt'
--- lib/lp/bugs/stories/bugtask-management/xx-view-non-editable-bug-task.txt 2009-09-18 15:24:30 +0000
+++ lib/lp/bugs/stories/bugtask-management/xx-view-non-editable-bug-task.txt 1970-01-01 00:00:00 +0000
@@ -1,16 +0,0 @@
1If someone views a bug task without logging in, they should see the task but
2not be able to edit it.
3
4 >>> anon_browser.open('http://launchpad.dev/firefox/+bug/6/+viewstatus')
5 >>> print extract_text(find_main_content(anon_browser.contents))
6 Mozilla Firefox Bug #6
7 ...
8 To change this information, you must be logged in.
9 ...
10
11 >>> anon_browser.open('http://launchpad.dev/evolution/+bug/7/+viewstatus')
12 >>> print extract_text(find_main_content(anon_browser.contents))
13 Evolution Bug #7
14 ...
15 To change this information, you must be logged in.
16 ...
170
=== removed file 'lib/lp/bugs/stories/standalone/xx-view-package-bug-task-anonymous.txt'
--- lib/lp/bugs/stories/standalone/xx-view-package-bug-task-anonymous.txt 2009-06-12 16:36:02 +0000
+++ lib/lp/bugs/stories/standalone/xx-view-package-bug-task-anonymous.txt 1970-01-01 00:00:00 +0000
@@ -1,8 +0,0 @@
1Anonymous users can view bug tasks on public bugs.
2
3 >>> print http(r"""
4 ... GET /debian/+source/mozilla-firefox/+bug/3/+viewstatus HTTP/1.1
5 ... """) #doctest: -NORMALIZE_WHITESPACE
6 HTTP/1.1 200 Ok
7 ...Package...
8 ...mozilla-firefox...
90
=== removed file 'lib/lp/bugs/templates/bugtask-view.pt'
--- lib/lp/bugs/templates/bugtask-view.pt 2011-09-08 22:50:59 +0000
+++ lib/lp/bugs/templates/bugtask-view.pt 1970-01-01 00:00:00 +0000
@@ -1,141 +0,0 @@
1<html
2 xmlns="http://www.w3.org/1999/xhtml"
3 xmlns:tal="http://xml.zope.org/namespaces/tal"
4 xmlns:metal="http://xml.zope.org/namespaces/metal"
5 xml:lang="en"
6 lang="en"
7 dir="ltr"
8 metal:use-macro="view/macro:page/main_only"
9>
10 <body>
11 <div metal:fill-slot="main">
12 <p tal:condition="context/bug/duplicateof" class="informational message">
13 This bug is a duplicate of
14 <a href="#"
15 tal:attributes="href context/bug/duplicateof/fmt:url">bug
16 #<span tal:replace="context/bug/duplicateof/id">42</span></a>
17 </p>
18
19 <p tal:condition="not: context/required:launchpad.Edit"
20 class="informational message">
21 <span tal:condition="not: request/lp:person">
22 To <a href="+editstatus">change this information</a>,
23 you must be logged in.
24 </span>
25 </p>
26
27 <div metal:define-macro="editform">
28 <div metal:define-macro="formbody">
29 <p class="error message"
30 tal:define="status view/update|nothing"
31 tal:condition="status"
32 tal:content="status" />
33 <p tal:define="errors view/errors|nothing"
34 tal:condition="errors"
35 class="error message">
36 There are <strong
37 tal:content="view/errors/count:len"
38 >6</strong>
39 problems with the information you entered.
40 Please correct them and try again.
41 </p>
42 </div>
43
44 <h2>Status in
45 <tal:target replace="context/bugtargetname">Firefox</tal:target>
46 </h2>
47
48 <div class="field">
49 <table>
50 <tr>
51 <td style="padding-right: 1em">
52 <label tal:attributes="for view/status_widget/name"
53 tal:content="view/status_widget/label">
54 Status
55 </label>
56 </td>
57 <td>
58 <label tal:attributes="for view/importance_widget/name"
59 tal:content="view/importance_widget/label">
60 Importance
61 </label>
62 </td>
63 <td tal:condition="python:context.milestone and view.milestone_widget">
64 <label tal:attributes="for view/milestone_widget/name"
65 tal:content="view/milestone_widget/label">
66 Target
67 </label>
68 </td>
69 </tr>
70 <tr>
71 <td tal:content="structure view/status_widget" />
72 <td tal:content="structure view/importance_widget" />
73 <td tal:condition="python:context.milestone and view.milestone_widget"
74 tal:content="context/milestone/name"
75 id="milestone">
76 </td>
77 </tr>
78 <tr tal:condition="python:context.distribution or
79 context.distroseries">
80 <td colspan="0">
81 <label tal:attributes="for view/sourcepackagename_widget/name"
82 tal:content="view/sourcepackagename_widget/label">
83 Status
84 </label>
85 </td>
86 </tr>
87 <tr tal:condition="python:context.distribution or
88 context.distroseries">
89 <td colspan="0"
90 tal:content="context/sourcepackagename/name|nothing"
91 style="white-space : nowrap;" />
92 </tr>
93 <tr>
94 <td colspan="2">
95 <label tal:attributes="for view/assignee_widget/name"
96 tal:content="view/assignee_widget/label">
97 Assignee
98 </label>
99 </td>
100 <td colspan="2">
101 <tal:block condition="view/bugwatch_widget">
102 <label tal:attributes="for view/bugwatch_widget/name"
103 tal:content="view/bugwatch_widget/label"
104 style="white-space: nowrap">
105 Remote Watch
106 </label>
107 </tal:block>
108 </td>
109 </tr>
110 <tr>
111 <td style="white-space : nowrap;" colspan="2">
112 <span tal:replace="structure view/assignee_widget">
113 Scott James Remnant
114 </span>
115 </td>
116 <td style="white-space : nowrap;" colspan="2"
117 tal:content="structure view/bugwatch_widget" />
118 </tr>
119 </table>
120 </div>
121
122 <tal:user condition="view/user">
123 <tal:description
124 define="global description context/bug/description/fmt:text-to-html" />
125 </tal:user>
126 <tal:not-user condition="not:view/user">
127 <tal:description
128 define="global description context/bug/description/fmt:obfuscate-email/fmt:text-to-html" />
129 </tal:not-user>
130
131 <h2>Bug description</h2>
132 <tal:description
133 content="structure description"
134 >
135 $Bug.description
136 </tal:description>
137
138 </div>
139 </div>
140 </body>
141</html>
1420
=== modified file 'lib/lp/registry/stories/milestone/xx-create-milestone-on-distribution.txt'
--- lib/lp/registry/stories/milestone/xx-create-milestone-on-distribution.txt 2009-09-14 15:03:45 +0000
+++ lib/lp/registry/stories/milestone/xx-create-milestone-on-distribution.txt 2011-10-03 03:02:25 +0000
@@ -49,12 +49,3 @@
49 ... name='ubuntu_mozilla-firefox.milestone')49 ... name='ubuntu_mozilla-firefox.milestone')
50 >>> milestone_control.value = [str(milestone.id)]50 >>> milestone_control.value = [str(milestone.id)]
51 >>> name12_browser.getControl('Save Changes').click()51 >>> name12_browser.getControl('Save Changes').click()
52
53Verify that the bug now has the milestone set on the view page:
54
55 >>> anon_browser.open(
56 ... 'http://launchpad.dev/ubuntu/+source/mozilla-firefox/+bug/1/'
57 ... '+viewstatus')
58 >>> milestone_tag = find_tag_by_id(anon_browser.contents, 'milestone')
59 >>> print str(extract_text(milestone_tag))
60 sounder01
6152
=== modified file 'lib/lp/registry/stories/person/xx-deactivate-account.txt'
--- lib/lp/registry/stories/person/xx-deactivate-account.txt 2010-03-16 12:45:53 +0000
+++ lib/lp/registry/stories/person/xx-deactivate-account.txt 2011-10-03 03:02:25 +0000
@@ -54,12 +54,16 @@
54assignee.54assignee.
5555
56 >>> browser.open('http://launchpad.dev/debian/+source/'56 >>> browser.open('http://launchpad.dev/debian/+source/'
57 ... 'mozilla-firefox/+bug/3/+viewstatus')57 ... 'mozilla-firefox/+bug/3')
58 >>> print extract_text(find_main_content(browser.contents))58 >>> print extract_text(find_main_content(browser.contents))
59 Bug Title Test
59 Debian60 Debian
60 ...61 “mozilla-firefox” package
61 Bug #362 Bug #3
62 ...Assigned to unknown...63 ...
64 Assigned to
65 Milestone
66 ...
6367
64Although teams have NOACCOUNT as their account_status, they are teams and so68Although teams have NOACCOUNT as their account_status, they are teams and so
65it makes no sense to say they don't use Launchpad.69it makes no sense to say they don't use Launchpad.