Bug 443566

Summary: FEAT: Match the new db schema of bz3.0 [#9 TABLE profiles]
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:39 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 "delete the refreshed_when "
none
The patch to fix : 9.1 (refresh_when) and 9.2 (emailflags)
none
Patch Improve for patching operation. none

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