Bug 443465

Summary: FEAT: Match the new db schema of bz3.0 [#4 TABLE flags]
Product: [Retired] Red Hat Hardware Certification Program Reporter: XINSUN <xisun>
Component: Hardware CatalogAssignee: XINSUN <xisun>
Status: CLOSED CURRENTRELEASE QA Contact: Yu Shao <yshao>
Severity: medium Docs Contact:
Priority: medium    
Version: 5CC: bxu, dkl, efeng, kbaker, nelhawar, rlandry, tfu, xiqin, ykun, yshao
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 3.2rh-20080801.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-08-04 17:56:27 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: 443456    
Attachments:
Description Flags
The patch to fix the "remove field flags.isactive"
none
Patch Improve: none

Description XINSUN 2008-04-21 17:54:37 UTC
4.   Relate to TABLE flags need to change list below:
      4.1 Delete  the field is_active from table flags.
                 Added :        N/A
                 Removed:       FIELD  flags.is_active

Comment 1 XINSUN 2008-04-23 02:29:31 UTC
Created attachment 303414 [details]
The patch to fix the "remove field flags.isactive"

Comment 2 Rob Landry 2008-04-23 17:41:14 UTC
What function did is_active have, and is it reproduced someplace else now?

@@ -408,7 +406,6 @@ technically the previous line has a "," which shouldn't be
there.

Comment 3 David Lawrence 2008-04-23 18:24:48 UTC
In the old days, a flag was set to is_active = 0 instead of being deleted. Now
in 3.2 they are just deleted.

Comment 4 Rob Landry 2008-04-23 18:50:16 UTC
So is_active is already a dead field?

Comment 5 David Lawrence 2008-04-23 19:00:42 UTC
(In reply to comment #4)
> So is_active is already a dead field?

Yes. for 3.2 anyway.

Comment 6 XINSUN 2008-04-25 13:30:17 UTC
Created attachment 303781 [details]
Patch Improve:

1. Correct the place (@408) which Rob figured out.
2. Add the changes into the clear($flag->{'id'}) : "DELETE FROM flags WHERE id
= $id"

Please Review.
Nicho

Comment 7 Noura El hawary 2008-04-28 04:48:23 UTC
Hi Nicho,,

in your patch in Bugzilla/Flag.pm , the section:
@@ -408,7 +406,6 @@
                                requestee_id = NULL , 
                                status = '$status' , 
                                modification_date = $timestamp ,
-                               is_active = 1
                         WHERE  id = $flag->{'id'}");
             
             # Send an email notifying the relevant parties about the fulfillment.
@@ -433,7 +430,6 @@
                                requestee_id = $requestee_id , 
                                status = '$status' , 
                                modification_date = $timestamp ,
-                               is_active = 1
                         WHERE  id = $flag->{'id'}");


Please remove the ',' comma after $timestamp variable, I think it might caze
syntax error in mysql.

----------------------------------------

also other places that might need removing of flags.is_active are:

./Bugzilla/FlagType.pm:273:        AND flags.is_active = 1
./Bugzilla/FlagType.pm:284:        AND flags.is_active = 1


Cheers,
Noura

Comment 8 XINSUN 2008-04-29 10:35:06 UTC
Created attachment 304096 [details]
Patch improve:

1. remove the ",". 
2. remove
./Bugzilla/FlagType.pm:273:	   AND flags.is_active = 1
./Bugzilla/FlagType.pm:284:	   AND flags.is_active = 1

please review
Nicho

Comment 9 Noura El hawary 2008-05-01 01:56:22 UTC
Patch looks good to me nicho.

Thanks,
Noura

Comment 10 Rob Landry 2008-07-17 21:03:04 UTC
Please commit this change to CVS and set the status to MODIFIED.

Comment 11 eric_liu 2008-08-01 11:30:21 UTC
tested and run good