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; anonymous removed

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 The owner will remain ChrisNelson.
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.