Closed
Bug 213679
Opened 21 years ago
Closed 21 years ago
There should be a 'commentoncreate' parameter
Categories
(Bugzilla :: Creating/Changing Bugs, enhancement, P3)
Bugzilla
Creating/Changing Bugs
Tracking
()
RESOLVED
FIXED
Bugzilla 2.18
People
(Reporter: dswegen, Assigned: dswegen)
Details
Attachments
(2 files, 2 obsolete files)
1.49 KB,
patch
|
Details | Diff | Splinter Review | |
2.20 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20030704 Mozilla Firebird/0.6
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20030704 Mozilla Firebird/0.6
At the moment there is no way of enforcing a policy of having to provide an
initial comment on a bug. This is odd as there are parameters to enforce
comments on virtually every other bug operation.
Reproducible: Always
Steps to Reproduce:
1. Create a new bug, don't provide a comment
2.
3.
Actual Results:
Bug was accepted
Expected Results:
If the option had been set it should have shown an error screen prompting for a
comment.
This feature doesn't exist in 2.17.1
Assignee | ||
Comment 1•21 years ago
|
||
If the descriptionrequired param is set a user error will be thrown if no
comment is given when submitting a bug.
Assignee | ||
Updated•21 years ago
|
Attachment #134308 -
Flags: review?(myk)
Comment 2•21 years ago
|
||
Comment on attachment 134308 [details] [diff] [review]
Patch that provides "description required" option
>diff -ur --exclude CVS /scratch/bugzilla-hacking/bugzilla.cvs.orig/defparams.pl
>+ name => 'descriptionrequired',
Please rename this to commentoncreate for consistency with the other related
parameters.
>diff -ur --exclude CVS /scratch/bugzilla-hacking/bugzilla.cvs.orig/post_bug.cgi
>+# Check that if required a description has been provided
>+if (Param("descriptionrequired")) {
>+ if (!defined $::FORM{'comment'} || $::FORM{'comment'} =~ /^\s*$/) {
>+ ThrowUserError("description_required");
>+ }
>+}
Nit: this could be simpler as just:
if (Param("descriptionrequired") && !trim($::FORM{'comment'})) ...
trim() will just return undefined if its argument is undefined, otherwise it'll
strip preceding and succeeding spaces, so this test is equivalent to separate
checks for definition and spaciness.
Attachment #134308 -
Flags: review?(myk) → review-
Assignee | ||
Comment 3•21 years ago
|
||
Attachment #134308 -
Attachment is obsolete: true
Assignee | ||
Updated•21 years ago
|
Attachment #134387 -
Flags: review?(myk)
Comment 4•21 years ago
|
||
Why should this be an option? It should be enforced. There is no occasion
where an empty comment is appropriate. You should include something, even if
it's the same as the summary.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
Target Milestone: --- → Bugzilla 2.20
Assignee | ||
Comment 5•21 years ago
|
||
I fully agree that allowing empty descriptions is bad policy, but with this
patch I'm simply trying to maintain what seems to be the current policy towards
comments, i.e. make them all optional. The only reason I can see for not making
this an option is for reasons of option bloat. I have no preference either way.
Assignee | ||
Comment 6•21 years ago
|
||
This patch takes Matty's comment into account, and makes create comment
mandatory.
Assignee | ||
Updated•21 years ago
|
Attachment #134387 -
Flags: review?(myk)
Assignee | ||
Updated•21 years ago
|
Attachment #140066 -
Flags: review?(myk)
Comment 7•21 years ago
|
||
Comment on attachment 140066 [details] [diff] [review]
Same patch, but without the config option
There are some legitimate reasons to have empty descriptions. We might want to
automatically duplicate the summary of such bugs in the description (if only to
improve fulltext and comment searches), but we shouldn't force the user to do
so.
Attachment #140066 -
Flags: review?(myk)
Comment 8•21 years ago
|
||
Comment on attachment 134387 [details] [diff] [review]
Updated comment on create patch
>+ name => 'commentoncreate',
>+ desc => 'If this option is on, the user needs to enter a description ' .
>+ 'of the bug',
Nit: of the bug -> when entering a new bug
>+ [% ELSIF error == "description_required" %]
>+ [% title = "Description Required" %]
>+ You must provide a description of the bug before it will be accepted.
Nit: the self-evident and passive phrase "before it will be accepted" seems
clunky and unnecessary.
r=myk
Attachment #134387 -
Flags: review+
Updated•21 years ago
|
Flags: approval+
Updated•21 years ago
|
Assignee: myk → dswegen
OS: Linux → All
Hardware: PC → All
Target Milestone: Bugzilla 2.20 → Bugzilla 2.18
Comment 9•21 years ago
|
||
Checked in patch (the same with the one that got a+ but with myk's nits fixed
and a "bug" ==> "terms.bug" in order not to set the tree on fire).
Attachment #134387 -
Attachment is obsolete: true
Comment 10•21 years ago
|
||
Checking in defparams.pl;
/cvsroot/mozilla/webtools/bugzilla/defparams.pl,v <-- defparams.pl
new revision: 1.124; previous revision: 1.123
done
Checking in post_bug.cgi;
/cvsroot/mozilla/webtools/bugzilla/post_bug.cgi,v <-- post_bug.cgi
new revision: 1.86; previous revision: 1.85
done
Checking in template/en/default/global/user-error.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/global/user-error.html.tmpl,v
<-- user-error.html.tmpl
new revision: 1.46; previous revision: 1.45
done
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•