Bugzilla – Attachment 186963 Details for
Bug 39145
Differentiate between deleting or transferring public and shared lists
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39145: (follow-up) Tidy files
Bug-39145-follow-up-Tidy-files.patch (text/plain), 3.50 KB, created by
Martin Renvoize (ashimema)
on 2025-09-26 08:41:44 UTC
(
hide
)
Description:
Bug 39145: (follow-up) Tidy files
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-09-26 08:41:44 UTC
Size:
3.50 KB
patch
obsolete
>From 2a57abd91232de5fc83b1b99550e2e71fde62b57 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 30 May 2025 08:27:12 +0200 >Subject: [PATCH] Bug 39145: (follow-up) Tidy files > >No test plan (just result of perltidy). > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> >--- > Koha/Virtualshelves.pm | 4 ++-- > t/db_dependent/Koha/Virtualshelves.t | 11 +++++------ > 2 files changed, 7 insertions(+), 8 deletions(-) > >diff --git a/Koha/Virtualshelves.pm b/Koha/Virtualshelves.pm >index 366f67ecb48..f3da2c70991 100644 >--- a/Koha/Virtualshelves.pm >+++ b/Koha/Virtualshelves.pm >@@ -48,7 +48,7 @@ sub disown_or_delete { > my $list_pref = C4::Context->preference('ListOwnershipUponPatronDeletion'); > $self->_resultset->result_source->schema->txn_do( > sub { >- if ( $list_pref ne 'delete' ) { # transfer or transfer_public >+ if ( $list_pref ne 'delete' ) { # transfer or transfer_public > my $new_owner; > > $new_owner = C4::Context->preference('ListOwnerDesignated') >@@ -64,7 +64,7 @@ sub disown_or_delete { > $list->transfer_ownership($new_owner); > } elsif ( $new_owner && $list->is_shared && $list_pref eq 'transfer' ) { > $list->transfer_ownership($new_owner); >- } else { # private list, or shared list with transfer_public >+ } else { # private list, or shared list with transfer_public > $list->delete; > } > } >diff --git a/t/db_dependent/Koha/Virtualshelves.t b/t/db_dependent/Koha/Virtualshelves.t >index 8d71ccf168f..bc9365fb716 100755 >--- a/t/db_dependent/Koha/Virtualshelves.t >+++ b/t/db_dependent/Koha/Virtualshelves.t >@@ -175,9 +175,9 @@ subtest 'disown_or_delete() tests' => sub { > subtest 'ListOwnershipUponPatronDeletion set to transfer_public' => sub { > plan tests => 2; > $schema->storage->txn_begin; >- my $patron_1 = $builder->build_object( { class => 'Koha::Patrons' } ); >- my $patron_2 = $builder->build_object( { class => 'Koha::Patrons' } ); >- my $patron_3 = $builder->build_object( { class => 'Koha::Patrons' } ); >+ my $patron_1 = $builder->build_object( { class => 'Koha::Patrons' } ); >+ my $patron_2 = $builder->build_object( { class => 'Koha::Patrons' } ); >+ my $patron_3 = $builder->build_object( { class => 'Koha::Patrons' } ); > my $public_list = $builder->build_object( > { > class => "Koha::Virtualshelves", >@@ -201,13 +201,12 @@ subtest 'disown_or_delete() tests' => sub { > t::lib::Mocks::mock_preference( 'ListOwnershipUponPatronDeletion', 'transfer_public' ); > t::lib::Mocks::mock_preference( 'ListOwnerDesignated', $patron_3->id ); > >- my $rs = Koha::Virtualshelves->search( >- { shelfnumber => [ $public_list->id, $private_list_shared->id ] } ); >+ my $rs = Koha::Virtualshelves->search( { shelfnumber => [ $public_list->id, $private_list_shared->id ] } ); > > my $result = $rs->disown_or_delete; > $rs->reset; > >- is( $rs->count, 1, 'Only public list should be transferred' ); >+ is( $rs->count, 1, 'Only public list should be transferred' ); > is( $rs->next->id, $public_list->id, 'Check id too' ); > > $schema->storage->txn_rollback; >-- >2.51.0
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 39145
:
178136
|
178137
|
178138
|
182851
|
182870
|
182871
|
182872
|
182873
|
184702
|
184703
|
184704
|
184705
|
186960
|
186961
|
186962
| 186963 |
187067