Opened 7 years ago

Closed 7 years ago

#1280 closed defect (duplicate)

Bug in master tickets plugin when invalid ticket num is entered.

Reported by: dpeterson@… Owned by: coderanger
Priority: normal Component: MasterTicketsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10


I've run a query generating a list of tickets (so they all exist) and then click on one of the ticket links and get the following traceback:

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-x86_64/egg/mastertickets/", line 59, in post_process_request
  File "build/bdist.linux-x86_64/egg/mastertickets/", line 19, in linkify_ids
  File "/usr/lib/python2.4/site-packages/trac/ticket/", line 40, in __init__
    self._fetch_ticket(tkt_id, db)
  File "/usr/lib/python2.4/site-packages/trac/ticket/", line 86, in _fetch_ticket
    raise TracError('Ticket %d does not exist.' % tkt_id,
TypeError: int argument required

Looks like a bug with the master ticket plugin.

Attachments (0)

Change History (2)

comment:1 Changed 7 years ago by dpeterson@…

Changing's linkify_ids method to the following allows the tickets to display even if the blocking or blocked ticket id's aren't valid. Probably not ideal code, but it works. :-)

def linkify_ids(env, req, ids):
    l = []
    for i in ids:
            href = req.href.ticket(i)
            t = Ticket(env, i)
            status = t['status']
            l.append(unicode(html.A('#%s'%i, href=href, class_='%s ticket'%status)))
            l.append(unicode('#%s' % i))
    #l = [unicode(html.A('#%s'%i, href=req.href.ticket(i), class_='%s ticket'%Ticket(env, i)['status'])) for i in ids]

    return Markup(', '.join(l))

comment:2 Changed 7 years ago by coderanger

  • Resolution set to duplicate
  • Status changed from new to closed

Same problem and fix as #1326.

Add Comment

Modify Ticket

as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from coderanger. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.