Development #76909
api & applification: lors de l'import d'un formulaire et workflow avec donnée de traitement il manque un rebuild de la table formdef
Début:
24 avril 2023
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Non
Planning:
Non
Description
diff --git a/tests/api/test_export_import.py b/tests/api/test_export_import.py index 23cd986a4..a0a5b54a3 100644 --- a/tests/api/test_export_import.py +++ b/tests/api/test_export_import.py @@ -578,6 +578,10 @@ def test_export_import_bundle_import(pub): workflow = Workflow(name='test') workflow.roles = {'_receiver': 'Receiver'} workflow.category = workflow_category + workflow.backoffice_fields_formdef = WorkflowBackofficeFieldsFormDef(workflow) + workflow.backoffice_fields_formdef.fields = [ + StringField(id='bo1', label='test', type='string'), + ] workflow.store() block_category = BlockCategory(name='test') @@ -745,6 +749,9 @@ def test_export_import_bundle_import(pub): assert application.visible is True assert ApplicationElement.count() == 15 + formdef = FormDef.select()[0] + assert formdef.data_class().select() # check that fbo1 field exists in DB + # check editable flag is kept on install application.editable = False application.store()
=> FAILED tests/api/test_export_import.py::test_export_import_bundle_import - psycopg2.errors.UndefinedColumn: ERREUR: la colonne « fbo1 » n'existe pas
Dans le store du workflow:
if not migration_update: if get_response(): # <- on passe là get_response().add_after_job(_('Reindexing cards and forms after workflow change'), update) # update fait un formdef.update_storage() else: update()
On est déjà dans un afterjob (BundleImportJob), qui appelle un autre afterjob.
Révisions associées
api: run afterjobs after application pre-imports (#76909)
Historique
Mis à jour par Robot Gitea il y a 6 mois
- Statut changé de Nouveau à En cours
Frédéric Péters (fpeters) a ouvert une pull request sur Gitea concernant cette demande :
- URL : https://git.entrouvert.org/entrouvert/wcs/pulls/787
- Titre : WIP: application avec workflow avec données de traitement (#76909)
- Modifications : https://git.entrouvert.org/entrouvert/wcs/pulls/787/files
Mis à jour par Robot Gitea il y a 6 mois
- Statut changé de Solution proposée à Solution validée
Lauréline Guérin (lguerin) a approuvé une pull request sur Gitea concernant cette demande :
Mis à jour par Robot Gitea il y a 6 mois
- Statut changé de Solution validée à Résolu (à déployer)
Frédéric Péters (fpeters) a mergé une pull request sur Gitea concernant cette demande :
- URL : https://git.entrouvert.org/entrouvert/wcs/pulls/787
- Titre : application avec workflow avec données de traitement (#76909)
- Modifications : https://git.entrouvert.org/entrouvert/wcs/pulls/787/files
Mis à jour par Transition automatique il y a 6 mois
- Statut changé de Résolu (à déployer) à Solution déployée
misc: add afterjob processing to native django views (#76909)