Project

General

Profile

Bug #22984

upgrade causes missing Templates history

Added by Sean O'Keeffe about 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Audit Log
Target version:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Description of problem:

After upgrading to 6.3 i see no history for my provisioning template

Version-Release number of selected component (if applicable):
6.3

How reproducible:
not sure

Steps to Reproduce:
1. build 6.2
2. create custom Provisioning Template
3. makes a change to that Template
4. check history tab for you change
5. Upgrade to 6.3
6. go to the history tab and no history will be displayed

Actual results:

no history is displayed

Expected results:

All previous history is displayed

Additional info:

It seems in 6.2 they were saved in the audit table as `:auditable_type => Template` whereas 6.3 they look like they are `:auditable_type => ProvisioningTemplate` and there has been no migration.

irb(main):028:0* Audit.descending.where(:auditable_id => 111, :auditable_type => Template, :action => 'update').count
=> 82
irb(main):029:0> Audit.descending.where(:auditable_id => 111, :auditable_type => Template, :action => 'update').first.created_at
=> Fri, 16 Mar 2018 15:46:56 UTC +00:00
irb(main):030:0> Audit.descending.where(:auditable_id => 111, :auditable_type => ProvisioningTemplate, :action => 'update').count
=> 2
irb(main):031:0> Audit.descending.where(:auditable_id => 111, :auditable_type => ProvisioningTemplate, :action => 'update').first.created_at
=> Wed, 21 Mar 2018 16:27:25 UTC +00:00

We upgraded on the morning of 21 Mar 2018

Associated revisions

Revision 4d5bdcd5 (diff)
Added by Sean O'Keeffe about 5 years ago

Fixes #22984 - Migrate templates auditable_type

https://github.com/theforeman/foreman/pull/4778 Changed `Ptable`
& `ProvisioningTemplate` `auditable_type` this commit adds the
missing migration.

Revision 596ec5dc (diff)
Added by Marek Hulán almost 5 years ago

Refs #22984 - fix the type for all templates

History

#1 Updated by The Foreman Bot about 5 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/5348 added

#2 Updated by Sean O'Keeffe about 5 years ago

  • Bugzilla link set to 1559108

#3 Updated by Tomer Brisker about 5 years ago

  • Legacy Backlogs Release (now unused) set to 330

#4 Updated by Sean O'Keeffe about 5 years ago

  • % Done changed from 0 to 100
  • Status changed from Ready For Testing to Closed

#5 Updated by The Foreman Bot almost 5 years ago

  • Pull request https://github.com/theforeman/foreman/pull/5632 added

#6 Updated by The Foreman Bot almost 5 years ago

  • Pull request https://github.com/theforeman/foreman/pull/5634 added

Also available in: Atom PDF