Project

General

Profile

Actions

Bug #34218

closed

SUSE errata application broken after #33852

Added by Evgeni Golov over 2 years ago. Updated about 2 years ago.

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

Description

Ohai,

in #33852 we changed the inputs in the template from being called "errata" to "Errata Search Query" and updated the non-SUSE part of the template:

diff --git app/views/foreman/job_templates/install_errata.erb app/views/foreman/job_templates/install_errata.erb
index 14b0a5f88e..7664a47aa4 100644
--- app/views/foreman/job_templates/install_errata.erb
+++ app/views/foreman/job_templates/install_errata.erb
@@ -2,14 +2,14 @@
 kind: job_template
 name: Install Errata - Katello SSH Default
 job_category: Katello
-description_format: 'Install errata %{errata}'
+description_format: 'Install errata %{Errata search query}'
 feature: katello_errata_install
 provider_type: SSH
 template_inputs:
-- name: errata
-  description: A comma separated list of errata to install
+- name: Errata search query
+  description: Filter criteria for errata to be installed.
   input_type: user
-  required: true
+  required: false
 foreign_input_sets:
 - template: Package Action - SSH Default
   exclude: action,package
@@ -19,6 +19,8 @@ foreign_input_sets:
     <% advisories = input(:errata).split(',').join(' ') %>
     <%= render_template('Package Action - SSH Default', :action => 'install -n -t patch', :package => advisories) %>
 <% else %>
-    <% advisories = input(:errata).split(',').map { |e| "--advisory=#{e}" }.join(' ') %>
+    <% advisory_ids = @host.advisory_ids(search: input("Errata search query")) %>
+
+    <% advisories = advisory_ids.map { |e| "--advisory=#{e}" }.join(' ') %>
     <%= render_template('Package Action - SSH Default', :action => 'update-minimal', :package => advisories) %>
-<% end %>
+<% end %>

But the SUSE part is still reading:

  <% if @host.operatingsystem.family == 'Suse' -%>
      <% advisories = input(:errata).split(',').join(' ') %>
      <%= render_template('Package Action - SSH Default', :action => 'install -n -t patch', :package => advisories) %>

But there is no such input anymore…


Related issues 2 (0 open2 closed)

Related to Katello - Bug #33852: Content - Errata - Add REX actions (menu items)ClosedPartha AjiActions
Is duplicate of Katello - Bug #34175: Content Hosts->Manage Errata: undefined method join for comma-separated stringClosedJeremy LenzActions
Actions #1

Updated by Evgeni Golov over 2 years ago

  • Related to Bug #33852: Content - Errata - Add REX actions (menu items) added
Actions #2

Updated by Jonathon Turel over 2 years ago

  • Target version changed from Katello 4.4.0 to Katello 4.3.1
  • Triaged changed from No to Yes
Actions #3

Updated by Jeremy Lenz about 2 years ago

  • Status changed from New to Duplicate
Actions #4

Updated by Jeremy Lenz about 2 years ago

  • Is duplicate of Bug #34175: Content Hosts->Manage Errata: undefined method join for comma-separated string added
Actions #5

Updated by Jeremy Lenz about 2 years ago

  • Target version changed from Katello 4.3.1 to Katello Recycle Bin
Actions

Also available in: Atom PDF