Bug 500957 - Bugzilla db data clean up (sanitycheck reported bugs with open status and a resolution error)
Bugzilla db data clean up (sanitycheck reported bugs with open status and a r...
Status: CLOSED CURRENTRELEASE
Product: Bugzilla
Classification: Community
Component: Database (Show other bugs)
3.2
All Linux
high Severity high (vote)
: ---
: ---
Assigned To: Tony Fu
http://hardware.redhat.com
:
Depends On: 495647
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-15 02:43 EDT by Tony Fu
Modified: 2009-05-20 03:09 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-05-20 03:09:23 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
script to set bugs.resolution to '' if the bug is in open state bug bugs.resolution is not '' (732 bytes, text/plain)
2009-05-18 04:54 EDT, Tony Fu
dkl: review+
Details

  None (edit)
Comment 1 Tony Fu 2009-05-15 02:56:54 EDT
Dave,

'Cause hwcert code has been changed to process bugs.resolution field properly when reopening a bug, this clean up is most likely to be an one-time thing.  I think we just need the simple sql query to do it.

mysql> UPDATE bugs SET resolution="" WHERE bug_id IN (325631, 471077, 472124);

Any thoughts?


Thanks,
Tony
Comment 2 David Lawrence 2009-05-15 11:30:08 EDT
(In reply to comment #1)
> Dave,
> 
> 'Cause hwcert code has been changed to process bugs.resolution field properly
> when reopening a bug, this clean up is most likely to be an one-time thing.  I
> think we just need the simple sql query to do it.
> 
> mysql> UPDATE bugs SET resolution="" WHERE bug_id IN (325631, 471077, 472124);
> 
> Any thoughts?
> 
> 
> Thanks,
> Tony  

Problem was since the hwcert code did not do this properly when the bug was reopened it did not get the proper activity log entry at that time. So we may
need to make a log entry as well as change the bugs table. You can do this pretty easily by using the core BZ modules.

#!/usr/bin/perl

use lib '.';
use Bugzilla;
use Bugzilla::Bug;

Bugzilla->set_user(Bugzilla::User->new({name => 'bugzilla@redhat.com'});

foreach my $id (325631, 471077, 472124) {
    my $bug = Bugzilla::Bug->new($id);
    $bug->clear_resolution();
    $bug->update();
}


Or something like that. Then have eng-sysadmins to run the script on the live server for you.

Dave
Comment 3 Tony Fu 2009-05-18 04:52:05 EDT
Dave,


Thanks for your suggestion.  I attached a script which should do the bugs.resolution clean up.  If you are happy with it, I will ask our sysadmin to run it on the live server.


Thanks,
Tony
Comment 4 Tony Fu 2009-05-18 04:54:31 EDT
Created attachment 344401 [details]
script to set bugs.resolution to '' if the bug is in open state bug bugs.resolution is not ''
Comment 5 David Lawrence 2009-05-18 15:28:45 EDT
Comment on attachment 344401 [details]
script to set bugs.resolution to '' if the bug is in open state bug bugs.resolution is not ''

Tony. Looks good. Coordinate with eng-systems to get this executed on the live server.

Dave
Comment 6 Tony Fu 2009-05-20 03:09:23 EDT
eng-system has run it on the live server.

Close this bug.

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