When importing a report from Mana, there are missing whitespaces that break the query. I'm not certain whether the spaces are lost when the report comes into mana or when the report comes down to Koha. It might be dropping newlines? Whatever the details, the reports require an amount of correction after download that is prohibitive for some users.
I'm not entirely clear whether this is something I should be filing here or entering as an issue on Mana on Git.
Which report, do you have an example?
Hi Jonathan, I can give you examples; this one was uploaded 4/27/2017 and named "All Orders" - I am pasting the sql that gets imported into the report box: select v.name as Vendor, concat(c.basketname, ' (', c.basketno, ')') as Basket, c.creationdate as Ordered, concat(p.firstname, ' ', p.surname) as 'Managed by', b.title, ExtractValue(bi.marcxml, '//datafield[@tag="245"]/subfield[@code="b"]') as subtitle, b.author, bi.isbn, bi.publishercode, o.rrp as RRP, o.ecost as EST, o.quantity as Qty, format(o.listprice*o.quantity,2) as Total, f.budget_name as Fundfrom aqorders oleft join aqbudgets f using (budget_id)left join biblio b using (biblionumber)left join biblioitems bi using (biblionumber)left join aqbasket c using (basketno)left join aqbooksellers v on (c.booksellerid=v.id)left join borrowers p on (c.authorisedby=p.borrowernumber)order by v.name, c.basketno asc As you can see there are odd spaces, and letters are joined to words, for example ojoin in line 6 . The from is usually the hardest to find as it will be merged with the word right before it in the sql. I will also attach a screenshot.
Created attachment 100415 [details] Importing report with Mana
Hi Kelly, I contacted Alex (@biblibre) who has access to the mana server. This report (id=254 for the record) is incorrect in the DB of the server, new lines have been deleted. It seems that something went wrong during the import. We also found other weirdnesses, like values not in the correct field - https://snipboard.io/UwKyYq.jpg He will have a look during the (no)hackfest week and get back to us :)
Hello, Borken reports in Mana came from bad formatted CSV file. I removed all of this reports from DB, clear all related CSV and imported them agsin. deleted 1719 reports re-imported 977 The difference is due to the bad formatted report i've removed from CSV. And one CSV (656 lines )i could not fix.
Alex, does it mean we can close this bug report?
Hi, I do see that there are newly imported reports in Mana as of 3/27/2020. I attempted to import two of these newer reports, and the spacing appears to still be an issue. I have attached a screenshot.
Created attachment 102254 [details] spacing in a report
Download still comes in too messy to use right after download. Example are both "Items ordered vs. received" reports. Is this something with the report that was uploaded or something that happens upon download?