Bug 1933162

Summary: [RFE] Provide erratum.synopsis option to Applicable errata Reporting template
Product: Red Hat Satellite Reporter: James Jeffers <jjeffers>
Component: ReportingAssignee: Marek Hulan <mhulan>
Status: CLOSED ERRATA QA Contact: Lukáš Hellebrandt <lhellebr>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.8.0CC: dmatoule, mhulan, oprazak, pcreech, zhunting
Target Milestone: 6.8.5Keywords: FutureFeature
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.16.0.23-1 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 1906164 Environment:
Last Closed: 2021-03-31 19:48:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 5 Lukáš Hellebrandt 2021-03-10 14:18:52 UTC
Verified with Sat 6.9.0 snap 12.

It's now possible to use `erratum.title` in the report template, which contains synopsis of the erratum, e.g. "Important: freetype security update", and 'erratum.summary' which contains errata summary text. Example based on Applicable Errata report template:

```
<%#
name: Host - Applicable Errata
snippet: false
template_inputs:
- name: Hosts filter
  required: false
  input_type: user
  description: Limit the report only on hosts found by this search query. Keep empty
    for report on all available hosts.
  advanced: false
  value_type: search
  resource_type: Host
- name: Errata filter
  required: false
  input_type: user
  description: Limit the report only on errata found by this search query. Keep empty
    for report on all available errata.
  advanced: false
model: ReportTemplate
require:
- plugin: katello
 version: 3.16.0
-%>
<%- report_headers 'Host', 'Operating System', 'Environment', 'Erratum', 'Type', 'Published', 'Applicable since', 'Severity', 'Packages', 'CVEs', 'Reboot suggested', 'Synopsis', 'Summary'-%>
<%- load_hosts(search: input('Hosts filter'), preload: [:operatingsystem, :lifecycle_environment]).each_record do |host| -%>
<%-   host_applicable_errata_filtered(host, input('Errata filter')).each do |erratum| -%>
<%-     report_row(
          'Host': host.name,
          'Operating System': host.operatingsystem,
          'Environment': host.lifecycle_environment,
          'Erratum': erratum.errata_id,
          'Type': erratum.errata_type,
          'Published': erratum.issued,
          'Applicable since': erratum.created_at,
          'Severity': erratum.severity,
          'Packages': erratum.package_names,
          'CVEs': erratum.cves.map { |c| c.cve_id },
          'Reboot suggested': erratum.reboot_suggested,
          'Synopsis': erratum.title,
          'Summary': erratum.summary
        ) -%>
<%-   end -%>
<%- end -%>
<%= report_render -%>
```

Comment 10 errata-xmlrpc 2021-03-31 19:48:19 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Satellite 6.8.5 Async Bug Fix Update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:1057