workflow reassign: change all evolution items status
This commit is contained in:
parent
864d0b0408
commit
d7b58c68b0
|
@ -581,12 +581,15 @@ class FormDefPage(Directory):
|
|||
form.get_widget('mapping-%s' % status.id).parse()
|
||||
for item in self.formdef.data_class().select():
|
||||
item.status = status_mapping.get(item.status)
|
||||
if not item.evolution:
|
||||
item.evolution = []
|
||||
else:
|
||||
for evo in item.evolution:
|
||||
evo.status = status_mapping.get(evo.status)
|
||||
evo = Evolution()
|
||||
evo.time = time.localtime()
|
||||
evo.status = item.status
|
||||
evo.comment = _('Administrator changed workflow, reassigned status')
|
||||
if not item.evolution:
|
||||
item.evolution = []
|
||||
item.evolution.append(evo)
|
||||
item.store()
|
||||
|
||||
|
|
Loading…
Reference in New Issue