incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [41/43] git commit: [#6815] Leave off "Originally owned by: nobody" from imported unowned Allura tickets
Date Thu, 14 Nov 2013 17:37:02 GMT
[#6815] Leave off "Originally owned by: nobody" from imported unowned Allura tickets

Signed-off-by: Cory Johns <cjohns@slashdotmedia.com>


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

Branch: refs/heads/cj/6836
Commit: 9dec93d74e42c85c8f37ae70c2f8c663c0618a53
Parents: 23cc1e8
Author: Cory Johns <cjohns@slashdotmedia.com>
Authored: Wed Nov 13 22:57:07 2013 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Wed Nov 13 23:14:46 2013 +0000

----------------------------------------------------------------------
 ForgeImporters/forgeimporters/forge/tracker.py            | 2 +-
 ForgeImporters/forgeimporters/tests/forge/test_tracker.py | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/9dec93d7/ForgeImporters/forgeimporters/forge/tracker.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/forge/tracker.py b/ForgeImporters/forgeimporters/forge/tracker.py
index c758651..0fe3fea 100644
--- a/ForgeImporters/forgeimporters/forge/tracker.py
+++ b/ForgeImporters/forgeimporters/forge/tracker.py
@@ -184,7 +184,7 @@ class ForgeTrackerImporter(ToolImporter):
         return user
 
     def annotate(self, text, user, username, label=''):
-        if username and user.is_anonymous():
+        if username and user.is_anonymous() and username != 'nobody':
             return '*Originally%s by:* %s\n\n%s' % (label, username, text)
         return text
 

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/9dec93d7/ForgeImporters/forgeimporters/tests/forge/test_tracker.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/tests/forge/test_tracker.py b/ForgeImporters/forgeimporters/tests/forge/test_tracker.py
index 0b8fa05..85f4650 100644
--- a/ForgeImporters/forgeimporters/tests/forge/test_tracker.py
+++ b/ForgeImporters/forgeimporters/tests/forge/test_tracker.py
@@ -236,6 +236,7 @@ class TestTrackerImporter(TestCase):
         self.assertEqual(importer.annotate('foo', user, 'bar'), 'foo')
         user.is_anonymous.return_value = True
         self.assertEqual(importer.annotate('foo', user, 'bar'), '*Originally by:* bar\n\nfoo')
+        self.assertEqual(importer.annotate('foo', user, 'nobody'), 'foo')
         self.assertEqual(importer.annotate('foo', user, None), 'foo')
 
     @mock.patch.object(tracker, 'File')


Mime
View raw message