]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Patch for bug 262141: Enable the creation of bookmarkable URL for bug entry when...
authorjocuri%softhome.net <>
Fri, 3 Dec 2004 06:31:50 +0000 (06:31 +0000)
committerjocuri%softhome.net <>
Fri, 3 Dec 2004 06:31:50 +0000 (06:31 +0000)
post_bug.cgi

index 800b46f01656e666d5a4b518e5bf336b0d98a3a1..473a1563a273e270d17d647066cf5b84e60d790c 100755 (executable)
@@ -75,10 +75,6 @@ my $format = GetFormat("bug/create/comment", $::FORM{'format'}, "txt");
 $template->process($format->{'template'}, $vars, \$comment)
   || ThrowTemplateError($template->error());
 
-# Check that if required a description has been provided
-if (Param("commentoncreate") && !trim($::FORM{'comment'})) {
-    ThrowUserError("description_required");
-}
 ValidateComment($comment);
 
 my $product = $::FORM{'product'};
@@ -121,6 +117,13 @@ if (!defined $::FORM{'short_desc'} || trim($::FORM{'short_desc'}) eq "") {
     ThrowUserError("require_summary");
 }
 
+# Check that if required a description has been provided
+# This has to go somewhere after 'maketemplate' 
+#  or it breaks bookmarks with no comments.
+if (Param("commentoncreate") && !trim($::FORM{'comment'})) {
+    ThrowUserError("description_required");
+}
+
 # If bug_file_loc is "http://", the default, strip it out and use an empty
 # value. 
 $::FORM{'bug_file_loc'} = "" if $::FORM{'bug_file_loc'} eq 'http://';