Version increment is done twice when restoring file from previous version
-------------------------------------------------------------------------
Key: NXP-3586
URL: http://jira.nuxeo.org/browse/NXP-3586
Project: Nuxeo Enterprise Platform
Issue Type: Bug
Reporter: Alexandre Russel
Assignee: Thierry Delprat
from the forum:
When restoring "archived versions" Nuxeo 5.2 increments minor version number by
2, not by 1.
For example if file is version 1.15 (written in summary tab, metadata) and I
want to restore version 1.2 then new version will be 1.17.
I noticed that version is incremented once
DocumentEventTypes.DOCUMENT_CHECKEDOUT was received
(/nuxeo-platform-versioning-core/src/main/java/org/nuxeo/ecm/platform/versioning/listeners/DocVersioningEventListener.java:106)
and second time when DocumentEventTypes.DOCUMENT_RESTORED was received
(/nuxeo-platform-versioning-core/src/main/java/org/nuxeo/ecm/platform/versioning/listeners/DocVersioningEventListener.java:132)
The problem is that getVersionChangeRequest() returns null if no incOption is
selected (line 164), but after that this decision is overrided in line 106:
req = getVersionChangeRequest(doc, options);
if (req == null) {
req = createAutoChangeRequest(doc);
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.nuxeo.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets