[Bug 19495] New: Automatic report conversion needs to do global replace on 'biblioitems' and 'marcxml'
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19495 Bug ID: 19495 Summary: Automatic report conversion needs to do global replace on 'biblioitems' and 'marcxml' Change sponsored?: --- Product: Koha Version: 17.05 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Reports Assignee: koha-bugs@lists.koha-community.org Reporter: barton@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Bug 17898 provides a way of converting reports that use biblioitems.marcxml so that they will use biblio_metadata.metadata instead. This only works with reports that do not refer to other columns in the biblioitems table. This is a known limitation. It means that we should be able to do a substitution of every occurrence of biblioitems with biblio_metadata, and every occurrence of marcxml with metadata. Unfortunately, we're not doing a global replace, we're only replacing the first occurrence. Here's the original: SELECT biblio.title, biblio.biblionumber, A.barcode,ExtractValue(biblioitems.marcxml,'//controlfield[@tag="001"]') AS "field_001", A.itemcallnumber, A.itype FROM items A JOIN biblio on (A.biblionumber = biblio.biblionumber) JOIN biblioitems on (A.biblionumber = biblioitems.biblionumber) WHERE withdrawn = 1 AND A.biblionumber NOT in ( SELECT biblionumber FROM items B WHERE B.itemnumber != A.itemnumber ) And here's the converted: SELECT biblio.title, biblio.biblionumber, A.barcode,ExtractValue(biblio_metadata.metadata,'//controlfield[@tag="001"]') AS "field_001", A.itemcallnumber, A.itype FROM items A JOIN biblio on (A.biblionumber = biblio.biblionumber) JOIN biblioitems on (A.biblionumber = biblioitems.biblionumber) WHERE withdrawn = 1 AND A.biblionumber NOT in ( SELECT biblionumber FROM items B WHERE B.itemnumber != A.itemnumber ) Note that there are three occurrences of 'biblioitems' in the first query, but only the first has been substituted in the second. -- 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=19495 Kyle M Hall <kyle@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=19495 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 68323 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68323&action=edit Bug 19495 - Automatic report conversion needs to do global replace on 'biblioitems' and 'marcxml' Bug 17898 provides a way of converting reports that use biblioitems.marcxml so that they will use biblio_metadata.metadata instead. This only works with reports that do not refer to other columns in the biblioitems table. This is a known limitation. It means that we should be able to do a substitution of every occurrence of biblioitems with biblio_metadata, and every occurrence of marcxml with metadata. Unfortunately, we're not doing a global replace, we're only replacing the first occurrence. Test Plan: 1) Apply this patch 2) prove t/db_dependent/Reports/Guided.t -- 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=19495 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Severity|enhancement |blocker --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- Updating importance to blocker because we should *really* get this fixed before release. -- 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=19495 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #68323|0 |1 is obsolete| | --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 68324 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68324&action=edit Forgot to add an explanation to the unit test -- 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=19495 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #68324|Forgot to add an |Bug 19495 - Automatic description|explanation to the unit |report conversion needs to |test |do global replace on | |'biblioitems' and 'marcxml' -- 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=19495 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |17898 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 [Bug 17898] Add a way to automatically convert 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=19495 Lisette <lisetteslatah@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lisetteslatah@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19495 Dominic Pichette <dominic.pichette@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #68324|0 |1 is obsolete| | --- Comment #4 from Dominic Pichette <dominic.pichette@inlibro.com> --- Created attachment 68329 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68329&action=edit Bug 19495 - Automatic report conversion needs to do global replace on 'biblioitems' and 'marcxml' Bug 17898 provides a way of converting reports that use biblioitems.marcxml so that they will use biblio_metadata.metadata instead. This only works with reports that do not refer to other columns in the biblioitems table. This is a known limitation. It means that we should be able to do a substitution of every occurrence of biblioitems with biblio_metadata, and every occurrence of marcxml with metadata. Unfortunately, we're not doing a global replace, we're only replacing the first occurrence. Test Plan: 1) Apply this patch 2) prove t/db_dependent/Reports/Guided.t All tests successful. Files=1, Tests=9, 10 wallclock secs ( 0.11 usr 0.01 sys + 2.85 cusr 0.25 csys = 3.22 CPU) Result: PASS Signed-off-by: Dominic Pichette <dominic@inlibro.com> -- 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=19495 Dominic Pichette <dominic.pichette@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |dominic.pichette@inlibro.co | |m -- 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=19495 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19495 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #68329|0 |1 is obsolete| | --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 68463 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68463&action=edit Bug 19495 - Automatic report conversion needs to do global replace on 'biblioitems' and 'marcxml' Bug 17898 provides a way of converting reports that use biblioitems.marcxml so that they will use biblio_metadata.metadata instead. This only works with reports that do not refer to other columns in the biblioitems table. This is a known limitation. It means that we should be able to do a substitution of every occurrence of biblioitems with biblio_metadata, and every occurrence of marcxml with metadata. Unfortunately, we're not doing a global replace, we're only replacing the first occurrence. Test Plan: 1) Apply this patch 2) prove t/db_dependent/Reports/Guided.t All tests successful. Files=1, Tests=9, 10 wallclock secs ( 0.11 usr 0.01 sys + 2.85 cusr 0.25 csys = 3.22 CPU) Result: PASS Signed-off-by: Dominic Pichette <dominic@inlibro.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- 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=19495 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |kyle@bywatersolutions.com |ity.org | QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | CC| |m.de.rooy@rijksmuseum.nl -- 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=19495 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|17.05 |master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19495 --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Would not mark this one as a blocker btw -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19495 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 17.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19495 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to Master |Pushed to Stable --- Comment #8 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 17.05.x, will be in 17.05.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19495 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Resolution|--- |FIXED Status|Pushed to Stable |RESOLVED --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Dependency is not in 16.11.x - patch is not needed. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org