[Bug 24759] New: OpacRenewalBranch code should be a Koh::Item method
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24759 Bug ID: 24759 Summary: OpacRenewalBranch code should be a Koh::Item method 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: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.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=24759 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 99763 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99763&action=edit Bug 24759: Move OpacRenewalBranch code to Koha::Item This patchset moves all code to calculate the correct renewal branch into Koha::Item.pm When interface is opac we follow the syspref, otherwise we use the current userenv, or pass through a defined branch To test: 1 - Check out an item to a patron 2 - Set allowed renewals in the circ rules to 100 (just so you can keep testing) 3 - Renew the item in staff interface, confirm it is recorded correctly in statistics table (as signed in branch) 4 - Renew via the opac, testing with each setting of OpacRenewalbranch 5 - prove -v t/db_dependent/Koha/Item.t -- 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=24759 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 99764 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99764&action=edit Bug 24759: CleanUp OpacRenewalBranch values We had a unique behvaiour where the syspref was set to string 'NULL' as opposed to undef, we need to clean that up To test: 1 - Set OpacRenewalBranch to 'NULL' in staff interface 2 - Renew via opac 3 - Check statistics to ensure branch is blank -- 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=24759 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | Status|NEW |Needs Signoff --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- This uncovered some issues, previously if you chose 'NULL' in the system preferences for OpacRenewalBranch it saved as "" - and the test for null looked for the string 'NULL' - so setting it to null was like setting it to 'opacrenew', having it undef was the same. Only having it set to the string value 'NULL' gave you a blank string in statistics (which, I must point out, is not the same a NULL) The second patch here makes the NULL option 'none' and cleans up old pref values - it shouldn't change behaviour, but may change pref value -- 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=24759 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24759 --- Comment #4 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 99780 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99780&action=edit Bug 23165: Unit tests for AddRenewal -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24759 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|OpacRenewalBranch code |OpacRenewalBranch code |should be a Koh::Item |should be a Koha::Item |method |method -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24759 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- *** Bug 23165 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24759 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- renewalbranch is not a correct name. renewal_branchcode is more appropriate here to avoid confusion. Even better, for consistency, I would prefer renewal_library and make it returns a Koha::Library object (if if you need an additional fetch). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24759 --- Comment #7 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 99953 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99953&action=edit Bug 24759: Rename renewalbranch to renewal_branchcode -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24759 --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #6)
renewalbranch is not a correct name. renewal_branchcode is more appropriate here to avoid confusion. Even better, for consistency, I would prefer renewal_library and make it returns a Koha::Library object (if if you need an additional fetch).
Renamed to renewal_branchcode - returning a library object doesn't work so well because we can have "" or "OPACRenew" as values, they won't have Library objects -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24759 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 100002 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=100002&action=edit Bug 24759: Simplify tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24759 --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 100003 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=100003&action=edit Bug 24759: Test intranet at the same time -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24759 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |24754 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24754 [Bug 24754] UserEnv not set for ISLDI requests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24759 --- Comment #11 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 101238 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101238&action=edit Bug 24759: (follow-up) Fix tests Earlier tests delete borrowers before issues, can cause a constraint failure Wrong test count -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24759 Andrew Fuerste-Henry <andrew@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=24759 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #99763|0 |1 is obsolete| | --- Comment #12 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 101239 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101239&action=edit Bug 24759: Move OpacRenewalBranch code to Koha::Item This patchset moves all code to calculate the correct renewal branch into Koha::Item.pm When interface is opac we follow the syspref, otherwise we use the current userenv, or pass through a defined branch To test: 1 - Check out an item to a patron 2 - Set allowed renewals in the circ rules to 100 (just so you can keep testing) 3 - Renew the item in staff interface, confirm it is recorded correctly in statistics table (as signed in branch) 4 - Renew via the opac, testing with each setting of OpacRenewalbranch 5 - prove -v t/db_dependent/Koha/Item.t Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24759 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #99764|0 |1 is obsolete| | --- Comment #13 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 101240 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101240&action=edit Bug 24759: CleanUp OpacRenewalBranch values We had a unique behvaiour where the syspref was set to string 'NULL' as opposed to undef, we need to clean that up To test: 1 - Set OpacRenewalBranch to 'NULL' in staff interface 2 - Renew via opac 3 - Check statistics to ensure branch is blank Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24759 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #99780|0 |1 is obsolete| | --- Comment #14 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 101241 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101241&action=edit Bug 23165: Unit tests for AddRenewal https://bugs.koha-community.org/show_bug.cgi?id=24759 Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24759 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #99953|0 |1 is obsolete| | --- Comment #15 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 101242 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101242&action=edit Bug 24759: Rename renewalbranch to renewal_branchcode Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24759 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #100002|0 |1 is obsolete| | --- Comment #16 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 101243 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101243&action=edit Bug 24759: Simplify tests Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24759 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #100003|0 |1 is obsolete| | --- Comment #17 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 101244 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101244&action=edit Bug 24759: Test intranet at the same time Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24759 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #101238|0 |1 is obsolete| | --- Comment #18 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 101245 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101245&action=edit Bug 24759: (follow-up) Fix tests Earlier tests delete borrowers before issues, can cause a constraint failure Wrong test count Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24759 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=24759 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #101239|0 |1 is obsolete| | Attachment #101240|0 |1 is obsolete| | Attachment #101241|0 |1 is obsolete| | Attachment #101242|0 |1 is obsolete| | Attachment #101243|0 |1 is obsolete| | Attachment #101244|0 |1 is obsolete| | Attachment #101245|0 |1 is obsolete| | --- Comment #19 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 101285 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101285&action=edit Bug 24759: Move OpacRenewalBranch code to Koha::Item This patchset moves all code to calculate the correct renewal branch into Koha::Item.pm When interface is opac we follow the syspref, otherwise we use the current userenv, or pass through a defined branch To test: 1 - Check out an item to a patron 2 - Set allowed renewals in the circ rules to 100 (just so you can keep testing) 3 - Renew the item in staff interface, confirm it is recorded correctly in statistics table (as signed in branch) 4 - Renew via the opac, testing with each setting of OpacRenewalbranch 5 - prove -v t/db_dependent/Koha/Item.t Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24759 --- Comment #20 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 101286 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101286&action=edit Bug 24759: CleanUp OpacRenewalBranch values We had a unique behvaiour where the syspref was set to string 'NULL' as opposed to undef, we need to clean that up To test: 1 - Set OpacRenewalBranch to 'NULL' in staff interface 2 - Renew via opac 3 - Check statistics to ensure branch is blank Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24759 --- Comment #21 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 101287 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101287&action=edit Bug 23165: Unit tests for AddRenewal https://bugs.koha-community.org/show_bug.cgi?id=24759 Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24759 --- Comment #22 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 101288 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101288&action=edit Bug 24759: Rename renewalbranch to renewal_branchcode Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24759 --- Comment #23 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 101289 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101289&action=edit Bug 24759: Simplify tests Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24759 --- Comment #24 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 101290 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101290&action=edit Bug 24759: Test intranet at the same time Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24759 --- Comment #25 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 101291 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101291&action=edit Bug 24759: (follow-up) Fix tests Earlier tests delete borrowers before issues, can cause a constraint failure Wrong test count Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24759 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |20.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=24759 --- Comment #26 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work everyone! Pushed to master for 20.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24759 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joy@bywatersolutions.com --- Comment #27 from Joy Nelson <joy@bywatersolutions.com> --- enhancement not backported to 19.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24759 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal CC| |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24759 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24759 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Circulation |Architecture, internals, | |and plumbing -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org