Modify

#11140 closed defect (duplicate)

KeyError: 'id' - Error in running report with input arguments

Reported by: ivanelson Owned by: rjollos
Priority: normal Component: BlackMagicTicketTweaksPlugin
Severity: normal Keywords: keyerror, tracreport
Cc: Trac Release: 1.0

Description (last modified by rjollos)

The error occurs when I run a report that has input arguments in the query:

2013-06-03 20:15:50,984 Trac[main] ERROR: Internal Server Error:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/Trac-1.0-py2.7.egg/trac/web/main.py", line 497, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/local/lib/python2.7/dist-packages/Trac-1.0-py2.7.egg/trac/web/main.py", line 224, in dispatch
    self._post_process_request(req, *resp)
  File "/usr/local/lib/python2.7/dist-packages/Trac-1.0-py2.7.egg/trac/web/main.py", line 338, in _post_process_request
    resp = f.post_process_request(req, *resp)
  File "/usr/local/lib/python2.7/dist-packages/BlackMagicTicketTweaks-0.12r1-py2.7.egg/blackmagic/blackmagic.py", line 129, in post_process_request
    id = t["id"]
KeyError: 'id'

Attachments (0)

Change History (3)

comment:1 Changed 15 months ago by rjollos

  • Description modified (diff)
  • Status changed from new to assigned

comment:2 Changed 15 months ago by ivanelson

Here my report that raises the error:

SELECT p.value AS __color__,
       owner AS __group__,
       t.id AS _Ticket,
       summary,
       t.type,
       t.resolution,
       to_char(to_timestamp(t.time/1000000),'DD/MM/YYYY') AS Created,
       to_char(to_timestamp(MAX(tc.time)/1000000),'DD/MM/YYYY') AS Closed
FROM ticket_change tc 
LEFT JOIN ticket t ON tc.ticket=id
LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
WHERE  tc.time >=
extract(epoch from to_timestamp('$DATEBEGIN','DDMMYYYY'))::bigint*1000000
AND tc.time < extract(epoch from to_timestamp('$DATEEND','DDMMYYYY') + interval '1 day')::bigint*1000000 
AND field='status' 
AND newvalue='closed' 
AND resolution='fixed'
GROUP by p.value, t.owner, t.id
ORDER BY  t.owner, t.id

comment:3 Changed 15 months ago by rjollos

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

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.