[Bug 38751] New: Creating ILL request through OPAC openURL explodes if same attribute defined twice
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38751 Bug ID: 38751 Summary: Creating ILL request through OPAC openURL explodes if same attribute defined twice Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: ILL Assignee: pedro.amorim@ptfs-europe.com Reporter: pedro.amorim@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org CC: pedro.amorim@ptfs-europe.com, tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38751 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38751 --- Comment #1 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 175700 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175700&action=edit Bug 38751: Add tests prove t/db_dependent/Koha/ILL/Request.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38751 --- Comment #2 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 175701 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175701&action=edit Bug 38751: Update Standard ILL backend add_request Make use of newly updated ILL::Request->extended_attributes method instead of creating the query manually -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38751 --- Comment #3 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 175702 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175702&action=edit Bug 38751: Update ILL::Request->extended_attributes This updates the extended_attributes method to also act as setter. Additionally, it'll skip adding any attribute that result in error, preventing an ugly error 500. Test plan: 1) Enable ILLModule sys pref 2) Attempt to create the following openurl request through the OPAC: http://localhost:8080/cgi-bin/koha/opac-illrequests.pl?DOI=10.1001%2Fjama.2024.11146&atitle=Interventions%20for%20High%20Body%20Mass%20Index%20in%20Children%20and%20Adolescents%3A%20US%20Preventive%20Services%20Task%20Force%20Recommendation%20Statement.&aulast=Nicholson%2C%20Wanda%20K.&backend=FreeForm&cardnumber=53807898&date=20240716&genre=article&id=DOI%3A10.1001%2Fjama.2024.11146&issn=00987484&issue=3&method=create&opac=1&openurl=1 3) Notice it fails with a Duplicate ID error and the OPAC blows up. This is because Koha is trying to add the 'DOI' illrequestattribute twice and that is resulting in a duplicate ID 4) Apply patches, repeat test plan, notice the error no longer happens, the request is created correctly and all successful attribute have been added. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38751 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #175702|0 |1 is obsolete| | --- Comment #4 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 175703 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175703&action=edit Bug 38751: Update ILL::Request->extended_attributes This updates the extended_attributes method to also act as setter. Additionally, it'll skip adding any attribute that result in error, preventing an ugly error 500. Test plan: 1) Enable ILLModule sys pref 2) Attempt to create the following openurl request through the OPAC: http://localhost:8080/cgi-bin/koha/opac-illrequests.pl?DOI=10.1001%2Fjama.2024.11146&atitle=Interventions%20for%20High%20Body%20Mass%20Index%20in%20Children%20and%20Adolescents%3A%20US%20Preventive%20Services%20Task%20Force%20Recommendation%20Statement.&aulast=Nicholson%2C%20Wanda%20K.&backend=FreeForm&cardnumber=53807898&date=20240716&genre=article&id=DOI%3A10.1001%2Fjama.2024.11146&issn=00987484&issue=3&method=create&opac=1&openurl=1 3) Notice it fails with a Duplicate ID error and the OPAC blows up. This is because Koha is trying to add the 'DOI' illrequestattribute twice and that is resulting in a duplicate ID 4) Apply patches, repeat test plan, notice the error no longer happens, the request is created correctly and all successful attribute have been added. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38751 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #175700|0 |1 is obsolete| | --- Comment #5 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 175704 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175704&action=edit Bug 38751: Add tests prove t/db_dependent/Koha/ILL/Request.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38751 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #175701|0 |1 is obsolete| | --- Comment #6 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 175705 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175705&action=edit Bug 38751: Update Standard ILL backend add_request Make use of newly updated ILL::Request->extended_attributes method instead of creating the query manually -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38751 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=38751 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #175703|0 |1 is obsolete| | --- Comment #7 from David Nind <david@davidnind.com> --- Created attachment 175903 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175903&action=edit Bug 38751: Update ILL::Request->extended_attributes This updates the extended_attributes method to also act as setter. Additionally, it'll skip adding any attribute that result in error, preventing an ugly error 500. Test plan: 1) Enable ILLModule sys pref 2) Attempt to create the following openurl request through the OPAC: http://localhost:8080/cgi-bin/koha/opac-illrequests.pl?DOI=10.1001%2Fjama.2024.11146&atitle=Interventions%20for%20High%20Body%20Mass%20Index%20in%20Children%20and%20Adolescents%3A%20US%20Preventive%20Services%20Task%20Force%20Recommendation%20Statement.&aulast=Nicholson%2C%20Wanda%20K.&backend=FreeForm&cardnumber=53807898&date=20240716&genre=article&id=DOI%3A10.1001%2Fjama.2024.11146&issn=00987484&issue=3&method=create&opac=1&openurl=1 3) Notice it fails with a Duplicate ID error and the OPAC blows up. This is because Koha is trying to add the 'DOI' illrequestattribute twice and that is resulting in a duplicate ID 4) Apply patches, repeat test plan, notice the error no longer happens, the request is created correctly and all successful attribute have been added. 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=38751 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #175704|0 |1 is obsolete| | --- Comment #8 from David Nind <david@davidnind.com> --- Created attachment 175904 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175904&action=edit Bug 38751: Add tests prove t/db_dependent/Koha/ILL/Request.t 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=38751 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #175705|0 |1 is obsolete| | --- Comment #9 from David Nind <david@davidnind.com> --- Created attachment 175905 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175905&action=edit Bug 38751: Update Standard ILL backend add_request Make use of newly updated ILL::Request->extended_attributes method instead of creating the query manually 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=38751 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |38819 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38819 [Bug 38819] ILL - 'Switch provider' should use AutoILLBackendPriority -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38751 --- Comment #10 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 176124 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176124&action=edit Bug 38751: Update Standard ILL backend migrate Make use of newly updated ILL::Request->extended_attributes method instead of creating the query manually The test plan in bug 38819 fails without this patch (page explodes with duplicate ID error). It's the same cause as the one being fixed here in bug 38751 so I'm submitting this here. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38751 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #175903|0 |1 is obsolete| | --- Comment #11 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 176250 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176250&action=edit Bug 38751: Update ILL::Request->extended_attributes This updates the extended_attributes method to also act as setter. Additionally, it'll skip adding any attribute that result in error, preventing an ugly error 500. Test plan: 1) Enable ILLModule sys pref 2) Attempt to create the following openurl request through the OPAC: http://localhost:8080/cgi-bin/koha/opac-illrequests.pl?DOI=10.1001%2Fjama.2024.11146&atitle=Interventions%20for%20High%20Body%20Mass%20Index%20in%20Children%20and%20Adolescents%3A%20US%20Preventive%20Services%20Task%20Force%20Recommendation%20Statement.&aulast=Nicholson%2C%20Wanda%20K.&backend=FreeForm&cardnumber=53807898&date=20240716&genre=article&id=DOI%3A10.1001%2Fjama.2024.11146&issn=00987484&issue=3&method=create&opac=1&openurl=1 3) Notice it fails with a Duplicate ID error and the OPAC blows up. This is because Koha is trying to add the 'DOI' illrequestattribute twice and that is resulting in a duplicate ID 4) Apply patches, repeat test plan, notice the error no longer happens, the request is created correctly and all successful attribute have been added. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <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=38751 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #175904|0 |1 is obsolete| | --- Comment #12 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 176251 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176251&action=edit Bug 38751: Add tests prove t/db_dependent/Koha/ILL/Request.t Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <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=38751 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #175905|0 |1 is obsolete| | --- Comment #13 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 176252 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176252&action=edit Bug 38751: Update Standard ILL backend add_request Make use of newly updated ILL::Request->extended_attributes method instead of creating the query manually Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <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=38751 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176124|0 |1 is obsolete| | --- Comment #14 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 176253 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176253&action=edit Bug 38751: Update Standard ILL backend migrate Make use of newly updated ILL::Request->extended_attributes method instead of creating the query manually The test plan in bug 38819 fails without this patch (page explodes with duplicate ID error). It's the same cause as the one being fixed here in bug 38751 so I'm submitting this here. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <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=38751 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com Status|Signed Off |Passed QA --- Comment #15 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Clear bugfix and code improvement, well tested and clear. QA scripts all happy, Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38751 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |25.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38751 --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 25.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38751 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|25.05.00 |25.05.00,24.11.04 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38751 --- Comment #17 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Nice work everyone! Pushed to 24.11.x for 24.11.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38751 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #18 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11.x as it wasn't backported to 24.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38751 Aude Charillon <aude.charillon@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED CC| |aude.charillon@openfifth.co | |.uk --- Comment #19 from Aude Charillon <aude.charillon@openfifth.co.uk> --- No need for any updates to the Manual. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org