| Summary: | Software error: Can't locate object method "field" via package "aqorders.datereceived" in reports/acquisitions_stats.pl | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Barton Chittenden <barton> |
| Component: | Reports | Assignee: | Katrin Fischer <katrin.fischer> |
| Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
| Severity: | major | ||
| Priority: | P5 - low | CC: | jonathan.druart, julian.maurice, kyle, liz |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | Trivial patch |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
| Bug Depends on: | 12151 | ||
| Bug Blocks: | |||
| Attachments: |
Bug 15250: Fix Perl error on acqisition stats page
Bug 15250: Fix Perl error on acqisition stats page Bug 15250: Fix Perl error on acqisition stats page |
||
Created attachment 45171 [details] [review] Bug 15250: Fix Perl error on acqisition stats page To test: - 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. - Apply the patch and repeat test - Verify the report now works correctly Note: Patch was created from notes and suggested fix on the bug report, written by Barton Chittenden. Created attachment 45173 [details] [review] Bug 15250: Fix Perl error on acqisition stats page To test: - 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. - Apply the patch and repeat test - Verify the report now works correctly Note: Patch was created from notes and suggested fix on the bug report, written by Barton Chittenden. Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> Created attachment 45265 [details] [review] Bug 15250: Fix Perl error on acqisition stats page To test: - 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. - Apply the patch and repeat test - Verify the report now works correctly Note: Patch was created from notes and suggested fix on the bug report, written by Barton Chittenden. Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Introduced by
commit 82e8a7a155807f50edae4e5f2b46791479c9b92d
Date: Sat May 31 00:30:32 2014 -0300
Bug 12151: Remove uses of smartmatch operator in report scripts
Patch pushed to master. Thanks Katrin! Patch pushed to 3.22.x, will be in 3.22.1 Pushed to 3.18.13, and released. |
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@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