Skip to content

[BO - Esabora SCHS] Syncho visite - gestion partenaire par défaut / gestion resynchronisation en cas doublon#5725

Open
sfinx13 wants to merge 1 commit intodevelopfrom
feature/5715-5714-esabora-schs-feedback
Open

[BO - Esabora SCHS] Syncho visite - gestion partenaire par défaut / gestion resynchronisation en cas doublon#5725
sfinx13 wants to merge 1 commit intodevelopfrom
feature/5715-5714-esabora-schs-feedback

Conversation

@sfinx13
Copy link
Copy Markdown
Collaborator

@sfinx13 sfinx13 commented Apr 15, 2026

Ticket

#5715
#5714

Description

  • Suppression affectation : Ajout message d'avertissement si dossier synchronisation
image
  • Réaffectation : Forcer la resynchronisation selon le code erreur
image image
  • Synchronisation des visites : Vérification du partenaire ayant fait la visite (Dossier affecté SCHS mais visite faite par ARS et vice versa)
image

Changements apportés

  • Mise à jour handlers SISH gérant les appels HTTP pour gérer les erreurs de doublon et éviter les appels inutiles en cas d'échec
  • Ajout nouveau mocks pour tester les visites faite par un autre partenaire que celui affecté
  • Mise à jour js pour message de confirmation

Pré-requis

make mock-restart

make worker-stop && make worker-consume

Tests

Message de confirmation

Resynchronisation

Synchronisation des visites

  • Lancer make sync-sish et vérifier que le partenaire d'affectation n'est pas repris dans le message de suivi mais plutôt le partenaire fourni par le web-service car différent

@sfinx13 sfinx13 force-pushed the feature/5715-5714-esabora-schs-feedback branch from b80e740 to 526761d Compare April 15, 2026 15:34
@sfinx13 sfinx13 marked this pull request as ready for review April 15, 2026 15:34
@sfinx13 sfinx13 requested review from emilschn and hmeneuvrier April 15, 2026 15:34
@sonarqubecloud
Copy link
Copy Markdown

Comment on lines +246 to +253
$message = \sprintf(
'[%s][%s] Suppression du partenaire %s sur le dossier synchronisé #%s',
$affectation->getSignalement()->getTerritory()->getZipAndName(),
$affectation->getPartner()->getType()->value,
$affectation->getPartner()->getId(),
$affectation->getSignalement()->getReference()
);
\Sentry\captureMessage($message);
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prévenir sur le channel dev si le cas se présente

Comment on lines +42 to +44
if (!$isSuccessful) {
break;
}
Copy link
Copy Markdown
Collaborator Author

@sfinx13 sfinx13 Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meilleure gestion des erreurs, pas utile d'appeler les web-services suivants si un des web-services est en erreur, ça va moins polluer la table.


abstract class AbstractDossierSISHHandler implements DossierSISHHandlerInterface
{
public const string ERROR_SQL_DUPLICATE_KEY = 'WS_ERR_SQL';
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vu dans la spec 1.10

Image

return AbstractEsaboraService::ACTION_PUSH_DOSSIER_PERSONNE === $this->action
&& JobEvent::STATUS_SUCCESS === $this->status;
&& JobEvent::STATUS_SUCCESS === $this->status
|| $this->dossierAlreadyExists();
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parent::handle($dossierMessageSISH);
}

return true; // last SISH web service called; no need to handle further
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rappel de l'ordre d'appel :

  1. SISH_ADRESSE
  2. SISH_DOSSIER
  3. SISH_DOSSIER_PERSONNE

Comment on lines +44 to +50
$partnerType = match ($doneBy) {
'SCHS' => PartnerType::COMMUNE_SCHS,
'ARS' => PartnerType::ARS,
default => PartnerType::tryFrom($doneBy),
};

if (null !== $partnerType && $affectation->getPartner()->getType() === $partnerType) {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant