Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1978588

Summary: ContentView Publish with Date Filter fails with undefined method `start_date' for nil:NilClass
Product: Red Hat Satellite Reporter: Matthias Dellweg <mdellweg>
Component: Content ViewsAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Lai <ltran>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.9.0CC: bbuckingham, peter.vreman
Target Milestone: 6.10.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-16 19:01:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1957813    

Description Matthias Dellweg 2021-07-02 08:56:23 UTC
Description of problem:

Contenview publish fails with:
```
2021-06-30T20:37:47 [I|bac|] Task {label: Actions::Katello::ContentView::Publish, id: 02f795bf-d419-42f9-a0dd-a590adbebe06, execution_p
lan_id: bd4a85eb-b60d-4b6d-9b18-774f6e632a1f} state changed: running
2021-06-30T20:37:47 [E|bac|] undefined method `start_date' for nil:NilClass (NoMethodError)
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.29/app/models/katello/content_view_erratum_filter.rb:96:in `errata_from'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.29/app/models/katello/content_view_erratum_filter.rb:36:in `content_unit
_pulp_ids'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.29/app/services/katello/pulp3/repository/yum.rb:268:in `block (2 levels)
 in add_filter_content'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.29/app/services/katello/pulp3/repository/yum.rb:267:in `each'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.29/app/services/katello/pulp3/repository/yum.rb:267:in `block in add_fil
ter_content'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.29/app/services/katello/pulp3/repository/yum.rb:265:in `each'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.29/app/services/katello/pulp3/repository/yum.rb:265:in `add_filter_conte
nt'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.29/app/services/katello/pulp3/repository/yum.rb:327:in `block in copy_co
ntent_from_mapping'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.29/app/services/katello/pulp3/repository/yum.rb:319:in `each'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.29/app/services/katello/pulp3/repository/yum.rb:319:in `copy_content_fro
m_mapping'
```

```
# hammer content-view filter info  --id=3702
Filter ID:    3702
Name:         product-<redacted>
Type:         erratum
Inclusion:    true
Description:
Repositories:

Rules:
 1) ID:         1309
    Start Date: 2000-01-01T00:00:00.000Z
    End Date:   2021-06-27T12:00:00.000Z
    Types:      security, enhancement, bugfix
    Created:    2021/06/28 08:43:56
    Updated:    2021/06/28 08:43:56
```



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Peter Vreman 2021-07-02 15:13:51 UTC
I found the root cause and simple reproducer
It it is a CV Filter of type 'Erratum by ID' filter

Reproducer:
- Create a filter 'Erratum by ID' and leave the ID list empty

Another bug is that the UI show in the next step and when editing later in the 'Add' Tab the Date/Time section which is incorrect because that shall be only for the 'Erratum by Date and Type'

Comment 3 Peter Vreman 2021-07-12 14:11:46 UTC
Sorry Brad for the overhead it creates.

I overlooked (maybe because of holidays) this existing BZ and created a Duplicate BZ https://bugzilla.redhat.com/show_bug.cgi?id=1981401 that includes the simple fix.

Comment 4 Brad Buckingham 2021-07-16 19:01:34 UTC
Hi Peter,

No worries at all.  Thank you for raising this to my attention.  Appreciate your support and collaboration!

I'll close this one as a duplicate.

*** This bug has been marked as a duplicate of bug 1981401 ***