Merge ~pappacena/launchpad:comment-editing-ui-list-revisions-bugcomment into launchpad:master

Proposed by Thiago F. Pappacena
Status: Merged
Approved by: Thiago F. Pappacena
Approved revision: 8e40b52d7712b477e0802561e55c62e5745e72ed
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~pappacena/launchpad:comment-editing-ui-list-revisions-bugcomment
Merge into: launchpad:master
Prerequisite: ~pappacena/launchpad:comment-editing-ui-list-revisions
Diff against target: 173 lines (+37/-5)
5 files modified
lib/lp/bugs/stories/bugattachments/xx-attachments-to-bug-report.txt (+2/-0)
lib/lp/bugs/stories/bugs/xx-bug-activity.txt (+5/-0)
lib/lp/bugs/stories/bugs/xx-bug-create-question.txt (+1/-0)
lib/lp/bugs/stories/bugs/xx-remote-bug-comments.txt (+4/-1)
lib/lp/bugs/templates/bugcomment-box.pt (+25/-4)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+403279@code.launchpad.net

Commit message

Adding message revision list to bug comment

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/lib/lp/bugs/stories/bugattachments/xx-attachments-to-bug-report.txt b/lib/lp/bugs/stories/bugattachments/xx-attachments-to-bug-report.txt
index 2bf6a34..9016ea8 100644
--- a/lib/lp/bugs/stories/bugattachments/xx-attachments-to-bug-report.txt
+++ b/lib/lp/bugs/stories/bugattachments/xx-attachments-to-bug-report.txt
@@ -12,6 +12,7 @@ of bug #11 is:
12 >>> browser.open("http://bugs.launchpad.test/redfish/+bug/11")12 >>> browser.open("http://bugs.launchpad.test/redfish/+bug/11")
13 >>> comment_1 = find_tags_by_class(browser.contents, 'boardComment')[0]13 >>> comment_1 = find_tags_by_class(browser.contents, 'boardComment')[0]
14 >>> print(extract_text(comment_1))14 >>> print(extract_text(comment_1))
15 Revision history for this message
15 Valentina Commissari (tsukimi)16 Valentina Commissari (tsukimi)
16 wrote17 wrote
17 on 2007-03-15:18 on 2007-03-15:
@@ -43,6 +44,7 @@ displayed as the bug report).
43 >>> browser.open("http://bugs.launchpad.test/redfish/+bug/11")44 >>> browser.open("http://bugs.launchpad.test/redfish/+bug/11")
44 >>> comment_0 = find_tags_by_class(browser.contents, 'boardComment')[0]45 >>> comment_0 = find_tags_by_class(browser.contents, 'boardComment')[0]
45 >>> print(extract_text(comment_0))46 >>> print(extract_text(comment_0))
47 Revision history for this message
46 Daniel Silverstone (kinnison)48 Daniel Silverstone (kinnison)
47 wrote49 wrote
48 on 2007-03-15:50 on 2007-03-15:
diff --git a/lib/lp/bugs/stories/bugs/xx-bug-activity.txt b/lib/lp/bugs/stories/bugs/xx-bug-activity.txt
index 95d0d4f..1d75aa4 100644
--- a/lib/lp/bugs/stories/bugs/xx-bug-activity.txt
+++ b/lib/lp/bugs/stories/bugs/xx-bug-activity.txt
@@ -63,6 +63,7 @@ page.
63 ... "Here's a comment for testing, like.")63 ... "Here's a comment for testing, like.")
64 >>> user_browser.getControl('Post Comment').click()64 >>> user_browser.getControl('Post Comment').click()
65 >>> print_comments(user_browser.contents, slice(None))65 >>> print_comments(user_browser.contents, slice(None))
66 Revision history for this message
66 In...67 In...
67 Bug Watch Updater (bug-watch-updater)68 Bug Watch Updater (bug-watch-updater)
68 on 2007-12-1869 on 2007-12-18
@@ -70,6 +71,7 @@ page.
70 status:71 status:
71 Unknown → New72 Unknown → New
72 --------73 --------
74 Revision history for this message
73 No Privileges Person (no-priv)75 No Privileges Person (no-priv)
74 ...76 ...
75 #777 #7
@@ -88,6 +90,7 @@ that have been added.
8890
89 >>> user_browser.open('http://launchpad.test/bugs/15')91 >>> user_browser.open('http://launchpad.test/bugs/15')
90 >>> print_comments(user_browser.contents, slice(None))92 >>> print_comments(user_browser.contents, slice(None))
93 Revision history for this message
91 In...94 In...
92 Bug95 Bug
93 ...96 ...
@@ -226,6 +229,7 @@ bundled with that comment in the UI.
226Note that "Lookit, a change!" appears twice: once displaying the message229Note that "Lookit, a change!" appears twice: once displaying the message
227itself, and once again inside the textarea to edit the message.230itself, and once again inside the textarea to edit the message.
228 >>> print_comments(admin_browser.contents)231 >>> print_comments(admin_browser.contents)
232 Revision history for this message
229 Foo Bar (name16)233 Foo Bar (name16)
230 wrote234 wrote
231 ... ago:235 ... ago:
@@ -252,6 +256,7 @@ If a target of a bug task is changed the old and new value will be shown.
252 ... ).value = 'linux-source-2.6.15'256 ... ).value = 'linux-source-2.6.15'
253 >>> admin_browser.getControl("Save Changes").click()257 >>> admin_browser.getControl("Save Changes").click()
254 >>> print_comments(admin_browser.contents)258 >>> print_comments(admin_browser.contents)
259 Revision history for this message
255 Foo Bar (name16)260 Foo Bar (name16)
256 wrote261 wrote
257 ... ago:262 ... ago:
diff --git a/lib/lp/bugs/stories/bugs/xx-bug-create-question.txt b/lib/lp/bugs/stories/bugs/xx-bug-create-question.txt
index ed2fd5d..b094569 100644
--- a/lib/lp/bugs/stories/bugs/xx-bug-create-question.txt
+++ b/lib/lp/bugs/stories/bugs/xx-bug-create-question.txt
@@ -271,6 +271,7 @@ They read their comment that was appended to the bug report's messages.
271271
272 >>> print(extract_text(272 >>> print(extract_text(
273 ... find_tags_by_class(str(content), 'boardComment')[-1]))273 ... find_tags_by_class(str(content), 'boardComment')[-1]))
274 Revision history for this message
274 No Privileges Person (no-priv)275 No Privileges Person (no-priv)
275 wrote276 wrote
276 ...277 ...
diff --git a/lib/lp/bugs/stories/bugs/xx-remote-bug-comments.txt b/lib/lp/bugs/stories/bugs/xx-remote-bug-comments.txt
index 7fa1e82..59e338d 100644
--- a/lib/lp/bugs/stories/bugs/xx-remote-bug-comments.txt
+++ b/lib/lp/bugs/stories/bugs/xx-remote-bug-comments.txt
@@ -11,6 +11,7 @@ entered within Launchpad itself.
11 >>> details = remote_bug_comment.find(11 >>> details = remote_bug_comment.find(
12 ... attrs={'class': 'boardCommentDetails'})12 ... attrs={'class': 'boardCommentDetails'})
13 >>> print(extract_text(details))13 >>> print(extract_text(details))
14 Revision history for this message
14 In15 In
15 Debian Bug tracker #308994,16 Debian Bug tracker #308994,
16 josh (jbuhl-nospam)17 josh (jbuhl-nospam)
@@ -21,7 +22,7 @@ entered within Launchpad itself.
21Remote comments are decorated with the bug watch icon, to distinguish22Remote comments are decorated with the bug watch icon, to distinguish
22them from comments posted directly by Launchpad users.23them from comments posted directly by Launchpad users.
2324
24 >>> print(details.find('img')['src'])25 >>> print(details.find_all('img')[1]['src'])
25 /@@/bug-remote26 /@@/bug-remote
2627
27Since it's possible to reply to imported comments and have them28Since it's possible to reply to imported comments and have them
@@ -52,6 +53,7 @@ The new comment appears, formatted as a remote bug comment.
52 >>> new_bug_comment = find_tags_by_class(53 >>> new_bug_comment = find_tags_by_class(
53 ... user_browser.contents, 'remoteBugComment')[-1]54 ... user_browser.contents, 'remoteBugComment')[-1]
54 >>> print(extract_text(new_bug_comment))55 >>> print(extract_text(new_bug_comment))
56 Revision history for this message
55 In57 In
56 Debian Bug tracker #308994,58 Debian Bug tracker #308994,
57 ...59 ...
@@ -91,6 +93,7 @@ the 'awaiting synchronization' mark goes away.
91 >>> last_bug_comment = find_tags_by_class(93 >>> last_bug_comment = find_tags_by_class(
92 ... user_browser.contents, 'remoteBugComment')[-1]94 ... user_browser.contents, 'remoteBugComment')[-1]
93 >>> print(extract_text(last_bug_comment))95 >>> print(extract_text(last_bug_comment))
96 Revision history for this message
94 In97 In
95 Debian Bug tracker #308994,98 Debian Bug tracker #308994,
96 ...99 ...
diff --git a/lib/lp/bugs/templates/bugcomment-box.pt b/lib/lp/bugs/templates/bugcomment-box.pt
index 83befd7..34e5789 100644
--- a/lib/lp/bugs/templates/bugcomment-box.pt
+++ b/lib/lp/bugs/templates/bugcomment-box.pt
@@ -14,6 +14,25 @@
14 data-baseurl comment/fmt:url">14 data-baseurl comment/fmt:url">
1515
16 <div class="boardCommentDetails">16 <div class="boardCommentDetails">
17 <div class="message-revision-container">
18 <div class="message-revision-container-header">
19 <span>Revision history for this message</span>
20 <img src="/+icing/build/overlay/assets/skins/sam/images/close.gif"
21 class="message-revision-close"/>
22 </div>
23 <script type="text/template">
24 <div class='message-revision-item'>
25 <div class='message-revision-title'>
26 <a class="js-action">
27 Revision #{revision}, created at {date_created}
28 </a>
29 </div>
30 <div class='message-revision-body'>{content}</div>
31 </div>
32 </script>
33 <div class="message-revision-list"></div>
34 </div>
35
17 <table>36 <table>
18 <tbody>37 <tbody>
19 <tr>38 <tr>
@@ -28,11 +47,12 @@
28 tal:content="comment/datecreated/fmt:displaydate">47 tal:content="comment/datecreated/fmt:displaydate">
29 7 minutes ago48 7 minutes ago
30 </time><span class="editable-message-last-edit-date"><tal:last-edit condition="context/date_last_edited">49 </time><span class="editable-message-last-edit-date"><tal:last-edit condition="context/date_last_edited">
31 (last edit <time50 <a href="#" class="editable-message-last-edit-link"
51 tal:condition="context/date_last_edited">(last edit <time
32 itemprop="editTime"52 itemprop="editTime"
33 tal:attributes="title context/date_last_edited/fmt:datetime;53 tal:attributes="title context/date_last_edited/fmt:datetime;
34 datetime context/date_last_edited/fmt:isodate"54 datetime context/date_last_edited/fmt:isodate"
35 tal:content="context/date_last_edited/fmt:displaydate"/>)</tal:last-edit>:55 tal:content="context/date_last_edited/fmt:displaydate"/>)</a></tal:last-edit>:
36 </span>56 </span>
37 <a tal:attributes="href comment/fmt:url"57 <a tal:attributes="href comment/fmt:url"
38 tal:condition="comment/display_title">58 tal:condition="comment/display_title">
@@ -55,11 +75,12 @@
55 tal:content="comment/datecreated/fmt:displaydate">75 tal:content="comment/datecreated/fmt:displaydate">
56 7 minutes ago76 7 minutes ago
57 </time><span class="editable-message-last-edit-date"><tal:last-edit condition="context/date_last_edited">77 </time><span class="editable-message-last-edit-date"><tal:last-edit condition="context/date_last_edited">
58 (last edit <time78 <a href="#" class="editable-message-last-edit-link"
79 tal:condition="context/date_last_edited">(last edit <time
59 itemprop="editTime"80 itemprop="editTime"
60 tal:attributes="title context/date_last_edited/fmt:datetime;81 tal:attributes="title context/date_last_edited/fmt:datetime;
61 datetime context/date_last_edited/fmt:isodate"82 datetime context/date_last_edited/fmt:isodate"
62 tal:content="context/date_last_edited/fmt:displaydate"/>)</tal:last-edit>:83 tal:content="context/date_last_edited/fmt:displaydate"/>)</a></tal:last-edit>:
63 </span>84 </span>
64 <a tal:attributes="href comment/fmt:url">85 <a tal:attributes="href comment/fmt:url">
65 <strong tal:condition="comment/display_title"86 <strong tal:condition="comment/display_title"