allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hei...@apache.org
Subject allura git commit: [#8066] don't error when user missing on ticket page
Date Thu, 24 Mar 2016 14:27:47 GMT
Repository: allura
Updated Branches:
  refs/heads/master 0ca4f4392 -> f06d73195


[#8066] don't error when user missing on ticket page


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

Branch: refs/heads/master
Commit: f06d731956acbd6ccb3d1a7237025373733c7f47
Parents: 0ca4f43
Author: Dave Brondsema <dave@brondsema.net>
Authored: Fri Mar 11 10:46:35 2016 -0500
Committer: Heith Seewald <heiths@gmail.com>
Committed: Thu Mar 24 10:27:24 2016 -0400

----------------------------------------------------------------------
 ForgeTracker/forgetracker/templates/tracker/ticket.html         | 4 ++--
 .../forgetracker/templates/tracker_widgets/ticket_form.html     | 2 +-
 ForgeTracker/forgetracker/tests/functional/test_root.py         | 5 +++++
 3 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/f06d7319/ForgeTracker/forgetracker/templates/tracker/ticket.html
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/templates/tracker/ticket.html b/ForgeTracker/forgetracker/templates/tracker/ticket.html
index d3b0342..afe0253 100644
--- a/ForgeTracker/forgetracker/templates/tracker/ticket.html
+++ b/ForgeTracker/forgetracker/templates/tracker/ticket.html
@@ -77,7 +77,7 @@
       <div class="grid-5 ticket-assigned-to">
         <label class="simple">Owner: </label>
         {% if ticket.assigned_to_id %}
-          <a href="{{ticket.assigned_to.url()}}">{{ticket.assigned_to_name()}}</a>
+          {{lib.user_link(ticket.assigned_to)}}
         {% else %}
           {{ticket.assigned_to_name()}}
         {% endif %}
@@ -131,7 +131,7 @@
     </div>
     <div class="grid-5">
       <label class="simple">Creator:</label>
-      <a href="{{ticket.reported_by.url()}}">{{ticket.reported_by.display_name}}</a>
+      {{lib.user_link(ticket.reported_by)}}
     </div>
     <div class="grid-4">
       <label class="simple">Private:</label>

http://git-wip-us.apache.org/repos/asf/allura/blob/f06d7319/ForgeTracker/forgetracker/templates/tracker_widgets/ticket_form.html
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/templates/tracker_widgets/ticket_form.html b/ForgeTracker/forgetracker/templates/tracker_widgets/ticket_form.html
index 4c1c045..d266ca2 100644
--- a/ForgeTracker/forgetracker/templates/tracker_widgets/ticket_form.html
+++ b/ForgeTracker/forgetracker/templates/tracker_widgets/ticket_form.html
@@ -79,7 +79,7 @@
   <div class="grid-6">
     <label class="simple">Creator:</label>
     {% if ticket %}
-      <a href="{{ticket.reported_by.url()}}">{{ticket.reported_by.display_name}}</a>
+      {{lib.user_link(ticket.reported_by)}}
     {% else %}
       {{lib.user_link(c.user)}}
     {% endif %}

http://git-wip-us.apache.org/repos/asf/allura/blob/f06d7319/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 2f1337a..f8e9d18 100644
--- a/ForgeTracker/forgetracker/tests/functional/test_root.py
+++ b/ForgeTracker/forgetracker/tests/functional/test_root.py
@@ -2449,6 +2449,11 @@ class TestFunctionalController(TrackerTestController):
             t = tm.Ticket.query.get(summary=summary)
             assert_equal(t, None)
 
+    def test_user_missing(self):
+        self.new_ticket(summary='foo bar', assigned_to=c.user.username)
+        M.User.query.remove({'username': c.user.username})
+        self.app.get('/p/test/bugs/1/', status=200)
+
 
 class TestMilestoneAdmin(TrackerTestController):
     def _post(self, params, **kw):


Mime
View raw message