Project

General

Profile

Anomalie #18572

Erreur typist not an integer lorsqu'on récupère des documents de MaarchParapheur

Added by Etienne FAMERY 7 months ago. Updated 6 months ago.

Status:
Développé / Analysé (S)
Priority:
0-Bloquant
Assignee:
Target version:
Start date:
10/21/2021
Due date:
10/28/2021
Tags Courrier:
20.10.16, 21.03.11

Description

Lors du lancement du script retrieveMailFromExternalSignatoryBook.sh.
Lorsqu'on récupère les documents sur MaarchParapheur,dans le cas de la signature d'un courrier principal, on ajoute en pièce jointe le faisceau de preuve.
Pour cela on fait appel à $retrievedLetterboxMails = \ExternalSignatoryBook\controllers\MaarchParapheurController::retrieveSignedMails.
Dans cette fonction, on fait la correspondance entre le signataire dans MaarchParpaheur et dans MaarchCourrier :

if (!empty($state['signatoryUserId'])) {
                    $signatoryUser = UserModel::getByExternalId([
                        'select'       => ['user_id', 'id'],
                        'externalId'   => $state['signatoryUserId'],
                        'externalName' => 'maarchParapheur'
                    ]);
                    if (!empty($signatoryUser['user_id'])) {
                        $aArgs['idsToRetrieve'][$version][$resId]['typist'] = $signatoryUser['user_id'];
                        $aArgs['idsToRetrieve'][$version][$resId]['signatory_user_serial_id'] = $signatoryUser['id'];
                    }
                }

On récupère le user_id au lieu de l'id du signataire avant de faire appel à la fonction Bt_createAttachment dans /bin/signatureBook/batch_tools.php.

On obtient alors l'erreur suivante :

[21/10/2021 14:46:14] INFO  [39496] [OK][MAARCH][][retrieveMailsFromSignatoryBook][retrieveMailsFromSignatoryBook][][Retrieve mails sent to remote signatory book][retrieveMailsFromSignatoryBook][]
[21/10/2021 14:47:12] INFO  [39496] [OK][MAARCH][][retrieveMailsFromSignatoryBook][retrieveMailsFromSignatoryBook][][Update res_letterbox : 204. SignatoryBookId : 40][retrieveMailsFromSignatoryBook][]
[21/10/2021 14:47:12] INFO  [39496] [OK][MAARCH][][retrieveMailsFromSignatoryBook][retrieveMailsFromSignatoryBook][][Create log Main Document][retrieveMailsFromSignatoryBook][]
[21/10/2021 14:47:13] ERROR [39496] [OK][MAARCH][][retrieveMailsFromSignatoryBook][retrieveMailsFromSignatoryBook][][[AttachmentController create] [storeAttachment] Argument typist is not an integer (value)][retrieveMailsFromSignatoryBook][]

Correctif :

remplacer

$aArgs['idsToRetrieve'][$version][$resId]['typist'] = $signatoryUser['user_id'];

par

$aArgs['idsToRetrieve'][$version][$resId]['typist'] = $signatoryUser['id']

History

#2 Updated by Ludovic ARAUJO 7 months ago

  • Assignee deleted (Emmanuel DILLARD)

#3 Updated by Madina Makhmutova 7 months ago

  • Status changed from A qualifier to En cours de dev (S)

#5 Updated by Emmanuel DILLARD 7 months ago

  • Tags Courrier 20.10.16, 21.03.11 added

#6 Updated by Hamza HRAMCHI 7 months ago

  • Assignee set to Hamza HRAMCHI

#7 Updated by GIT LAB 7 months ago

Commit ajouté sur la branche fix/18572/21.03 de MaarchCourrier
FIX #18572 TIME 0:18 Typist not an integer error when retrieving documents from MaarchParapheur
https://labs.maarch.org/maarch/MaarchCourrier/commit/19c76593d20471580ce55985680ebb911b549058

#8 Updated by GIT LAB 7 months ago

Commit ajouté sur la branche fix/18572/20.10 de MaarchCourrier
FIX #18572 TIME 0:15 Typist not an integer error when retrieving documents from MaarchParapheur
https://labs.maarch.org/maarch/MaarchCourrier/commit/f62b4b3c1c51e15ea76d883497ed0c84204806c1

#9 Updated by GIT LAB 7 months ago

Commit ajouté sur la branche fix/18572/develop de MaarchCourrier
FIX #18572 TIME 0:10 Typist not an integer error when retrieving documents from MaarchParapheur
https://labs.maarch.org/maarch/MaarchCourrier/commit/3236337b6ca2af7c8169036a9992876a6527ec9b

#10 Updated by Hamza HRAMCHI 7 months ago

  • Status changed from En cours de dev (S) to A tester (S)

#11 Updated by GIT LAB 7 months ago

[MERGE REQUEST] Mergé sur develop ()

#12 Updated by Hamza HRAMCHI 7 months ago

  • Status changed from A tester (S) to Développé / Analysé (S)

#13 Updated by GIT LAB 7 months ago

[MERGE REQUEST] Mergé sur develop ()

Also available in: Atom PDF