Modify

Opened 6 years ago

Closed 6 years 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

Description

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
        else:
            work = None

Attachments (0)

Change History (4)

comment:1 Changed 6 years ago by Chris Nelson

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

comment:2 Changed 6 years ago by falkb

You can close this ticket. Works now. Thanks.

comment:3 Changed 6 years ago by Ryan J Ollos

Cc: Ryan J Ollos added; anonymous removed

comment:4 Changed 6 years ago by Chris Nelson

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
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.