diff --git a/config/alfresco/core-services-context.xml b/config/alfresco/core-services-context.xml
index 88de712e3d..e7089f4da4 100644
--- a/config/alfresco/core-services-context.xml
+++ b/config/alfresco/core-services-context.xml
@@ -906,9 +906,6 @@
-
- true
-
diff --git a/config/alfresco/model/contentModel.xml b/config/alfresco/model/contentModel.xml
index 8b42534c00..49bf9dbffc 100644
--- a/config/alfresco/model/contentModel.xml
+++ b/config/alfresco/model/contentModel.xml
@@ -822,6 +822,11 @@
d:boolean
true
+
+ Auto Version - on update properties only
+ d:boolean
+ true
+
diff --git a/source/java/org/alfresco/model/ContentModel.java b/source/java/org/alfresco/model/ContentModel.java
index 682b4dc102..1136a7055b 100644
--- a/source/java/org/alfresco/model/ContentModel.java
+++ b/source/java/org/alfresco/model/ContentModel.java
@@ -161,7 +161,8 @@ public interface ContentModel
static final QName PROP_VERSION_LABEL = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "versionLabel");
static final QName PROP_INITIAL_VERSION = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "initialVersion");
static final QName PROP_AUTO_VERSION = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "autoVersion");
-
+ static final QName PROP_AUTO_VERSION_PROPS = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "autoVersionOnUpdateProps");
+
// folders
static final QName TYPE_SYSTEM_FOLDER = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "systemfolder");
static final QName TYPE_FOLDER = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "folder");
diff --git a/source/java/org/alfresco/repo/coci/CheckOutCheckInServiceImplTest.java b/source/java/org/alfresco/repo/coci/CheckOutCheckInServiceImplTest.java
index 02eebffea6..e007023800 100644
--- a/source/java/org/alfresco/repo/coci/CheckOutCheckInServiceImplTest.java
+++ b/source/java/org/alfresco/repo/coci/CheckOutCheckInServiceImplTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005-2007 Alfresco Software Limited.
+ * Copyright (C) 2005-2009 Alfresco Software Limited.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -513,5 +513,96 @@ public class CheckOutCheckInServiceImplTest extends BaseSpringTest
}
}
-
+
+ public void testMultipleCheckoutsCheckInsWithPropChange()
+ {
+ // Note: this test assumes cm:autoVersionProps=true by default (refer to cm:versionableAspect in contentModel.xml)
+
+ // Create a new node
+ ChildAssociationRef childAssocRef = this.nodeService.createNode(
+ rootNodeRef,
+ ContentModel.ASSOC_CHILDREN,
+ QName.createQName("{test}test"),
+ ContentModel.TYPE_CONTENT,
+ null);
+ final NodeRef testNodeRef = childAssocRef.getChildRef();
+
+ // Add the version aspect to the created node
+ this.nodeService.addAspect(testNodeRef, ContentModel.ASPECT_VERSIONABLE, null);
+
+ setComplete();
+ endTransaction();
+
+ // Checkout
+ final NodeRef workingCopy1 = transactionService.getRetryingTransactionHelper().doInTransaction(new RetryingTransactionCallback()
+ {
+ public NodeRef execute() throws Exception
+ {
+ return cociService.checkout(testNodeRef);
+ }
+ });
+
+ // Change property and checkin
+ transactionService.getRetryingTransactionHelper().doInTransaction(new RetryingTransactionCallback