History - Archived Versions Behavior

I would like to know if its possible to restore to the first version of a document. It seems that after modification of a document the first 1.0+ version is not archived , only the subsequent.

Here is the test i made;

1-Create Document

Summary Version 1.0+
Event Log  :  Creation  (no version mentionned)
Archived Versions :  No archived version

2-Modify Document

Increment minor version
Summary Version 1.1
Event Log:  Creation    1.1
            Modificaton 1.1
Archived Versions : 1.1 

It seams that the archived version is done on the modified version instead of archiving the version before the modification. So the original 1.0+ version does not appear in the history and is not recoverable.

Is this a bug or i am missing something ?

tx Michel

0 votes

1 answers

2598 views

ANSWER



Which version of Nuxeo are you using? On 5.5 I have sequence of user actions / document states:

Create a document:

Version of the live document 0.0 (in the summary tab)
Event Log  :  Creation  (no version mentioned)
Archived Versions :  No archived version

Perform edit on the document without version increment:

Version of the live document 0.0 (in the summary tab)
Event Log  :  Creation + Modification (no version mentioned)
Archived Versions :  No archived version

There is a UI glitch here: there is no + after the 0.0 version number as there is no difference since the last archived version as there is no archived version.

Make another edit on the document with major version increment:

Version of the live document 1.0 (in the summary tab)
Event Log  :  Creation + Modification + Modification + Version creation
Archived Versions :  1.0

Make another edit on the document without version increment:

Version of the live document 1.0+ (in the summary tab)
Event Log  :  Creation + Modification + Modification + Version creation + Modification
Archived Versions :  1.0

Apart from the lack of the + after the first edit, the UI seems consistent to me.

0 votes



I am on 5.4.2, but i see the same behavior with your test. The archived version is a copy of the document after modification not before modification. (I assume that we edit with increment)

How would you restore to the original 0.0 version ?

01/13/2012

The UI logic is what you describe, increment the version into the Edit tab is incrementing the version of the document displayed…

We plan to add a "checkin" button into the View and Edit mode to let the user checkin the version stored into the server before the user post the modification.

To follow this development, here: https://jira.nuxeo.com/browse/NXP-8610

01/13/2012

0.0 is not a version and is not archived. 0.0 means "initial draft". If you want something, anything, archived you have to explicitly ask for it.
01/13/2012

So if i create a document(description = original) ; save it, then make a modification(description=modification);save it, i cannot recuperate the document with description = original, because the first archived version is description = modification.

When you say "If you want something, anything, archived you have to explicitly ask for it", my question is how can i explicitly ask to recuperate the original version ?

01/13/2012

This is effectively the default behavior… But you can create a listener with 4 line of code that will archive each version of your document…
01/13/2012

I have to agree with mcaissie here - I think that the base nuxeo product should save an iteration 0 of the document the first time a change is made to the document in question, and that the version 0 should be fully recoverable. Yes, it's possible to write a very simple listener to achieve this right now, but I think it's an important enough use case to warrant inclusion in the base product.
01/14/2012

In the base product the initial document you upload is a draft.
01/18/2012