RM-7111: AGS 3.3 can't be installed on ACS 6.1

- added alfresco.min.version to 6.1
This commit is contained in:
Ramona Popa
2020-02-05 12:28:31 +00:00
parent 4ce3d763ed
commit 0f7cc3b94c
4 changed files with 26 additions and 4 deletions

View File

@@ -534,7 +534,7 @@
<alfresco-spring-webscripts.version>7.9</alfresco-spring-webscripts.version>
<api.explorer.version>6.2.0</api.explorer.version>
<!-- Set this here and override it in the community and enterprise modules. -->
<alfresco.version>0.0</alfresco.version>
<alfresco.min.version>0.0</alfresco.min.version>
<skip.integrationtests>true</skip.integrationtests>
<postgres.version>9.4.12</postgres.version>
@@ -694,7 +694,7 @@
<regexPropertySettings>
<regexPropertySetting>
<name>ags.module.repo.version.min</name>
<value>${alfresco.version}</value>
<value>${alfresco.min.version}</value>
<regex>(\d+)\.(\d+).*</regex>
<replacement>$1.$2</replacement>
<failIfNoMatch>false</failIfNoMatch>

View File

@@ -76,6 +76,7 @@
<spring.version>5.1.8.RELEASE</spring.version>
<alfresco.version>6.2.0-ga</alfresco.version>
<alfresco.min.version>6.1</alfresco.min.version>
<share.version>6.2.0</share.version>
<!-- The properties app.amp.* need to be set for share to work. -->
<app.filtering.enabled>true</app.filtering.enabled>

View File

@@ -67,8 +67,11 @@ public class RMv33HoldAuditEntryValuesPatch extends AbstractModulePatch
private void updatePropertyStringValueEntity(String fromStringValue, String toStringValue)
{
PropertyStringValueEntity propertyStringValueEntity = recordsManagementQueryDAO.getPropertyStringValueEntity(fromStringValue);
propertyStringValueEntity.setValue(toStringValue);
recordsManagementQueryDAO.updatePropertyStringValueEntity(propertyStringValueEntity);
if (propertyStringValueEntity != null)
{
propertyStringValueEntity.setValue(toStringValue);
recordsManagementQueryDAO.updatePropertyStringValueEntity(propertyStringValueEntity);
}
}
}

View File

@@ -28,6 +28,7 @@
package org.alfresco.module.org_alfresco_module_rm.patch.v33;
import static org.junit.Assert.assertEquals;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
@@ -104,6 +105,23 @@ public class RMv33HoldAuditEntryValuesPatchUnitTest
assertEquals(Long.valueOf(132_640_810L), deleteHoldPropertyStringValueEntity.getStringCrc());
}
/**
* if there are no hold audit entries, the patch is executed with success; no entries are updated
*/
@Test
public void patchRunWithSuccessWhenNoHoldEntries()
{
when(mockedRecordsManagementQueryDAO.getPropertyStringValueEntity("addToHold")).thenReturn(null);
when(mockedRecordsManagementQueryDAO.getPropertyStringValueEntity("removeFromHold")).thenReturn(null);
when(mockedRecordsManagementQueryDAO.getPropertyStringValueEntity("deleteHold")).thenReturn(null);
patch.applyInternal();
verify(mockedRecordsManagementQueryDAO, times(1)).getPropertyStringValueEntity("addToHold");
verify(mockedRecordsManagementQueryDAO, times(1)).getPropertyStringValueEntity("removeFromHold");
verify(mockedRecordsManagementQueryDAO, times(1)).getPropertyStringValueEntity("deleteHold");
verify(mockedRecordsManagementQueryDAO, times(0)).updatePropertyStringValueEntity(any());
}
}