Commits

Tetsuya Morimoto committed b63f214

fixed to show ticket id even if ticket is not found, related to 0f5a0796ca99

  • Participants
  • Parent commits 5bec2b8

Comments (0)

Files changed (1)

ticketref/web_ui.py

                                                                 cell["value"])
 
     def _get_hyperlink_from_ticket(self, req, ref_id):
-        elem = verbose_elem = "#%s" % ref_id
+        elem = verbose_elem = tag.span("#%s" % ref_id)
         try:
             ticket = Ticket(self.env, ref_id)
             if "TICKET_VIEW" in req.perm(ticket.resource):
                 elem = tag.a("#%s" % ref_id, **attr)
                 verbose_elem = tag.a("#%s %s" % (ref_id, title), **attr)
         except ResourceNotFound:
-            pass  # not supposed to happen, just in case
+            self.log.warn("ticket not found: %s" % ref_id)
         return elem, verbose_elem
 
     def _link_refs(self, req, refs_text, verbose_link=False):
                     title = shorten_line(ticket["summary"])
                     elem = u"#%s %s" % (ref_id, title)
             except ResourceNotFound:
-                pass  # not supposed to happen, just in case
+                self.log.warn("ticket not found: %s" % ref_id)
             items.extend([elem, u", "])
         return u"".join(item for item in items[:-1])