Pogues
Pogues copied to clipboard
Questionnaire composition - Handle objects with same technical ID
🇫🇷
Remonté par les premiers essais sur l'environnement de beta test :
- sur ce questionnaire, deux refs à deux modules distincts du TCM ne permettent pas la génération
- et ce pour toutes les cibles de génération
- deux types d'erreur différentes visibles :
- lorsque l'on produit le DDI, on obtient le message d'erreur
EnoGeneration error : An error was occured during the POGUES_XML_INSERT_FILTER_LOOP_INTO_QUESTION_TREE transformation. A sequence of more than one item is not allowed as the first argument of fn:number() (@position="247", @position="247")
- dans le document de spécification
EnoGeneration error : An error has occurred during the DDI_MULTIMODAL_SELECTION transformation. org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog. : Error in :/xslt/pre-processing/ddi/multimodal-selection.xsl null
- lorsque l'on produit le DDI, on obtient le message d'erreur
- ce n'est pas un problème général, joindre plusieurs refs est possible (comme recetté en DV), ce que prouve le questionnaire suivant.
Cause non établie, mais on dispose d'une solution de correction globale, en cours de mise en place côté back-office.
@nsenave an instance of the same technical id problem, isn't it?
Bug identified: we can't generate when two objects share the same technical ID. It only happens with fringe cases, when importing objects (like sequences) that have been duplicated.
(Started working on it. To be finished after work on other issues with higher priority.)
Issue should probably be transfered to Pogues-Back-Office repo (i can't do that due to lack of a proper permission).
Waiting for EnoV3
Linked with InseeFr/Bowie#64
Eno V3 is here, should we resume working on that @nsenave @laurentC35 ? Its back-office work.
@romaintailhurat We need a bit more specification on this I think, do we want:
- raise an exception if duplicate identifiers are detected: user saves the questionnaire in UI -> backend checks identifiers -> if duplicates -> throw an exception with a detailed error message -> the error message is prompted in UI.
or
- if duplicates, change the identifier of concerned elements
The latter one looks better on a user perspective, yet it seems trickier, especially in the composition case (might result in modifying identifiers of external questionnaires that might cause incoherences between Pogues questionnaires and for instance DDI that might not be updated)
First, we need to address the problem at its core, ie when duplicating a questionnaire, should the technical id of every objects stays the same? From a metadata management / DDI perspective, i think they should not, but it could challenged (moreover our ID management are not perfect, see https://github.com/InseeFr/Pogues/issues/592)
So, with the current situation, ie possibly having identical IDs when composing, the best way would be to modify the imported ID (your 2nd solution) not by modifying the referenced questionnaire ID but only at the composed questionnaire.
Ok, fair enough!
What about the case if duplicates exist within a single questionnaire? do we:
- consider it impossible (-> the backend doesn't check)
- make a check in backend with a warning message sent to UI if this happens?
- modify concerned ids?