Bugzilla – Attachment 137908 Details for
Bug 25498
Allow to change owner of public or shared list
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25498: (follow-up) Show error message when no sharee has email
Bug-25498-follow-up-Show-error-message-when-no-sha.patch (text/plain), 2.70 KB, created by
Marcel de Rooy
on 2022-07-20 11:47:42 UTC
(
hide
)
Description:
Bug 25498: (follow-up) Show error message when no sharee has email
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2022-07-20 11:47:42 UTC
Size:
2.70 KB
patch
obsolete
>From 174aa3b7144ec6447c841f1cb7d1d7a228c9497f Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 20 Jul 2022 11:45:23 +0000 >Subject: [PATCH] Bug 25498: (follow-up) Show error message when no sharee has > email >Content-Type: text/plain; charset=utf-8 > >Test plan: >Share a list with a patron that has no email address. >Try to transfer ownership. Verify that you get the error message. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../opac-tmpl/bootstrap/en/modules/opac-shelves.tt | 2 ++ > opac/opac-shelves.pl | 11 ++++++++--- > 2 files changed, 10 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >index fdf8036b3e..37b1b226fd 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >@@ -156,6 +156,8 @@ > <span>The item has not been added to the list. Please check it's not already in the list.</span> > [% CASE 'error_on_remove_share' %] > <span>The share has not been removed.</span> >+ [% CASE 'no_email_found' %] >+ <span>No email found for the patrons that accepted the share</span> > [% CASE 'success_on_update' %] > <span>List updated.</span> > [% CASE 'success_on_insert' %] >diff --git a/opac/opac-shelves.pl b/opac/opac-shelves.pl >index d93ae2c52a..bc7b70d70a 100755 >--- a/opac/opac-shelves.pl >+++ b/opac/opac-shelves.pl >@@ -272,10 +272,15 @@ if ( $op eq 'add_form' ) { > my $patrons = []; > my $shares = $shelf->get_shares->search({ borrowernumber => { '!=' => undef } }); > while( my $share = $shares->next ) { >- push @$patrons, { email => $share->sharee->notice_email_address, borrowernumber => $share->get_column('borrowernumber') }; >+ my $email = $share->sharee->notice_email_address; >+ push @$patrons, { email => $email, borrowernumber => $share->get_column('borrowernumber') } if $email; >+ } >+ if( @$patrons ) { >+ $template->param( shared_users => $patrons ); >+ $op = 'transfer'; >+ } else { >+ push @messages, { type => 'error', code => 'no_email_found' }; > } >- $template->param( shared_users => $patrons ); >- $op = 'transfer'; > } elsif( !Koha::Patrons->find($new_owner) ) { > push @messages, { type => 'error', code => 'new_owner_not_found' }; > } elsif( !$shelf->get_shares->search({ borrowernumber => $new_owner })->count ) { >-- >2.20.1
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 25498
:
135889
|
135921
|
136008
|
136009
|
136010
|
136011
|
136033
|
136034
|
136035
|
136036
|
136166
|
136167
|
136168
|
136169
|
136220
|
136221
|
137862
|
137863
|
137864
|
137865
|
137866
|
137867
|
137871
| 137908