cancel
Showing results for 
Search instead for 
Did you mean: 

Hiding Auto Version property on edit screen

apickard
Champ in-the-making
Champ in-the-making
As a way to enforce versioning for any changes made by users, I need to be able to have content with the versionable aspect but not allow users to uncheck the Auto Version checkbox on the "Modify Content Properties" screen.  There may be a bug to report around this issue, but for now I'm trying to work around it since these properties forms are supposed to be data-driven: http://wiki.alfresco.com/wiki/Displaying_Custom_Metadata#Editing_Aspect_Properties_in_the_Web_Client...

I've made changes to the web-client-config-custom.xml trying to prevent at least the Auto Version property from being edited, but it always remains.  But strangely, I have successfully made the field show multiple times on a single form when I was tinkering…

    <config evaluator="aspect-name" condition="cm:versionable">
      <property-sheet>
         <show-property name="cm:autoVersion" show-in-edit-mode="false" />
      </property-sheet>
   </config>
I have also updated the contentModel.xml to make the cm:versionable aspect mandatory on cm:content

      <type name="cm:content">
         <title>Content</title>
         <parent>cm:cmobject</parent>
         <archive>true</archive>
         <properties>
            <property name="cm:content">
               <type>d:content</type>
               <mandatory>false</mandatory>
               <!– Although content is marked as indexed atomically it may end up asynchronous –>
               <!– if the content conversion will take too long. Content that does not require conversion –>
               <!– to UTF8 test/plain will always be indexed atomically –>
               <index enabled="true">
                  <atomic>true</atomic>
                  <stored>false</stored>
                  <tokenised>true</tokenised>
               </index>
            </property>
         </properties>
      <mandatory-aspects>
         <aspect>cm:versionable</aspect>
      </mandatory-aspects>
      </type>

Can someone point out what I'm doing wrong?  Is the content inheriting the cm:autoVersion property from somewhere else besides the cm:versionable aspect or something?  Thanks for you help




To reproduce the possible bug:
1. Create a piece of content that is versionable (and has Auto Version enabled)
2. Click to modify content properties and make changes to basic properties and uncheck Auto Version.

Expected behavior:
3. A new revision is saved with the properties changed, but any future modifications will not be auto-versioned
Actual behavior:
3. Property changes are saved on the "base version" and the version number is not automatically incremented.

I realize this can go either way, but it is the opposite of what I expect.  I couldn't find any previous discussion on the forums about this.
3 REPLIES 3

chintanparekh
Champ in-the-making
Champ in-the-making
Dear apikard,

                 There are two ways to fulfill your requirement .

1. Either While Modifying Properties you need not show the Auto Versioning  in disabled mode.
2. Or you just show this field only to the Admin user who can be just check or uncheck Auto Versioning option.

I will let you know the solution soon as you adopt any one of the above options.

Thanks & Regards,
Chintan C Parekh,
Software Developer.

apickard
Champ in-the-making
Champ in-the-making
Either option's solution would be appreciated, but if I had to choose I would go with option 1… shown as disabled.
Thanks

apickard
Champ in-the-making
Champ in-the-making
Anyone care to answer this for me?  I'm going to report this as a bug.