Bug 454459

Summary: clean up NEEDINFO_* from bugzilla for 3.2 migration
Product: [Community] Bugzilla Reporter: Noura El hawary <nelhawar>
Component: Bugzilla GeneralAssignee: Noura El hawary <nelhawar>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.2   
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-07-22 20:11:15 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: 406071    
Attachments:
Description Flags
v1 added code to clean up NEEDINFO_REPORTER status
dkl: review+
patch for the rest of NEEDINFO_* cleanup dkl: review+

Description Noura El hawary 2008-07-08 16:36:26 UTC
few bugs have NEEDINFO_REPORTER status in them as reported by tony, this all
needs to be cleaned out as part of the NEEDINFO status clean up for the 3.2
bugzilla migration.

Comment 1 Noura El hawary 2008-07-09 13:05:19 UTC
Created attachment 311372 [details]
v1 added code to clean up NEEDINFO_REPORTER status

attached is a patch to the needinfo cleanup script which does clean up of the
NEEDINFO_REPORTER status and also now it has code to write the output to a log
file so we can keep track and record of the clean up process and keep Meethune
happy lol.

please review when you can.

Noura

Comment 2 Noura El hawary 2008-07-09 13:07:34 UTC
just a note when i checked the partner database it had about 35 bugs with
NEEDINFO_REPORTER, but currently the live production database has only one bug
with that status, i just fixed the script just in case at the time of the
migration there are more bugs again with that status.

Noura

Comment 3 David Lawrence 2008-07-09 16:06:55 UTC
Comment on attachment 311372 [details]
v1 added code to clean up NEEDINFO_REPORTER status

Looks good Noura. 

One little nitpick though:
Change MYFILE to LOGFILE or LOG to be more descriptive.

Once that is changed, feel free to checkin and then send email for bhowmick to
run on partner-bugzilla.

Dave

Comment 4 Noura El hawary 2008-07-09 21:48:16 UTC
Thanks for the review Dave, changed to LOGFILE, and sent request to run the
script on partner-bugzilla.

Noura

Comment 5 Noura El hawary 2008-07-10 02:14:53 UTC
looking the the result i got from meethune from running the clean up script on
partner-bugzilla , 2 things went wrong:

1- the needinfo?($SOMONE) string was appending the reporters from each bug to
the other because i forgot to rest the string to its original value inside each
loop.

2- new thing came out which is what if the prev status to a bug with NEEDINFO
was NEEDINFO_REPORTER or the other way around prev status with NEEDINFO_REPORTER
was NEEDINFO this will still change back to the NEEDINFO or NEEDINFO_REPORTER
and we haven't done anything.

a patch is attached which has the fix for the above 2 cases also i run the
script with that patch on bz-db1-test and the output is attached

Noura

Comment 6 Noura El hawary 2008-07-10 05:03:29 UTC
Created attachment 311443 [details]
patch for the rest of NEEDINFO_* cleanup

This is the patch that includes fix for the above points, basically i found out
that there are some other previous statuses that are not valid and should not
be set instead of the NEEDINFO status for example, INVISTIGATE, NEEDINFO_PM
,etc 
so i put condition for the previous status that it has to be in:

removed IN (select value from bug_status where isactive=1 and is_open=1 and
value != 'NEEDINFO')

please see attached patch.

Noura

Comment 7 David Lawrence 2008-07-10 05:13:30 UTC
Comment on attachment 311443 [details]
patch for the rest of NEEDINFO_* cleanup

Looks good Noura.

Comment 8 Noura El hawary 2008-07-10 12:53:00 UTC
Thanks for the review Dave, now committed.

Comment 9 David Lawrence 2008-07-22 20:11:15 UTC
The changes have been pushed to partner-bugzilla.redhat.com and/or have been
recorded in the Bugzilla migration pages on the Bugzilla 3 upgrade Wiki.

Closing as NEXTRELEASE.
Dave