Bug 1627066

Summary: Unable to revert to the original version of the provisioning template
Product: Red Hat Satellite Reporter: Roman Plevka <rplevka>
Component: Provisioning TemplatesAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Roman Plevka <rplevka>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.4CC: ajambhul, asharvit, bkearney, egolov, mhulan, oprazak
Target Milestone: 6.8.0Keywords: EasyFix, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman-2.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 12:57:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Roman Plevka 2018-09-10 11:15:27 UTC
Description of problem:
there's simply no button to rvert to the original version of the template. Once user makes a change, there is a new revision created and one can only revert to this version.
- it should be possible if not trivial to simply rever to the original by undoing the first revision.

Version-Release number of selected component (if applicable):
sat6.4.0

How reproducible:
always

Steps to Reproduce:
1. create or clone a provisioning template
2. save it
3. do some change to it
4. in the History tab, there's now the revision containing the diff of the original state and the new state
5. from now on, one can only get to this version at max (by clicking "revert to this version"
6. one is unable to get to the original, unchanged version

Comment 2 Ondřej Pražák 2018-09-25 11:25:42 UTC
Created redmine issue http://projects.theforeman.org/issues/25029 from this bug

Comment 3 Bryan Kearney 2019-11-13 13:04:01 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25029 has been resolved.

Comment 4 Roman Plevka 2020-06-24 10:24:18 UTC
FAILEDQA
sat6.8.0-snap5

the original revision is now available but when trying to reverting using UI,
there is a react error:
"Revert Failed, TypeError: e.split is not a function".
User is then redirected to the "template" page with missing "content" field (no editor displayed)

not a blocker, but nice to have: the original revision could have some default comment assigned to it, like "original version" so it's easily distinguishable and there's no "no comment provided" displayed

Comment 5 Avi Sharvit 2020-08-11 11:02:05 UTC
I could not reproduce it upstream and it seems to be working for me.
After discussing with Roman, looks like he can't reproduce it either.

Moving back to on_qa

Comment 6 Roman Plevka 2020-08-24 09:08:13 UTC
This now works in snap11.

Moving to VERIFIED

Comment 7 Marek Hulan 2020-08-25 15:27:13 UTC
*** Bug 1829352 has been marked as a duplicate of this bug. ***

Comment 10 errata-xmlrpc 2020-10-27 12:57:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Satellite 6.8 release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:4366