workflows: add a 'form_status_changed' variable

This commit is contained in:
Frédéric Péters 2012-08-16 14:04:31 +02:00
parent 956a26f26c
commit 2e87deff53
2 changed files with 4 additions and 0 deletions

View File

@ -249,6 +249,8 @@ class FormData(StorableObject):
if evolution.status and evolution.status != self.status:
d['form_previous_status'] = self.get_status_label(evolution.status)
break
if d['form_status'] == d['form_previous_status']:
d['form_status_changed'] = True
d.update(self.formdef.get_substitution_variables())

View File

@ -636,7 +636,9 @@ EmailsDirectory.register('change_user', N_('Notification of change to user'),
default_body = N_('''\
Hello,
[if-any form_status_changed]
Status of the form you submitted just changed (from "[before]" to "[after]").
[end]
[if-any user]
You can consult it with this link: