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.
Created attachment 170494 [details] [review] 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
This patch touches a lot of files. Do we maybe want to split this bug in two for simpler merging into main?