Child:
[38f2fe]
(diff)
Download this file
ticket_changed_tmpl
38 lines (32 with data), 939 Bytes
{% python from allura.lib import patience %}\
{% for key, values in changelist %}\
{% choose %}\
{% when key == 'description' %}\
- Description has changed:
Diff:
~~~~
${'\n'.join(patience.unified_diff(
a=values[0].splitlines(),
b=values[1].splitlines(),
fromfile='old',
tofile='new',
lineterm=''))}
~~~~
{% end %}\
{% otherwise %}\
{% with oldv, newv = values %}\
{% choose %}\
{% when key == 'assigned_to' %}\
- **${key}**: {% if oldv %}${oldv.display_name} --> {% end %}{% choose %}{% when newv %}${newv.display_name}{% end %}{% otherwise %} nobody {% end %}{% end %}
{% end %}\
{% when key == 'labels' %}\
- **${key}**: ${', '.join(oldv)} --> ${', '.join(newv)}
{% end %}\
{% otherwise %}\
- **${key}**: ${oldv} --> ${newv}
{% end %}\
{% end %}\
{% end %}\
{% end %}\
{% end %}\
{% end %}\