[WTF CVS] wtf/util update_db.pl,1.1.1.1,1.2
Brought to you by:
gryphonshafer
From: Gryphon S. <gry...@us...> - 2007-03-09 22:57:04
|
Update of /cvsroot/wtf-tracker/wtf/util In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1767/util Modified Files: update_db.pl Log Message: Changes to fix bug 1644788: Change bugzilla state trigger Index: update_db.pl =================================================================== RCS file: /cvsroot/wtf-tracker/wtf/util/update_db.pl,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** update_db.pl 18 Oct 2006 16:52:50 -0000 1.1.1.1 --- update_db.pl 9 Mar 2007 22:56:59 -0000 1.2 *************** *** 16,32 **** use WTF::Config; ! my $dbh_wtf = DBI->connect( ! WTF::Config::get( 'database', 'dsn' ), ! WTF::Config::get( 'database', 'user' ), ! WTF::Config::get( 'database', 'passwd' ), ! { RaiseError => 1, AutoCommit => 1 } ! ) or die $DBI::errstr; ! ! my $dbh_bz = DBI->connect( ! WTF::Config::get( 'bugzilla', 'dsn' ), ! WTF::Config::get( 'bugzilla', 'user' ), ! WTF::Config::get( 'bugzilla', 'passwd' ), ! { RaiseError => 1, AutoCommit => 1 } ! ) or die $DBI::errstr; sub copy_data { --- 16,27 ---- use WTF::Config; ! my ( $dbh_wtf, $dbh_bz ) = map { ! DBI->connect( ! WTF::Config::get( $_, 'dsn' ), ! WTF::Config::get( $_, 'user' ), ! WTF::Config::get( $_, 'passwd' ), ! { 'RaiseError' => 1, 'AutoCommit' => 1 }, ! ) or die $DBI::errstr ! } qw( database bugzilla ); sub copy_data { *************** *** 67,71 **** SELECT b.product_id, b.bug_id AS bug, b.short_desc AS name, ! IF(b.bug_status NOT IN ('CLOSED', 'VERIFIED'), 1, 0) AS active FROM bugs AS b INNER JOIN components AS c ON b.component_id = c.id --- 62,68 ---- SELECT b.product_id, b.bug_id AS bug, b.short_desc AS name, ! IF(b.bug_status NOT IN ( '} . ! join( q(','), WTF::Config::get('closed_states') ) ! . q{' ), 1, 0) AS active FROM bugs AS b INNER JOIN components AS c ON b.component_id = c.id |