cancel
Showing results for 
Search instead for 
Did you mean: 

Is auto-versioning broken?

ianpriest
Champ in-the-making
Champ in-the-making
Hi,

a source-code change seems to have disabled auto-versioning. Class org.alfresco.repo.version.VersionableAspect had a code change made to it at version 2098 as follows:

old:
    private void queueCreateVersionAction(NodeRef nodeRef)
    {
        …
        action.addActionCondition(condition);

new:

    private void queueCreateVersionAction(NodeRef nodeRef)
    {
        …
        // conditions are only evaluated on the parent rule - not the contained actions
        rule.addActionCondition(condition);

Now when queueCreateAction() is called by onContentUpdate(), the  condition instance will evaluate to false for any node that has a version history, (because the condition is inverted), and so the rule doesn't fire and no new version is created. This has the effect that if I update a versioned file via (for example) CIFS it doesn't create a new version when I save the file. I've found that by reverting the change auto-versioning comes back.

At least that what I think is happening. Is it broken, or  am I missing something?

Cheers,
Ian.
2 REPLIES 2

davidc
Star Contributor
Star Contributor
Hi Ian,

Yes, that was a recent change and it's introduced a bug.  We'll take a look and fix.

Thanks.

rwetherall
Confirmed Champ
Confirmed Champ
Hi Ian,

This should be fixed now.

————————————————————————
r2150 | royw | 2006-01-19 15:55:27 +0000 (Thu, 19 Jan 2006) | 1 line
Changed paths:
   M /alfresco/HEAD/root/projects/repository/config/alfresco/model/contentModel.xml
   M /alfresco/HEAD/root/projects/repository/source/java/org/alfresco/model/ContentModel.java
   M /alfresco/HEAD/root/projects/repository/source/java/org/alfresco/repo/version/VersionServiceImplTest.java
   M /alfresco/HEAD/root/projects/repository/source/java/org/alfresco/repo/version/VersionableAspect.java

- Fixed auto-version and added 'initialVersion' attribute to versionable aspect
————————————————————————

Thanks,
Roy