Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 224295

Summary: TAM ACK should not be required for pass-through clones in hardware certification
Product: Red Hat Hardware Certification Program Reporter: heyinglong <yhe>
Component: Hardware CatalogAssignee: Rob Landry <rlandry>
Status: CLOSED CURRENTRELEASE QA Contact: Yu Shao <yshao>
Severity: medium Docs Contact:
Priority: medium    
Version: 5CC: rlandry, xiqin, xisun, ykun, yshao
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-10-28 07:29:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 238495    

Description heyinglong 2007-01-25 04:59:37 UTC
Description of problem:
when reviewer want to make a clone certs "public", and always need to TAM ack
the    the public process.


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


How reproducible:


Steps to Reproduce:
1. visit a clone bug, and its status is CLOSED. then can't public it as a reviewer.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 3 Rob Landry 2008-09-18 20:14:13 UTC
Turns out we're forcing the support group in code, the follow patch put's a conditional around that to not add the support group if it's a dup.  This will unfortunately break if in the future we add the support group as a default group to the hwcert product. :(  I'm going to go ahead and check this change in.


[rlandry@bugdev hwcert-rlandry9]$ cvs diff post.cgi
rlandry@cvs.devel.redhat.com's password:
Index: post.cgi
===================================================================
RCS file: /cvs/qa/hwcert/post.cgi,v
retrieving revision 1.63
diff -u -r1.63 post.cgi
--- post.cgi    3 Sep 2008 03:02:04 -0000       1.63
+++ post.cgi    18 Sep 2008 20:08:54 -0000
@@ -869,10 +869,12 @@
     $comment .= "$extra_comment\n";
 }

-# Force the support group.
-SendSQL("SELECT id from groups where name = 'support'");
-my $gid = FetchSQLData();
-push(@groupstoadd, $gid) if (! grep(/^$gid$/,@groupstoadd));
+# Force the support group except for pass-throughs. (bz#224295)
+if (! $cgi->param('dup_id')){
+  SendSQL("SELECT id from groups where name = 'support'");
+  my $gid = FetchSQLData();
+  push(@groupstoadd, $gid) if (! grep(/^$gid$/,@groupstoadd));
+}

 #Get the group id of hwcert_postdate group.
 my $HWCERT_POSTDATE_group_id = GroupNameToId(HWCERT_POST_DATE);

Comment 4 XINSUN 2008-10-07 08:11:30 UTC
Patch improve:

Index: post.cgi
===================================================================
RCS file: /cvs/qa/hwcert/post.cgi,v
retrieving revision 1.66
diff -u -r1.66 post.cgi
--- post.cgi	3 Oct 2008 03:41:00 -0000	1.66
+++ post.cgi	7 Oct 2008 08:08:52 -0000
@@ -896,10 +896,10 @@
 }
 
 # Force the support group except for pass-throughs. (bz#224295)
+SendSQL("SELECT id from groups where name = 'support'");
+my $support_group_id = FetchSQLData();
 if (! $cgi->param('dup_id')){
-  SendSQL("SELECT id from groups where name = 'support'");
-  my $gid = FetchSQLData();
-  push(@groupstoadd, $gid) if (! grep(/^$gid$/,@groupstoadd));
+  push(@groupstoadd, $support_group_id) if (! grep(/^$support_group_id$/,@groupstoadd));
 }
 
 #Get the group id of hwcert_postdate group.
@@ -907,8 +907,8 @@
 
 # Add the group restrictions
 foreach my $grouptoadd (@groupstoadd) {
-    #Force to keep the hwcert_postdate group out of the default group restrictions.
-    next if $grouptoadd eq $HWCERT_POSTDATE_group_id;
+    #Force to keep the hwcert_postdate group out of the default group restrictions and also support group if pass-throughts.
+    next if ($grouptoadd eq $HWCERT_POSTDATE_group_id || ($grouptoadd eq $support_group_id && $cgi->param('dup_id')));
     SendSQL("INSERT INTO bug_group_map (bug_id, group_id)
              VALUES ($id, $grouptoadd)");
 }