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

(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 1874-1880 CREATE TABLE saved_sql ( -- saved sql reports Link Here
1874
   `last_modified` datetime default NULL, -- the date this report was last edited
1874
   `last_modified` datetime default NULL, -- the date this report was last edited
1875
   `savedsql` text, -- the SQL for this report
1875
   `savedsql` text, -- the SQL for this report
1876
   `last_run` datetime default NULL,
1876
   `last_run` datetime default NULL,
1877
   `report_name` varchar(255) default NULL, -- the name of this report
1877
   `report_name` varchar(255) NOT NULL default '', -- the name of this report
1878
   `type` varchar(255) default NULL, -- always 1 for tabular
1878
   `type` varchar(255) default NULL, -- always 1 for tabular
1879
   `notes` text, -- the notes or description given to this report
1879
   `notes` text, -- the notes or description given to this report
1880
   `cache_expiry` int NOT NULL default 300,
1880
   `cache_expiry` int NOT NULL default 300,
(-)a/installer/data/mysql/updatedatabase.pl (+7 lines)
Lines 8751-8756 if ( CheckVersion($DBversion) ) { Link Here
8751
    SetVersion($DBversion);
8751
    SetVersion($DBversion);
8752
}
8752
}
8753
8753
8754
$DBversion = "3.17.00.XXX";
8755
if ( CheckVersion($DBversion) ) {
8756
   $dbh->do("ALTER TABLE saved_sql CHANGE report_name report_name VARCHAR( 255 ) NOT NULL DEFAULT '' ");
8757
   print "Upgrade to $DBversion done, requiring that saved report name not be NULL. (Bug 2969: Report Name should be mandatory for saved reports)\n";
8758
   SetVersion ($DBversion);
8759
}
8760
8754
=head1 FUNCTIONS
8761
=head1 FUNCTIONS
8755
8762
8756
=head2 TableExists($table)
8763
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt (-8 / +7 lines)
Lines 666-672 canned reports and writing custom SQL reports.</p> Link Here
666
[% END %]
666
[% END %]
667
667
668
[% IF ( save ) %]
668
[% IF ( save ) %]
669
<form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
669
<form action="/cgi-bin/koha/reports/guided_reports.pl" method="post" class="validated">
670
<input type="hidden" name="sql" value="[% sql |html %]" />
670
<input type="hidden" name="sql" value="[% sql |html %]" />
671
<input type="hidden" name="type" value="[% type %]" />
671
<input type="hidden" name="type" value="[% type %]" />
672
<input type="hidden" name="area" value="[% area %]" />
672
<input type="hidden" name="area" value="[% area %]" />
Lines 675-681 canned reports and writing custom SQL reports.</p> Link Here
675
<fieldset class="rows">
675
<fieldset class="rows">
676
<legend>Save your custom report</legend>
676
<legend>Save your custom report</legend>
677
<ol>
677
<ol>
678
    <li><label for="reportname">Report name: </label><input type="text" id="reportname" name="reportname" /></li>
678
    <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>
679
    [% PROCESS group_and_subgroup_selection %]
679
    [% PROCESS group_and_subgroup_selection %]
680
    <li><label for="notes">Notes:</label> <textarea name="notes" id="notes"></textarea></li>
680
    <li><label for="notes">Notes:</label> <textarea name="notes" id="notes"></textarea></li>
681
</ol></fieldset>
681
</ol></fieldset>
Lines 834-846 $(document).ready(function() { Link Here
834
    load_group_subgroups();
834
    load_group_subgroups();
835
});
835
});
836
</script>
836
</script>
837
<form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
837
<form action="/cgi-bin/koha/reports/guided_reports.pl" method="post" class="validated">
838
<fieldset class="rows">
838
<fieldset class="rows">
839
<legend>Create report from SQL</legend>
839
<legend>Create report from SQL</legend>
840
<ol>
840
<ol>
841
    <li><label for="reportname">Report name:</label>
841
    <li><label for="reportname" class="required">Report name:</label>
842
        [% IF ( reportname ) %]<input type="text" id="reportname" name="reportname" value="[% reportname %]" />
842
        [% IF ( reportname ) %]<input type="text" class="required" required="required" id="reportname" name="reportname" value="[% reportname %]" />
843
        [% ELSE %]<input type="text" id="reportname" name="reportname" />[% END %] 
843
        [% ELSE %]<input type="text" class="required" required="required" id="reportname" name="reportname" />[% END %] <span class="required">Required</span>
844
    </li>
844
    </li>
845
    [% PROCESS group_and_subgroup_selection %]
845
    [% PROCESS group_and_subgroup_selection %]
846
846
Lines 871-877 $(document).ready(function() { Link Here
871
<fieldset class="rows">
871
<fieldset class="rows">
872
<legend>SQL:</legend>
872
<legend>SQL:</legend>
873
<div style="margin:1em;">
873
<div style="margin:1em;">
874
<textarea  id="sql" name="sql" cols="50" rows="10">[% sql %]</textarea>
874
<textarea id="sql" name="sql" class="required" required="required" cols="50" rows="10">[% sql %]</textarea> <span class="required">Required</span>
875
</div>
875
</div>
876
</fieldset>
876
</fieldset>
877
877
878
- 

Return to bug 2969