Pogues icon indicating copy to clipboard operation
Pogues copied to clipboard

Questionnaire composition - Handle objects with same technical ID

Open romaintailhurat opened this issue 2 years ago • 11 comments

🇫🇷

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
  • 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.

romaintailhurat avatar Mar 02 '23 09:03 romaintailhurat

Cause non établie, mais on dispose d'une solution de correction globale, en cours de mise en place côté back-office.

romaintailhurat avatar Mar 07 '23 09:03 romaintailhurat

@nsenave an instance of the same technical id problem, isn't it?

romaintailhurat avatar Apr 05 '23 12:04 romaintailhurat

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.

romaintailhurat avatar Apr 12 '23 12:04 romaintailhurat

(Started working on it. To be finished after work on other issues with higher priority.)

nsenave avatar Apr 27 '23 08:04 nsenave

Issue should probably be transfered to Pogues-Back-Office repo (i can't do that due to lack of a proper permission).

romaintailhurat avatar Sep 18 '23 08:09 romaintailhurat

Waiting for EnoV3

Linked with InseeFr/Bowie#64

laurentC35 avatar Sep 29 '23 09:09 laurentC35

Eno V3 is here, should we resume working on that @nsenave @laurentC35 ? Its back-office work.

romaintailhurat avatar Mar 13 '24 14:03 romaintailhurat

@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)

nsenave avatar Mar 20 '24 09:03 nsenave

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.

romaintailhurat avatar Mar 20 '24 10:03 romaintailhurat

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?

nsenave avatar Mar 20 '24 10:03 nsenave