Change several bugs at once causes extraneous messages in apache log file

RESOLVED FIXED in Bugzilla 2.18

Status

()

RESOLVED FIXED
16 years ago
13 years ago

People

(Reporter: kniht, Assigned: LpSolit)

Tracking

2.17.4
Bugzilla 2.18
Dependency tree / graph
Bug Flags:
approval +
blocking2.20 +
approval2.18 +
blocking2.18.2 +

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

16 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686) Gecko/20030428 Galeon/1.3.3
Build Identifier: Mozilla/5.0 (X11; U; Linux i686) Gecko/20030428 Galeon/1.3.3

When changing several bugs at once; eg adding a comment there are messages
generated like the following:
 process_bug.cgi: Use of uninitialized value in pattern match (m//) at
globals.pl line 831.
 Use of uninitialized value in string eq at
/var/www/html/bugzilla-cvs/process_bug.cgi line 368

It appears that on line 1119 in process_bug.cgi that $::FORM{'component_id'} is
being set to get_component_id(...) even if $FORM{'component'} equals dontchange.
 This can cause it to be undef.  When the loop following this assignment calls
CheckCanChangeField then we get the message from line 368 given above.  The
first message about line 831 in globals.pl is because the product is also set to
dontchange.


Reproducible: Always

Steps to Reproduce:
1.query a list of bugs
2.goto to change several bugs at once page
3.add a comment to 1 or more bugs

Actual Results:  
messages in apache's error_log file such as
process_bug.cgi: Use of uninitialized value in pattern match (m//) at globals.pl
line 831.

Expected Results:  
no messages generated to error_log file
(Reporter)

Updated

16 years ago
Version: unspecified → 2.17.4
confirming... I can reproduce this.
taking...  I have a patch :)
Assignee: myk → justdave
Status: UNCONFIRMED → NEW
Ever confirmed: true
Created attachment 130325 [details] [diff] [review]
Patch v1

This is loosely ported from Zippy where we ran into similar problems and also
have many "_id" fields like component_id, so the dereferencing of id fields got
genericized just a little.  This is more of a rewrite of the whole
"CheckCanChange" loop, but it does solve the reported problem as well as
cleaning up a little :)
Comment on attachment 130325 [details] [diff] [review]
Patch v1

Change the undef to $vars (so that the error message will work)

+	 my $new = $::FORM{$cmpcol} || "";
+	 if (exists $::FORM{$cmpcol}

The |exists| test will always be true here because of the autovivification -
whats the conditional trying to test here?
Comment on attachment 130325 [details] [diff] [review]
Patch v1

If you can explain the exists, and fix the undef thing, then r=bbaetz
Attachment #130325 - Flags: review?(bbaetz) → review-
(Assignee)

Updated

14 years ago
Blocks: 231570
Assignee: justdave → create-and-change
Flags: blocking2.20+
Flags: blocking2.18.2+
OS: Linux → All
QA Contact: mattyt-bugzilla → default-qa
Hardware: PC → All
Target Milestone: --- → Bugzilla 2.18
(Assignee)

Comment 5

14 years ago
Looks like we need a volunteer. Taking!
Assignee: create-and-change → LpSolit
(Assignee)

Comment 6

14 years ago
I cannot reproduce. This seems to be fixed by bug 233645. If you get any other
"uninitialized value" error message when changing several bugs at once, feel
free to give me a testcase and to reopen this bug. I keep this bug assigned to
me for a few days, just in case. ;)


*** This bug has been marked as a duplicate of 233645 ***
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → DUPLICATE
(Assignee)

Updated

14 years ago
Target Milestone: Bugzilla 2.18 → ---
(Assignee)

Comment 7

14 years ago
Reopening! I found a testcase where a lot of error messages appear in the log
file, see bug 279309 comment 16:

The point is that when changing several bugs at once with the time tracking
group being defined, the "estimated_time" and "remaining_time" fields may
contain "--do_not_change--", responsible for this error message.
Blocks: 279309
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Target Milestone: --- → Bugzilla 2.18
(Assignee)

Comment 8

14 years ago
Created attachment 183778 [details] [diff] [review]
patch, v2
Attachment #130325 - Attachment is obsolete: true
Attachment #183778 - Flags: review?(kiko)

Comment 9

14 years ago
Great. r=kiko.
Status: REOPENED → ASSIGNED
Flags: approval?

Updated

14 years ago
Attachment #183778 - Flags: review?(kiko) → review+
(Assignee)

Comment 10

14 years ago
Created attachment 183840 [details] [diff] [review]
2.18.1 backport, v1
Attachment #183840 - Flags: review?(kiko)

Updated

14 years ago
Attachment #183840 - Flags: review?(kiko) → review+
(Assignee)

Updated

14 years ago
Flags: approval2.18?
Flags: approval?
Flags: approval2.18?
Flags: approval2.18+
Flags: approval+
(Assignee)

Comment 11

14 years ago
Tip:

Checking in process_bug.cgi;
/cvsroot/mozilla/webtools/bugzilla/process_bug.cgi,v  <--  process_bug.cgi
new revision: 1.256; previous revision: 1.255
done

2.18.1:

Checking in process_bug.cgi;
/cvsroot/mozilla/webtools/bugzilla/process_bug.cgi,v  <--  process_bug.cgi
new revision: 1.205.2.20; previous revision: 1.205.2.19
done
Status: ASSIGNED → RESOLVED
Last Resolved: 14 years ago14 years ago
Resolution: --- → FIXED
*** Bug 279309 has been marked as a duplicate of this bug. ***
*** Bug 331486 has been marked as a duplicate of this bug. ***
*** Bug 331489 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.