How can i disable the option: Skip Version Increment?

I am trying to make it impossible to skip the version update. So that every time when a document has been modified, it wil create atleast a minor of major version increment…?

0 votes

1 answers




Here's a typical definition of a contribution to the versioning service that controls available options:

<extension target="org.nuxeo.ecm.core.versioning.VersioningService" point="versioningRules">
  <versioningRule typeName="MyDoc">
    <initialState major="0" minor="0"/>
    <options lifeCycleState="*">
      <none default="true"/>

You can define your own for your document type, and remove the “none” option if you'd like to force version increment.

This cannot be used in an XML extension in Studio waiting for issue to be fixed, but as a workaround, you can put this contribution in a another jar and make it require the Studio bundle (to make sure it's deployed afterwards).

1 votes

Could you please mention the required bundle to use that extension point ? If there are no dependencies, how I can t use it with a custom type ? Thanks

if you are using studio, you will need no requirement as deployed at the end. If you like produce XML yourself, you can search in You have all contributions of Nuxeo distributions.



First, i would like to thank u for the answer, it looked pretty simple. But when i try it on nuxeo Studio on the document type: File. I dont seem to get it to work. Im a missing something?

I have added to following extension:

&lt;extension target=&quot;org.nuxeo.ecm.core.versioning.VersioningService&quot; point=&quot;versioningRules&quot;&gt;
  &lt;versioningRule enabled=&quot;true&quot; typeName=&quot;File&quot;&gt;
    &lt;initialState major=&quot;0&quot; minor=&quot;0&quot;/&gt;
    &lt;options lifeCycleState=&quot;*&quot;&gt;
      &lt;major default=&quot;true&quot;/&gt;

Did you have it to Advanced Settings > XML Extensions ?

I ve tried both ways :

in an xml file in the templates/custom directory

in the xml extensions of studio

I ve also tried to define a defaultVersioningRule : it seems to work for all default types, but not my overriden File Document type.


For me the same as pibou. I have made some of it work with defaultVersioningRule. Everything is now always creating major versions (document types like 'picture'), but for the document type File and any other document type that i have created that extends file or has the facet is versionable activated, doesnt work and de 3 default options are still available…

hi, i'm updating my answer to reflect the issue you're facing

Hi, thnx for your help so far. Ive used your tip for the workaround, so when its fixed, ill see the change in the documents.

Ok for the fix :

a new extension depending on my studio bundle works fine


Uhmm could u specify how u did it?

Hi, I see the bug is fixed, but it still doesnt work for me.. Any help pls.

I have a extension via XML extensions:

<extension target="org.nuxeo.ecm.core.versioning.VersioningService" point="versioningRules"> <versioningRule typeName="MyFile">

&lt;initialState major=&quot;0&quot; minor=&quot;0&quot;/&gt;
&lt;options lifeCycleState=&quot;*&quot;&gt;

</versioningRule> </extension>

After installing the nuxeo package im still able to use all 3 options for versioning.

I hope u guys can help me. What im a doing wrong?


fix is not online yet, update should be done sometime next week

In the extensions.xml generated in studio, extract the name of the component

&lt;component name=&quot;studio.extensions.XXXX&quot; version=&quot;1.0.0&quot;&gt;

In your component extending the Versioning Service :

&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;component name=&quot;custom.versioningRules&quot; version=&quot;1.0.0&quot;&gt;
  &lt;extension target=&quot;org.nuxeo.ecm.core.versioning.VersioningService&quot; point=&quot;versioningRules&quot;&gt;       
  &lt;versioningRule typeName=&quot;File&quot; enabled=&quot;true&quot;&gt;
    &lt;initialState major=&quot;2&quot; minor=&quot;0&quot;/&gt;
    &lt;options lifeCycleState=&quot;*&quot;&gt;
      &lt;minor default=&quot;true&quot; /&gt;

this extension creates the file in V2.0, and the default selected item in the versionning form is "minor version".

If you want to make the minor version compulsory, get rid of the "none" and "major" entry in the rule definition.


Oke im srry but this is very helpfull i only dont know where to put it.

Do i put it all in Nuxeo Studio, Advanced Settings - XML Extensions?

I know that this is probably very stupid of me to ask, pls dont hate me :)


You can put your contribution in


After the server restart, it will copied to


after restarting the server i get the message:

= Component Loading Status: Pending: 1 / Unstarted: 0 / Total: 656

  • service:custom.versioningRules requires

I dont know how to extract the component name in my nuxeo studio bundle?

If u can find it in your hart to take the a moment to help me out:

Pls give a step by step guide to configure this like u have pibou.


Download the jar, open it, the name of the component can be found in OSGI-INF\extensions.xml

<component name="studio.extensions.my_studio_project" version="1.0.0">

In the component you wrote :

<component name="My.versioningRules" version="1.0.0">



pibou, you are my super hero :)