Project

General

Profile

Bug #22984

upgrade causes missing Templates history

Added by Sean O'Keeffe 5 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Audit Log
Target version:
Team Backlog:
Fixed in Releases:
Found in Releases:

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 5 months 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 3 months ago

Refs #22984 - fix the type for all templates

History

#1 Updated by The Foreman Bot 5 months 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 5 months ago

  • Bugzilla link set to 1559108

#3 Updated by Tomer Brisker 5 months ago

  • Legacy Backlogs Release (now unused) set to 330

#4 Updated by Sean O'Keeffe 5 months ago

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

#5 Updated by The Foreman Bot 3 months ago

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

#6 Updated by The Foreman Bot 3 months ago

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

Also available in: Atom PDF