Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Salvador Baena
Document versioning
19. November 2012 08:53
Antwort

Salvador Baena

Rang: New Member

Nachrichten: 8

Eintrittsdatum: 13. Juni 2012

Neue Beiträge

Hello,

Working with the Documents and Media portlet we ended up having this doubt regarding the versioning of a document. We would like to know what it is to be done in order to move the version of a document from 1.x to 2.y. We have read so far that this happens when, while editing a document, it is indicated somewhere that this version is a major version, however, in our case, there is no such option and hence everytime changes are applied to a document the number of the version increases reaching even the 1.32 version.

I do not know if the above mentioned description was expressed clearly enough, but we would appreciate if anyone could bring some light to the topic.

Regards!!
Hitoshi Ozawa
RE: Document versioning
19. November 2012 15:44
Antwort

Hitoshi Ozawa

Rang: Liferay Legend

Nachrichten: 7949

Eintrittsdatum: 23. März 2010

Neue Beiträge

It used to be that users were able to set version number. However in recent releases, liferay automatically increase version number.
Salvador Baena
RE: Document versioning
20. November 2012 01:07
Antwort

Salvador Baena

Rang: New Member

Nachrichten: 8

Eintrittsdatum: 13. Juni 2012

Neue Beiträge

Hello Hitoshi,

Yes, the version number is increased but we want to know how this increment works, based on what minor/major changes and more important how it is produced the change from a version 1.3 for example to a 2.0, that is what we were not able to find out yet.
Pavel Savinov
RE: Document versioning
20. November 2012 01:47
Antwort

Pavel Savinov

Rang: Junior Member

Nachrichten: 97

Eintrittsdatum: 24. September 2012

Neue Beiträge

To understand it you can take a look at the EditFileEntryAction class of DL portlet, updateFileEntry method:
1   
2/* ... in updateFileEntry() ... */   
3boolean majorVersion = ParamUtil.getBoolean(
4    uploadPortletRequest, "majorVersion");

that means that you can pass boolean parameter, named majorVersion with value true to get a new major version. Otherwise(and by default) this parameter is absent. All you need is hook emoticon

Participate in the State of Liferay Community 2017. Help the community and even win some prizes!