Bug 505362

Summary: Errata search, advanced errata search by package name is not returning results
Product: Red Hat Satellite 5 Reporter: wes hayutin <whayutin>
Component: ServerAssignee: John Matthews <jmatthew>
Status: CLOSED CURRENTRELEASE QA Contact: wes hayutin <whayutin>
Severity: medium Docs Contact:
Priority: low    
Version: 530CC: cperry, pthomas
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
URL: https://grandprix.rhndev.redhat.com/rhn/errata/Search.do?start_hour=11&end_year=2009&start_month=5&errata_type_bug=on&end_hour=11&search_string=kernel&end_am_pm=0&errata_type_security=on&start_minute=55&start_am_pm=0&end_minute=55&end_day=11&start_year=2009&end_month=5&view_mode=errata_search_by_package_name&errata_type_enhancement=on&start_day=10
Whiteboard:
Fixed In Version: sat530 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-10 19:32:43 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:
Bug Depends On:    
Bug Blocks: 456985, 457073    

Description wes hayutin 2009-06-11 16:14:22 UTC
Description of problem:

6/5.1 rhel 5

1. confirm that there are errata that contain the pkg kernel
2. errata, advanced search, by package name, search for kernel

no results found..

expected results:

erratum listed that have the pkg kernel

Comment 2 John Matthews 2009-06-11 16:59:49 UTC
This is fixed with the below commit.

commit 40bbd72aca5584d24bccea315ccf60d270e7bfee
Author: John Matthews <jmatthew>
Date:   Wed Jun 10 16:04:12 2009 -0400


The issue was that in 6/5.1 ISO I changed the query to flesh out Errata to filter based on org_id, I didn't handle org_id being NULL For Red Hat channels, so I dropped all of those results from the query....this wasn't picked up during testing since I had clones of all the rhel channels I ended up testing with cloned errata.



--- a/java/code/src/com/redhat/rhn/domain/errata/impl/PublishedErrata.hbm.xml
+++ b/java/code/src/com/redhat/rhn/domain/errata/impl/PublishedErrata.hbm.xml
@@ -155,12 +155,16 @@ PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
                    from rhnErrata e,
                         rhnErrataPackage ep,
                         rhnPackage p,
-                        rhnPackageName pn
+                        rhnPackageName pn,
+                        rhnAvailableChannels ac,
+                        rhnChannelErrata ce
                   where e.id = ep.errata_id
                     and p.id = ep.package_id
                     and p.name_id = pn.id
                     and ep.package_id IN (:pids)
-                    and e.org_id IN (:org_ids)
+                    and e.id = ce.errata_id
+                    and ce.channel_id = ac.channel_id
+                    and ac.org_id = :org_id
                   order by e.id]]>
         <return-scalar column="id" type="long" />
         <return-scalar column="advisory" type="string" />

Comment 3 wes hayutin 2009-06-15 18:18:10 UTC
verified 6/12

Comment 4 Preethi Thomas 2009-08-04 18:08:29 UTC
Release Pending
test1182.test.redhat.com

Comment 5 Brandon Perkins 2009-09-10 19:32:43 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-1434.html