The workflow for a staff member to accept the copyright clearance declaration defined in the ILLModuleCopyrightClearance preference is erroneous. It is only necessary for OPAC users to accept the declaration. (Currently this functionality is broken, see bug 20284). This bug is for the removal of the workflow step requiring staff members to accept the declaration.
Created attachment 73871 [details] [review] 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
Created attachment 74155 [details] [review] Bug 20548: Remove copyright clearance for staff 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. To test: 1) Ensure you have at least one ILL backend available: https://wiki.koha-community.org/wiki/ILL_backends 2) Ensure you have the "ILLModule" preference enabled 3) Add some text to the "ILLModuleCopyrightClearance" preference 4) As an OPAC user make an ILL request: a) Navigate to a search results page in the catalog b) Click the "Make an Interlibrary Loan request" link at the bottom c) Choose "Create a new request", then select a backend d) Observe the text you added earlier is displayed with buttons for agreeing or disagreeing 5) As a staff user, select the "ILL requests" button on the front page of the intranet site a) Choose "Create a new request", then select a backend b) Observe that you are NOT prompted to agree to the text you added earlier Assigned-to: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
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. To test: 1) Ensure you have at least one ILL backend available: https://wiki.koha-community.org/wiki/ILL_backends 2) Ensure you have the "ILLModule" preference enabled 3) Add some text to the "ILLModuleCopyrightClearance" preference 4) As an OPAC user make an ILL request: a) Navigate to a search results page in the catalog b) Click the "Make an Interlibrary Loan request" link at the bottom c) Choose "Create a new request", then select a backend d) Observe the text you added earlier is displayed with buttons for agreeing or disagreeing 5) As a staff user, select the "ILL requests" button on the front page of the intranet site a) Choose "Create a new request", then select a backend b) Observe that you are NOT prompted to agree to the text you added earlier Assigned-to: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Signed-off-by: Barry Cannon <bc@interleaf.ie>
Created attachment 74549 [details] [review] Remove copyright clearance for staff 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. To test: 1) Ensure you have at least one ILL backend available: https://wiki.koha-community.org/wiki/ILL_backends 2) Ensure you have the "ILLModule" preference enabled 3) Add some text to the "ILLModuleCopyrightClearance" preference 4) As an OPAC user make an ILL request: a) Navigate to a search results page in the catalog b) Click the "Make an Interlibrary Loan request" link at the bottom c) Choose "Create a new request", then select a backend d) Observe the text you added earlier is displayed with buttons for agreeing or disagreeing 5) As a staff user, select the "ILL requests" button on the front page of the intranet site a) Choose "Create a new request", then select a backend b) Observe that you are NOT prompted to agree to the text you added earlier Assigned-to: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Signed-off-by: Barry Cannon <bc@interleaf.ie>
Dependency in FQA
dependency is pushed, changing back to signed off.
Created attachment 79051 [details] [review] Bug 20548: Remove copyright clearance for staff 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. To test: 1) Ensure you have at least one ILL backend available: https://wiki.koha-community.org/wiki/ILL_backends 2) Ensure you have the "ILLModule" preference enabled 3) Add some text to the "ILLModuleCopyrightClearance" preference 4) As an OPAC user make an ILL request: a) Navigate to a search results page in the catalog b) Click the "Make an Interlibrary Loan request" link at the bottom c) Choose "Create a new request", then select a backend d) Observe the text you added earlier is displayed with buttons for agreeing or disagreeing 5) As a staff user, select the "ILL requests" button on the front page of the intranet site a) Choose "Create a new request", then select a backend b) Observe that you are NOT prompted to agree to the text you added earlier Assigned-to: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Signed-off-by: Barry Cannon <bc@interleaf.ie> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Andrew, did you notice the empty button (with and without the patch): https://snag.gy/9PQ5yL.jpg on /cgi-bin/koha/ill/ill-requests.pl?method=illview&illrequest_id=1
Hi Jonathan, this is actually a bug in master. I spotted it the other day but completely forgot to do anything about it, thanks for the reminder. It seems that at some point the "| html" filter was erroneously added to some variable declarations that weren't strings, these specifically: https://github.com/PTFS-Europe/koha/blob/master/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt#L483-L485 Since these variables are either hashrefs or arrayrefs, the filter breaks them, hence the problem you're seeing. I'll create a new bug and get them fixed.
A patch for this is now at https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21377
please add unit tests to cover this change. After applying: vagrant@kohadevbox:kohaclone(master)$ prove /home/vagrant/kohaclone/t/db_dependent/Illrequests.t /home/vagrant/kohaclone/t/db_dependent/Illrequests.t .. 4/11 Use of uninitialized value $backend_dir in join or string at /home/vagrant/kohaclone/Koha/Illrequest.pm line 665. # Failed test 'Backend create: copyright clearance.' # at /home/vagrant/kohaclone/t/db_dependent/Illrequests.t line 412. # Structures begin differing at: # $got->{value} = Does not exist # $expected->{value} = HASH(0x971d1e0) # Failed test 'Backend create: arbitrary stage.' # at /home/vagrant/kohaclone/t/db_dependent/Illrequests.t line 426. # Structures begin differing at: # $got->{stage} = 'commit' # $expected->{stage} = 'bar' Use of uninitialized value $stage in string eq at /home/vagrant/kohaclone/Koha/Illrequest.pm line 630. Use of uninitialized value in concatenation (.) or string at /home/vagrant/kohaclone/Koha/Illrequest.pm line 666. Use of uninitialized value in concatenation (.) or string at /home/vagrant/kohaclone/Koha/Illrequest.pm line 668. # Failed test 'Backend create: arbitrary stage, permitted.' # at /home/vagrant/kohaclone/t/db_dependent/Illrequests.t line 444. # Structures begin differing at: # $got->{permitted} = Does not exist # $expected->{permitted} = '1' # Looks like you failed 3 tests of 18. # Failed test 'Backend core methods' # at /home/vagrant/kohaclone/t/db_dependent/Illrequests.t line 534. # Looks like you failed 1 test of 11. /home/vagrant/kohaclone/t/db_dependent/Illrequests.t .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/11 subtests
Created attachment 79414 [details] [review] Bug 20548: (follow-up) Fix unit tests Removed the "Backend create: copyright clearance" unit test since we no longer have a "copyrightclearance" stage, hence we don't have a block in the template handling it, hence the test failure!
Thanks Nick. It actually required the removal of a test that is no longer applicable due to the original patch removing the code that it tested!
Created attachment 80243 [details] [review] Bug 20548: Remove copyright clearance for staff 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. To test: 1) Ensure you have at least one ILL backend available: https://wiki.koha-community.org/wiki/ILL_backends 2) Ensure you have the "ILLModule" preference enabled 3) Add some text to the "ILLModuleCopyrightClearance" preference 4) As an OPAC user make an ILL request: a) Navigate to a search results page in the catalog b) Click the "Make an Interlibrary Loan request" link at the bottom c) Choose "Create a new request", then select a backend d) Observe the text you added earlier is displayed with buttons for agreeing or disagreeing 5) As a staff user, select the "ILL requests" button on the front page of the intranet site a) Choose "Create a new request", then select a backend b) Observe that you are NOT prompted to agree to the text you added earlier Assigned-to: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Signed-off-by: Barry Cannon <bc@interleaf.ie> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Created attachment 80244 [details] [review] Bug 20548: (follow-up) Fix unit tests Removed the "Backend create: copyright clearance" unit test since we no longer have a "copyrightclearance" stage, hence we don't have a block in the template handling it, hence the test failure! Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Awesome work all! Pushed to master for 18.11
Pushed to 18.05.x for 18.05.05
Depends on Bug 20284 not in 17.11.x