]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 308318: Can create a product without description but cannot remove an existing...
authorlpsolit%gmail.com <>
Wed, 28 Sep 2005 04:47:32 +0000 (04:47 +0000)
committerlpsolit%gmail.com <>
Wed, 28 Sep 2005 04:47:32 +0000 (04:47 +0000)
editproducts.cgi
template/en/default/global/user-error.html.tmpl

index 54f1de190a281f41402960fd68383116c5d94639..82ce7433dec94c3bebd1be6aeb8da557c72a3388 100755 (executable)
@@ -303,6 +303,12 @@ if ($action eq 'new') {
     }
 
     my $description  = trim($cgi->param('description')  || '');
+
+    if ($description eq '') {
+        ThrowUserError('product_must_have_description',
+                       {'product' => $product});
+    }
+
     my $milestoneurl = trim($cgi->param('milestoneurl') || '');
     my $disallownew = 0;
     $disallownew = 1 if $cgi->param('disallownew');
index 8288a309daa1bf96b21aa55b21a249e90a955819..f23220d2945ed9a789d45e54839fe55ce596a718 100644 (file)
     You must reassign those [% terms.bugs %] to another product before you
     can delete this one.
 
+  [% ELSIF error == "product_must_have_description" %]
+    [% title = "Product needs Description" %]
+    You must enter a description for product '[% product FILTER html %]'.
+
   [% ELSIF error == "product_must_have_version" %]
-    [% title = "Product needs version" %]
+    [% title = "Product needs Version" %]
     You must enter a version for product '[% product FILTER html %]'.
 
   [% ELSIF error == "product_not_specified" %]