[MAGNOLIA-4473] Restore command does not restore the selected version Created: 11/Jul/12  Updated: 20/Feb/13  Resolved: 04/Dec/12

Status: Closed
Project: Magnolia
Component/s: admininterface
Affects Version/s: 4.5.3
Fix Version/s: 4.5.7

Type: Bug Priority: Neutral
Reporter: Antti Hietala Assignee: Milan Divilek
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File 1st-versioning.png     PNG File 2nd-versioning.png     PNG File message.png     PNG File version-history.png    
Issue Links:
relation
is related to MAGNOLIA-4696 Restore of binary in dms does not work Closed
is related to MAGNOLIA-3409 Wrong comment is used when restoring ... Closed
is related to MGNLADMLEG-18 VersionCommand saves comment property... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

The Restore command does not restore the selected version. It sometimes restores the "latest" version instead. The Restore button is only enabled when you select a list item but the command does not act on the selected item.

To reproduce, first build a version history:

  1. Edit a page. Make a change you that can identify later, for example change the first word on the page to "Monday".
  2. Activate the page. Set the workflow comment to "Monday".
  3. Repeat two times using "Tuesday" and "Wednesday". Now you have a basic version history, see version-history.png

Then restore the first version:

  1. Select the first version (Monday) and click Restore.
  2. The system creates a new version of the content and adds it to the list, see 1st-versioning.png

Issue: The system displays a message "Successfully restored latest version", see message.png. But that's not what you selected. You selected the first version (Monday).

Restore again:

  1. Select Monday again and click Restore.
  2. This time the system versions the content you selected (Monday) and applies the correct workflow comment, see 2nd-versioning.png

The problem is that the system responds differently to the same user action. First it versions the latest version (Wednesday), then the user-selected version (Monday).



 Comments   
Comment by Milan Divilek [ 03/Dec/12 ]

When I tried reproduce the issue I figured out that the correct version is restored, but wrong comment is used. The version which is create during restore isn't restored version but it's saved current state. -> So comment should be "Automatically created version prior restoration". This was fixed in MAGNOLIA-3409.

Message "Successfully restored latest version" is wrong. This message is used for restoring any version. Correct message should be "Version was successfully restored.". -> Fixed in this ticket

There is still another use case when incorrect version comment is used: When you restore version which contains version comment then the comment is also restored. Then if you create new version which has blank version comment then the restored version comment is used instead the blank one. -> Fixed in this ticket

Comment by Milan Divilek [ 04/Dec/12 ]

Port to 5.0 can't be done right now. Because 5.0 doesn't support metadata. This issue should be ported after refactoring VersionCommand. MGNLUI-330

Generated at Mon Feb 12 03:56:07 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.