• Changing the initial Document Version number.

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #30285  by JOS123
 
Hi, we have just started using OKM and I would like to know if it is possible to commence the version numbering from 0.1, instead of 1.0? That is, when you do the initial upload of a document, can the system assign 0.1 instead of 1.0? The versions would then go to 0.1, 0.2 etc until we do a major release to 1.0. If this is possible, how can we do this?
Many thanks
 #30311  by jllort
 
Document version number is based on java class plugin. You can change the logic implementing your own class for it.
Code: Select all
/**
 * @author pavila
 * @see PlainVersionNumerationAdapter
 * @see BranchVersionNumerationAdapter
 * @see MajorMinorVersionNumerationAdapter
 * @see MajorMinorReleaseVersionNumerationAdapter
 */
public interface VersionNumerationAdapter {
	final String qs = "from NodeVersion nv where nv.parent=:parent and nv.name=:name";

	/**
	 * Obtain the initial version number to be set when creating a new document
	 *
	 * @return This first version number.
	 */
	public String getInitialVersionNumber();

	/**
	 * Calculate the next version number from a given one.
	 *
	 * @param session Hibernate session.
	 * @param nVer    Current document version node.
	 * @return The new calculated version numbering.
	 */
	public String getNextVersionNumber(Session session, NodeVersion nVer, int increment);
}
Here you can take a look about some implementations
http://sourceforge.net/p/openkm/code/HE ... km/vernum/

To change it must go to Administration / Configuration parameters and change default class by your own
Code: Select all
version.numeration.adapter=com.openkm.vernum.MajorMinorVersionNumerationAdapter 

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.