id,summary,reporter,owner,description,type,status,priority,component,severity,resolution,keywords,cc,release
6043,Hours and Estimation Fields should be checked for existence,anonymous,bobbysmith007,A KeyError-exception occurs if the fields hours and estimation are not transmitted.\r\nTherefore it should be checked if the fields exist:\r\n\r\n{{{\r\n--- ticket_daemon.py.orig       2009-10-27 18:07:39.000000000 +0100\r\n+++ ticket_daemon.py    2009-10-27 18:54:20.000000000 +0100\r\n@@ -166_10 +166_16 @@\r\n         #some european countries use _ as the decimal separator\r\n         try:\r\n             convertfloat(ticket.values['hours'])\r\n+       except KeyError:\r\n+           ticket['hours'] = 0\r\n+           convertfloat(ticket.values['hours'])\r\n         except ValueError:\r\n             errors.append(('Add Hours to Ticket'_ 'Value must be a number'))\r\n         try:\r\n             convertfloat(ticket.values['estimatedhours'])\r\n+       except KeyError:\r\n+           ticket['estimatedhours'] = 0\r\n+           convertfloat(ticket.values['estimatedhours'])\r\n         except ValueError:\r\n             errors.append(('Estimated Number of Hours'_ 'Value must be a number'))\r\n         return errors\r\n}}}\r\n,defect,closed,normal,TimingAndEstimationPlugin,normal,fixed,,,0.11
