Editing the name of a shot/task/asset now logs the old and new name in the activity

This commit is contained in:
2016-11-10 09:34:32 +01:00
parent 1134bb82a0
commit 497bbb8273
4 changed files with 61 additions and 2 deletions

View File

@@ -76,8 +76,9 @@ def activity_after_replacing_shot_asset(shot_or_asset, original):
val_shot = val_shot[:80] + u''
if descr is None:
# A name change activity contains both the old and the new name.
descr = 'changed "%s" to "%s" in %s "%s"' % \
(human_key, val_shot, typename, shot_or_asset['name'])
(human_key, val_shot, typename, original['name'])
else:
descr = 'edited %s "%s"' % (typename, shot_or_asset['name'])

View File

@@ -154,7 +154,8 @@ def activity_after_replacing_task(task, original):
val_task = val_task[:80] + u''
if descr is None:
descr = 'changed %s to "%s" in task "%s"' % (human_key, val_task, task['name'])
# A name change activity contains both the old and the new name.
descr = 'changed %s to "%s" in task "%s"' % (human_key, val_task, original['name'])
else:
descr = 'edited task "%s"' % task['name']