Project

General

Profile

Anomalie #16406

Migration : Documents dupliqué lors de la migration (Courriers départs)

Added by Ludovic ARAUJO about 1 year ago. Updated 11 months ago.

Status:
Résolue
Priority:
2-Sérieux
Target version:
Start date:
02/25/2021
Due date:
Tags Courrier:

Description

Lors de la migration les documents principal sont dupliqué.
En effet, les document principale que l'on trouve dans res_letterbox se trouvent doublé dans res_attachments :

Fingerprint de référence : 877e045a3e996f874f7a23b0026d8348c201c7cd6dc909564c1e2527df3ee8e9142a798e69a1195e50773516eedc447a4847e8466be90a129346ab65f01ff5e1

res_letterbox:

select res_id,filename from res_attachments where fingerprint = '877e045a3e996f874f7a23b0026d8348c201c7cd6dc909564c1e2527df3ee8e9142a798e69a1195e50773516eedc447a4847e8466be90a129346ab65f01ff5e1'
res_id|filename            |
------|--------------------|
  2613|0303_1661759406.docx|

res_attachments :

select res_id,filename from res_letterbox where fingerprint = '877e045a3e996f874f7a23b0026d8348c201c7cd6dc909564c1e2527df3ee8e9142a798e69a1195e50773516eedc447a4847e8466be90a129346ab65f01ff5e1'
res_id|filename           |
------|-------------------|
  3768|0304_478338975.docx|

History

#4 Updated by Ludovic ARAUJO about 1 year ago

  • Target version changed from Inscription Backlog Courrier to 20.10 (Support actif)

#5 Updated by Emmanuel DILLARD about 1 year ago

  • Subject changed from Documents dupliqué lors de la migration to Migration : Documents dupliqué lors de la migration (Courriers départs)
  • Due date set to 03/01/2021
  • Status changed from A qualifier to A étudier

#6 Updated by Emmanuel DILLARD about 1 year ago

  • Status changed from A étudier to Etude planifiée

#7 Updated by Emmanuel DILLARD about 1 year ago

-> Effet sur le parapheur : document identique en document principal et en attachement

#8 Updated by Emmanuel DILLARD about 1 year ago

  • Assignee changed from EDI PO to Florian AZIZIAN

#9 Updated by Emmanuel DILLARD about 1 year ago

  • Status changed from Etude planifiée to A étudier

#10 Updated by Florian AZIZIAN about 1 year ago

  • Status changed from A étudier to Complément d'Informations
  • Assignee changed from Florian AZIZIAN to Ludovic ARAUJO

