Changeset 2654
- Timestamp:
- 09/23/07 08:27:43 (1 year ago)
- Files:
-
- worklogplugin/0.10/worklog/manager.py (modified) (2 diffs)
- worklogplugin/0.10/worklog/ticket_daemon.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
worklogplugin/0.10/worklog/manager.py
r2571 r2654 72 72 if change['permanent']: 73 73 cnum += 1 74 75 74 tckt.save_changes(self.authname, msg, self.now, db, cnum+1) 75 ## Often the time overlaps and causes a db error, 76 ## especially when the trac integration post-commit hook is used. 77 ## NOTE TO SELF. I DON'T THINK THIS IS NECESSARY RIGHT NOW... 78 #count = 0 79 #while count < 10: 80 # try: 81 # tckt.save_changes(self.authname, msg, self.now, db, cnum+1) 82 # count = 42 83 # except Exception, e: 84 # self.now += 1 85 # count += 1 76 86 db.commit() 77 87 … … 192 202 db = self.env.get_db_cnx() 193 203 tckt = Ticket(self.env, active['ticket'], db) 204 194 205 # This hideous hack is here because I don't yet know how to do variable-DP rounding in python - sorry! 195 206 # It's meant to round to 2 DP, so please replace it if you know how. Many thanks, MK. worklogplugin/0.10/worklog/ticket_daemon.py
r2434 r2654 11 11 """Called when a ticket is created.""" 12 12 pass 13 14 13 15 14 def ticket_changed(self, ticket, comment, author, old_values): 16 15 """Called when a ticket is modified. … … 21 20 if self.config.getbool('worklog', 'autostop') \ 22 21 and 'closed' == ticket['status'] \ 22 and old_values.has_key('status') \ 23 23 and 'closed' != old_values['status']: 24 24 mgr = WorkLogManager(self.env, self.config)
