Bug 457857

Summary: customer-facing field gets automatically updated value --- and send in emails when bugs are changed
Product: [Community] Bugzilla Reporter: Noura El hawary <nelhawar>
Component: Creating/Changing BugsAssignee: Tony Fu <tfu>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.2CC: dkl, petersen, pnemade, tfu
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-08-12 20:20: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:

Description Noura El hawary 2008-08-05 01:49:23 UTC
reported by : Jens and Parag:

cutomer facing is getting weird value '---' in bugs.

Comment 1 David Lawrence 2008-08-05 02:09:55 UTC
we need to makesure that all rows of the database that are current set to null or emtpy for cf_cust_facing are updated to '---' and that is set as the default for new rows. Currently the only valid choices for that field is '---', 'YES', and 'NO'. So the bug form is auto selecting the first in the list and hence the change.

Tony. Can you submit a SQL statement to eng-sysadmin if this looks right?

Dave

Comment 2 Tony Fu 2008-08-05 06:19:16 UTC
(In reply to comment #1)
> we need to makesure that all rows of the database that are current set to null
> or emtpy for cf_cust_facing are updated to '---' and that is set as the default
> for new rows. Currently the only valid choices for that field is '---', 'YES',
> and 'NO'. So the bug form is auto selecting the first in the list and hence the
> change.
> 
> Tony. Can you submit a SQL statement to eng-sysadmin if this looks right?
> 
> Dave

Hi Dave,

Apart from changing empty string (there is no NULL of bugs.cf_cust_facing) to default value '---', I think we may need to change 0 to 'No' and 1 to 'Yes' as well (i am not sure about the mapping).

Also it seems that we need to make sure the bugs.cf_cust_facing values match with values in cf_cust_facing exactly, changing value 'NO' or 'no' of bugs.cf_cust_facing to 'No', which is the value used in cf_cust_facing table.  And same changes for yes value (cf_cust_facing uses 'Yes').

I have run following three sql statements against db on bz-db1-test (web server bz-web2-test) and it looked good for me.  Please take a look and if you are happy with them, we can submit them to eng-sysadmin.

update bugs set cf_cust_facing='---' where cf_cust_facing='';
update bugs set cf_cust_facing='No' where cf_cust_facing='0' or cf_cust_facing='no';
update bugs set cf_cust_facing='Yes' where cf_cust_facing='1' or cf_cust_facing='yes';


Thanks,
Tony

Comment 3 David Lawrence 2008-08-08 03:54:18 UTC
Tony, SQL looks good. Have eng-sysadmin run it against the live dbs when they can.

Dave

Comment 4 David Lawrence 2008-08-12 20:20:39 UTC
I had eng-sysadmin to run the SQL on the live db so we can close this.