Project

General

Profile

Bug #23667

History of actions of content views missing after upgrade to 6.3

Added by Andrew Kofink about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Content Views
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1575999

Description of problem:
After upgrading from Satellite 6.2(.14) to 6.3(.1) the promotion history of content views doesn't display correct information.

Version-Release number of selected component (if applicable):
satellite-6.3.1-3.el7sat

How reproducible:
Unknown.

Steps to Reproduce:
1. Upgrade to Satellite 6.3(.1).
2.
3.

Actual results:
- https://<satellite>/content_views/<cv_id>/history
- has wrong timestamps for "Date" column (it shows the time of the upgrade to 6.3 for all entries in the table rather than the individual timestamp for each action).
- is missing the values for "Action" column (it shows "{{ actionText(history) }}" instead of the actual action.

- https://<satellite>/content_views/<cv_id>/versions
- same issues.

Expected results:
The timestamps and actions are preserved through the upgrade and are still available after the upgrade.

Additional info:
The list of CVs https://<satellite>/content_views does show the correct timestamp for the latest action for each CV.

Associated revisions

Revision 2befef5d (diff)
Added by Andrew Kofink about 3 years ago

Fixes #23667: Allow nil task, xfer date from CVV

1. Add `action` to the content_view_histories show API
2. Use `history.action` when `history.task` is nil
3. Tranfer the created_at date to the new history record during
migration from the ContentViewVersion created_at date

History

#1 Updated by Andrew Kofink about 3 years ago

  • Subject changed from History of actions of content views missing after upgrade to 6.3 to History of actions of content views missing after upgrade to 6.3

This actionText(history) behavior comes from creating ContentViewHistory records in the https://github.com/Katello/katello/blob/master/db/migrate/20161014133811_move_content_view_version_description_to_histories.rb#L25 migration which don't have associated tasks.

To reproduce (on any Foreman/Katello version):
1. Publish a Content View
2. Run `Katello::ContentViewHistory.last.update_attributes(task: nil)`
3. Visit the Content View history tab in the UI

The date issue also comes from the same migration, using the current time/date as the created_at date for the ContentViewHistory record, rather than the ContentView's created_at date/time.

#2 Updated by Andrew Kofink about 3 years ago

Another way to reproduce the actionText bug is to delete the associated task:

Katello::ContentViewHistory.last.task.destroy

#3 Updated by The Foreman Bot about 3 years ago

  • Assignee set to Andrew Kofink
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/7394 added

#4 Updated by Jonathon Turel about 3 years ago

  • Legacy Backlogs Release (now unused) set to 338

#5 Updated by Andrew Kofink about 3 years ago

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

Also available in: Atom PDF