Project

General

Profile

Actions

Bug #39419

closed

CVECF priorities not set during initial host registration

Added by Jeremy Lenz 2 months ago. Updated 8 days ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Content Views
Target version:
-
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

When a host is first registered with multiple content view environments, all CVECF records get priority: 0. The content_view_environments= setter calls reprioritize_for_content_facet
immediately after super, but for a new (unsaved) content facet, the CVECF join records only exist in memory — not in the database. Since reprioritize_for_content_facet uses find_by (a
database query), it finds nothing and sets no priorities. When content_facet.save! runs later in populate_content_facet, all CVECFs are persisted with the default priority of 0.

Fix: Call reprioritize_for_content_facet again in populate_content_facet after content_facet.save! when the content facet was a new record.
Actions #1

Updated by Jeremy Lenz 2 months ago

  • Red Hat JIRA set to SAT-46510
Actions #2

Updated by Ian Ballou 2 months ago

  • Target version set to Katello 4.21.1
  • Triaged changed from No to Yes
Actions #3

Updated by Pavan Soma Shekar 8 days ago

  • Status changed from New to Duplicate

Closing this as duplicate. Refer to https://projects.theforeman.org/issues/39503

Actions #4

Updated by Ian Ballou 8 days ago

  • Target version deleted (Katello 4.21.1)
Actions

Also available in: Atom PDF