Bugzilla – Attachment 118185 Details for
Bug 20718
Add ability to have lists that are available to all list editors
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20718: Set owner to NULL when owner is deleted
Bug-20718-Set-owner-to-NULL-when-owner-is-deleted.patch (text/plain), 1.16 KB, created by
Kyle M Hall (khall)
on 2021-03-12 11:08:00 UTC
(
hide
)
Description:
Bug 20718: Set owner to NULL when owner is deleted
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2021-03-12 11:08:00 UTC
Size:
1.16 KB
patch
obsolete
>From d579be3ff989f52738238e300b7289be2289dee6 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 12 Mar 2021 06:07:44 -0500 >Subject: [PATCH] Bug 20718: Set owner to NULL when owner is deleted > >--- > Koha/Patron.pm | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index 8c1592c3f2..f17ffd3022 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -386,7 +386,11 @@ sub delete { > # This pref should then govern the results of other routines/methods such as > # Koha::Virtualshelf->new->delete too. > # FIXME Could be $patron->get_lists >- $_->delete for Koha::Virtualshelves->search( { owner => $self->borrowernumber } ); >+ # >+ # Set owner to NULL if the list is an "all staff" list, otherwise delete it. >+ $_->category == 3 ? $_->owner(undef)->store() : $_->delete >+ for Koha::Virtualshelves->search( >+ { owner => $self->borrowernumber } ); > > # We cannot have a FK on borrower_modifications.borrowernumber, the table is also used > # for patron selfreg >-- >2.24.1 (Apple Git-126)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20718
:
75119
|
75201
|
76944
|
81135
|
81136
|
115823
|
116716
| 118185