Bug 1252181 - activity fields causing uninitialized value warnings
Summary: activity fields causing uninitialized value warnings
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Bugzilla
Classification: Community
Component: Bugzilla General
Version: 4.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: 4.4
Assignee: Matt Tyson 🤬
QA Contact: Rony Gong 🔥
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-10 22:54 UTC by Jeff Fearn 🐞
Modified: 2018-12-09 06:29 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-09-20 23:29:52 UTC
Embargoed:


Attachments (Terms of Use)

Description Jeff Fearn 🐞 2015-08-10 22:54:55 UTC
Description of problem:
The activity fields are trigger uninitialized value warnings.

Version-Release number of selected component (if applicable):
Pg

How reproducible:
Easy

Steps to Reproduce:
1. Find a bug in the DB where added or removed are null
2. Tail the error log
3. View the bug in a b rowser

Actual results:
Use of uninitialized value $added in pattern match (m//) at /var/www/html/bugzilla/Bugzilla/Bug.pm line 4894.
Use of uninitialized value $added in string eq at /var/www/html/bugzilla/Bugzilla/Bug.pm line 4894.
Use of uninitialized value in split at /var/www/html/bugzilla/extensions/InlineHistory/Extension.pm line 120.
Use of uninitialized value in string eq at /var/www/html/bugzilla/extensions/InlineHistory/Extension.pm line 80.
Use of uninitialized value $removed in pattern match (m//) at /var/www/html/bugzilla/Bugzilla/Bug.pm line 4894.

Expected results:
No errors

Additional info:
The added & removed fields are NULL-able and thus must be checked for defined before they are evaluated.

Comment 1 Rony Gong 🔥 2015-08-14 08:58:16 UTC
QE still could get below error message when open bug 17241:

Use of uninitialized value $removed in pattern match (m//) at /var/www/html/bugzilla/Bugzilla/Bug.pm line 4894.
Use of uninitialized value $removed in pattern match (m//) at /var/www/html/bugzilla/Bugzilla/Bug.pm line 4894.
Use of uninitialized value $added in pattern match (m//) at /var/www/html/bugzilla/Bugzilla/Bug.pm line 4894.
Use of uninitialized value $removed in pattern match (m//) at /var/www/html/bugzilla/Bugzilla/Bug.pm line 4894.
Use of uninitialized value in split at /var/www/html/bugzilla/extensions/BayotBase/Extension.pm line 99.
Use of uninitialized value in split at /var/www/html/bugzilla/extensions/BayotBase/Extension.pm line 99

Comment 2 Matt Tyson 🤬 2015-08-17 02:43:16 UTC
Use of uninitialized value in split at /var/www/html/bugzilla/extensions/BayotBase/Extension.pm line 99

To fix this you will need the following in the data/params file.

'bb_bug_entry_fields' => 'summary product component severity priority comment',

Comment 3 Rony Gong 🔥 2015-08-18 06:06:25 UTC
Tested on 
QA environment(bzweb01-qe) with version(4.4.9039-2, DB: mysql)
QA environment(bzperfweb01.app.qa) with version(4.4.9039-2, DB: psql )
Result: Pass
It will not log such kind of error when open bug 17241

@Matt, Thanks a lot for your kindly reminder of setting 
bb_bug_entry_fields' => 'summary product component severity priority comment',

Comment 4 Matt Tyson 🤬 2015-09-20 23:29:52 UTC
This change is now live. If there are any issues, do not reopen this bug.
Instead, you should create a new bug and reference this bug.


Note You need to log in before you can comment on or make changes to this bug.