Bug 30129 - 500 error when search reports by date
Summary: 500 error when search reports by date
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Peter Vashchuk
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-18 11:28 UTC by Peter Vashchuk
Modified: 2022-03-18 02:39 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00,21.11.03,21.05.12


Attachments
Bug 30129: remove the third required date that was causing 500 error (1.28 KB, patch)
2022-02-18 11:43 UTC, Peter Vashchuk
Details | Diff | Splinter Review
Bug 30129: remove the third required date that was causing 500 error (1.34 KB, patch)
2022-02-18 22:22 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 30129: remove the third required date that was causing 500 error (1.42 KB, patch)
2022-02-21 12:00 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30129: Add test (1.57 KB, patch)
2022-02-21 12:00 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30129: Add test (1.56 KB, patch)
2022-02-22 01:11 UTC, Fridolin Somers
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Vashchuk 2022-02-18 11:28:33 UTC
When you try to search reports by date it results with 500 error.

C4::Reports::Guided::get_saved_reports(): DBI Exception: DBD::mysql::db selectall_arrayref failed: called with 3 bind variables when 2 are needed at /usr/share/koha/intranet/cgi-bin/reports/guided_reports.pl line 138
Comment 1 Peter Vashchuk 2022-02-18 11:43:53 UTC
Created attachment 130825 [details] [review]
Bug 30129: remove the third required date that was causing 500 error

This problem appeared because of this commit:
Bug 14435 Add the ability to store result's report
cf9031711282f4be23e4a639797d0fd178940e1f

This patch fixes it by removing the third $date that wasn't removed
back then.

To reproduce:
1) Head over to Reports page.
2) Search for report by date. It should cause 500 error.
3) Apply the patch.
4) Repeat the search again, it should be working now.
Comment 2 ByWater Sandboxes 2022-02-18 22:22:44 UTC
Created attachment 130904 [details] [review]
Bug 30129: remove the third required date that was causing 500 error

This problem appeared because of this commit:
Bug 14435 Add the ability to store result's report
cf9031711282f4be23e4a639797d0fd178940e1f

This patch fixes it by removing the third $date that wasn't removed
back then.

To reproduce:
1) Head over to Reports page.
2) Search for report by date. It should cause 500 error.
3) Apply the patch.
4) Repeat the search again, it should be working now.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Comment 3 Jonathan Druart 2022-02-21 12:00:11 UTC
Created attachment 130958 [details] [review]
Bug 30129: remove the third required date that was causing 500 error

This problem appeared because of this commit:
Bug 14435 Add the ability to store result's report
cf9031711282f4be23e4a639797d0fd178940e1f

This patch fixes it by removing the third $date that wasn't removed
back then.

To reproduce:
1) Head over to Reports page.
2) Search for report by date. It should cause 500 error.
3) Apply the patch.
4) Repeat the search again, it should be working now.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Jonathan Druart 2022-02-21 12:00:15 UTC
Created attachment 130959 [details] [review]
Bug 30129: Add test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 5 Fridolin Somers 2022-02-22 01:11:19 UTC
Created attachment 131005 [details] [review]
Bug 30129: Add test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Fridolin Somers 2022-02-22 01:12:31 UTC
(In reply to Fridolin Somers from comment #5)
> Created attachment 131005 [details] [review] [review]
> Bug 30129: Add test
> 
> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Fix of small type 'fiter' instead of 'filter'
Comment 7 Fridolin Somers 2022-02-22 01:15:16 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 8 Kyle M Hall 2022-02-25 13:34:47 UTC
Pushed to 21.11.x for 21.11.03
Comment 9 Andrew Fuerste-Henry 2022-03-07 21:14:35 UTC
Pushed to 21.05.x for 21.05.12
Comment 10 Victor Grousset/tuxayo 2022-03-18 02:39:49 UTC
Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed.