[Bug 29453] New: Add routes to fetch patron credits/debits
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 Bug ID: 29453 Summary: Add routes to fetch patron credits/debits Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: REST API Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@ptfs-europe.com As the title says.. we should have API routes for fetching a patrons credits and debits by now ;) -- 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=29453 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |28544 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28544 [Bug 28544] Add API's for account transactions -- 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=29453 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@ptfs-europe |ity.org |.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=29453 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=20944 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 130350 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130350&action=edit Bug 29453: Add endpoints for fetching patron credits & debits This patch adds two new API endpoints for fetching a patrons credits and a patrons debits. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17735 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17735 [Bug 17735] Merge boraccount and pay pages into one -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #130350|0 |1 is obsolete| | --- Comment #2 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 144619 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144619&action=edit Bug 29453: Add endpoints for fetching patron credits & debits This patch adds two new API endpoints for fetching a patrons credits and a patrons debits. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Rebased -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |21043 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21043 [Bug 21043] Add routes to add debits to a patron's account -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=29453 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #4 from Lucas Gass <lucas@bywatersolutions.com> --- When I try testing this, applying patch and restarting all services, then going to 'http://localhost:8081/api/v1/.html' I get this: The application raised the following error: Can't use an undefined value as an ARRAY reference at template mojo/debug.html.ep line 288. Context: 283: </div> 284: <div class="tap tap-border-top">tap for more</div> 285: </div> 286: </div> 287: <div class="row"> 288: % if (@{app->log->history}) { 289: % my $log = join '', map { scalar app->log->format->(@$_) } @{app->log->history}; 290: <pre class="mojo-terminal"><code class="nohighlight"><%= $log %></code></pre> 291: % } 292: % else { 293: <div class="alert alert-warning wide" role="alert"> Traceback (most recent call first): and the StackTrace middleware couldn't catch its stack trace, possibly because your application overrides $SIG{__DIE__} by itself, preventing the middleware from working correctly. Remove the offending code or module that does it: known examples are CGI::Carp and Carp::Always. Am I doing something wrong? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Probably a rebase error on my part.. I'll have a look today. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |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=29453 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144619|0 |1 is obsolete| | --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 144713 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144713&action=edit Bug 29453: Add endpoints for fetching patron credits & debits This patch adds two new API endpoints for fetching a patrons credits and a patrons debits. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Yup, it was a rebase issue.. sorted now :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 --- Comment #8 from Lucas Gass <lucas@bywatersolutions.com> --- Note: I am testing by playing around with this JS: let bn = 5; let api_url = "/api/v1/patrons/" + bn + "/account/debits"; $.getJSON(api_url, function(data) { console.log(data) }); Works well. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 --- Comment #9 from Lucas Gass <lucas@bywatersolutions.com> --- The QA tool complains: OK Koha/Account.pm FAIL Koha/Account/Credit.pm FAIL valid Inconsistent hierarchy during C3 merge of class 'Koha::Account::Credit': current merge results [ Koha::Account::Credit, ] merging failed on 'Koha::Account::Line' OK Koha/Account/Credits.pm FAIL Koha/Account/Debit.pm FAIL valid Inconsistent hierarchy during C3 merge of class 'Koha::Account::Debit': current merge results [ Koha::Account::Debit, ] merging failed on 'Koha::Account::Line' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 Lucas Gass <lucas@bywatersolutions.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=29453 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144713|0 |1 is obsolete| | --- Comment #10 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 144718 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144718&action=edit Bug 29453: Add endpoints for fetching patron credits & debits This patch adds two new API endpoints for fetching a patrons credits and a patrons debits. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |m.de.rooy@rijksmuseum.nl --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- FAIL valid Inconsistent hierarchy during C3 merge of class 'Koha::Account::Credit': current merge results [ Koha::Account::Credit, ] merging failed on 'Koha::Account::Line' FAIL valid Inconsistent hierarchy during C3 merge of class 'Koha::Account::Debit': current merge results [ Koha::Account::Debit, ] merging failed on 'Koha::Account::Line' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144718|0 |1 is obsolete| | --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 147565 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147565&action=edit Bug 29453: Add endpoints for fetching patron credits & debits This patch adds two new API endpoints for fetching a patrons credits and a patrons debits. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- OK.. the QA Script issue here is a bit of a red herring.. but there is still work to be done anyway. We ought to have some api tests.. seems I didn't add them here yet! I'm also considering just outright dropping Koha::Account::Line(s) classes and migrating the appropriate methods into the ::Credit(s) and ::Debit(s) classes instead.. There might still be some need for a base class to share some methods between them.. I'm not sure yet. Dropping the base class would get rid of the QA Script unhappiness. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #147565|0 |1 is obsolete| | --- Comment #14 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 147570 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147570&action=edit Bug 29453: Add endpoints for fetching patron credits & debits This patch adds two new API endpoints for fetching a patrons credits and a patrons debits. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #147570|0 |1 is obsolete| | --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 147644 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147644&action=edit Bug 29453: Add endpoints for fetching patron credits & debits This patch adds two new API endpoints for fetching a patrons credits and a patrons debits. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |michaela.sieber@kit.edu -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lukasz.koszyk@kit.edu -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #147644|0 |1 is obsolete| | --- Comment #16 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 150670 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150670&action=edit Bug 29453: Add endpoints for fetching patron credits & debits This patch adds two new API endpoints for fetching a patrons credits and a patrons debits. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Agustin Moyano <agustinmoyano@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 --- Comment #17 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 150671 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150671&action=edit Bug 29453: (follow-up) Add tests and fix minimum amount in credit.yaml definition -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com QA Contact| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 Kyle M Hall <kyle@bywatersolutions.com> 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=29453 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #150670|0 |1 is obsolete| | Attachment #150671|0 |1 is obsolete| | --- Comment #18 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 150763 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150763&action=edit Bug 29453: Add endpoints for fetching patron credits & debits This patch adds two new API endpoints for fetching a patrons credits and a patrons debits. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Agustin Moyano <agustinmoyano@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 --- Comment #19 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 150764 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150764&action=edit Bug 29453: (follow-up) Add tests and fix minimum amount in credit.yaml definition Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |new feature -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |23.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 --- Comment #20 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.05. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED --- Comment #21 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- New feature, no backport for 22.11.x series. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|new feature |enhancement -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |**Sponsored by** *PTFS release notes| |Europe* -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |new feature -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|**Sponsored by** *PTFS |**Sponsored by** *PTFS release notes|Europe* |Europe* | | | |This adds GET | |endpoints for fetching | |credits and debits of a | |patron to the REST API. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Add routes to fetch patron |Add GET endpoints to fetch |credits/debits |patron credits and debits -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29453 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|**Sponsored by** *PTFS |**Sponsored by** *PTFS release notes|Europe* |Europe* | | |This adds GET | |endpoints for fetching | |credits and debits of a | |patron to the REST API. | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org