Bugzilla – Attachment 147157 Details for
Bug 32548
Make illrequestattributes easily available to ILL notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32548: Make illrequestattributes available in ILL emails
Bug-32548-Make-illrequestattributes-available-in-I.patch (text/plain), 2.87 KB, created by
Katrin Fischer
on 2023-02-22 14:07:47 UTC
(
hide
)
Description:
Bug 32548: Make illrequestattributes available in ILL emails
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-02-22 14:07:47 UTC
Size:
2.87 KB
patch
obsolete
>From e17409b06f5d4540ce397de673c0e1ffe884f07e Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer@bsz-bw.de> >Date: Thu, 29 Dec 2022 16:17:40 +0000 >Subject: [PATCH] Bug 32548: Make illrequestattributes available in ILL emails > >Without this ILL module only provides very limited data to >be included in the notices sent about the request itself. > >We have the columns illrequests, but not the illrequestattributes, >that often will contain the more useful information needed. > >This patch enables to use values of the illrequestattributs using >[% illrequestattributes.<attributname> %] in the notices. > >To test: >* Apply patch >* First you'll need to activate the ILL module and install a > backend to use it with. FreeForm was used for this test plan, > BLDSS is usually also good for testing. > See: https://wiki.koha-community.org/wiki/ILL_backends >* Also set up an SMTP server to use for notices and make > sure the email address is set in KohaAdminEmailAddress > and the user you are using for testing this with. >* Make sure your user has an email address and will receive > ILL notices by seleting them in the messaging preferences. >* Create an ILL request with the FreeForm backend for your user. >* On the ILL request detail page: "Display supplier metadata" > Pick some attributes you want to use in the notice >* Go to Tools > Notices and slips and edit ILL_REQUEST_UNAVAIL >* Add some of the attributes you picked. Example: > [% illrequestattributes.type %] > [% illrequestattributes.title %] >* Back to the ILL request detail page: Send notice to patron > > ILL request unavailable >* Go to your patron's account and check the notices tab >* The generated notice shoudl show and include the information > from the illrequestattributes you picked. >--- > Koha/Illrequest.pm | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > >diff --git a/Koha/Illrequest.pm b/Koha/Illrequest.pm >index 723b11843e..f1423ada86 100644 >--- a/Koha/Illrequest.pm >+++ b/Koha/Illrequest.pm >@@ -1650,6 +1650,13 @@ sub get_notice { > push @metaarray, "- $key: $value" if $value; > } > my $metastring = join("\n", @metaarray); >+ >+ my $illrequestattributes = {}; >+ my $attributes = $self->illrequestattributes; >+ while ( my $attribute = $attributes->next ) { >+ $illrequestattributes->{$attribute->type} = $attribute->value; >+ } >+ > my $letter = C4::Letters::GetPreparedLetter( > module => 'ill', > letter_code => $params->{notice_code}, >@@ -1666,7 +1673,8 @@ sub get_notice { > ill_bib_title => $title ? $title->value : '', > ill_bib_author => $author ? $author->value : '', > ill_full_metadata => $metastring, >- additional_text => $params->{additional_text} >+ additional_text => $params->{additional_text}, >+ illrequestattributes => $illrequestattributes, > } > ); > >-- >2.30.2
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 32548
:
147157
|
149034
|
149035
|
149064
|
149065
|
149066
|
150400
|
150401
|
150402