allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [1/3] git commit: [#5383] show changes to the private field too
Date Wed, 12 Dec 2012 17:11:44 GMT
Updated Branches:
  refs/heads/db/5383 [created] 3136deed6


[#5383] show changes to the private field too


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/3136deed
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/3136deed
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/3136deed

Branch: refs/heads/db/5383
Commit: 3136deed663674f7b6cbc4394d144c2f03c7d6fc
Parents: a08fff4
Author: Dave Brondsema <dbrondsema@geek.net>
Authored: Wed Dec 12 17:10:53 2012 +0000
Committer: Dave Brondsema <dbrondsema@geek.net>
Committed: Wed Dec 12 17:11:33 2012 +0000

----------------------------------------------------------------------
 .../forgetracker/tests/functional/test_root.py     |   14 ++++++++++++++
 ForgeTracker/forgetracker/tracker_main.py          |    2 ++
 2 files changed, 16 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/3136deed/ForgeTracker/forgetracker/tests/functional/test_root.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tests/functional/test_root.py b/ForgeTracker/forgetracker/tests/functional/test_root.py
index b4c914b..857d979 100644
--- a/ForgeTracker/forgetracker/tests/functional/test_root.py
+++ b/ForgeTracker/forgetracker/tests/functional/test_root.py
@@ -236,6 +236,20 @@ class TestFunctionalController(TrackerTestController):
         r = self.app.get('/rest/p/test/bugs/')
         assert 'Private Ticket' not in r
 
+        # update private ticket
+        self.app.post('/bugs/1/update_ticket_from_widget',{
+            'ticket_form.summary':'Public Ticket',
+            'ticket_form.description':'',
+            'ticket_form.status':'open',
+            'ticket_form._milestone':'1.0',
+            'ticket_form.assigned_to':'',
+            'ticket_form.labels':'',
+            'ticket_form.comment': 'gotta be secret about this now',
+            'ticket_form.private': 'on',
+        })
+        response = self.app.get('/bugs/1/')
+        assert_true('<li><strong>private</strong>: No --&gt; Yes</li>'
in response)
+
     @td.with_tool('test', 'Tickets', 'doc-bugs')
     def test_two_trackers(self):
         summary = 'test two trackers'

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/3136deed/ForgeTracker/forgetracker/tracker_main.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tracker_main.py b/ForgeTracker/forgetracker/tracker_main.py
index bbf4e44..83c2a0b 100644
--- a/ForgeTracker/forgetracker/tracker_main.py
+++ b/ForgeTracker/forgetracker/tracker_main.py
@@ -1117,7 +1117,9 @@ class TicketController(BaseController):
             else:
                 self.ticket.assigned_to_id = None
             changes['assigned_to'] = self.ticket.assigned_to
+        changes['private'] = 'Yes' if self.ticket.private else 'No'
         self.ticket.private = post_data.get('private', False)
+        changes['private'] = 'Yes' if self.ticket.private else 'No'
 
         if 'attachment' in post_data:
             attachment = post_data['attachment']


Mime
View raw message