Bugzilla – Attachment 73871 Details for
Bug 20548
Remove copyright clearance workflow from staff created ILL requests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug [20548] - [Remove copyright clearance workfl..]
Bug-20548---Remove-copyright-clearance-workfl.patch (text/plain), 4.93 KB, created by
Andrew Isherwood
on 2018-04-09 14:12:11 UTC
(
hide
)
Description:
Bug [20548] - [Remove copyright clearance workfl..]
Filename:
MIME Type:
Creator:
Andrew Isherwood
Created:
2018-04-09 14:12:11 UTC
Size:
4.93 KB
patch
obsolete
>From 6a8741fef3b9e5a3d4c10d334368a9c0312ab89c Mon Sep 17 00:00:00 2001 >From: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> >Date: Mon, 9 Apr 2018 15:04:35 +0100 >Subject: [PATCH] Bug [20548] - [Remove copyright clearance workfl..] > >This patch removes the erroneously added workflow that requires staff >users to agree to the copyright clearance declaration defined in the >ILLModuleCopyrightClearance preference. Only OPAC users should be >required to accept the declaration. > >TEST PLAN >--------- > >- Ensure you have at least one ILL backend available: > https://wiki.koha-community.org/wiki/ILL_backends >- Ensure you have the "ILLModule" preference enabled >- Add some text to the "ILLModuleCopyrightClearance" preference >- As an OPAC user make an ILL request: > - Navigate to a search results page in the catalog > - Click the "Make an Interlibrary Loan request" link at the bottom > - Choose "Create a new request", then select a backend > - TEST: Check the text you added earlier is displayed with buttons for > agreeing or disagreeing >- As a staff user, select the "ILL requests" button on the front page of >the intranet site > - Choose "Create a new request", then select a backend > - TEST: Check that you are NOT prompted to agree to the text you added > earlier >--- > Koha/Illrequest.pm | 33 +++++++++++----------- > .../prog/en/modules/ill/ill-requests.tt | 14 +-------- > opac/opac-illrequests.pl | 1 + > 3 files changed, 19 insertions(+), 29 deletions(-) > >diff --git a/Koha/Illrequest.pm b/Koha/Illrequest.pm >index 99b97bdbe4..cc61a870e5 100644 >--- a/Koha/Illrequest.pm >+++ b/Koha/Illrequest.pm >@@ -600,23 +600,24 @@ sub backend_create { > my ( $self, $params ) = @_; > > # Establish whether we need to do a generic copyright clearance. >- if ( ( !$params->{stage} || $params->{stage} eq 'init' ) >- && C4::Context->preference("ILLModuleCopyrightClearance") ) { >- return { >- error => 0, >- status => '', >- message => '', >- method => 'create', >- stage => 'copyrightclearance', >- value => { >- backend => $self->_backend->name >- } >- }; >- } elsif ( defined $params->{stage} >- && $params->{stage} eq 'copyrightclearance' ) { >- $params->{stage} = 'init'; >+ if ($params->{opac}) { >+ if ( ( !$params->{stage} || $params->{stage} eq 'init' ) >+ && C4::Context->preference("ILLModuleCopyrightClearance") ) { >+ return { >+ error => 0, >+ status => '', >+ message => '', >+ method => 'create', >+ stage => 'copyrightclearance', >+ value => { >+ backend => $self->_backend->name >+ } >+ }; >+ } elsif ( defined $params->{stage} >+ && $params->{stage} eq 'copyrightclearance' ) { >+ $params->{stage} = 'init'; >+ } > } >- > # First perform API action, then... > my $args = { > request => $self, >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 aab9a75346..74f8c399a1 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 >@@ -315,19 +315,7 @@ > > [% IF query_type == 'create' %] > <h1>New ILL request</h1> >- [% IF whole.stage == 'copyrightclearance' %] >- <div> >- <p> >- [% Koha.Preference('ILLModuleCopyrightClearance') %] >- </p> >- <a href="?method=create&stage=copyrightclearance&backend=[% whole.value.backend %]" >- class="btn btn-sm btn-default btn-group"><i class="fa fa-check">Yes</i></a> >- <a href="/cgi-bin/koha/ill/ill-requests.pl" >- class="btn btn-sm btn-default btn-group"><i class="fa fa-times">No</i></a> >- </div> >- [% ELSE %] >- [% PROCESS $whole.template %] >- [% END %] >+ [% PROCESS $whole.template %] > > [% ELSIF query_type == 'confirm' %] > <h1>Confirm ILL request</h1> >diff --git a/opac/opac-illrequests.pl b/opac/opac-illrequests.pl >index 110898d2ba..a14e04e449 100755 >--- a/opac/opac-illrequests.pl >+++ b/opac/opac-illrequests.pl >@@ -111,6 +111,7 @@ if ( $op eq 'list' ) { > $params->{cardnumber} = Koha::Patrons->find({ > borrowernumber => $loggedinuser > })->cardnumber; >+ $params->{opac} = 1; > my $backend_result = $request->backend_create($params); > if ($backend_result->{stage} eq 'copyrightclearance') { > $template->param( >-- >2.11.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 20548
:
73871
|
74155
|
74549
|
79051
|
79414
|
80243
|
80244