Commit 86693a92 by Alexandre Morin

Merge branch 'hotfix/2.0.2' - #6236 FinalDisposition

parents 726ff460 ce048569
......@@ -409,7 +409,10 @@ trait archiveEntryTrait
$retentionRule = $this->retentionRuleController->read($archive->retentionRuleCode);
$archive->retentionDuration = $retentionRule->duration;
$archive->finalDisposition = $retentionRule->finalDisposition;
if (!$archive->finalDisposition) {
$archive->finalDisposition = $retentionRule->finalDisposition;
}
}
if (is_string($archive->retentionStartDate)) {
......@@ -445,10 +448,17 @@ trait archiveEntryTrait
*/
public function completeServiceLevel($archive)
{
if (empty($this->currentServiceLevel)) {
$this->useServiceLevel('deposit', $archive->serviceLevelReference);
if (!empty($archive->archivalProfileReference) && empty($archive->serviceLevelReference)) {
$currentOrg = \laabs::getToken("ORGANIZATION");
$archivalProfileAccess = $this->organizationController->getOrgUnitArchivalProfile($currentOrg->orgId, $archive->archivalProfileReference);
if (!empty($archivalProfileAccess)) {
$archive->serviceLevelReference = $archivalProfileAccess->serviceLevelReference;
}
}
$this->useServiceLevel('deposit', $archive->serviceLevelReference);
$archive->serviceLevelReference = $this->currentServiceLevel->reference;
if (strpos($this->currentServiceLevel->control, "fullTextIndexation")) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment