On Monday, July 05, 2010, Adolfo González Blázquez wrote:
> Is it possible that you send that patch so we can use it?
Sure. Attached you find the patch. I do not guarantee that it fixes all plugins
and does not break the burndown update behavior. Well, I know for sure it
disables the burndown update for ticket import, but that's okay for me. I also
removed trailing whitespace in one file, so that's the reason for the many
whitespace changes.
Regards,
Stephan
--
Entrepreneur and Software Geek
Google me. "Zope Stephan Richter"
--
Follow Agilo on Twitter: http://twitter.com/agiloforscrum
Please support us by reviewing and voting on:
http://userstories.com/products/8-agilo-for-scrum
http://ohloh.net/p/agilo-scrum
http://freshmeat.net/projects/agiloforscrum
You have received this message because you are subscribed to
the "Agilo for Scrum" Google Group. This group is focused on
supporting Agilo for Scrum users and is moderated by
agile42 GmbH <http://www.agile42.com>.
To post to this group, send email to [email protected]
To unsubscribe from this group, send an email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/agilo
diff -r binary_agilo-1.3.0.3_PRO-py2.4/agilo/scrum/backlog/burndown.py binary_agilo-1.3.0.3_PRO-py2.4-patched/agilo/scrum/backlog/burndown.py
117c117
< def set_remaining_time(self, remaining_time, day=None):
---
> def set_remaining_time(self, remaining_time = 0, day=None):
120,121c120,126
< self._save(timestamp, remaining_time,
< update=(timestamp in self.history))
---
> update = timestamp in self.history
> debug(self,
> "set_remaining_time timestamp %s taskid %s remaining_time %d" % \
> (timestamp, self.task.id, remaining_time))
>
> self._save(timestamp, int(remaining_time),
> update = timestamp in self.history)
129c134
< Key.TASK_ID : self.task.id,
---
> Key.TASK_ID : int(self.task.id),
131c136
< Key.REMAINING_TIME : value,
---
> Key.REMAINING_TIME : int(value),
148c153
< (params[Key.REMAINING_TIME], self.task.id))
---
> (int(params[Key.REMAINING_TIME]), self.task.id))
153,154c158,160
< raise TracError("Error while saving remaining time: %s" % \
< to_unicode(e))
---
> if e is None:
> e = ""
> error(self, "Error while saving remaining time: %s sql %s" % (to_unicode(e), sql_query))
160c166
< " WHERE task_id=%d ORDER BY date DESC" % (BURNDOWN_TABLE, self.task.id)
---
> " WHERE task_id=%d ORDER BY date DESC" % (BURNDOWN_TABLE, int(self.task.id))
diff -r binary_agilo-1.3.0.3_PRO-py2.4/agilo/scrum/burndown/changelistener.py binary_agilo-1.3.0.3_PRO-py2.4-patched/agilo/scrum/burndown/changelistener.py
27c27
< # If the sprint backlog is not configured to show tasks - this class will fail.
---
> # If the sprint backlog is not configured to show tasks - this class will fail.
30c30
<
---
>
32c32
<
---
>
36c36
<
---
>
42c42
<
---
>
44,45c44,49
< has_fields = ticket.is_writeable_field(Key.SPRINT) and \
< ticket.is_writeable_field(Key.REMAINING_TIME)
---
> # XXX: If the ticket is missing the `is_writable_field` method, don't
> # call it.
> has_fields = False
> if hasattr(ticket, 'is_writable_field'):
> has_fields = ticket.is_writeable_field(Key.SPRINT) and \
> ticket.is_writeable_field(Key.REMAINING_TIME)
48c52
<
---
>
52c56
<
---
>
55c59
<
---
>
58c62
<
---
>
62c66
<
---
>
66c70
<
---
>
75c79
<
---
>
79c83
<
---
>
83c87
<
---
>
90c94
<
---
>
91a96,97
> if not hasattr(ticket, 'is_task_like'):
> return False
94c100
<
---
>
105c111
<
---
>
109c115
<
---
>
113c119
<
---
>
115c121
<
---
>
120c126
<
---
>
123c129
<
---
>
126c132
<
---
>
127a134,135
> if not hasattr(ticket, 'is_writable_field'):
> return None
131c139
<
---
>
135c143
<
---
>
138c146
<
---
>
141c149
<
---
>
150c158
<
---
>
155c163
<
---
>
162c170
<
---
>
165c173
<
---
>
172c180
<
---
>
176c184
<
---
>