Bug 443465 - FEAT: Match the new db schema of bz3.0 [#4 TABLE flags]
Summary: FEAT: Match the new db schema of bz3.0 [#4 TABLE flags]
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Hardware Certification Program
Classification: Retired
Component: Hardware Catalog
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: XINSUN
QA Contact: Yu Shao
URL:
Whiteboard:
Depends On:
Blocks: hwcert->BZ3_tracker
TreeView+ depends on / blocked
 
Reported: 2008-04-21 17:54 UTC by XINSUN
Modified: 2008-08-04 17:56 UTC (History)
10 users (show)

Fixed In Version: 3.2rh-20080801.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-08-04 17:56:27 UTC
Embargoed:


Attachments (Terms of Use)
The patch to fix the "remove field flags.isactive" (7.72 KB, patch)
2008-04-23 02:29 UTC, XINSUN
no flags Details | Diff
Patch Improve: (8.14 KB, patch)
2008-04-25 13:30 UTC, XINSUN
no flags Details | Diff

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 


Note You need to log in before you can comment on or make changes to this bug.