@@ -, +, @@ - Create a new guided report. Confirm that you cannot save your guided report without a report name. - Create or edit a saved SQL report. Confirm that you cannot save your report without a name or without SQL. - Confirm that the saved_sql table structure has been updated. --- installer/data/mysql/kohastructure.sql | 2 +- installer/data/mysql/updatedatabase.pl | 7 +++++++ .../en/modules/reports/guided_reports_start.tt | 14 +++++++------- 3 files changed, 15 insertions(+), 8 deletions(-) --- a/installer/data/mysql/kohastructure.sql +++ a/installer/data/mysql/kohastructure.sql @@ -1841,7 +1841,7 @@ CREATE TABLE saved_sql ( -- saved sql reports `last_modified` datetime default NULL, -- the date this report was last edited `savedsql` text, -- the SQL for this report `last_run` datetime default NULL, - `report_name` varchar(255) default NULL, -- the name of this report + `report_name` varchar(255) NOT NULL default '', -- the name of this report `type` varchar(255) default NULL, -- always 1 for tabular `notes` text, -- the notes or description given to this report `cache_expiry` int NOT NULL default 300, --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -7050,6 +7050,13 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.13.00.XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do("ALTER TABLE saved_sql CHANGE report_name report_name VARCHAR( 255 ) NOT NULL DEFAULT '' "); + print "Upgrade to $DBversion done, requiring that saved report name not be NULL. (Bug 2969: Report Name should be mandatory for saved reports)\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt @@ -636,7 +636,7 @@ canned reports and writing custom SQL reports.

[% END %] [% IF ( save ) %] -
+ @@ -645,7 +645,7 @@ canned reports and writing custom SQL reports.

Save your custom report
    -
  1. +
  2. Required
  3. [% PROCESS group_and_subgroup_selection %]
@@ -803,13 +803,13 @@ $(document).ready(function() { load_group_subgroups(); }); - +
Create report from SQL
    -
  1. - [% IF ( reportname ) %] - [% ELSE %][% END %] +
  2. + [% IF ( reportname ) %] + [% ELSE %][% END %] Required
  3. [% PROCESS group_and_subgroup_selection %] @@ -840,7 +840,7 @@ $(document).ready(function() {
    SQL:
    - + Required
    --