Bug 17535: Fix search for reports by keywords
The commit cf90317112
Bug 14435: Add the ability to store result's report
introduced a regression when searching for reports by keywords.
It also breaks tests in t/db_dependent/Reports/Guided.t
It's caused by the missing join on saved_reports.
The error says DBD::mysql::db selectall_arrayref failed: Unknown column
'report' in 'where clause'
Test plan:
Confirm that the tests are fixed and that you are able to search for
reports using the "keyword" input
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
8eec57d605
commit
3f8a4cd2a1
|
|
@ -632,6 +632,7 @@ sub get_saved_reports_base_query {
|
|||
SELECT s.*, $area_name_sql_snippet, av_g.lib AS groupname, av_sg.lib AS subgroupname,
|
||||
b.firstname AS borrowerfirstname, b.surname AS borrowersurname
|
||||
FROM saved_sql s
|
||||
LEFT JOIN saved_reports r ON r.report_id = s.id
|
||||
LEFT OUTER JOIN authorised_values av_g ON (av_g.category = 'REPORT_GROUP' AND av_g.authorised_value = s.report_group)
|
||||
LEFT OUTER JOIN authorised_values av_sg ON (av_sg.category = 'REPORT_SUBGROUP' AND av_sg.lib_opac = s.report_group AND av_sg.authorised_value = s.report_subgroup)
|
||||
LEFT OUTER JOIN borrowers b USING (borrowernumber)
|
||||
|
|
|
|||
Loading…
Reference in New Issue