Closed Bug 102487 Opened 24 years ago Closed 24 years ago

product-change page appears even if i don't write a comment

Categories

(Bugzilla :: Creating/Changing Bugs, defect, P3)

2.15
x86
Windows 98

Tracking

()

RESOLVED FIXED
Bugzilla 2.16

People

(Reporter: aufbau01, Assigned: gerv)

Details

Attachments

(1 file, 2 obsolete files)

I tried to move bug 101258 to the evangelism product without giving a comment. (My previous comment had been "Reopening, will send to evangelism.") I got a page asking me to make sure the target milestone and version fields were correct, and *then* I was told that the change couldn't go through because I didn't include a comment. I'm leaving the severity at "normal" because even though this doesn't cause a lot of problems, it does make Bugzilla look stupid.
Severity: normal → minor
Priority: -- → P3
Target Milestone: --- → Bugzilla 2.16
Attached patch Patch v.1 (obsolete) — Splinter Review
I think this is the fix. Gerv
Taking. Gerv
Assignee: myk → gerv
Keywords: patch, review
Comment on attachment 57690 [details] [diff] [review] Patch v.1 r=kiko, even though i hate that if statement. maybe add a tiny comment saying what it does?
Attachment #57690 - Flags: review+
r=ddk, but note violation of coding standard with '{' on a line by itself. (I can't believe I'm complaining about that because I tend to code with '{' on a separate line. :^)
Comment on attachment 57690 [details] [diff] [review] Patch v.1 But see my previous comment.
Attachment #57690 - Flags: review+
checked in. /cvsroot/mozilla/webtools/bugzilla/process_bug.cgi,v <-- process_bug.cgi new revision: 1.107; previous revision: 1.106
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Backed out... this checking broke the tree. [Sat Nov 17 13:19:06 2001] process_bug.cgi: main::CheckonComment() called too early to check prototype at process_bug.cgi line 139. process_bug.cgi syntax OK not ok 36 - process_bug.cgi--WARNING # Failed test (t/001compile.t at line 69)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment on attachment 57690 [details] [diff] [review] Patch v.1 shame on the reviewers... this doesn't even pass the tests... :-)
Attachment #57690 - Flags: review-
Attachment #57690 - Flags: review+
Attached patch Patch v.2 (obsolete) — Splinter Review
- Moved errant '{' from its own line to the previous line. - Fixed warning about CheckonComment() subroutine by declaring all local subroutines at the top of the file before any of them are used.
Attachment #57690 - Attachment is obsolete: true
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
> Fixed warning about CheckonComment() subroutine by declaring all > local subroutines at the top of the file before any of them are > used. This seems overkill, and we don't do it anywhere else. Can't you just move the subroutine in the file? We can do this for 2.16 - it's not hard. Gerv
Target Milestone: Bugzilla 2.18 → Bugzilla 2.16
Yes, the subroutine could be moved to fix the used-before-declaration warning. However, am I the only one concerned with code readability? Interlacing subroutines through a path of code execution (especially in a CGI script) doesn't enhance readability for me. Having all the subroutines in one place in the file, either at the beginning or (my preference) at the end, makes it easier to read the code IMO. For Patch v.2, I decided to pre-declare all the subs in this file since it seemed silly to do only one. (I thought about moving ALL the subroutines to the end of the file after doing this, but then the patch would have gotten much longer.) Personally, I think pre-declaring local subroutines in each file, then moving them all to the end of the file should be a part of the code style guidelines, but I'll abide by whatever the majority decides to do. Feel free to post a different patch. :)
Comment on attachment 58248 [details] [diff] [review] Patch v.2 While I am not opposed to the idea of declaring subroutines, I do agree with Gerv when he says that we don't do it anywhere else in Bugzilla and shouldn't do it in one file and not the rest. Please open a new bug for that. Also, you were concerned with readability, and so am I: >+if ((($::FORM{'id'} && $::FORM{'product'} ne $::oldproduct) >+ || (!$::FORM{'id'} && $::FORM{'product'} ne $::dontchange)) >+ && CheckonComment( "reassignbycomponent" )) { Please move the end brace on the multiline if statement to a new line which will enhance readability and conform to both Perl and Bugzilla coding guidelines.
Attachment #58248 - Flags: review-
Attached patch Patch v.3Splinter Review
- Moves CheckonComment() subroutine within the file to a location before it is used, rather than predeclaring the subroutine. - Moved the curly brace back to its own line in the patch to the if() statement (as in Patch v.1). Will be filing a documentation bug for this since it does violate the current Bugzilla coding standards (docs/sgml/patches.sgml), or at least the coding standards do not clarify what to do in a situation with a multi-line if() statement.
Attachment #58248 - Attachment is obsolete: true
Bug 107918 talks about using the perl style guide in the perlstyle(1) manpage. This includes the following paragraph (covering curly brace placement): Regarding aesthetics of code lay out, about the only thing Larry cares strongly about is that the closing curly bracket of a multi-line BLOCK should line up with the key­ word that started the construct. Beyond that, he has other preferences that aren't so strong: · 4-column indent. · Opening curly on same line as keyword, if possible, otherwise line up. [...] Therefore, no need to open a new bug for the disputed curly brace.
NOTE: Bug 112191 opened for subroutine predeclaration issue raised by Patch v.2 (attachment 58248 [details] [diff] [review]).
Comment on attachment 59337 [details] [diff] [review] Patch v.3 r=gerv. Looks OK to me. Gerv
Attachment #59337 - Flags: review+
/cvsroot/mozilla/webtools/bugzilla/process_bug.cgi,v <-- process_bug.cgi new revision: 1.111; previous revision: 1.110
Status: REOPENED → RESOLVED
Closed: 24 years ago24 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.

Attachment

General

Created:
Updated:
Size: