Current code in integration_add_tag for BZ 3.6 is still not correct. If
I try to make a new BZ branch via Subversion, I get error in log:
2010/06/23 08:45:37 Scmbug ERROR> 
Version.pm:193:Bugzilla::Version::_check_product - Can't locate object method 
"name" via package "TestProduct" (perhaps you forgot to load "TestProduct"?) at 
/srv/www/htdocs/bugzilla/Bugzilla/Version.pm line 193.
This patch fixes it:
--- Bugzilla.pm.orig    2010-06-23 08:50:51.000000000 +0200
+++ Bugzilla.pm 2010-06-23 08:54:32.000000000 +0200
@@ -1295,6 +1295,12 @@
        SendSQL( $sql );
        PopGlobalSQLState();
     } else {
+       my $product = new Bugzilla::Product( { name => $product_name } );
+
+        if( !defined ( $product ) ) {
+            # The product name does not exist
+            return 1;
+        }
 
         my $user = "";
         # Need to first check if the user exists
@@ -1314,7 +1320,7 @@
         } else {
             # User->check did not raise an exception. The user exists.
             Bugzilla->set_user( $user );
-            my $version = Bugzilla::Version->create( { name => $tag_name, 
product => $product_name } );
+            my $version = Bugzilla::Version->create( { name => $tag_name, 
product => $product } );
         }
     }


-- 
Michal Kašpar


_______________________________________________
scmbug-users mailing list
[email protected]
http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users

Reply via email to