View | Details | Raw Unified | Return to bug 2969
Collapse All | Expand All

(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 1841-1847 CREATE TABLE saved_sql ( -- saved sql reports Link Here
1841
   `last_modified` datetime default NULL, -- the date this report was last edited
1841
   `last_modified` datetime default NULL, -- the date this report was last edited
1842
   `savedsql` text, -- the SQL for this report
1842
   `savedsql` text, -- the SQL for this report
1843
   `last_run` datetime default NULL,
1843
   `last_run` datetime default NULL,
1844
   `report_name` varchar(255) default NULL, -- the name of this report
1844
   `report_name` varchar(255) NOT NULL default '', -- the name of this report
1845
   `type` varchar(255) default NULL, -- always 1 for tabular
1845
   `type` varchar(255) default NULL, -- always 1 for tabular
1846
   `notes` text, -- the notes or description given to this report
1846
   `notes` text, -- the notes or description given to this report
1847
   `cache_expiry` int NOT NULL default 300,
1847
   `cache_expiry` int NOT NULL default 300,
(-)a/installer/data/mysql/updatedatabase.pl (+7 lines)
Lines 7050-7055 if ( CheckVersion($DBversion) ) { Link Here
7050
    SetVersion($DBversion);
7050
    SetVersion($DBversion);
7051
}
7051
}
7052
7052
7053
$DBversion = "3.13.00.XXX";
7054
if ( CheckVersion($DBversion) ) {
7055
   $dbh->do("ALTER TABLE saved_sql CHANGE report_name report_name VARCHAR( 255 ) NOT NULL DEFAULT '' ");
7056
   print "Upgrade to $DBversion done, requiring that saved report name not be NULL. (Bug 2969: Report Name should be mandatory for saved reports)\n";
7057
   SetVersion ($DBversion);
7058
}
7059
7053
=head1 FUNCTIONS
7060
=head1 FUNCTIONS
7054
7061
7055
=head2 TableExists($table)
7062
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt (-8 / +7 lines)
Lines 636-642 canned reports and writing custom SQL reports.</p> Link Here
636
[% END %]
636
[% END %]
637
637
638
[% IF ( save ) %]
638
[% IF ( save ) %]
639
<form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
639
<form action="/cgi-bin/koha/reports/guided_reports.pl" method="post" class="validated">
640
<input type="hidden" name="sql" value="[% sql |html %]" />
640
<input type="hidden" name="sql" value="[% sql |html %]" />
641
<input type="hidden" name="type" value="[% type %]" />
641
<input type="hidden" name="type" value="[% type %]" />
642
<input type="hidden" name="area" value="[% area %]" />
642
<input type="hidden" name="area" value="[% area %]" />
Lines 645-651 canned reports and writing custom SQL reports.</p> Link Here
645
<fieldset class="rows">
645
<fieldset class="rows">
646
<legend>Save your custom report</legend>
646
<legend>Save your custom report</legend>
647
<ol>
647
<ol>
648
    <li><label for="reportname">Report name: </label><input type="text" id="reportname" name="reportname" /></li>
648
    <li><label for="reportname" class="required">Report name: </label><input type="text" id="reportname" name="reportname" class="required" required="required" /> <span class="required">Required</span></li>
649
    [% PROCESS group_and_subgroup_selection %]
649
    [% PROCESS group_and_subgroup_selection %]
650
    <li><label for="notes">Notes:</label> <textarea name="notes" id="notes"></textarea></li>
650
    <li><label for="notes">Notes:</label> <textarea name="notes" id="notes"></textarea></li>
651
</ol></fieldset>
651
</ol></fieldset>
Lines 803-815 $(document).ready(function() { Link Here
803
    load_group_subgroups();
803
    load_group_subgroups();
804
});
804
});
805
</script>
805
</script>
806
<form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
806
<form action="/cgi-bin/koha/reports/guided_reports.pl" method="post" class="validated">
807
<fieldset class="rows">
807
<fieldset class="rows">
808
<legend>Create report from SQL</legend>
808
<legend>Create report from SQL</legend>
809
<ol>
809
<ol>
810
    <li><label for="reportname">Report name:</label>
810
    <li><label for="reportname" class="required">Report name:</label>
811
        [% IF ( reportname ) %]<input type="text" id="reportname" name="reportname" value="[% reportname %]" />
811
        [% IF ( reportname ) %]<input type="text" class="required" required="required" id="reportname" name="reportname" value="[% reportname %]" />
812
        [% ELSE %]<input type="text" id="reportname" name="reportname" />[% END %] 
812
        [% ELSE %]<input type="text" class="required" required="required" id="reportname" name="reportname" />[% END %] <span class="required">Required</span>
813
    </li>
813
    </li>
814
    [% PROCESS group_and_subgroup_selection %]
814
    [% PROCESS group_and_subgroup_selection %]
815
815
Lines 840-846 $(document).ready(function() { Link Here
840
<fieldset class="rows">
840
<fieldset class="rows">
841
<legend>SQL:</legend>
841
<legend>SQL:</legend>
842
<div style="margin:1em;">
842
<div style="margin:1em;">
843
<textarea  id="sql" name="sql" cols="50" rows="10">[% sql %]</textarea>
843
<textarea id="sql" name="sql" class="required" required="required" cols="50" rows="10">[% sql %]</textarea> <span class="required">Required</span>
844
</div>
844
</div>
845
</fieldset>
845
</fieldset>
846
846
847
- 

Return to bug 2969