Lors de la migration vers 20.03, dans le fichier migration/20.03/migrateOutgoingAttachments.php
Les courriers départ spontané (PJ) sont migrés en tant que courrier principal (car on peut maintenant créer un courrier départ directement depuis l'indexation).
Les pj départ sont ensuite supprimés.

Les 2 requêtes indiquées dans la description pointent sur res_letterbox.
Il faudrait les 2 requêtes suivantes, pour un courrier qui a l'anomalie, et un courrier qui n'a pas l'anomalie

select * from res_letterbox where res_id = 123;
select * from res_attachments where res_id_master = 123;

#11 Updated by Ludovic ARAUJO about 1 year ago

  • Description updated (diff)

petite modif sur les requête faites me suis trompé quand j'ai collé les requetes ...
bref du coup j'ai ajusté les requetes en fonction de ce que tu m'a dit :

select res_id,res_id_master,filename from res_attachments where fingerprint = '877e045a3e996f874f7a23b0026d8348c201c7cd6dc909564c1e2527df3ee8e9142a798e69a1195e50773516eedc447a4847e8466be90a129346ab65f01ff5e1'

res_id|res_id_master|filename           |
------|-------------|-------------------|
  3768|         2613|0304_478338975.docx|
select res_id,filename from res_letterbox where fingerprint = '877e045a3e996f874f7a23b0026d8348c201c7cd6dc909564c1e2527df3ee8e9142a798e69a1195e50773516eedc447a4847e8466be90a129346ab65f01ff5e1'

res_id|filename            |
------|--------------------|
  2613|0303_1661759406.docx|

#12 Updated by Ludovic ARAUJO about 1 year ago

  • Status changed from Complément d'Informations to A traiter
  • Assignee deleted (Ludovic ARAUJO)

#13 Updated by Ludovic ARAUJO about 1 year ago

voici d'autre exemple avec des courriers arrivé :

select * from res_letterbox where res_id = 2073
res_id|subject         |type_id|format|creation_date      |modification_date  |doc_date           |docserver_id|path          |filename           |fingerprint                                                                                                                     |filesize|status|destination    |work_batch|origin|priority        |policy_id|cycle_id|initiator      |locker_user_id|locker_time|confidentiality|fulltext_result|departure_date|barcode|opinion_limit_date|external_id|category_id|alt_identifier      |admission_date     |process_limit_date|closing_date       |flag_alarm1|flag_alarm2|alarm1_date|alarm2_date|model_id|typist|custom_fields           |linked_resources|version|integrations|dest_user|retention_frozen|binding|
------|----------------|-------|------|-------------------|-------------------|-------------------|------------|--------------|-------------------|--------------------------------------------------------------------------------------------------------------------------------|--------|------|---------------|----------|------|----------------|---------|--------|---------------|--------------|-----------|---------------|---------------|--------------|-------|------------------|-----------|-----------|--------------------|-------------------|------------------|-------------------|-----------|-----------|-----------|-----------|--------|------|------------------------|----------------|-------|------------|---------|----------------|-------|
  2073|document n  2073|   1206|pdf   |2020-03-06 09:41:46|2020-03-06 09:41:46|2020-03-06 00:00:00|FASTHD_MAN  |2020#03#0001##|0131_1414077264.pdf|b36968621958d7afe55a5e12277a6bc7ca38468251bf293910316cef264829c70479d833b73f6125a5ed5b821336085f45db46f2b6145d18e3e1a93a54038f3c|  118402|END   |AFD-DOE-TER-MOB|          |      |poiuytre1357nbvc|         |        |AFD-DOE-TER-MOB|              |           |N              |               |              |       |                  |{}         |incoming   |PARAF/AFD/2020/00643|2020-03-06 00:00:00|                  |2020-03-18 14:26:43|N          |N          |           |           |       1|  2717|{"1": "Courrier simple"}|[]              |      1|{}          |     2717|false           |       |
select * from res_attachments where res_id_master = 2073
res_id|title                           |format|creation_date      |identifier|relation|modification_date|docserver_id|path          |filename           |fingerprint                                                                                                                     |filesize|status|validation_date|effective_date|work_batch|origin|res_id_master|attachment_type  |in_signature_book|signatory_user_serial_id|fulltext_result|in_send_attach|external_id              |origin_id|modified_by|recipient_type|recipient_id|typist|
------|--------------------------------|------|-------------------|----------|--------|-----------------|------------|--------------|-------------------|--------------------------------------------------------------------------------------------------------------------------------|--------|------|---------------|--------------|----------|------|-------------|-----------------|-----------------|------------------------|---------------|--------------|-------------------------|---------|-----------|--------------|------------|------|
  2906|PJ n  2906 pour le document 2073|pdf   |2020-03-06 09:41:47|          |        |                 |FASTHD_MAN  |2020#03#0001##|0132_1099885677.pdf|b36968621958d7afe55a5e12277a6bc7ca38468251bf293910316cef264829c70479d833b73f6125a5ed5b821336085f45db46f2b6145d18e3e1a93a54038f3c|  118402|A_TRA |               |              |          |      |         2073|response_project |true             |                        |               |false         |{"signatureBookId": null}|         |           |              |            |  2717|
  2983|PJ n  2983 pour le document 2073|doc   |2020-03-12 08:55:34|          |       1|                 |FASTHD_MAN  |2020#03#0001##|0265_96648537.doc  |0f1de13bd7a609699168c6921349defb57db51cb8c39ba7debad39f0292f35eb6ae07ec8b23e6ff8e8c7d4c5abed8b2a61d5fd409b60496336e7b0235ef6b727|  164864|A_TRA |               |              |          |      |         2073|simple_attachment|false            |                        |               |false         |{"signatureBookId": null}|         |           |              |            |  2717|
select * from res_letterbox where res_id = 3184;
res_id|subject         |type_id|format|creation_date      |modification_date  |doc_date           |docserver_id|path          |filename           |fingerprint                                                                                                                     |filesize|status|destination    |work_batch|origin|priority        |policy_id|cycle_id|initiator      |locker_user_id|locker_time|confidentiality|fulltext_result|departure_date|barcode|opinion_limit_date|external_id|category_id|alt_identifier      |admission_date     |process_limit_date|closing_date       |flag_alarm1|flag_alarm2|alarm1_date|alarm2_date|model_id|typist|custom_fields           |linked_resources|version|integrations|dest_user|retention_frozen|binding|
------|----------------|-------|------|-------------------|-------------------|-------------------|------------|--------------|-------------------|--------------------------------------------------------------------------------------------------------------------------------|--------|------|---------------|----------|------|----------------|---------|--------|---------------|--------------|-----------|---------------|---------------|--------------|-------|------------------|-----------|-----------|--------------------|-------------------|------------------|-------------------|-----------|-----------|-----------|-----------|--------|------|------------------------|----------------|-------|------------|---------|----------------|-------|
  3184|document n  3184|   1206|pdf   |2020-07-15 17:47:48|2020-07-15 17:47:48|2020-07-15 00:00:00|FASTHD_MAN  |2020#07#0001##|0340_1420038006.pdf|d1d537d9eb3944f27fb789c76f0df563b8c338c3549f1fde53c03a656e1c4716d638e958fb6034329df84290452d9b80ff63facde9301b832665e45fcc53d572| 1092897|END   |AFD-SGN-DSI-SAP|          |      |poiuytre1357nbvc|         |        |AFD-SGN-DSI-SAP|              |           |N              |               |              |       |                  |{}         |incoming   |PARAF/AFD/2020/01754|2020-07-15 00:00:00|                  |2020-08-14 11:25:14|N          |N          |           |           |       1|   158|{"1": "Courrier simple"}|[]              |      1|{}          |      158|false           |       |
select * from res_attachments where res_id_master = 3184;
res_id|title                           |format|creation_date      |identifier|relation|modification_date|docserver_id|path          |filename          |fingerprint                                                                                                                     |filesize|status|validation_date|effective_date|work_batch|origin|res_id_master|attachment_type |in_signature_book|signatory_user_serial_id|fulltext_result|in_send_attach|external_id              |origin_id|modified_by|recipient_type|recipient_id|typist|
------|--------------------------------|------|-------------------|----------|--------|-----------------|------------|--------------|------------------|--------------------------------------------------------------------------------------------------------------------------------|--------|------|---------------|--------------|----------|------|-------------|----------------|-----------------|------------------------|---------------|--------------|-------------------------|---------|-----------|--------------|------------|------|
  4678|PJ n  4678 pour le document 3184|pdf   |2020-07-15 17:47:48|          |        |                 |FASTHD_MAN  |2020#07#0001##|0341_873460485.pdf|d1d537d9eb3944f27fb789c76f0df563b8c338c3549f1fde53c03a656e1c4716d638e958fb6034329df84290452d9b80ff63facde9301b832665e45fcc53d572| 1092897|A_TRA |               |              |          |      |         3184|response_project|true             |                        |               |false         |{"signatureBookId": null}|         |           |              |            |   158|~~~

#14 Updated by Emmanuel DILLARD about 1 year ago

  • Status changed from A traiter to A étudier
  • Assignee set to Florian AZIZIAN

#15 Updated by Ludovic ARAUJO about 1 year ago

exemple avant migration :

select * from res_letterbox where res_id = 3184;
res_id|title|subject         |description|type_id|format|typist|creation_date      |modification_date  |converter_result|author|identifier|source|relation|doc_date           |docserver_id|folders_system_id|path          |filename           |offset_doc|fingerprint                                                                                                                     |filesize|status|destination    |validation_date|work_batch|origin|priority        |policy_id|cycle_id|is_multi_docservers|custom_t1|custom_n1|custom_f1|custom_d1|custom_t2|custom_n2|custom_f2|custom_d2|custom_t3|custom_n3|custom_f3|custom_d3|custom_t4|custom_n4|custom_f4|custom_d4|custom_t5|custom_n5|custom_f5|custom_d5|custom_t6|custom_d6|custom_t7|custom_d7|custom_t8|custom_d8|custom_t9|custom_d9|custom_t10|custom_d10|custom_t11|custom_t12|custom_t13|custom_t14|custom_t15|reference_number|tablename    |initiator      |dest_user|locker_user_id|locker_time|confidentiality|convert_result|convert_attempts|fulltext_result|fulltext_attempts|tnl_result|tnl_attempts|external_id|external_link|departure_date|department_number_id|barcode|sve_start_date|
------|-----|----------------|-----------|-------|------|------|-------------------|-------------------|----------------|------|----------|------|--------|-------------------|------------|-----------------|--------------|-------------------|----------|--------------------------------------------------------------------------------------------------------------------------------|--------|------|---------------|---------------|----------|------|----------------|---------|--------|-------------------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|----------|----------|----------|----------|----------|----------|----------|----------------|-------------|---------------|---------|--------------|-----------|---------------|--------------|----------------|---------------|-----------------|----------|------------|-----------|-------------|--------------|--------------------|-------|--------------|
  3184|     |document n  3184|           |   1206|pdf   |430   |2020-07-15 17:47:48|2020-07-15 17:47:48|                |      |          |      |        |2020-07-15 00:00:00|FASTHD_MAN  |                 |2020#07#0001##|0340_1420038006.pdf|          |d1d537d9eb3944f27fb789c76f0df563b8c338c3549f1fde53c03a656e1c4716d638e958fb6034329df84290452d9b80ff63facde9301b832665e45fcc53d572| 1092897|END   |AFD-SGN-DSI-SAP|               |          |      |poiuytre1357nbvc|         |        |N                  |         |         |    39000|         |         |         |         |         |         |         |         |         |         |         |         |         |         |         |         |         |         |         |         |         |         |         |         |         |          |          |          |          |          |          |          |                |res_letterbox|AFD-SGN-DSI-SAP|430      |              |           |N              |              |                |               |                 |          |            |           |             |              |                    |       |              |
select * from res_attachments where res_id_master = 3184;
res_id|title|subject         |description|type_id|format|typist|creation_date      |modification_date  |converter_result|author|identifier|source|relation|doc_date           |docserver_id|folders_system_id|path          |filename           |offset_doc|fingerprint                                                                                                                     |filesize|status|destination    |validation_date|work_batch|origin|priority        |policy_id|cycle_id|is_multi_docservers|custom_t1|custom_n1|custom_f1|custom_d1|custom_t2|custom_n2|custom_f2|custom_d2|custom_t3|custom_n3|custom_f3|custom_d3|custom_t4|custom_n4|custom_f4|custom_d4|custom_t5|custom_n5|custom_f5|custom_d5|custom_t6|custom_d6|custom_t7|custom_d7|custom_t8|custom_d8|custom_t9|custom_d9|custom_t10|custom_d10|custom_t11|custom_t12|custom_t13|custom_t14|custom_t15|reference_number|tablename    |initiator      |dest_user|locker_user_id|locker_time|confidentiality|convert_result|convert_attempts|fulltext_result|fulltext_attempts|tnl_result|tnl_attempts|external_id|external_link|departure_date|department_number_id|barcode|sve_start_date|
------|-----|----------------|-----------|-------|------|------|-------------------|-------------------|----------------|------|----------|------|--------|-------------------|------------|-----------------|--------------|-------------------|----------|--------------------------------------------------------------------------------------------------------------------------------|--------|------|---------------|---------------|----------|------|----------------|---------|--------|-------------------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|----------|----------|----------|----------|----------|----------|----------|----------------|-------------|---------------|---------|--------------|-----------|---------------|--------------|----------------|---------------|-----------------|----------|------------|-----------|-------------|--------------|--------------------|-------|--------------|

#16 Updated by Ludovic ARAUJO about 1 year ago

en passant j'ai fouiller dans le sql de migration vendredi mais j'ai rien trouvé.
je pense donc que le problème de cohérence pourrais etre intervenu sur une custo de laurent que j'aurai loupée.
problème je trouve rien a se sujet...

#17 Updated by Florian AZIZIAN about 1 year ago

  • Status changed from A étudier to Complément d'Informations
  • Assignee changed from Florian AZIZIAN to Ludovic ARAUJO

D'après les requêtes, pour le courrier 3184, il n'y avait pas de pj avant la migration, et il y a une pj après la migration.
Après vérification, les scripts de migration ne créé par de nouvelle ligne dans res_attachment.
Aussi, c'est un courrier de catégorie "Arrivée". Donc la mécanique que j'ai indiqué dans mon précédent message n'est plus d'actualité ici.

Une piste : il y a peut être un code custom qui créé une pj lors de la création d'un doc. Ou une conf de MaarchCapture ?
=> les creation_date entre pj et res_letterbox ont 0 ou 1 seconde de différence. Et les séquences des filename dans les docservers se suivent.

#18 Updated by Emmanuel DILLARD about 1 year ago

  • Priority changed from 0-Bloquant to 1-Majeur

#19 Updated by Emmanuel DILLARD about 1 year ago

  • Due date deleted (03/01/2021)

#20 Updated by Emmanuel DILLARD about 1 year ago

  • Status changed from Complément d'Informations to 17

#21 Updated by Emmanuel DILLARD about 1 year ago

  • Priority changed from 1-Majeur to 2-Sérieux

#22 Updated by Emmanuel DILLARD about 1 year ago

  • Status changed from 17 to Complément d'Informations

#23 Updated by Emmanuel DILLARD 12 months ago

  • Project changed from Backlog to Backlog Courrier
  • Target version changed from 20.10 (Support actif) to 20.10 (Actif)

#24 Updated by Ludovic ARAUJO 11 months ago

  • Status changed from Complément d'Informations to Résolue

Also available in: Atom PDF