AnsweredAssumed Answered

Change version manually?

Question asked by patrik on Sep 24, 2007
Latest reply on Sep 25, 2007 by patrik
Hi! It seems to be hard to change the version number by executing a script. Is there things i need to do before? My code is the following:

var refName =["cm:name"];
var refFile = companyhome.childByNamePath(refName);;;;

var logFile = space.childByNamePath("log.txt");
if (logFile==null)
   var logFile = space.createFile("log.txt");
if (logFile!=null)
   logFile.content+= "\n\r" + " Version refFile" + + " Version document " +;

What the script is supposed to do is to take the version from a file under Company Home which has the same filename as the file that is referred to as "document". The logfile gives this output:

              Version refFile1.1 ref Version document 1.1

Which indicates that the version is updated to 1.1 but in the browser it's still 1.0. I have tried to make to following change in contentModel.xml:
      <aspect name="cm:versionable">
            <property name="cm:versionLabel">
               <title>Version Label</title>

But without any success.