general: update file types in all kind of formdefs on change (#47180) #688

Merged
fpeters merged 1 commits from wip/47180-update-filetype-in-all-formdefs into main 2023-09-18 11:48:48 +02:00
Owner
No description provided.
fpeters changed title from WIP: general: update file types in all kind of formdefs on change (#47180) to general: update file types in all kind of formdefs on change (#47180) 2023-09-17 18:45:08 +02:00
fpeters reviewed 2023-09-17 18:46:23 +02:00
@ -447,0 +447,4 @@
return redirect('./')
job = get_response().add_after_job(
FileTypeUpdateAfterJob(
Author
Owner

Au-delà de ce que je notais dans le ticket, je transforme ici en afterjob.

Au-delà de ce que je notais dans le ticket, je transforme ici en afterjob.
@ -1312,0 +1342,4 @@
filetype_id = self.kwargs['filetype_id']
previous_filetype = self.kwargs['previous_filetype']
new_filetype = self.kwargs['new_filetype']
for formdef in get_formdefs_of_all_kinds():
Author
Owner

ce que ne demandait pas non plus le ticket : passer sur tous les types de formdef.

ce que ne demandait pas non plus le ticket : passer sur tous les types de formdef.
fpeters changed title from general: update file types in all kind of formdefs on change (#47180) to WIP: general: update file types in all kind of formdefs on change (#47180) 2023-09-17 18:47:33 +02:00
fpeters force-pushed wip/47180-update-filetype-in-all-formdefs from 177ee88e62 to 056a3484a1 2023-09-17 18:57:28 +02:00 Compare
fpeters reviewed 2023-09-17 18:58:47 +02:00
@ -1312,0 +1364,4 @@
for workflow in workflows:
changed = False
for item in workflow.get_all_items():
if item.key == 'addattachment':
Author
Owner

Enfin ce que demandait le ticket : passer sur l'action "attacher un fichier".

Enfin ce que demandait le ticket : passer sur l'action "attacher un fichier".
fpeters changed title from WIP: general: update file types in all kind of formdefs on change (#47180) to general: update file types in all kind of formdefs on change (#47180) 2023-09-17 19:18:33 +02:00
tnoel requested changes 2023-09-18 10:22:19 +02:00
tnoel left a comment
Owner

Demande un peu pénible d'ajouts de tests... peut être contestée !

Demande un peu pénible d'ajouts de tests... peut être contestée !
@ -790,0 +801,4 @@
attach.document_type = formdef.fields[0].document_type
attach.by = ['_submitter']
wf.store()
Owner

Puisqu'on passe par get_formdefs_of_all_kinds pour mettre à jour les formdef, peut-être ajouter un bloc de champ avec un champ fichier, et une action de formulaire-de-workflow avec un champ fichier... (je sais, c'est un peu relou)

Puisqu'on passe par get_formdefs_of_all_kinds pour mettre à jour les formdef, peut-être ajouter un bloc de champ avec un champ fichier, et une action de formulaire-de-workflow avec un champ fichier... (je sais, c'est un peu relou)
Author
Owner

Voilà avec bloc et formulaire de workflow. (et bien d'avoir ajouté ce test, ça a permis de voir que la modif aux workflows pouvait ne pas avoir lieu s'il y avait à la fois formulaire de workflow et action de fichier attaché).

Voilà avec bloc et formulaire de workflow. (et bien d'avoir ajouté ce test, ça a permis de voir que la modif aux workflows pouvait ne pas avoir lieu s'il y avait à la fois formulaire de workflow et action de fichier attaché).
fpeters force-pushed wip/47180-update-filetype-in-all-formdefs from 056a3484a1 to 3df29ff9fc 2023-09-18 10:37:34 +02:00 Compare
fpeters requested review from tnoel 2023-09-18 11:43:43 +02:00
tnoel approved these changes 2023-09-18 11:48:23 +02:00
fpeters merged commit 699bc426f0 into main 2023-09-18 11:48:48 +02:00
fpeters deleted branch wip/47180-update-filetype-in-all-formdefs 2023-09-18 11:48:48 +02:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: entrouvert/wcs#688
No description provided.