allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject allura git commit: [#8066] don't error when user missing on ticket page [Forced Update!]
Date Fri, 11 Mar 2016 22:05:40 GMT
Repository: allura
Updated Branches:
  refs/heads/db/8066 a25c430a8 -> 3b7128857 (forced update)


[#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/3b712885
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/3b712885
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/3b712885

Branch: refs/heads/db/8066
Commit: 3b71288577151b473498f99858b97536493c0e45
Parents: c91eb67
Author: Dave Brondsema <dave@brondsema.net>
Authored: Fri Mar 11 10:46:35 2016 -0500
Committer: Dave Brondsema <dave@brondsema.net>
Committed: Fri Mar 11 17:05:26 2016 -0500

----------------------------------------------------------------------
 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/3b712885/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/3b712885/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/3b712885/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