workflows: record single event for button clicks (#86597) #1103
Loading…
Reference in New Issue
No description provided.
Delete Branch "wip/86597-workflow-event"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Le problème réel semble plutôt être que sur un clic "saut manuel" il y a deux évènements enregistrés, le clic puis l'évènement générique "action dans un
<form>
"; je reprends ici pour marquer tous les boutons de workflow avec l'action correspondante, et ainsi tout le temps pouvoir enregistrer l'évènement précis du clic sur un bouton.18133d08f8
toc7f95b491e
@ -148,6 +148,7 @@ class AddAttachmentWorkflowStatusItem(WorkflowStatusItem):
if self.display_button:
form.add_submit('button%s' % self.id, self.button_label or _('Upload File'))
form.get_widget('button%s' % self.id).backoffice_info_text = self.backoffice_info_text
form.get_widget('button%s' % self.id).action_id = self.id
Annotation de tous les boutons ajoutés par les actions avec l'id de l'action.
@ -121,7 +122,6 @@ class ChoiceWorkflowStatusItem(WorkflowStatusJumpItem):
if form.get_submit() == 'button%s' % self.id:
wf_status = self.get_target_status(formdata)
if wf_status:
formdata.record_workflow_event('button', action_item_id=self.id)
On retire l'enregistrement spécifique qui avait lieu pour le saut manuel.
@ -73,3 +73,3 @@
'workflow-created-carddata': _('Created card'),
'workflow-edited-carddata': _('Edited card'),
'workflow-form-submit': _('Action in workflow form'),
'workflow-form-submit': _('Action in workflow form'), # legacy
Le message qui prêtait à confusion n'apparaitra plus.
@ -2683,7 +2689,6 @@ class WorkflowStatus(SerieOfActionsMixin):
if evo.status:
filled.status = evo.status
filled.store()
filled.record_workflow_event('workflow-form-submit')
On n'enregistre plus l'ancien évènement.
@ -2674,0 +2675,4 @@
if hasattr(button, 'action_id'):
# some actions won't have a button name (e.g. a click on a "add block row" button),
# and some actual buttons won't have an action_id ("editable" action).
filled.record_workflow_event('button', action_item_id=button.action_id)
Enregistrement de l'évènement du clic de manière systématique. (sauf les cas cités)
WIP: workflows: record single event for button clicks (#86597)to workflows: record single event for button clicks (#86597)