cancel
Showing results for 
Search instead for 
Did you mean: 

Does versioning store the document properties?

kbpair
Champ in-the-making
Champ in-the-making
I have applied versioning and I can view the history of a document. This is great, however in the gui I do not see the previous properties of a document. I am assuming they are still there just not displayed in the gui.

My long term goal is to create a hash property for the document. Upon each check in of a new version I would like to compare the new hash with the hash of previous versions.

In my scenario each document should be unique and I need to prevent someone uploading a stale document.

Is versioning the best way to do this?
1 REPLY 1

kevinr
Star Contributor
Star Contributor
Yes the properties are versioned and yes they are not displayed in the current GUI. However they are accesssable in the templating API, so you could use a Custom View template that displays the properties of previous versions of the document. This template gives you an example of what you want:

<#– Shows version history for the current document, with links to previous content versions –>
<#if document?exists>
   <h3>Document Version History for: ${document.name}</h3>
   <table cellspacing=4>
      <tr align=left><th>Version</th><th>Name</th><th>Description</th><th>Created Date</th><th>Creator</th></tr>
      <#list document.versionHistory as record>
         <tr>
            <td><a href="/alfresco${record.url}" target="new">${record.versionLabel}</a></td>
            <td><a href="/alfresco${record.url}" target="new">${record.name}</a></td>
            <td><#if record.description?exists>${record.description}</#if></td>
            <td>${record.createdDate?datetime}</td>
            <td>${record.creator}</td>
         </tr>
      </#list>
   </table>
<#else>
   No document found!
</#if>

http://wiki.alfresco.com/wiki/Template_Guide

Thanks,

Kevin