[Bug 24554] New: Only embed relations from Koha::Biblio in to_api
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24554 Bug ID: 24554 Summary: Only embed relations from Koha::Biblio in to_api Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: REST API Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com The current implemented behaviour of this method (fallback to the biblioitems relations) breaks using it with bug 24538. On fixing it, I noticed the method is quite over-engineered. As biblioitems is not a real entity on the API and we are not going to add related tables to bilbioitems (most probably get it merged into biblio) we don't need the pass-through of embeds into the biblioitem object. This makes counts work, and also makes sense :-D -- 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=24554 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Blocks| |20212 Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | Depends on| |24366, 24528 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212 [Bug 20212] Slowness in Receiving in Acquisitions https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24366 [Bug 24366] Merging biblioitems should happen in Koha::Biblio->to_api https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24528 [Bug 24528] Add a syntax for specifying counts on x-koha-embed -- 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=24554 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 98225 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98225&action=edit Bug 24554: Only embed relations from Koha::Biblio in to_api This patch simplifies the behaviour of Koha::Biblio->to_api. It was designed with the idea of handling possible methods that would be added to Koha::Biblioitem. But it had a weird fallback behaviour was highlighted by using it with bug 24528. On fixing it it become obvious that it was unnessessarily complex and that it was not worth. That's the reason there wasn't any test for it, as Koha::Biblioitem doesn't implement any extra methods. To test: 1. Run: $ kshell k$ prove t/db_dependent/Koha/Biblio.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests pass! 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24554 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24554 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24554 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #98225|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 98266 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98266&action=edit Bug 24554: Only embed relations from Koha::Biblio in to_api This patch simplifies the behaviour of Koha::Biblio->to_api. It was designed with the idea of handling possible methods that would be added to Koha::Biblioitem. But it had a weird fallback behaviour was highlighted by using it with bug 24528. On fixing it it become obvious that it was unnessessarily complex and that it was not worth. That's the reason there wasn't any test for it, as Koha::Biblioitem doesn't implement any extra methods. To test: 1. Run: $ kshell k$ prove t/db_dependent/Koha/Biblio.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests pass! 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24554 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=24554 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #98266|0 |1 is obsolete| | --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 98519 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98519&action=edit Bug 24554: Only embed relations from Koha::Biblio in to_api This patch simplifies the behaviour of Koha::Biblio->to_api. It was designed with the idea of handling possible methods that would be added to Koha::Biblioitem. But it had a weird fallback behaviour was highlighted by using it with bug 24528. On fixing it it become obvious that it was unnessessarily complex and that it was not worth. That's the reason there wasn't any test for it, as Koha::Biblioitem doesn't implement any extra methods. To test: 1. Run: $ kshell k$ prove t/db_dependent/Koha/Biblio.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests pass! 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24554 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.05.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=24554 --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work everyone! Pushed to master for 20.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24554 Bug 24554 depends on bug 24528, which changed state. Bug 24528 Summary: Add a syntax for specifying counts on x-koha-embed https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24528 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24554 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joy@bywatersolutions.com Resolution|--- |FIXED Status|Pushed to master |RESOLVED --- Comment #5 from Joy Nelson <joy@bywatersolutions.com> --- Not pushed to 19.11.x due to dependencies -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24554 Bug 24554 depends on bug 24366, which changed state. Bug 24366 Summary: Merging biblioitems should happen in Koha::Biblio->to_api https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24366 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org