[Bug 43809] New: illreq_created statistic is not recorded for ILL requests created by plugin backends
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43809 Bug ID: 43809 Summary: illreq_created statistic is not recorded for ILL requests created by plugin backends Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: ILL Assignee: koha-bugs@lists.koha-community.org Reporter: pedro.amorim@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org CC: lisette@bywatersolutions.com, pedro.amorim@openfifth.co.uk, tomascohen@gmail.com Target Milestone: --- -- 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=43809 helm.consortium@nhs.net changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |helm.consortium@nhs.net -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43809 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> 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=43809 --- Comment #1 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Created attachment 208192 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208192&action=edit Bug 43809: Add tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> -- 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=43809 --- Comment #2 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Created attachment 208193 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208193&action=edit Bug 43809: Record illreq_created for requests created by any ILL backend illreq_created was only recorded when a backend called after_created itself, which the Standard backend does, but other plugins may not. Core now calls after_created once the backend has created the request, from backend_create and the REST API. A request gets at most one illreq_created, so backends calling it themselves are not counted twice. Test plan: 1) Install the test backend plugin from: https://github.com/openfifth/koha-ill-backend-plugin/releases 2) Enable ILLModule 3) Create a request with the plugin backend at: http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=PluginBackend 4) Check its statistics, notice there is none: SELECT * FROM statistics WHERE illrequest_id = <id> AND type = 'illreq_created'; 5) Create a Standard request at: http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard 6) Repeat 4) for that request, notice there is one row 7) Apply patch, restart_all 8) Repeat 3) and 4). Notice there is now one row 9) Repeat 5) and 6). Notice there is still exactly one row 10) Run tests, notice they pass: k$ prove t/db_dependent/Koha/Plugins/ILL/Backends.t t/db_dependent/api/v1/ill_requests.t Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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=43809 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. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43809 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #208193|0 |1 is obsolete| | -- 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=43809 --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 208221 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208221&action=edit Bug 43809: Record illreq_created for requests created by any ILL backend illreq_created was only recorded when a backend called after_created itself, which the Standard backend does, but other plugins may not. Core now calls after_created once the backend has created the request, from backend_create and the REST API. A request gets at most one illreq_created, so backends calling it themselves are not counted twice. Test plan: 1) Install the test backend plugin from: https://github.com/openfifth/koha-ill-backend-plugin/releases 2) Enable ILLModule 3) Create a request with the plugin backend at: http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=PluginBackend 4) Check its statistics, notice there is none: SELECT * FROM statistics WHERE illrequest_id = <id> AND type = 'illreq_created'; 5) Create a Standard request at: http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard 6) Repeat 4) for that request, notice there is one row 7) Apply patch, restart_all 8) Repeat 3) and 4). Notice there is now one row 9) Repeat 5) and 6). Notice there is still exactly one row 10) Run tests, notice they pass: k$ prove t/db_dependent/Koha/Plugins/ILL/Backends.t t/db_dependent/api/v1/ill_requests.t Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: David Nind <david@davidnind.com> -- 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=43809 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |lisette@bywatersolutions.co |y.org |m Assignee|koha-bugs@lists.koha-commun |pedro.amorim@openfifth.co.u |ity.org |k Patch complexity|--- |Small patch -- 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=43809 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #208192|0 |1 is obsolete| | Attachment #208221|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43809 --- Comment #4 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Created attachment 208344 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208344&action=edit Bug 43809: Add tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Hannah Prince <helm.consortium.nhs.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43809 --- Comment #5 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Created attachment 208345 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208345&action=edit Bug 43809: Record illreq_created for requests created by any ILL backend illreq_created was only recorded when a backend called after_created itself, which the Standard backend does, but other plugins may not. Core now calls after_created once the backend has created the request, from backend_create and the REST API. A request gets at most one illreq_created, so backends calling it themselves are not counted twice. Test plan: 1) Install the test backend plugin from: https://github.com/openfifth/koha-ill-backend-plugin/releases 2) Enable ILLModule 3) Create a request with the plugin backend at: http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=PluginBackend 4) Check its statistics, notice there is none: SELECT * FROM statistics WHERE illrequest_id = <id> AND type = 'illreq_created'; 5) Create a Standard request at: http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard 6) Repeat 4) for that request, notice there is one row 7) Apply patch, restart_all 8) Repeat 3) and 4). Notice there is now one row 9) Repeat 5) and 6). Notice there is still exactly one row 10) Run tests, notice they pass: k$ prove t/db_dependent/Koha/Plugins/ILL/Backends.t t/db_dependent/api/v1/ill_requests.t Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Hannah Prince <helm.consortium.nhs.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43809 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com 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=43809 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |26.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=43809 --- Comment #8 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Thanks everyone! Pushed to main for 26.11! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org