mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merge branch 'feature-2.3/RM-2968_CutoffQuery' into 'release/V2.3.0.x'
Feature 2.3/rm 2968 cutoff query See merge request !36
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -4,7 +4,7 @@
|
|||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-rm-parent</artifactId>
|
<artifactId>alfresco-rm-parent</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<version>2.3.0.1-SNAPSHOT</version>
|
<version>2.3.0.2-SNAPSHOT</version>
|
||||||
<name>Alfresco Records Management</name>
|
<name>Alfresco Records Management</name>
|
||||||
|
|
||||||
<url>http://www.alfresco.org/</url>
|
<url>http://www.alfresco.org/</url>
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-rm-parent</artifactId>
|
<artifactId>alfresco-rm-parent</artifactId>
|
||||||
<version>2.3.0.1-SNAPSHOT</version>
|
<version>2.3.0.2-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>alfresco-rm-automation</artifactId>
|
<artifactId>alfresco-rm-automation</artifactId>
|
||||||
|
@@ -6,6 +6,6 @@ module.aliases=org_alfresco_module_dod5015
|
|||||||
|
|
||||||
module.title=Records Management
|
module.title=Records Management
|
||||||
module.description=Alfresco Record Management Extension
|
module.description=Alfresco Record Management Extension
|
||||||
module.version=2.3.0.1
|
module.version=2.3.0.2
|
||||||
|
|
||||||
module.repo.version.min=4.2.2
|
module.repo.version.min=4.2.2
|
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-rm-parent</artifactId>
|
<artifactId>alfresco-rm-parent</artifactId>
|
||||||
<version>2.3.0.1-SNAPSHOT</version>
|
<version>2.3.0.2-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>alfresco-rm-server</artifactId>
|
<artifactId>alfresco-rm-server</artifactId>
|
||||||
|
@@ -108,7 +108,7 @@ public class DispositionLifecycleJobExecuter extends RecordsManagementJobExecute
|
|||||||
*
|
*
|
||||||
* @return job query string
|
* @return job query string
|
||||||
*/
|
*/
|
||||||
private String getQuery()
|
protected String getQuery()
|
||||||
{
|
{
|
||||||
if (query == null)
|
if (query == null)
|
||||||
{
|
{
|
||||||
@@ -133,8 +133,8 @@ public class DispositionLifecycleJobExecuter extends RecordsManagementJobExecute
|
|||||||
}
|
}
|
||||||
|
|
||||||
sb.append("))");
|
sb.append("))");
|
||||||
sb.append(" AND ISNULL:\"rma:dispositionActionCompletedAt\" ");
|
sb.append(" AND ISUNSET:\"rma:dispositionActionCompletedAt\" ");
|
||||||
sb.append(" + ( ");
|
sb.append(" AND ( ");
|
||||||
sb.append("@rma\\:dispositionEventsEligible:true ");
|
sb.append("@rma\\:dispositionEventsEligible:true ");
|
||||||
sb.append("OR @rma\\:dispositionAsOf:[MIN TO NOW] ");
|
sb.append("OR @rma\\:dispositionAsOf:[MIN TO NOW] ");
|
||||||
sb.append(") ");
|
sb.append(") ");
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.alfresco.module.org_alfresco_module_rm.job;
|
package org.alfresco.module.org_alfresco_module_rm.job;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
import static org.mockito.Matchers.any;
|
import static org.mockito.Matchers.any;
|
||||||
import static org.mockito.Matchers.anyString;
|
import static org.mockito.Matchers.anyString;
|
||||||
import static org.mockito.Matchers.eq;
|
import static org.mockito.Matchers.eq;
|
||||||
@@ -228,4 +229,17 @@ public class DispositionLifecycleJobExecuterUnitTest extends BaseUnitTest
|
|||||||
// ensure no more interactions
|
// ensure no more interactions
|
||||||
verifyNoMoreInteractions(mockedNodeService, mockedRecordsManagementActionService);
|
verifyNoMoreInteractions(mockedNodeService, mockedRecordsManagementActionService);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Brittle unit test that simply checks the generated query is an exact string when the supplied disposition actions
|
||||||
|
* are "CUTOFF" and "RETAIN" (see {@link #before}).
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testGetQuery()
|
||||||
|
{
|
||||||
|
String actual = executer.getQuery();
|
||||||
|
|
||||||
|
String expected = "TYPE:\"rma:dispositionAction\" + (@rma\\:dispositionAction:(\"cutoff\" OR \"retain\")) AND ISUNSET:\"rma:dispositionActionCompletedAt\" AND ( @rma\\:dispositionEventsEligible:true OR @rma\\:dispositionAsOf:[MIN TO NOW] ) ";
|
||||||
|
assertEquals(expected, actual);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user