Modify

Opened 11 years ago

Closed 11 years ago

#11140 closed defect (duplicate)

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

Reported by: Ivanelson Nunes Owned by: Ryan J Ollos
Priority: normal Component: BlackMagicTicketTweaksPlugin
Severity: normal Keywords: keyerror, tracreport
Cc: Trac Release: 1.0

Description (last modified by Ryan J Ollos)

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 11 years ago by Ryan J Ollos

Description: modified (diff)
Status: newassigned

comment:2 Changed 11 years ago by Ivanelson Nunes

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 11 years ago by Ryan J Ollos

Resolution: duplicate
Status: assignedclosed

Duplicate of #7185.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.