fix import social work metadata: use child social issue if any

This commit is contained in:
2021-12-13 15:03:20 +01:00
parent 041655d26e
commit 13a1ab380e
2 changed files with 622 additions and 267 deletions

View File

@@ -284,6 +284,7 @@ final class SocialWorkMetadata implements SocialWorkMetadataInterface
} else {
$return['socialActionChild'] = $child = (new SocialAction())->setTitle(['fr' => $socialActionChildTitle]);
$parent->addChild($child);
$child->setIssue($socialIssue);
$this->entityManager->persist($child);
}
@@ -370,7 +371,7 @@ final class SocialWorkMetadata implements SocialWorkMetadataInterface
->handleSocialAction(
$row[2],
$row[3],
$socialIssues['socialIssue'] ?? $socialIssues,
$socialIssue,
$previousRow['socialActions']['socialAction'] ?? null,
$previousRow['socialActions']['socialActionChild'] ?? null
);