[Bug 22588] New: Simplify getting account information in opac and self checkout module
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22588 Bug ID: 22588 Summary: Simplify getting account information in opac and self checkout module Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: josef.moravec@gmail.com QA Contact: testopia@bugs.koha-community.org Target Milestone: --- -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22588 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |josef.moravec@gmail.com Depends on| |21772 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21772 [Bug 21772] Add holds and account information tab to the SCO module -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22588 --- Comment #1 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 87049 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=87049&action=edit Bug 22588: Simplify getting fines information in opac and selfcheckout Test plan: 0) Have patron with some fines and credits 1) Go to opac and log in 2) Go to 'your summary' page and confirm it shows the right amount and description for both, credit and debit 3) Go to 'your fines' page and confirm it show right information 4) Go to self checkout page and confirm the fines are right here Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22588 Josef Moravec <josef.moravec@gmail.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=22588 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |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=22588 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #87049|0 |1 is obsolete| | --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 87065 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=87065&action=edit Bug 22588: Simplify getting fines information in opac and selfcheckout Test plan: 0) Have patron with some fines and credits 1) Go to opac and log in 2) Go to 'your summary' page and confirm it shows the right amount and description for both, credit and debit 3) Go to 'your fines' page and confirm it show right information 4) Go to self checkout page and confirm the fines are right here Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22588 --- Comment #3 from Josef Moravec <josef.moravec@gmail.com> ---
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Thanks for testing Owen! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22588 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I like the idea in general but: - shouldn't we be using line.{is_debit|is_credit} instead of comparing line.amount > 0? Keep in mind that we found pathological cases in the wild where the amountoutstanding got flipped. We better rely on the methods we have. - The fact that we aren't using $account->outstanding_debits and $account->outstanding_credits but instead keep searching for all accountlines makes some noise to me. I guess it is not straightforward as we want to display all outstanding debits and credits ordered by date. Just something to think about a bit. Maybe we should add amountountstanding => { '!=' => 0 } to the search line. - We could replace the search with my $account = $patron->account; my $total = $account->balance; my $lines = $account->lines; -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22588 --- Comment #5 from Josef Moravec <josef.moravec@gmail.com> --- (In reply to Tomás Cohen Arazi from comment #4)
I like the idea in general but: - shouldn't we be using line.{is_debit|is_credit} instead of comparing line.amount > 0? Keep in mind that we found pathological cases in the wild where the amountoutstanding got flipped. We better rely on the methods we have.
Definitely yes, I don't know how could I forget these methods... I'll add a follow-up for this
- The fact that we aren't using $account->outstanding_debits and $account->outstanding_credits but instead keep searching for all accountlines makes some noise to me. I guess it is not straightforward as we want to display all outstanding debits and credits ordered by date. Just something to think about a bit. Maybe we should add amountountstanding => { '!=' => 0 } to the search line.
Maybe we should think a bit more, what we wan't to show to users in accounts information table - now it is something like cash book, but is that right way of presenting account lines to user? Do they understand it enough?
- We could replace the search with
my $account = $patron->account; my $total = $account->balance; my $lines = $account->lines;
Will be done in follow-up -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22588 --- Comment #6 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 87131 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=87131&action=edit Bug 22588: (follow-up) Simplify getting accounts even more -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22588 Bug 22588 depends on bug 21772, which changed state. Bug 21772 Summary: Add holds and account information tab to the SCO module https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21772 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=22588 Katrin Fischer <katrin.fischer@bsz-bw.de> 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=22588 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #87065|0 |1 is obsolete| | --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 87350 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=87350&action=edit Bug 22588: Simplify getting fines information in opac and selfcheckout Test plan: 0) Have patron with some fines and credits 1) Go to opac and log in 2) Go to 'your summary' page and confirm it shows the right amount and description for both, credit and debit 3) Go to 'your fines' page and confirm it show right information 4) Go to self checkout page and confirm the fines are right here Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22588 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #87131|0 |1 is obsolete| | --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 87351 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=87351&action=edit Bug 22588: (follow-up) Simplify getting accounts even more Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22588 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com Status|Passed QA |Patch doesn't apply -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22588 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #87350|0 |1 is obsolete| | --- Comment #9 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 88021 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=88021&action=edit Bug 22588: Simplify getting fines information in opac and selfcheckout Test plan: 0) Have patron with some fines and credits 1) Go to opac and log in 2) Go to 'your summary' page and confirm it shows the right amount and description for both, credit and debit 3) Go to 'your fines' page and confirm it show right information 4) Go to self checkout page and confirm the fines are right here Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22588 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #87351|0 |1 is obsolete| | --- Comment #10 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 88022 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=88022&action=edit Bug 22588: (follow-up) Simplify getting accounts even more Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22588 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Passed QA --- Comment #11 from Josef Moravec <josef.moravec@gmail.com> --- Rebased on master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22588 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #12 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 19.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22588 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |19.05.00 released in| | CC| |martin.renvoize@ptfs-europe | |.com Resolution|--- |FIXED Status|Pushed to Master |RESOLVED --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Enhancement will not be backported to 18.11.x series. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org