Bugzilla – Attachment 183607 Details for
Bug 40262
ILL - Save the fact that copyright clearance has been confirmed by the patron
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40262: Save and display copyrightclearance_confirmed
Bug-40262-Save-and-display-copyrightclearanceconfi.patch (text/plain), 5.71 KB, created by
Pedro Amorim
on 2025-06-27 14:09:02 UTC
(
hide
)
Description:
Bug 40262: Save and display copyrightclearance_confirmed
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-06-27 14:09:02 UTC
Size:
5.71 KB
patch
obsolete
>From 0a7d718b81822b00796c45b1f844bc64b6756d67 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@openfifth.co.uk> >Date: Fri, 27 Jun 2025 14:04:54 +0000 >Subject: [PATCH] Bug 40262: Save and display copyrightclearance_confirmed > >Test plan, k-t-d: >1) Enable ILLModule >2) Add a new HTML customization, visit: ><staff_url>/cgi-bin/koha/tools/additional-contents.pl?op=add_form&category=html_customizations&editmode=wysiwyg >3) Pick ILLModuleCopyrightClearance as the 'Display location' >4) Pick a 'Publication date' in the past >5) Add a title and content. Save. >6) Create a new ILL request in the OPAC, visit: ><opac_url>/cgi-bin/koha/opac-illrequests.pl?op=add_form&backend=Standard >7) Notice the copyright clearance step is shown. Click 'Yes'. >8) Enter a 'type' and (optionally) some metadata. Click 'Create'. >9) Go back to the module in Staff UI and pick the request just created through the OPAC, visit: ><staff_url>/cgi-bin/koha/ill/ill-requests.pl >10) Notice the message 'Patron has confirmed copyright clearance for this request' is shown next to the patron in the the request details >--- > Koha/ILL/Backend/Standard.pm | 2 +- > Koha/ILL/Request.pm | 3 ++- > .../intranet-tmpl/prog/en/modules/ill/ill-requests.tt | 4 ++++ > .../en/includes/ill/backends/Standard/create.inc | 3 +++ > opac/opac-illrequests.pl | 8 ++++++++ > 5 files changed, 18 insertions(+), 2 deletions(-) > >diff --git a/Koha/ILL/Backend/Standard.pm b/Koha/ILL/Backend/Standard.pm >index 444c0074d97..4deb9a09d64 100644 >--- a/Koha/ILL/Backend/Standard.pm >+++ b/Koha/ILL/Backend/Standard.pm >@@ -149,7 +149,7 @@ sub metadata { > my $metadata = {}; > my @ignore = ( > 'requested_partners', 'type', 'type_disclaimer_value', 'type_disclaimer_date', 'unauthenticated_first_name', >- 'unauthenticated_last_name', 'unauthenticated_email', 'historycheck_requests' >+ 'unauthenticated_last_name', 'unauthenticated_email', 'historycheck_requests', 'copyrightclearance_confirmed' > ); > my $core_fields = _get_core_fields(); > while ( my $attr = $attrs->next ) { >diff --git a/Koha/ILL/Request.pm b/Koha/ILL/Request.pm >index 9b151e3924c..ccc41a0e7c9 100644 >--- a/Koha/ILL/Request.pm >+++ b/Koha/ILL/Request.pm >@@ -1084,7 +1084,8 @@ sub backend_create { > } elsif ( defined $params->{stage} > && $params->{stage} eq 'copyrightclearance' ) > { >- $params->{stage} = 'init'; >+ $params->{copyrightclearance_confirmed} = 1; >+ $params->{stage} = 'init'; > } > } > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >index 26ba077ed94..d958b0b8e3c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >@@ -606,6 +606,10 @@ > <span class="label borrowernumber">Patron:</span> > [% borrowerlink = "/cgi-bin/koha/members/moremember.pl" _ "?borrowernumber=" _ request.patron.borrowernumber %] > <a href="[% borrowerlink | url %]" title="View borrower details"> [% request.patron.firstname _ " " _ request.patron.surname _ " [" _ request.patron.cardnumber _ "]" | html %] </a> >+ [% copyrightclearance_confirmed = request.extended_attributes.find({'type'=>'copyrightclearance_confirmed'}).value %] >+ [% IF copyrightclearance_confirmed %] >+ <i class="fa fa-fw fa-check text-success" aria-hidden="true"></i> <span class="tab-title">Patron has confirmed copyright clearance for this request</span> >+ [% END %] > </li> > [% END %] > [% IF request.biblio_id %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/create.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/create.inc >index 4ef7691762b..1fb4d3df9b5 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/create.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/create.inc >@@ -124,6 +124,9 @@ > <input id="ill-submit" class="btn btn-primary" type="submit" value="Create" /> > <a class="cancel" href="/cgi-bin/koha/opac-illrequests.pl">Cancel</a> > </fieldset> >+ [% IF (whole.value.other.copyrightclearance_confirmed) %] >+ <input type="hidden" name="copyrightclearance_confirmed" value="1" /> >+ [% END %] > <input type="hidden" name="op" value="cud-create" /> > <input type="hidden" name="stage" value="form" /> > <input type="hidden" name="backend" value="Standard" /> >diff --git a/opac/opac-illrequests.pl b/opac/opac-illrequests.pl >index 27b853a64f4..8c3e9b4b315 100755 >--- a/opac/opac-illrequests.pl >+++ b/opac/opac-illrequests.pl >@@ -230,6 +230,14 @@ if ( $op eq 'list' ) { > $session->flush; > print $query->redirect('/cgi-bin/koha/opac-illrequests-unauthenticated.pl'); > } else { >+ $request->extended_attributes( >+ [ >+ { >+ type => 'copyrightclearance_confirmed', >+ value => 1, >+ } >+ ] >+ ) if $params->{copyrightclearance_confirmed}; > print $query->redirect('/cgi-bin/koha/opac-illrequests.pl?message=2'); > exit; > } >-- >2.39.5
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 40262
:
183607
|
183662