[Bug 18882] New: Add location code to statistics table for checkouts and renewals
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18882 Bug ID: 18882 Summary: Add location code to statistics table for checkouts and renewals Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Some libraries wish to track what the current location of items was at the time they were checked out. This will help libraries track which physical locations in the library patrons are more likely to check out a given book from. -- 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=18882 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |kyle@bywatersolutions.com |ity.org | -- 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=18882 Kyle M Hall <kyle@bywatersolutions.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=18882 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 64727 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64727&action=edit Bug 18882 - Add location code to statistics table for checkouts and renewals Some libraries wish to track what the current location of items was at the time they were checked out. This will help libraries track which physical locations in the library patrons are more likely to check out a given book from. Test Plan: 1) Apply this patch 2) Run updatedatabase.pl 3) Check out an item that has a location set 4) Renew that item 5) View the checkout and renewal in the statistics table, verify each has the location column populated correctly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18882 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com Status|Needs Signoff |In Discussion --- Comment #2 from M. Tompsett <mtompset@hotmail.com> --- The code puts '' if there is no location key. But if the location key is NULL, because I hadn't set my shelving location, there is NULL. Do we want NULL's? If so, I'll sign this off. If not, could you tweak that? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18882 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18882 --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 64756 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64756&action=edit Bug 18882 [QA Followup] - Ensure stats with no or undef location are set to NULL in db -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18882 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |In Discussion --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to M. Tompsett from comment #2)
The code puts '' if there is no location key. But if the location key is NULL, because I hadn't set my shelving location, there is NULL. Do we want NULL's? If so, I'll sign this off. If not, could you tweak that?
I think we should always use NULL is the location is not passed or is set to undef. It seems like odd behavior to convert undef values to empty strings. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18882 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18882 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #64727|0 |1 is obsolete| | --- Comment #5 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 64758 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64758&action=edit Bug 18882 - Add location code to statistics table for checkouts and renewals Some libraries wish to track what the current location of items was at the time they were checked out. This will help libraries track which physical locations in the library patrons are more likely to check out a given book from. Test Plan: 1) Apply this patch 2) Run updatedatabase.pl 3) Check out an item that has a location set 4) Renew that item 5) View the checkout and renewal in the statistics table, verify each has the location column populated correctly Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18882 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #64756|0 |1 is obsolete| | --- Comment #6 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 64759 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64759&action=edit Bug 18882 [QA Followup] - Ensure stats with no or undef location are set to NULL in db Confirm that only NULL or a string are in the location field of the statistics table. Test with two items, one with shelving location set, and one without it set. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18882 M. Tompsett <mtompset@hotmail.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=18882 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Kyle M Hall from comment #4)
(In reply to M. Tompsett from comment #2)
The code puts '' if there is no location key. But if the location key is NULL, because I hadn't set my shelving location, there is NULL. Do we want NULL's? If so, I'll sign this off. If not, could you tweak that?
I think we should always use NULL is the location is not passed or is set to undef. It seems like odd behavior to convert undef values to empty strings.
What we are doing now however, is storing undef only for location. Which is inconsistent. You change all lines in the second patch, only set undef for location. No blocker, but could be improved. I think that empty string would have been better now. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18882 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA 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=18882 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #64758|0 |1 is obsolete| | --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 68911 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68911&action=edit Bug 18882 - Add location code to statistics table for checkouts and renewals Some libraries wish to track what the current location of items was at the time they were checked out. This will help libraries track which physical locations in the library patrons are more likely to check out a given book from. Test Plan: 1) Apply this patch 2) Run updatedatabase.pl 3) Check out an item that has a location set 4) Renew that item 5) View the checkout and renewal in the statistics table, verify each has the location column populated correctly Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18882 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #64759|0 |1 is obsolete| | --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 68912 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68912&action=edit Bug 18882 [QA Followup] - Ensure stats with no or undef location are set to NULL in db Confirm that only NULL or a string are in the location field of the statistics table. Test with two items, one with shelving location set, and one without it set. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18882 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18882 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 17.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org