Activity: Shorten long values.

This commit is contained in:
2016-10-20 18:06:20 +02:00
parent a552cf4ae5
commit 63984d3455
2 changed files with 9 additions and 1 deletions

View File

@@ -1,3 +1,5 @@
# -*- encoding: utf-8 -*-
import itertools
import logging
@@ -49,6 +51,9 @@ def activity_after_replacing_shot(shot, original):
if key == 'properties.status':
val_shot = pillar.web.jinja.format_undertitle(val_shot)
elif len(val_shot) > 20:
val_shot = val_shot[:17] + u''
descr = 'changed "%s" to "%s" in shot "%s"' %\
(human_key, val_shot, shot['name'])
else:

View File

@@ -1,3 +1,5 @@
# -*- encoding: utf-8 -*-
import logging
import itertools
@@ -145,7 +147,8 @@ def activity_after_replacing_task(task, original):
human_key = 'assigned users'
val_task = get_user_list(val_task)
descr = 'assigned task "%s" to %s' % (task['name'], val_task)
elif len(val_task) > 20:
val_task = val_task[:17] + u''
if descr is None:
descr = 'changed %s to %s in task "%s"' % (human_key, val_task, task['name'])
else: