Bug 443566 - FEAT: Match the new db schema of bz3.0 [#9 TABLE profiles]
Summary: FEAT: Match the new db schema of bz3.0 [#9 TABLE profiles]
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:
: 443562 (view as bug list)
Depends On:
Blocks: hwcert->BZ3_tracker
TreeView+ depends on / blocked
 
Reported: 2008-04-22 08:35 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:39 UTC
Embargoed:


Attachments (Terms of Use)
The patch to fix the "delete the refreshed_when " (4.02 KB, patch)
2008-04-23 02:15 UTC, XINSUN
no flags Details | Diff
The patch to fix : 9.1 (refresh_when) and 9.2 (emailflags) (8.64 KB, patch)
2008-04-25 01:57 UTC, XINSUN
no flags Details | Diff
Patch Improve for patching operation. (8.34 KB, patch)
2008-04-25 14:05 UTC, XINSUN
no flags Details | Diff

Description XINSUN 2008-04-22 08:35:16 UTC
9. Relate to TABLE profiles need to change list below:
   9.1 Delete  the field emailflags from table profiles
       Added :     N/A
       Removed:    FIELD  profiles. emailflags

   9.2 Delete  the field refreshed_when from table profiles
       Added :        N/A
       Removed:    FIELD  profiles. refreshed_when

Comment 1 XINSUN 2008-04-23 02:15:49 UTC
Created attachment 303411 [details]
The patch to fix the "delete the refreshed_when "

Comment 2 Rob Landry 2008-04-23 17:30:34 UTC
Just to verify... the effect here is there are changes in the schema which
impact altering user email preference settings; doing so isn't something that
the catalog supports and thusly this patch simply removes the functions, is that
correct?

Comment 3 XINSUN 2008-04-24 00:19:59 UTC
Rob, :) yes, that is correct, just my thought. Need you and Dave confirm if it
is ok.

Comment 4 XINSUN 2008-04-25 01:57:09 UTC
Created attachment 303720 [details]
The patch to fix : 9.1 (refresh_when) and 9.2 (emailflags)

Comment 5 XINSUN 2008-04-25 05:13:32 UTC
*** Bug 443562 has been marked as a duplicate of this bug. ***

Comment 6 XINSUN 2008-04-25 14:05:48 UTC
Created attachment 303788 [details]
Patch Improve for patching operation. 

Because all the bugs'patch will be patched into one codes tree, 
35a36,51
> @@ -321,14 +300,7 @@
>	       }
>	   }
>      }
> -
> -    $dbh->do(q{UPDATE profiles
> -		     SET refreshed_when = ?
> -		   WHERE userid=?},
> -		undef,
> -		$time,
> -		$id);
> -
> +
>      Bugzilla::DB::UnlockTables() unless $already_locked;
>  }
>

Above codes' process have been moved into bug 433561 's patch

Nicho

Comment 7 XINSUN 2008-04-25 14:07:18 UTC
s/bug 433561/ bug 443561

Sorry. :)

Comment 8 Noura El hawary 2008-04-25 15:02:58 UTC
The patch looks good to me nicho.. regarding the part of the patch that deletes
the email filtering based on the user preferences. I think this shouldn't affect
hwcert as I think it is related to mailing bugs so not doing the email filtering
in hwcert wouldn't annoy anyone I think. otherwise if we will have to replace
this code then it is very complicated and it involves a lot of code changing in
different modules to use the new table email_setting. 

Noura

Comment 9 Noura El hawary 2008-04-28 03:31:59 UTC
Just to confirm my point the Send() function that requires the email filtering
by role only exists in hwcert in the following places:

[root@bugdev hwcert-noura]# grep -r  Send\( .
./Bugzilla/BugMail.pm:sub Send($;$) {
./Bugzilla/Template.pm:                Bugzilla::BugMail::Send($id,
$mailrecipients);

meaning is it not used by hwcert.

Noura

Comment 10 Rob Landry 2008-07-17 21:04:44 UTC
Noura, to confirm, you are happy/otherwise approve this patch does the needed work?

Comment 11 Noura El hawary 2008-07-21 03:20:36 UTC
Hey Rob, Yeah the patch looks good to me.

Noura

Comment 12 eric_liu 2008-08-01 11:35:01 UTC
tested and run good 


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