Opened 11 years ago

Closed 11 years ago

Last modified 5 years ago

#1267 closed defect (fixed)

[patch] fix error when there's no ticket.blocking set in a ticket

Reported by: phpxcache Owned by: Noah Kantrowitz
Priority: high Component: MasterTicketsPlugin
Severity: critical Keywords:
Cc: Trac Release: 0.10


this happen for old tickets which were created before custom field is added

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/trac/web/", line 387, in dispatch_request
  File "/usr/lib/python2.4/site-packages/trac/web/", line 239, in dispatch
    template, content_type = self._post_process_request(req,
  File "/usr/lib/python2.4/site-packages/trac/web/", line 269, in _post_process_request
  File "build/bdist.linux-i686/egg/mastertickets/", line 56, in post_process_request
AttributeError: 'NoneType' object has no attribute 'replace'
Index: mastertickets/
--- mastertickets/ (revision 2071)
+++ mastertickets/ (working copy)
@@ -53,8 +53,9 @@

             # Linkify the 'Blocks' field
             blocks_ids = req.hdf.get('ticket.blocking')
-            blocks_ids = blocks_ids.replace('#', '')
             if blocks_ids:
+               blocks_ids = blocks_ids.replace('#', '')
+            if blocks_ids:
                 blocks_ids = [x.strip() for x in blocks_ids.split(',')]
                 req.hdf['project.footer'] = Markup(req.hdf['project.footer'] + Markup(html.DIV(linkify_ids(self.env, req, blocks_ids), id='linkified_blocking', style='display:none')))
                 add_script(req, 'mastertickets/linkify_blocking.js')

Attachments (0)

Change History (2)

comment:1 Changed 11 years ago by Noah Kantrowitz

Resolution: fixed
Status: newclosed

(In [2079]) Handle pre-existing tickets. (Closes #1241, #1267)

comment:2 Changed 5 years ago by Ryan J Ollos

(In [12867]) MasterTicketsPlugin:

Handle pre-existing tickets. (Closes #1241, #1267)

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Noah Kantrowitz.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.