cancel
Showing results for 
Search instead for 
Did you mean: 

How can i disable the option: Skip Version Increment?

peter013_
Champ in-the-making
Champ in-the-making

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...?

1 ACCEPTED ANSWER

Anahide_Tchertc
Elite Collaborator
Elite Collaborator

Hi,

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"/>
      <minor/>
      <major/>
    </options>
  </versioningRule>
</extension>

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 https://jira.nuxeo.com/browse/NXS-1259 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).

View answer in original post

19 REPLIES 19

Anahide_Tchertc
Elite Collaborator
Elite Collaborator

Hi,

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"/>
      <minor/>
      <major/>
    </options>
  </versioningRule>
</extension>

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 https://jira.nuxeo.com/browse/NXS-1259 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).

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 ?

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 explorer.nuxeo.com. 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

Did you have it to Advanced Settings > XML Extensions ?

I ve tried both ways

For me the same as pibou.

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.

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.