[Koha-bugs] [Bug 15250] New: Software error: Can't locate object method "field" via package "aqorders.datereceived" in reports/acquisitions_stats.pl

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Nov 24 21:14:30 CET 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15250

            Bug ID: 15250
           Summary: Software error: Can't locate object method "field" via
                    package "aqorders.datereceived" in
                    reports/acquisitions_stats.pl
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Reports
          Assignee: gmcharlt at gmail.com
          Reporter: barton at bywatersolutions.com
        QA Contact: testopia at bugs.koha-community.org

To re-create

Go to reports -> Acquisitions statistics

Populate with the following values:

Acquisitions statistics
    Received on.
         Row:    checked
         Column: checked
         From:   01/01/2015
         To:     Un-selected

Cell value
    Count items

Output: To screen into the browser: checked

Running the report will trigger the following error:

Software error:

Can't locate object method "field" via package "aqorders.datereceived" (perhaps
you forgot to load "aqorders.datereceived"?) at
/usr/share/koha/intranet/cgi-bin/reports/acquisitions_stats.pl line 293.
For help, please send mail to the webmaster (staff at bywatersolutions.com),
giving this error message and the time and date of the error.

Inspecting reports/acquisitions_stats.pl

The error is at line 293 of
/usr/share/koha/intranet/cgi-bin/reports/acquisitions_stats.pl

282         elsif ( $_ =~ /received/ ) {
283             $filter{$_}->[0] = @$filters[2];
284             $filter{$_}->[1] = @$filters[3];
285             my $a = $_;
286             if ( $rodsp == 1 ) {
287                 $field{$a} = "concat(hex(weekday($a)+1),'-',dayname($a))";
288             } elsif ( $rodsp == 2 ) {
289                 $field{$a} = "concat(hex(month($a)),'-',monthname($a))";
290             } elsif ( $rodsp == 3 ) {
291                 $field{$a} = "Year($a)";
292             } else {
293                 field{$a} = $a;
294             }
295         }

Line 293

                 field{$a} = $a;

should instead read

                 $field{$a} = $a;

The line numbers have shifted slightly in master, but the bug remains:

http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=reports/acquisitions_stats.pl;h=58e3fd9a634bb37c96d9ef12239dab38ceecb0f7;hb=HEAD#l287

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list