Bugzilla – Attachment 102013 Details for
Bug 24614
Can't edit reports if not using cache
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24614: Fix Reports/Guided.t
Bug-24614-Fix-ReportsGuidedt.patch (text/plain), 1.81 KB, created by
Jonathan Druart
on 2020-03-27 16:12:14 UTC
(
hide
)
Description:
Bug 24614: Fix Reports/Guided.t
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-03-27 16:12:14 UTC
Size:
1.81 KB
patch
obsolete
>From 39d85b1149e21ae4155d82f1b78a3784e79d8b57 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 27 Mar 2020 17:09:27 +0100 >Subject: [PATCH] Bug 24614: Fix Reports/Guided.t > >DBD::mysql::st execute failed: Column 'public' cannot be null [for Statement "UPDATE `saved_sql` SET `last_modified` = ?, `notes` = ?, `public` = ?, `report_group` = ?, `report_name` = ?, `report_subgroup` = ?, >`savedsql` = ? WHERE ( `id` = ? )" with ParamValues: 0='2020-03-27T16:03:04', 1=undef, 2=undef, 3=undef, 4='Just another report', 5=undef, 6=undef, 7=25] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1836. > # Looks like you planned 17 tests but ran 6. > >update_sql expect all the paramters to be set, otherwise it will be >nulled. > >The best way to fix it is at test level. There is only 1 occurrence in >controller/module, and it sends all the parameters. That is the correct >way to do and will make things easier when we will removed them to use >Koha::Reports directly >--- > t/db_dependent/Reports/Guided.t | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/t/db_dependent/Reports/Guided.t b/t/db_dependent/Reports/Guided.t >index c8167488cf..e2143a6525 100644 >--- a/t/db_dependent/Reports/Guided.t >+++ b/t/db_dependent/Reports/Guided.t >@@ -217,7 +217,7 @@ subtest 'get_saved_reports' => sub { > ok( 0 < scalar @{ get_saved_reports( $report_ids[0] ) }, "filter takes report id" ); > > my $r1 = Koha::Reports->find($report_ids[0]); >- $r1 = update_sql($r1->id, { borrowernumber => $r1->borrowernumber, name => 'Just another report' }); >+ $r1 = update_sql($r1->id, { %{$r1->unblessed}, borrowernumber => $r1->borrowernumber, name => 'Just another report' }); > is( $r1->cache_expiry, 300, 'cache_expiry has the correct default value, from DBMS' ); > > #Test delete_report >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24614
:
98714
|
98715
|
101700
|
101701
|
101764
|
101765
| 102013