AnsweredAssumed Answered

Hiding Auto Version property on edit screen

Question asked by apickard on Nov 11, 2010
Latest reply on Nov 30, 2010 by apickard
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_Properties_Page

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.

Outcomes