Modify

Opened 3 years ago

Closed 3 years ago

#9214 closed defect (fixed)

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

Reported by: falkb Owned by: ChrisNelson
Priority: normal Component: TracJsGanttPlugin
Severity: normal Keywords:
Cc: rjollos 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 3 years ago by ChrisNelson

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

comment:2 Changed 3 years ago by falkb

You can close this ticket. Works now. Thanks.

comment:3 Changed 3 years ago by rjollos

  • Cc rjollos added

comment:4 Changed 3 years ago by ChrisNelson

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

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from ChrisNelson. Next status will be '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.