[Bug 23390] New: Add placeholder syntax for column names
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23390 Bug ID: 23390 Summary: Add placeholder syntax for column names Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Reports Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Bug 23206 added more bactch operations for report results. The use of these is limited by the column names which is not ideal for translations. We should add a way to transpose column names for these functions. I suggest [[column|alias]] -- 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=23390 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=23390 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 91849 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91849&action=edit Bug 23390: Introduce placeholder syntax for report column names This patch adds the ability to rename columns in MySQL reports using a syntax: [[column|alias]] To test: 1 - Write a report like: SELECT cardnumber FROM borrowers WHERE cardnumber LIKE '%9' 2 - Run report 3 - Note you can batch modify the patrons 4 - Update report: SELECT cardnumber AS library_barcode FROM borrowers WHERE cardnumber LIKE '%9' 5 - Run report 6 - Note batch options are no longer present 7 - Apply patch 8 - Run report, no change 9 - Update report like: SELECT [[cardnumber|library_barcode]] FROM borrowers WHERE cardnumber LIKE '%9' 10 - Run report 11 - Batch options work! 12 - Update report like: SELECT cardnumber FROM borrowers WHERE cardnumber LIKE '%9' 13 - Verify batch options still work 14 - Set report 'public' 15 - Verify report can be run via JSON URLs: http://kohadev.mydnsname.org:8080/cgi-bin/koha/svc/report?id=1 http://kohadev.mydnsname.org:8081/cgi-bin/koha/svc/report?id=1 -- 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=23390 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- 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=23390 George Williams (NEKLS) <george@nekls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |george@nekls.org --- Comment #2 from George Williams (NEKLS) <george@nekls.org> --- Tested on ByWater sandbox. I got this error message when I got to step 10: The following error was encountered: The database returned the following error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[[cardnumber|library_barcode]] AS library_barcode FROM borrowers WHERE cardnumbe' at line 1 Please check the log for further details. Return to previous page I left the sandbox up - it's just called "sandbox" - if you want to take a look. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23390 --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to George Williams (NEKLS) from comment #2)
Tested on ByWater sandbox. I got this error message when I got to step 10:
The following error was encountered: The database returned the following error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[[cardnumber|library_barcode]] AS library_barcode FROM borrowers WHERE cardnumbe' at line 1 Please check the log for further details. Return to previous page
I left the sandbox up - it's just called "sandbox" - if you want to take a look.
I restarted the services on the sandbox and edited the report from: SELECT [[cardnumber|library_barcode]] AS library_barcode FROM borrowers WHERE cardnumber LIKE '%9' To: SELECT [[cardnumber|library_barcode]] FROM borrowers WHERE cardnumber LIKE '%9' and all appears to work now :-) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23390 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #91849|0 |1 is obsolete| | --- Comment #4 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 91880 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91880&action=edit Bug 23390: Introduce placeholder syntax for report column names This patch adds the ability to rename columns in MySQL reports using a syntax: [[column|alias]] To test: 1 - Write a report like: SELECT cardnumber FROM borrowers WHERE cardnumber LIKE '%9' 2 - Run report 3 - Note you can batch modify the patrons 4 - Update report: SELECT cardnumber AS library_barcode FROM borrowers WHERE cardnumber LIKE '%9' 5 - Run report 6 - Note batch options are no longer present 7 - Apply patch 8 - Run report, no change 9 - Update report like: SELECT [[cardnumber|library_barcode]] FROM borrowers WHERE cardnumber LIKE '%9' 10 - Run report 11 - Batch options work! 12 - Update report like: SELECT cardnumber FROM borrowers WHERE cardnumber LIKE '%9' 13 - Verify batch options still work 14 - Set report 'public' 15 - Verify report can be run via JSON URLs: http://kohadev.mydnsname.org:8080/cgi-bin/koha/svc/report?id=1 http://kohadev.mydnsname.org:8081/cgi-bin/koha/svc/report?id=1 Signed-off-by: George Williams <george@nekls.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23390 George Williams (NEKLS) <george@nekls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #5 from George Williams (NEKLS) <george@nekls.org> --- Tested again with no problems after restarting services. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23390 --- Comment #6 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 91882 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91882&action=edit Bug 23390: (QA follow-up) Don't redeclare variable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23390 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Status|Signed Off |Failed QA --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Nick, when the column alias is more than one word or includes spaces, this doesn't work. Can you please have another look? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23390 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I've used: SELECT [[cardnumber|We test]] from borrowers The database returned the following error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'test from borrowers LIMIT 0, 20' at line 1 Please check the log for further details. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23390 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23390 --- Comment #9 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 91888 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91888&action=edit Bug 23390: (follow-up) Quote aliases -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23390 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #91880|0 |1 is obsolete| | --- Comment #10 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 91917 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91917&action=edit Bug 23390: Introduce placeholder syntax for report column names This patch adds the ability to rename columns in MySQL reports using a syntax: [[column|alias]] To test: 1 - Write a report like: SELECT cardnumber FROM borrowers WHERE cardnumber LIKE '%9' 2 - Run report 3 - Note you can batch modify the patrons 4 - Update report: SELECT cardnumber AS library_barcode FROM borrowers WHERE cardnumber LIKE '%9' 5 - Run report 6 - Note batch options are no longer present 7 - Apply patch 8 - Run report, no change 9 - Update report like: SELECT [[cardnumber|library_barcode]] FROM borrowers WHERE cardnumber LIKE '%9' 10 - Run report 11 - Batch options work! 12 - Update report like: SELECT cardnumber FROM borrowers WHERE cardnumber LIKE '%9' 13 - Verify batch options still work 14 - Set report 'public' 15 - Verify report can be run via JSON URLs: http://kohadev.mydnsname.org:8080/cgi-bin/koha/svc/report?id=1 http://kohadev.mydnsname.org:8081/cgi-bin/koha/svc/report?id=1 Signed-off-by: George Williams <george@nekls.org> Signed-off-by: George Williams <george@nekls.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23390 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #91882|0 |1 is obsolete| | --- Comment #11 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 91918 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91918&action=edit Bug 23390: (QA follow-up) Don't redeclare variable Signed-off-by: George Williams <george@nekls.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23390 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #91888|0 |1 is obsolete| | --- Comment #12 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 91919 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91919&action=edit Bug 23390: (follow-up) Quote aliases Signed-off-by: George Williams <george@nekls.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23390 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Manual --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This will get easily lost if not documented - can we get a manual patch too? :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23390 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23390 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #91917|0 |1 is obsolete| | --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 92095 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92095&action=edit Bug 23390: Introduce placeholder syntax for report column names This patch adds the ability to rename columns in MySQL reports using a syntax: [[column|alias]] To test: 1 - Write a report like: SELECT cardnumber FROM borrowers WHERE cardnumber LIKE '%9' 2 - Run report 3 - Note you can batch modify the patrons 4 - Update report: SELECT cardnumber AS library_barcode FROM borrowers WHERE cardnumber LIKE '%9' 5 - Run report 6 - Note batch options are no longer present 7 - Apply patch 8 - Run report, no change 9 - Update report like: SELECT [[cardnumber|library_barcode]] FROM borrowers WHERE cardnumber LIKE '%9' 10 - Run report 11 - Batch options work! 12 - Update report like: SELECT cardnumber FROM borrowers WHERE cardnumber LIKE '%9' 13 - Verify batch options still work 14 - Set report 'public' 15 - Verify report can be run via JSON URLs: http://kohadev.mydnsname.org:8080/cgi-bin/koha/svc/report?id=1 http://kohadev.mydnsname.org:8081/cgi-bin/koha/svc/report?id=1 Signed-off-by: George Williams <george@nekls.org> Signed-off-by: George Williams <george@nekls.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23390 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #91918|0 |1 is obsolete| | --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 92096 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92096&action=edit Bug 23390: (QA follow-up) Don't redeclare variable Signed-off-by: George Williams <george@nekls.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23390 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #91919|0 |1 is obsolete| | --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 92097 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92097&action=edit Bug 23390: (follow-up) Quote aliases Signed-off-by: George Williams <george@nekls.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23390 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |19.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23390 --- Comment #17 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work! Pushed to master for 19.11.00 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23390 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |23206 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23206 [Bug 23206] Batch patron modification from reports which return cardnumber -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23390 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED CC| |fridolin.somers@biblibre.co | |m Resolution|--- |FIXED --- Comment #18 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Depends on Bug 23206 not in 19.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23390 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |23730 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23730 [Bug 23730] Exporting reports is broken -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23390 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |release-notes-needed CC| |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23390 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This enhancement allows for release notes| |renaming columns used to | |trigger batch modification | |actions in reports. Before | |this patch, a column had to | |be called 'itemnumber' to | |be sent from reports to | |batch modification. With | |this enhancement, you can | |specify `[[itemnumber| | |Koha_internal_id]]` to | |allow for a clearer name | |for the end-user and to | |allow translation of terms | |like 'itemnumber' while | |preserving the batch | |modification functionality | |something like that? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23390 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|release-notes-needed | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23390 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|This enhancement allows for |This enhancement allows for release notes|renaming columns used to |renaming columns used to |trigger batch modification |trigger batch modification |actions in reports. Before |actions in reports. Before |this patch, a column had to |this patch, a column had to |be called 'itemnumber' to |be called 'itemnumber' to |be sent from reports to |be sent from reports to |batch modification. With |batch modification. With |this enhancement, you can |this enhancement, you can |specify `[[itemnumber| |specify `[[itemnumber| |Koha_internal_id]]` to |Koha_internal_id]]` to |allow for a clearer name |allow for a clearer name |for the end-user and to |for the end-user and to |allow translation of terms |allow translation of terms |like 'itemnumber' while |like 'itemnumber' while |preserving the batch |preserving the batch |modification functionality |modification functionality. |something like that? | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23390 --- Comment #19 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- *** Bug 22167 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23390 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |27824 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27824 [Bug 27824] Report batch operations break with space in placeholder -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org