Skip to content

Commit

Permalink
Report which fields have changed when updating a task.
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Coddington authored and ralphbean committed May 5, 2014
1 parent 82c36e9 commit f8d3b25
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions bugwarrior/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,18 @@ def _bool_option(section, option, default):

log.name('db').info("Updating {0} tasks", len(issue_updates['changed']))
for issue in issue_updates['changed']:
changes = '; '.join([
'{field}: {f} -> {t}'.format(
field=field,
f=repr(ch[0]),
t=repr(ch[1])
)
for field, ch in six.iteritems(issue.get_changes(keep=True))
])
log.name('db').info(
"Updating task {0}",
issue['description'].encode("utf-8")
"Updating task {0}; {1}",
issue['description'].encode("utf-8"),
changes,
)
try:
tw.task_update(issue)
Expand Down

0 comments on commit f8d3b25

Please sign in to comment.