Commit e3e4bbe8 authored by Alexandre Morin's avatar Alexandre Morin
Browse files

Feat final status detail

parent 3428435e
...@@ -387,7 +387,7 @@ class ArchiveRestitution extends abstractMessage ...@@ -387,7 +387,7 @@ class ArchiveRestitution extends abstractMessage
$requestMessage->unitIdentifier = $this->sdoFactory->readChildren('medona/unitIdentifier', $requestMessage); $requestMessage->unitIdentifier = $this->sdoFactory->readChildren('medona/unitIdentifier', $requestMessage);
foreach ($requestMessage->unitIdentifier as $unitIdentifier) { foreach ($requestMessage->unitIdentifier as $unitIdentifier) {
$this->archiveController->setStatus($unitIdentifier->objectId, 'disposed'); $this->archiveController->setStatus($unitIdentifier->objectId, 'restituted');
} }
$this->changeStatus($messageId, "validated"); $this->changeStatus($messageId, "validated");
......
...@@ -435,8 +435,9 @@ class ArchiveRestitutionRequest extends abstractMessage ...@@ -435,8 +435,9 @@ class ArchiveRestitutionRequest extends abstractMessage
$removedArchiveIds = []; $removedArchiveIds = [];
foreach ($restitutionRequest->unitIdentifier as $unitIdentifier) { foreach ($restitutionRequest->unitIdentifier as $unitIdentifier) {
$archive = $this->archiveController->destruct($unitIdentifier->objectId); $archive = $this->archiveController->destruct($unitIdentifier->objectId);
if (count($archive["success"]) > 0) {
$removedArchiveIds[] = (string) $archive["success"][0]->archiveId; $removedArchiveIds[] = (string)$archive["success"][0]->archiveId;
}
} }
return $removedArchiveIds; return $removedArchiveIds;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment