[Bug 37346] New: The VirtualShelf object should have an 'owner' accessor to return the related owner Koha::Patron
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37346 Bug ID: 37346 Summary: The VirtualShelf object should have an 'owner' accessor to return the related owner Koha::Patron Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Lists Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl We should add an 'owner' accessor to Koha::Virtualshelf that returns the Koha::Patron who owns the List. The cleanest approach would be to rename the current 'owner' database field to 'owner_id' and then write the usual Koha::Object relation wrapper into Koha::Virtualshelf. This would improve code consistency and allow for access to the owner directly from the object in notices. -- 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=37346 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=25498 -- 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=37346 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jake.deery@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=37346 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jake.deery@ptfs-europe.com |ity.org | -- 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=37346 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=30955 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37346 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Academy -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37346 --- Comment #1 from Jake Deery <jake.deery@ptfs-europe.com> --- Created attachment 170494 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170494&action=edit Bug 37346: Rename 'owner' to 'owner_id' in virtualshelves This patch will rename the owner field in the virtualshelves database to owner_id. This makes it more consistent with other tables, and paves the way for a patch which will allow a direct accessor to the borrower specified in owner_id. Test plan: a) apply patch b) ensure the full test harness works, by running k.t.d with RUN_TESTS_AND_EXIT=yes in your .env file c) ensure ALL create, read, update, and delete functions work under the lists module on the staff client & OPAC (aka TEST EVERYTHING) d) ensure you can add to lists from the search on the staff client & OPAC e) ensure you can email lists from the send lists button on the staff client & OPAC f) create a list with at least one biblio inside g) enable the ERMModule system preference 1) goto the ERM module 2) create a package called package 3) under titles, select import from list 4) select package in the dropdown, and click import next to your list h) ensure a biblio is listed under titles in the ERMModule -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37346 Jake Deery <jake.deery@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff --- Comment #2 from Jake Deery <jake.deery@ptfs-europe.com> --- This patch touches a lot of files. Do we maybe want to split this bug in two for simpler merging into main? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37346 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |roadmap_24_11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37346 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37346 Jake Deery <jake.deery@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #170494|0 |1 is obsolete| | --- Comment #3 from Jake Deery <jake.deery@ptfs-europe.com> --- Created attachment 174478 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174478&action=edit Bug 37346: Rename 'owner' to 'owner_id' in virtualshelves This patch will rename the owner field in the virtualshelves database to owner_id. This makes it more consistent with other tables, and paves the way for a patch which will allow a direct accessor to the borrower specified in owner_id. Test plan: a) apply patch b) ensure the full test harness works, by running k.t.d with RUN_TESTS_AND_EXIT=yes in your .env file c) ensure ALL create, read, update, and delete functions work under the lists module on the staff client & OPAC (aka TEST EVERYTHING) d) ensure you can add to lists from the search on the staff client & OPAC e) ensure you can email lists from the send lists button on the staff client & OPAC f) create a list with at least one biblio inside g) enable the ERMModule system preference 1) goto the ERM module 2) create a package called package 3) under titles, select import from list 4) select package in the dropdown, and click import next to your list h) ensure a biblio is listed under titles in the ERMModule -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37346 --- Comment #4 from Jake Deery <jake.deery@ptfs-europe.com> --- Found that it needed a rebase :-) Jake. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37346 claire.hernandez@biblibre.com <claire.hernandez@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |claire.hernandez@biblibre.c | |om -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37346 Jake Deery <jake.deery@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #174478|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37346 --- Comment #5 from Jake Deery <jake.deery@openfifth.co.uk> --- Created attachment 194345 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194345&action=edit Bug 37346: Koha::VirtualShelf::owner is now an accessor This patch updates the DB field `virtualshelves`.`owner` to be `virtualshelves`.`owner_id`, and adds an accessor method in place of owner. The rationale behind this patch is that, in future patches, we can begin to reduce repeated calls of Koha::Patrons->find by providing an accessor for the aforementioned damp code. TO TEST: == APPLY PATCH == b) ensure the full test harness works, by running k.t.d with RUN_TESTS_AND_EXIT=yes in your .env file c) ensure ALL create, read, update, and delete functions work under the lists module on the staff client & OPAC (aka TEST EVERYTHING) d) ensure you can add to lists from the search on the staff client & OPAC e) ensure you can email lists from the send lists button on the staff client & OPAC f) create a list with at least one biblio inside g) enable the ERMModule system preference 1) goto the ERM module 2) create a package called package 3) under titles, select import from list 4) select package in the dropdown, and click import next to your list h) ensure a biblio is listed under titles in the ERMModule == SIGN OFF == -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37346 --- Comment #6 from Jake Deery <jake.deery@openfifth.co.uk> --- Created attachment 194346 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194346&action=edit Bug 37346: atomicupdate - DO NOT PUSH Patch from commit a1b65d9 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37346 --- Comment #7 from Jake Deery <jake.deery@openfifth.co.uk> --- Created attachment 194347 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194347&action=edit Bug 37346: DBIC - DO NOT PUSH Patch from commit 611645a -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37346 Jake Deery <jake.deery@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff --- Comment #8 from Jake Deery <jake.deery@openfifth.co.uk> --- Wrote this patch a while ago – my confidence and abilities have come on a lot since then. Resubmitting a rebased patch, which is also (hopefully) neater, and contains the actual accessor! Ta, Jake -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org