$ perl -e 'use lib /usr/share/request-tracker3.8/lib; use
RT::Transaction; print $RT::VERSION'
3.8.4
I think you are right that the warning is due to comparing string
against what is in the DB as NULL.
This fixed it for me:
Line 273:
- if (($tr-TimeTaken != 0) || ($tr-Field eq 'TimeWorked')) {
+ if (($tr-TimeTaken != 0) || ($tr-Field $tr-Field eq 'TimeWorked')) {
Thank you again!
Allen Lee
Crystalfontz America, Incorporated
12412 East Saltese Avenue
Spokane Valley, WA 99216-0357
Twitter @Crystalfontz al...@crystalfontz.com http://www.crystalfontz.com
voice (509) 892-1200 fax (509) 892-1203 US toll-free (888) 206-9720
On Fri, Aug 21, 2009 at 1:09 PM, Fran Fabriziof...@cis.uab.edu wrote:
Ok so it is complaining about an uninitialized value in the eq comparison
$tr-Field eq TimeWorked. Some transactions have NULL in the Field field
in the database. The question is when there is NULL in the database, what
does RT::Transaction object return? Maybe it's trying undef eq TimeWorked
and throwing the warning. The question is, why don't I see those? What
version of RT.pm are you using?
What does:
perl -e 'use lib /usr/local/rt/lib; use RT::Transaction; print
$RT::VERSION'
show? (Of course, updating the /usr/local/rt/lib path).
Maybe (off the wall, but) an older version of the RT::Transaction
returns undef when NULL is read from the database, but the one I am using
(3.8.2) returns '' or something?
Allen Lee wrote:
Hi,
The script still worked fine.
It looked like it was throwing that warning for every iteration of the
loop. Below, it finds 1 tickets with Time Worked filled in, but more
than 24 warnings are thrown:
# rt-timeworked.pl --startdate 2009-08-15 --enddate 2009-08-22 --queues
testy
[Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
string eq at /usr/sbin/rt-timeworked.pl line 273.
(/usr/sbin/rt-timeworked.pl:273)
[Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
string eq at /usr/sbin/rt-timeworked.pl line 273.
(/usr/sbin/rt-timeworked.pl:273)
[Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
string eq at /usr/sbin/rt-timeworked.pl line 273.
(/usr/sbin/rt-timeworked.pl:273)
[Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
string eq at /usr/sbin/rt-timeworked.pl line 273.
(/usr/sbin/rt-timeworked.pl:273)
[Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
string eq at /usr/sbin/rt-timeworked.pl line 273.
(/usr/sbin/rt-timeworked.pl:273)
[Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
string eq at /usr/sbin/rt-timeworked.pl line 273.
(/usr/sbin/rt-timeworked.pl:273)
[Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
string eq at /usr/sbin/rt-timeworked.pl line 273.
(/usr/sbin/rt-timeworked.pl:273)
[Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
string eq at /usr/sbin/rt-timeworked.pl line 273.
(/usr/sbin/rt-timeworked.pl:273)
[Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
string eq at /usr/sbin/rt-timeworked.pl line 273.
(/usr/sbin/rt-timeworked.pl:273)
[Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
string eq at /usr/sbin/rt-timeworked.pl line 273.
(/usr/sbin/rt-timeworked.pl:273)
[Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
string eq at /usr/sbin/rt-timeworked.pl line 273.
(/usr/sbin/rt-timeworked.pl:273)
[Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
string eq at /usr/sbin/rt-timeworked.pl line 273.
(/usr/sbin/rt-timeworked.pl:273)
[Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
string eq at /usr/sbin/rt-timeworked.pl line 273.
(/usr/sbin/rt-timeworked.pl:273)
[Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
string eq at /usr/sbin/rt-timeworked.pl line 273.
(/usr/sbin/rt-timeworked.pl:273)
[Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
string eq at /usr/sbin/rt-timeworked.pl line 273.
(/usr/sbin/rt-timeworked.pl:273)
[Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
string eq at /usr/sbin/rt-timeworked.pl line 273.
(/usr/sbin/rt-timeworked.pl:273)
[Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
string eq at /usr/sbin/rt-timeworked.pl line 273.
(/usr/sbin/rt-timeworked.pl:273)
[Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
string eq at /usr/sbin/rt-timeworked.pl line 273.
(/usr/sbin/rt-timeworked.pl:273)
[Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
string eq at /usr/sbin/rt-timeworked.pl line 273.
(/usr/sbin/rt-timeworked.pl:273)
[Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
string eq at /usr/sbin/rt-timeworked.pl line 273.
(/usr/sbin/rt-timeworked.pl:273)
[Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
string eq at /usr/sbin/rt-timeworked.pl line 273.
(/usr/sbin/rt-timeworked.pl:273