[Bug 21906] New: WHERE clause doesn't like % in CONCAT
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21906 Bug ID: 21906 Summary: WHERE clause doesn't like % in CONCAT Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Reports Assignee: koha-bugs@lists.koha-community.org Reporter: cbrannon@cdalibrary.org QA Contact: testopia@bugs.koha-community.org In previous versions of Koha, I have been able to create a field that could have some information or be left blank in the WHERE clause, such as: WHERE itemcallnumber LIKE CONCAT(<<Start of call number>>,'%') Starting with 18.05, Koha will give me results, but it will give me blank results with the header if I download. If I use something else, it will populate in the download just fine. The % seems to be interfering with the download process. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21906 --- Comment #1 from Christopher Brannon <cbrannon@cdalibrary.org> --- More specifically, the CONCAT does not work in the download now with the % if the field is blank. If I have anything else, it works fine, but displaying and downloading. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21906 --- Comment #2 from Christopher Brannon <cbrannon@cdalibrary.org> --- If I use CONCAT(IFNULL(<<Gimme>>,""),"%"), it works. Something has changed (only with downloads) that causes the report to barf if the field is blank (null). -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21906 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21906 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I have tried: - Create a new report from SQL SELECT itemnumber, itemcallnumber FROM items WHERE itemcallnumber LIKE CONCAT(<<Start of call number>>,'%') - Execute - Enter "a" => Return 2 results - Export (csv, tab, ods) => Return 2 results on master -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21906 --- Comment #4 from Christopher Brannon <cbrannon@cdalibrary.org> --- (In reply to Jonathan Druart from comment #3)
I have tried: - Create a new report from SQL
SELECT itemnumber, itemcallnumber FROM items WHERE itemcallnumber LIKE CONCAT(<<Start of call number>>,'%')
- Execute - Enter "a" => Return 2 results - Export (csv, tab, ods) => Return 2 results
on master
And what happens if you don't fill in the field? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21906 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Ha! That was the important bit indeed :) -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21906 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |9634 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- At first glance it is caused by bug 9634. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9634 [Bug 9634] Allow for parameters re-use on SQL reports -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21906 --- Comment #7 from Christopher Brannon <cbrannon@cdalibrary.org> --- (In reply to Jonathan Druart from comment #6)
At first glance it is caused by bug 9634.
That would be my guess. It broke after this was introduced. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org