Project

General

Profile

Actions

Bug #33972

closed

tailoring_file_profile_selector

Added by Fabio Sbano over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Target version:
-
Fixed in Releases:
Found in Releases:

Description

Hello,

The func "tailoring_file_profile_selector" is retrive tailoring_file.scap_content_profiles.first.id instead of last selection from database

Best Regards,
Fabio Sbano

Actions #1

Updated by Fabio Sbano over 3 years ago

  • Priority changed from Normal to Immediate
Actions #2

Updated by Fabio Sbano over 3 years ago

I'm sending the fix below

[fsbano@eugenia foreman_openscap]$ diff -Nru app/helpers/policies_helper.rb.orig app/helpers/policies_helper.rb
--- app/helpers/policies_helper.rb.orig    2021-11-22 23:10:17.169304680 -0300
+++ app/helpers/policies_helper.rb    2021-11-22 23:11:19.057530971 -0300
@@ -93,7 +93,7 @@
   def tailoring_file_profile_selector(form, tailoring_file)
     if tailoring_file
       select_f form, :tailoring_file_profile_id, tailoring_file.scap_content_profiles, :id, :title,
-               { :selected => tailoring_file.scap_content_profiles.first.id },
+               { :selected => @policy.tailoring_file_profile_id },
                { :label => _("XCCDF Profile in Tailoring File"),
                  :help_inline => _("This profile will be used to override the one from scap content") }
     else
[fsbano@eugenia foreman_openscap]$ 

Best Regards,
Fabio Sbano

Actions #3

Updated by Fabio Sbano over 3 years ago

  • Pull request https://github.com/theforeman/foreman_openscap/pull/517 added
Actions #4

Updated by The Foreman Bot over 3 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_openscap/pull/518 added
Actions #5

Updated by The Foreman Bot over 3 years ago

  • Fixed in Releases foreman_openscap 5.1.0 added
Actions #6

Updated by Fabio Sbano over 3 years ago

  • Status changed from Ready For Testing to Closed
Actions #7

Updated by Ondřej Pražák over 3 years ago

  • Fixed in Releases foreman_openscap 5.2.0 added
  • Fixed in Releases deleted (foreman_openscap 5.1.0)
Actions #8

Updated by Ondřej Pražák over 3 years ago

  • Bugzilla link set to 2026718
Actions #9

Updated by Ondřej Pražák over 3 years ago

  • Priority changed from Immediate to High
Actions

Also available in: Atom PDF