cancel
Showing results for 
Search instead for 
Did you mean: 

Versioning Aspect not applied

maximus007
Champ in-the-making
Champ in-the-making
I am trying to set Alfresco up to automatically version Word and Excel files. I have set up my rule as follows:

Rule conditions:
Item has a mimetype of 'Microsoft Word 2007' 
Item has a mimetype of 'Microsoft Excel 2007' 
Name property matches '*.docx' 
Name property matches '*.doc' 
Name property matches '*.xls' 
Name property matches '*.xlsx' 
Item has a mimetype of 'Microsoft Word' 
Item has a mimetype of 'Microsoft Excel' 

Rule actions:
Add aspect 'Versionable' 

Details:
Type:   Items are created or enter this folder 
Title:   Auto document versioning 
Description:   

Other Options selected:
Apply rule to sub spaces
Run rule in background

Despite the above setup, if I upload a new file to any space, including the root space, the versioning aspect is not applied. I can manually enable it perfectly fine on a per-file basis, but the content rule is never applied.

The versioning aspect is not added whether I upload using CIFS, FTP or the web interface.

Running Alfresco Community 3.3 on Server 2008 R2.
11 REPLIES 11

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
You can change alfresco model to make versionable aspect mandatory if you like.
  <type name="cm:content">
        <title>Content</title>
        <parent>cm:cmobject</parent>
        <properties>
           <property name="cm:content">
              <type>d:content</type>
              <mandatory>false</mandatory>
              <index enabled="true">
                 <atomic>true</atomic>
                 <stored>false</stored>
                 <tokenised>true</tokenised>
              </index>
           </property>
        </properties>
     </type>

to


    <type name="cm:content">
        <title>Content</title>
        <parent>cm:cmobject</parent>
        <properties>
           <property name="cm:content">
              <type>d:content</type>
              <mandatory>false</mandatory>
              <index enabled="true">
                 <atomic>true</atomic>
                 <stored>false</stored>
                 <tokenised>true</tokenised>
              </index>
           </property>
        </properties>
        <mandatory-aspects>
           <aspect>cm:versionable</aspect>
        </mandatory-aspects>

maximus007
Champ in-the-making
Champ in-the-making
Thank you Savic, but what if I only want Word and Excel files (as per the above) to be versioned?

I also store many other files, such as PDF, JPG, movies, which I don't want versioning for.

Do you know why the above setup doesn't function?

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
I thing you are doing this wrong .
you should do: create rule to run action to do changes to node that you need .

rama_honge
Champ in-the-making
Champ in-the-making
Create a rule ( for docs with .doc and .xls extension) to apply the versioning aspect to them.

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
yes, create rule fro nodes  with specific mime types ( select your prefered types)

maximus007
Champ in-the-making
Champ in-the-making
I have done all of the above (see my original post) but it doesn't work.

Or have I missed something?

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
create rule on your mimetype to apply aspect that you like (versionable ) . this works, use only this do not edit model for this.

maximus007
Champ in-the-making
Champ in-the-making
Savic,

I am confused. As in my first post, my rule is already set up as follows:

I have set up my rule as follows:

Rule conditions:
Item has a mimetype of 'Microsoft Word 2007'
Item has a mimetype of 'Microsoft Excel 2007'
Name property matches '*.docx'
Name property matches '*.doc'
Name property matches '*.xls'
Name property matches '*.xlsx'
Item has a mimetype of 'Microsoft Word'
Item has a mimetype of 'Microsoft Excel'

Rule actions:
Add aspect 'Versionable'

Details:
Type: Items are created or enter this folder
Title: Auto document versioning
Description:

Other Options selected:
Apply rule to sub spaces
Run rule in background

What have I done wrong?

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
nothing as far as i can see it is all good.