[Bug 30553] New: Add a count to borrower Files tab in patroninfo
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30553 Bug ID: 30553 Summary: Add a count to borrower Files tab in patroninfo Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Patrons Assignee: lucas@bywatersolutions.com Reporter: lucas@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com If you have the sys pref EnableBorrowerFiles turned on you will see a tab for 'Files' on the patroninfo navigation bar. Some librarians would find it useful to have count on that tab so they can see how many files a borrower has. i.e.: Files(2) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30553 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30553 --- Comment #1 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 133365 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=133365&action=edit Bug 30553: Add file count to patron circ-menu To test: 1. Apply patch 2. Enable the system preference 'EnableBorrowerFiles' 3. Go to a patron account and noticet the Files tab on left nav bar. 4. It should read "Files (0)" 5. Begin uploading some files to the borrower. The tab should reflect the number of files uploaded. 6. Go to other pages on the borrower account ( Checkout, Details, etc. ) 7. The number of files should display from all borrower pages -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30553 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=30553 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #133365|0 |1 is obsolete| | --- Comment #2 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 133480 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=133480&action=edit Bug 30553: Add file count to patron circ-menu To test: 1. Apply patch 2. Enable the system preference 'EnableBorrowerFiles' 3. Go to a patron account and noticet the Files tab on left nav bar. 4. It should read "Files (0)" 5. Begin uploading some files to the borrower. The tab should reflect the number of files uploaded. 6. Go to other pages on the borrower account ( Checkout, Details, etc. ) 7. The number of files should display from all borrower pages Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30553 Barbara Johnson <barbara.johnson@bedfordtx.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |barbara.johnson@bedfordtx.g | |ov -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30553 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Add a count to borrower |Add a count to the Files |Files tab in patroninfo |tab in the patron account -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30553 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Lucas, someone else might be able to help better here, but this leaves some question marks for me. 1) We are missing unit tests for the new method. 2) The new method is named filecount, but it doesn't appear to return an actual count, as then in the templates we have: patron.filecount.size I believe, either the name is not quite right or the return value should be the number. Maybe it should be patron_files instead? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30553 --- Comment #4 from Lucas Gass <lucas@bywatersolutions.com> --- Cait, Thanks for looking. I think, unless there is another reason, we should just return the file count. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30553 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I am fine with either, I just felt like here was some mismatch here. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30553 --- Comment #6 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 133847 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=133847&action=edit Bug 30510: Return only the count from the new filecount method -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30553 --- Comment #7 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 134287 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134287&action=edit Bug 30553: Unit tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30553 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30553 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Hmm, my initial thought here is what are we grabbing so much data for just a count? I see Koha::Patron::Files isn't a modern Koha::Object based class, more of a half way between C4 module and an object.. so it's not as simple as it initially looks. However, maybe it's worth going half way and introducing a 'GetFileCount' method in the underlying Koha::Patron::Files class which does the simpler 'SELECT COUNT(*) FROM borrower_files WHERE borrowernumber = ?' instead? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30553 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hm, but no SQL in Koha namespace, I think. The DBIX equivalent? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30553 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- FQA = Feedback for QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30553 --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- (In reply to Katrin Fischer from comment #9)
Hm, but no SQL in Koha namespace, I think. The DBIX equivalent?
I would suggest allowing the SQL in Koha::Patron::Files and using the method from Koha::Patron.. and then having a follow-up bug to convert Koha::Patron::Files to proper Koha::Object based classes as a modernisation effort. To me, that's the most pragmatic route to goal for this simple enhancement. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30553 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Martin Renvoize from comment #11)
(In reply to Katrin Fischer from comment #9)
Hm, but no SQL in Koha namespace, I think. The DBIX equivalent?
I would suggest allowing the SQL in Koha::Patron::Files and using the method from Koha::Patron.. and then having a follow-up bug to convert Koha::Patron::Files to proper Koha::Object based classes as a modernisation effort.
To me, that's the most pragmatic route to goal for this simple enhancement.
With the risk that we push this arguable code and the follow=up is delayed ;) Since it is a very simple development, it could probably be done here? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30553 Cheryl <clackman@fargolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |clackman@fargolibrary.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30553 Juliet Heltibridle <jheltibridle@rcplib.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jheltibridle@rcplib.org --- Comment #13 from Juliet Heltibridle <jheltibridle@rcplib.org> --- This enhancement would be incredibly useful for our library. I would love to see someone pick up the work on it again! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30553 --- Comment #14 from Lucas Gass <lucas@bywatersolutions.com> --- I don't think I fully understand what y'all need me to do here. To move this forward do I need to convert Koha::Patron::Files into a modern Koha::Object? Sorry for confusion... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30553 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |40302 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40302 [Bug 40302] Modernize Koha::Patron::Files to use Koha::Object based classes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30553 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |BLOCKED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30553 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|lucas@bywatersolutions.com |koha-bugs@lists.koha-commun | |ity.org -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org