Opened 13 years ago

Closed 13 years ago

Last modified 18 months ago

#9214 closed defect (fixed)

KeyError at ticket[self.fields['worked']

Reported by: falkb Owned by: Chris Nelson
Priority: normal Component: TracJsGanttPlugin
Severity: normal Keywords:
Cc: Ryan J Ollos Trac Release: 0.12


seen with your downloaded latest version [10700]. Some of my tickets haven't the projected hours set yet. Then I got an error traceback with KeyError: u'totalhours'.

The patch to fix that is to apply at line 490:

        if self.fields['worked']:
-            work = float(ticket[self.fields['worked']])
+            if ticket.get(self.fields['worked']):
+                work = float(ticket[self.fields['worked']])
+            else:
+                work = None
            work = None

Attachments (0)

Change History (4)

comment:1 Changed 13 years ago by Chris Nelson

(In [10701]) Handle missing time worked. Refs #9214.

comment:2 Changed 13 years ago by falkb

You can close this ticket. Works now. Thanks.

comment:3 Changed 13 years ago by Ryan J Ollos

Cc: Ryan J Ollos added; anonymous removed

comment:4 Changed 13 years ago by Chris Nelson

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Chris Nelson.
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.