Don't allow empty bug summaries

RESOLVED FIXED in Bugzilla 2.18

Status

()

defect
P3
trivial
RESOLVED FIXED
18 years ago
7 years ago

People

(Reporter: hsivonen, Assigned: goobix)

Tracking

2.11
Bugzilla 2.18
Bug Flags:
approval +

Details

(Whiteboard: [content:summary], )

Attachments

(1 attachment)

Bug 82118 had its summary deleted. Bugzilla should require the summary field to
have data at all times.
I remember seeing a Mozilla bug very recently that form fields were getting 
resubmitted in the wrong order.  I bet that was caused by the browser.  However, 
yes, Bugzilla should be validating the data...
Target Milestone: --- → Bugzilla 2.16
Priority: -- → P3
-> Bugzilla product, Changing Bugs component, reassigning.
Assignee: tara → myk
Component: Bugzilla → Creating/Changing Bugs
Product: Webtools → Bugzilla
Version: Bugzilla 2.11 → 2.11
Whiteboard: [content:summary]
We are currently trying to wrap up Bugzilla 2.16.  We are now close enough to
release time that anything that wasn't already ranked at P1 isn't going to make
the cut.  Thus this is being retargetted at 2.18.  If you strongly disagree with
this retargetting, please comment, however, be aware that we only have about 2
weeks left to review and test anything at this point, and we intend to devote
this time to the remaining bugs that were designated as release blockers.
Target Milestone: Bugzilla 2.16 → Bugzilla 2.18
Summary: Bugzilla apparently allows deletion of summary → Don't allow empty bug summaries
this bug is fixed.  there is both a javascript warning pop up and if you get
past that, a web page with a message: "Summary Needed - You must enter a summary
for this bug."  this is in cvs now.

close this out.
testing...
Summary: Don't allow empty bug summaries
Nope, this is still valid.  The warnings you speak of only ocurr on new bugs. 
This bug (according to the original description) is about changes to existing
bugs (i.e. it allows you to delete an existing summary)
Summary: Don't allow empty bug summaries
just reproduced on landfill as well, it's definitely still broken on the tip.
Posting new bugs gets done in post_bug.cgi. There are safety-checks in that
place for empty summaries.

However, editing bugs gets done in process_bug.cgi. Here we have 2 cases:
either we edit a single bug, or we change more bugs at once. Hopefully, in the
second case, the UI doesn't allow summaries to be changed, so we deal only with
the first case where we add 3 lines in order to ThrowUserError if the
short_desc is empty.

I've tested this with the CVS current code from the tip and it works and does
what it should.
Comment on attachment 127899 [details] [diff] [review]
Patch which requires summary when editing bugs.

Requesting review.
Attachment #127899 - Flags: review?(kiko)
<-- me
Assignee: myk → jocuri
Status: NEW → ASSIGNED
Comment on attachment 127899 [details] [diff] [review]
Patch which requires summary when editing bugs.

Looks simple enough; note that I don't have a tree at the moment to test this.
r=kiko assuming you've tested the common cases with it.
Attachment #127899 - Flags: review?(kiko) → review+
Thanks. Yeap, tested 4 different cases:

- edit a bug with a summary; delete the summary; push submit.

Expected: error. Got: error.

- edit a bug with empty summary; leave it empty; push submit.

Expected: error. Got: error.

- edit a bug with a summary; change the summary to something not-empty; push submit.

Expected: no error. Got: no error.

- edit a bug with a summary; change the bug but not the summary; push submit.

Expected: no error. Got: no error.


The tests have been performed on the CVS tip, I'd say it's safe to check-in.
Checking in process_bug.cgi;
/cvsroot/mozilla/webtools/bugzilla/process_bug.cgi,v  <--  process_bug.cgi
new revision: 1.186; previous revision: 1.185
done
Thanks, jp. Marking as fixed.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.