koha.git
4 years agoBug 25009: [18.11.x] Add missing biblio_metadata stuffs 18.11.x v18.11.16
Jonathan Druart [Wed, 22 Apr 2020 13:06:16 +0000]
Bug 25009: [18.11.x] Add missing biblio_metadata stuffs

It adds methods, DBIC rs and Exceptions class for biblio metadata.

Note that schema is marcflavour in 18.11

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoUpdate release notes for 18.11.16 release
Hayley Mapley [Wed, 22 Apr 2020 01:05:03 +0000]
Update release notes for 18.11.16 release

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoIncrement version for 18.11.16 release
Hayley Mapley [Wed, 22 Apr 2020 00:42:55 +0000]
Increment version for 18.11.16 release

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoTranslation updates for Koha 18.11.16
Koha translators [Wed, 22 Apr 2020 00:29:48 +0000]
Translation updates for Koha 18.11.16

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 25009: Avoid leakages in opac-showmarc.pl
Tomas Cohen Arazi [Fri, 27 Mar 2020 21:16:58 +0000]
Bug 25009: Avoid leakages in opac-showmarc.pl

This patch cleans opac-showmarc.pl so it doesn't allow retrieving
records from import batches without requiring any permissions in the
OPAC.

it does so by just removing the code portion that does that.

It also cleans the record fetch operation and how the record processor
is initialized to it actually works :-D

To test:
1. Perform a successful Z39.50 search in cataloguing (this fetches 20
   records usually)
2. Query your DB for a valid import_record_id:
  $ koha-mysql kohadev
  > SELECT * FROM import_records LIMIT 1;
3. Notice some of the MARCXML details (title, author, etc), and the
   import_record_id
4. Point your browser to the opac-showmarc.pl URL like this:
   http://kohadev.mydnsname.org:8080/cgi-bin/koha/opac-showmarc.pl?importid=20
=> FAIL: You get the record! (Bonus: no field/subfield takes place)
5. Hide some obvious subfield on the framework for a known (to you)
   biblionumber
6. Point your browser to:
   http://kohadev.mydnsname.org:8080/cgi-bin/koha/opac-showmarc.pl?id=<biblionumber_here>
=> FAIL: No filtering takes place
7. Apply this patch
8. Repeat 4
=> SUCCESS: You get an error because you did a bad request (no id param)
9. Repeat 6
=> SUCCESS: Subfield filtering actually works!
10. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit d3ba9dc0fe423347f0e0e90b66be3ebeb7a6dec1)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 25142: Fix wrong grep logical test
Jonathan Druart [Tue, 14 Apr 2020 11:22:44 +0000]
Bug 25142: Fix wrong grep logical test

To test and understand what's going on, you can try that bit of code:
my @a = qw( a b c a);
my @b = qw( b c d );
my @c;
@c = grep { 'a' eq $_ } @a ? 'ok' : ();
say @c;
@c = ( grep { 'a' eq $_ } @a ) ? 'ok' : ();
say @c;
@c = grep { 'a' eq $_ } @a ? ('ok') : (undef);
say @c;

The problem here:
Have patrons in 3 branches CPL, MPL, SPL
Have a non superlibrarian with edit_borrowers permission but
without view_borrower_infos_from_any_libraries, from CPL
Create a library group with CPL, MPL
Use that non superlibrarian to search for patrons
You can search for patrons fro CPL and MPL
BUT, edit the value for CPL, use SPL (edit the DOM)
Search and... oops

Apply this patch, try again

Also use a superlibrarian patron (and/or with view_borrower_infos_from_any_libraries)
and confirm that they can see all patrons

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested with edit_borrowers permission but NOT view_borrower_infos_from_any_libraries
Editing the DOM I can search (not edit) from any branch
With patch no entries found :)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Amended test plan slightly (+ without)

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit c33f598c5cdea829390660419498e15f968f9abe)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 16922: Add RewriteRule to apache-shared-intranet for dev package installs
Marcel de Rooy [Thu, 14 Jul 2016 11:51:21 +0000]
Bug 16922: Add RewriteRule to apache-shared-intranet for dev package installs

As a simple alternative to the solution in bug 9949 or just as an
additional measure, this patch adds a rewrite rule for intranet
in order to intercept potential misuse of perl scripts that could be
reached on a dev package install via the cgi-bin/koha scriptalias.

It simply rewrites them to the nonexistent "notfound", resulting in a
regular 404 error.

The rewrite rule does not harm regular installs and is just a little extra
step in securing a dev install. You should have more security measures in
place to secure your staff client.

QA Note: Although a rewrite rule may not be our first choice, this one
rule is more elegant and easier to maintain than e.g. a whole bunch of
aliases.

Note: This patch should have a regular and a dev install signoff.

Test plan:
[1] Make sure that this rewrite rule is inserted in your actual apache
    config via /etc/koha/apache-shared-intranet.conf. Restart Apache.
[2] For regular package installs:
    Try one of the URLs in step 3.
    Verify that your staff client still operates as usual. Test a few
    URLs inside some modules.
[3] For dev installs:
    Try some URLs like below.
    Expect 404 errors only, not 500s. If you do not see a 404, go back!
    /misc/stage_file.pl
    /t/db_dependent/default_search_class.pl
    /installer/data/mysql/updatedatabase.pl
    /Makefile.PL
[4] Do you see an additional directory to add to the regex? Please report.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 3401e94d942a8d8a4e216ea44bd295f96b8f3e24)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24324: Resolve error with delete_records_via_leader.pl
Liz Rea [Fri, 3 Jan 2020 21:18:27 +0000]
Bug 24324: Resolve error with delete_records_via_leader.pl

To test:

Have a record with the 000 position 5 set to "deleted" (record status)
Use koha-shell to run the job with the -i flag: perl misc/cronjobs/delete_records_via_leader.pl -c -i -v
* items and the record should be deleted
Mark another record with the 000 position 5 set to deleted (record status)
Use koha-shell to run the job without the -i flag: perl misc/cronjobs/delete_records_via_leader.pl -c -v
* if the record had items, it will not be deleted
* if the record did not have items, it will be deleted.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit b713241845e8f730b46c756fa65c4ddd17ed746b)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24688: Check the priority of the fulfilled hold when fixing priorities
Aleisha Amohia [Thu, 20 Feb 2020 01:36:32 +0000]
Bug 24688: Check the priority of the fulfilled hold when fixing priorities

Currently when fixing priorities of existing holds, priorities aren't
fixed when checking out a middle priority hold because the hold has been
fulfilled and deleted. This patch adds a check for, if the hold can't be
found, an old hold with the required reserve_id.

To test:
1. Place at least four holds on a biblio for different borrowers
2. Check out an item to the 3rd priority borrower
3. Check the existing holds table for the biblio. The priorities might be
out of order, or try clicking the dropdowns and there might be an empty
dropdown option, or open the browser developer tools and notice the option
values in the select are missing value=3.
4. Apply patch and restart memcached
5. Check out an item to the 2nd priority borrower
6. Check the existing holds table for the biblio. Confirm the priorities
have been fixed and are now consecutive with no gaps.

Sponsored-by: Chartered Accountants Australia and New Zealand
Signed-off-by: Emmi Takkinen <emmi.takkinen@outlook.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit b17c16f9106eb159a1690da80a2a46b1f3a165ab)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d29f435e2676e104ae84bac840924c48f54b5568)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24870: Translate installer data label
Bernardo Gonzalez Kriegel [Sun, 15 Mar 2020 00:00:24 +0000]
Bug 24870: Translate installer data label

This patch enable the translation of the
labels 'Mandatory' or 'Optional' present at install time
for groups of installer files.

To test:
1) Try install using de-DE language,
   at step3 verify 'Mandatory' and 'Optional'
   labels for marc21 or other data checklist
   Do not close this window!
2) Apply this patch
3) Update de-DE translation files, reinstall lang files
   cd misc/translator
   ./translate update de-DE
   ./translate install de-DE
4) Reload page at step3, now 'Mandatory' label
is translated to 'Pflichtfeld'
5) Verify strings in translation file
Search for
^msgid \"Mandatory\"
^msgid \"Optional\"
in po/de-DE-staff-prog.po.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 1adc4986e9d2f715f44ef4b99b5dece79845f885)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 42bc9671ca47272258cecde2abccdef521a58b56)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 25020: Preserve time part when batch extending due dates
Jonathan Druart [Mon, 30 Mar 2020 14:11:51 +0000]
Bug 25020: Preserve time part when batch extending due dates

When selecting a new hard due date, we should keep the time part of the
original checkouts.

Test plan:
1 - Checkout an item specifying a date due
2 - Checkout an item without specifying a date due
3 - Use Tools->Batch extend due date
4 - Select a hard due date
5 - On the confirmation screen you should see that the time part has
been kept
6 - Confirm
7 - Make sure the correct values hava been inserted in DB
8 - Try now using the other option, give a number of days
9 - Repeat 4-7

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 5550da8a50dbb60fcad6ea2a43658938d1200803)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5d49c806445e00dd55259d805c7d88a73378e61f)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24838: Fix help link for patron categories
Andrew Fuerste-Henry [Wed, 11 Mar 2020 00:54:03 +0000]
Bug 24838: Fix help link for patron categories

To test:
- go to admin/categories.pl
- click Help, confirm it takes you to manual main page
- apply patch
- restart all
- click Help, confirm it takes you to patron categories in manual

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 5fbde57bbcb5c4035c6e7a5a7416ebbc407719e2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bacd18d29b1b2e5ceeb8ec7ca4a0dcbccd418d87)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24813: Prevent api/v1/holds.t to fail randomly
Jonathan Druart [Thu, 5 Mar 2020 15:27:15 +0000]
Bug 24813: Prevent api/v1/holds.t to fail randomly

Hold cannot be suspended if found=W:
Koha::Hold->suspend_hold
 90     if ( $self->is_found ) {    # We can't suspend found holds

So when TestBuilder generate a hold with found=W the test fail.

A question however:
Why did not we have the correct exception displayed somewhere? That
would be much more helpful to find the problem!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit c405b03dd367adb7c1c274477865a7444f59c9e9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1993e98edf0c272d6d93e18292a5c8b79da4b458)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24798: smart-rules.tt has erroneous comments
Owen Leonard [Wed, 4 Mar 2020 18:29:24 +0000]
Bug 24798: smart-rules.tt has erroneous comments

This patch corrects a couple of invalid Template Toolkit comments in the
Circulation and Fines rules template.

To test, apply the patch and log into the staff client as an
administrator.

On the Circulation and Fines Rules page "View source" and look for
instances of the text "[#% Default branch %#]" There should be none.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] There is a theoretical difference between [% # and [%#. The latter
marks the whole directive as a comment and not just until EOL.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 1fbd4468642aa09b999b3baf014b6f3a0afd6df8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b791fabc939ace33aa915d3ae6e2480ce2901581)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 17464: Order deny,allow / Deny from all was deprecated in Apache 2.4 and is now...
David Cook [Mon, 13 Jan 2020 06:05:17 +0000]
Bug 17464: Order deny,allow / Deny from all was deprecated in Apache 2.4 and is now a hard error

Patch change Apache access control from 2.2 to 2.4 directives.

Test plan:
0. Apply patch
1. Build Koha from source
2. Copy or symlink koha-dev/etc/koha-httpd.conf into your relevant
Apache directory.
3. Reload Apache
4. Note a lack of syntax errors regarding the "Order" directive

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit c0422998f89daf82eb898ddb951d46df97a6f1e4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 97df645697f238f503d6afe1105d203eacd6fc51)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24747: Corrects on-screen instructions in branch transfer limits
Andrew Fuerste-Henry [Thu, 27 Feb 2020 20:09:02 +0000]
Bug 24747: Corrects on-screen instructions in branch transfer limits

To test:
1- go to cgi-bin/koha/admin/branch_transfer_limits.pl
2- see wording "Check the boxes for the libraries you accept to checkin items from"
3- apply patch
4- see wording "Check the boxes for the libraries you allow your items to be transferred to"

To verify new wording accuractely describes behavior:
1- Set UseBranchTransferLimits set to Enforce using itemtype
2- Confirm circ rules allow holds
3- Confirm hold policy by item type allows holds
4- Confirm all branches are valid pickup locations in branch setup
5- In Branch Transfer Limits, set dropdown to Branch A, select itemtype Book, disable all transfers so Branch A does not accept books from any other branch
6- Find a patron from Branch A
7- Find a book from Branch B
8- On the intranet, successfully place hold on item for patron for pickup at branch A
9- Cancel hold
10- Log into opac as patron
11- Successfully place hold on item for pickup at Branch A
12- Cancel hold
13- In Branch Transfer Limits, set dropdown to Branch A, select itemtype Book, ENABLE all transfers so Branch A DOES accept books from any other branch
14- In Branch Transfer Limits, set dropdown to Branch B, select itemtype Book, disable all transfers so Branch B does not accept books from any other branch
15- On the intranet, try to place a hold on item for patron, confirm Branch B is your only pickup option
16- On the OPAC, log in as patron, try to place a hold on item, confirm Branch B is your only pickup option

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 84026f258909e1203f34793a1089388cd933d1c9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 67a4e40f5cd1866d5ed27f211800731bd4c14764)

4 years agoBug 24733: created_by param should be an arrayref
Nick Clemens [Wed, 26 Feb 2020 03:16:26 +0000]
Bug 24733: created_by param should be an arrayref

We allow for the user to add multiple users to this field, and the
search function expects and array. We have been treating it as a scalar

TO test:
1 - Have an open basket in acquisitions
2 - Add to basket - from an existing order (copy)
3 - Enter a name in the 'Basket created by' field and select a user
4 - Hit search
5 - ISE (Can't use string ("1") as an ARRAY ref while "strict refs" in use at /usr/share/koha/lib/C4/Acquisition.pm line 2482.)
6 - Apply patch
7 - Repeat 1-4
8 - Success!
9 - Test with mutiple 'created by' entries as well

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 789866e585be0a5c439559383325cbe4db525412)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 63374a8db6f759c8bb3e9b6ca1029ad07d2bb938)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24673 (18.11.x U18 follow-up): Fixing t/db_dependent/Koha/XSLT/Security.t
Hayley Mapley [Tue, 14 Apr 2020 04:00:40 +0000]
Bug 24673 (18.11.x U18 follow-up): Fixing t/db_dependent/Koha/XSLT/Security.t

The test t/db_dependent/Koha/XSLT/Security.t failed on Jenkins for U18
when this bug's patches were backported, due to it returning a different
IO error message for XSLT.

This patch adds a condition to the regex which matches both messages:
'Failed to load external entity' and 'Failed to load HTTP resource'

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24605: (QA follow-up) Fix unencoded series link in staff interface
Katrin Fischer [Sun, 23 Feb 2020 21:25:00 +0000]
Bug 24605: (QA follow-up) Fix unencoded series link in staff interface

Same change as the first patch, but for the staff detail page.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 6298eafa642529283ed82f72638bb434762a2c15)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0870bb6da6191759512e8b7a29ebe7a2f169ee62)

4 years agoBug 24605: Fix unencoded series link
Nick Clemens [Thu, 6 Feb 2020 17:45:07 +0000]
Bug 24605: Fix unencoded series link

To test:
1 - Add an 830 to a record with a volume subfield separated by a semicolon
    830$aThe series ;$vvol 8.
2 - View the record in the opac
3 - Click the series link, no results
4 - View the link url - the semicolon is not encoded
5 - Apply patch
6 - link works
7 - URL is corrrectly encoded

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit e3cffae41f82fb22100bcf269696107cb102660e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e94543c454e1de6688f910515885757f1b467caf)

4 years agoBug 24809: (QA follow-up) Add prefix to prevent disambiguity
Marcel de Rooy [Fri, 20 Mar 2020 10:12:24 +0000]
Bug 24809: (QA follow-up) Add prefix to prevent disambiguity

This seems not to be needed. Just at the safe side.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 96e6362ab721621dd7e24d6f8a56d168e2a9b497)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 27be06c67281bf24df755c67e305da420c11eac8)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24809: Get only timestamp of deleted items attached to existing bibs when check...
Nick Clemens [Thu, 5 Mar 2020 10:59:22 +0000]
Bug 24809: Get only timestamp of deleted items attached to existing bibs when check if bib deleted

To test:
 1 - Edit/create a file in the koha home dir '/var/lib/koha/{instance}/OAI.yaml' with content like below:
format:
  marcxml:
    metadataPrefix: marcxml
    metadataNamespace: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim
    schema: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd
    include_items: 1
 2 - Set the systempreferences below to indicated values:
  OAI-PMH => Enable
  OAI-PMH:ConfFile => /var/lib/koha/{instace}/OAI.yaml
 3 - View a record with items and confirm the items show:
  http://localhost:8080/cgi-bin/koha/oai.pl?verb=GetRecord&metadataPrefix=marcxml&identifier=KOHA-OAI-TEST:4
 4 - Delete the items, then delete the record
 5 - Reload the URL from step 3
 6 - Internal Server Error:
  Empty String at /kohadevbox/koha/Koha/OAI/Server/Record.pm line 58.
    at /usr/share/perl/5.24/Carp.pm line 167
 7 - Apply patch
 8 - restart_all
 9 - Repeat
10 - Reload URL from step 3
11 - Success

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 68488f40558d66b7e4e444c1ed57a260b33ee034)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d474a4edb165d7116b5bfc459d33e04cc88ca456)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24527: misc/cronjobs/update_totalissues.pl problem with multiple items
Fridolin Somers [Tue, 28 Jan 2020 15:09:20 +0000]
Bug 24527: misc/cronjobs/update_totalissues.pl problem with multiple items

misc/cronjobs/update_totalissues.pl when issuing statistics table, no-incremental,  has a problem for biblio with multiple items.
The first SQL query gets the biblios linked to items with issues in statistics :

SELECT
  biblio.biblionumber, COUNT(statistics.itemnumber)
FROM
  biblio
LEFT JOIN
  items
ON
  (biblio.biblionumber=items.biblionumber)
LEFT JOIN
  statistics
ON
  (items.itemnumber=statistics.itemnumber)
WHERE
  statistics.type = 'issue'
$limit
GROUP BY
  biblio.biblionumber

The second SQL query is :
SELECT
  biblio.biblionumber, 0
FROM
  biblio
LEFT JOIN
  items
ON
  (biblio.biblionumber=items.biblionumber)
LEFT JOIN
  statistics
ON
  (items.itemnumber=statistics.itemnumber)
WHERE
  statistics.itemnumber IS NULL
GROUP BY
  biblio.biblionumber

The problem is that this second query will set to 0 where ANY item has no entry in statistics table.
So when running it sets 0 to the biblio that had a value from first
query.

I think the best fix is to use "WHERE statistics.type = 'issue'" inside que JOIN :
LEFT JOIN statistics ON (items.itemnumber=statistics.itemnumber AND statistics.type = 'issue')

Test plan :
1) Begin with an empty database
2) Create a biblio 1 with no items
3) Create a biblio 2 with 3 items
4) Create a biblio 3 with 2 items
5) Checkout and checkin all items of biblio 2
6) Checkout and checkin the firt item of biblio 3
7) run misc/cronjobs/update_totalissues.pl --use-stats -v
8) Check biblio 1 has biblioitems.totalissues = 0
9) Check biblio 2 has biblioitems.totalissues = 3
10) Without patch the biblio 3 has biblioitems.totalissues = 0
11) With patch the biblio 3 has biblioitems.totalissues = 1
12) Check misc/cronjobs/update_totalissues.pl --incremental is OK

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 91da9841d78d26db205c6493c27c174c20e7b7c2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f6d61ce5e07c633143843604722f29b0d92d8fce)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24711: Don't add logout input to login form
Nick Clemens [Fri, 21 Feb 2020 21:11:37 +0000]
Bug 24711: Don't add logout input to login form

To test:
1 - Set OpacPublic syspref to 'Disable'
2 - Log in to OPAC
3 - Log out
4 - Try to log in again
5 - No error, but you get the login form again
6 - Apply patch
7 - Repeat
8 - This time you can log in again

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit a137b170c0f4bac8fdd69dd4e9fe6e46c60edd59)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c188cf91a0c66196620f1efeeea8e39ae30da182)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 23968: Add div this id around OPACMySummaryNote content
Fridolin Somers [Tue, 5 Nov 2019 08:55:25 +0000]
Bug 23968: Add div this id around OPACMySummaryNote content

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cffa7623e13d8a21e66f5c9dc8caaa5668738411)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit faed28348d4bdc0bcd9639b3c38208960ac5fb7f)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 23968: fix OPACMySummaryNote feature
Fridolin Somers [Tue, 5 Nov 2019 08:52:59 +0000]
Bug 23968: fix OPACMySummaryNote feature

The system preference OPACMySummaryNote is used to display on the logged-in patron summary page at OPAC.
It does not display anymore.

Looks like it comes from code :
[% IF OPACMySummaryNote %][% Koha.Preference('OPACMySummaryNote') | $raw %][% END %]
OPACMySummaryNote used to be a provided variable.

Test plan:
1) Enable system preference OPACMySummaryNote
2) Enter some HTML into it
3) Go to OPAC and loggin
4) Check you see the HTML in opac-user.pl
5) Disable the preference
6) Check you dont see the HTML anymore

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d5c501bf63f9d42bc9d872eef391c0864753c8ba)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0f75bffeeb7d6518a707dc800e7d12091946706b)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24846: DBRev 18.11.15.001
Hayley Mapley [Thu, 26 Mar 2020 22:25:34 +0000]
Bug 24846: DBRev 18.11.15.001

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24846: Update items.onloan with the new due date
Jonathan Druart [Tue, 17 Mar 2020 15:59:44 +0000]
Bug 24846: Update items.onloan with the new due date

Signed-off-by: Donna Bachowski <donna@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit b56562f2d0fe466dee2bc5c22f3753b140477a13)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 50cc72db58ace16f5603496148cf43eb5beaafec)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24846: Add new tool to batch extend due dates
Jonathan Druart [Mon, 16 Mar 2020 10:45:44 +0000]
Bug 24846: Add new tool to batch extend due dates

With events sometimes leading to unforeseen branch closures (think Coronavirus as
an example), it would be helpful to have a tool that would allow librarians to
update due dates in bulk based on branch and current due date of the material.

It allows to select checkouts given the following parameters:
 * libraries
 * patron's categories
 * range of the due date

You can set a hard due date, or define a number of days to extend the
due date.

Test plan:
Check some items out
Use the new tool to extend the due dates
Test the different filters to make sure they all work

Note: What about holidays?

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 0ff5dc25ffac4c13c68b8a2db9046e844f23d028)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7b0d904f88c99fe15c1e0be6d386fc56ffd983eb)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24846: Link to the new tool
Jonathan Druart [Mon, 16 Mar 2020 10:51:10 +0000]
Bug 24846: Link to the new tool

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 32e5ec841a748249462189846c267a5078febe81)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ceecc18c2ec73f91c54b744784d58e38dc328b41)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24846: Add new permission batch_extend_due_dates
Jonathan Druart [Mon, 16 Mar 2020 10:45:15 +0000]
Bug 24846: Add new permission batch_extend_due_dates

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bb6c483a245a229a77c6726ddebb2f4484f6c2a0)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24673: Add CSRF token support to opac-messaging.pl v18.11.15
David Cook [Mon, 17 Feb 2020 06:50:49 +0000]
Bug 24673: Add CSRF token support to opac-messaging.pl

This patch adds CSRF token support to opac-messaging.pl,
which allows users to manually update their messaging preferences,
but prevents bad actors from tricking people into updating their
preferences from cross-site requests.

Test plan:
0. Set SMSSendDriver global system preference to "Test" if unset
1. Log into the OPAC
2. Navigate to a URL in your browser like the following:
http://localhost:8080/cgi-bin/koha/opac-messaging.pl?modify=yes
&1=email&digest=1&2-DAYS=5&2=email&digest=2&4=email&SMSnumber=0444444444
3. Observe that the preference and SMS number update

4. Apply the patch

5. Navigate to a URL in your browser like the following:
http://localhost:8080/cgi-bin/koha/opac-messaging.pl?modify=yes
&1=email&digest=1&2-DAYS=5&2=email&digest=2&4=email&SMSnumber=0444444444
6. Observe that you get an error message of "Wrong CSRF token" instead
of the previous behaviour
7. Navigate to a URL in your browser like the following:
http://localhost:8080/cgi-bin/koha/opac-messaging.pl
8. Update "Advance notice" to 3 and update "SMS number" to 61111111111
9. Observe that the "Advance notice" and "SMS number" fields update
correctly

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 35cdeadbdfbf75731688f71778756aab73ffb824)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24878: Add auth check for copy-holidays
Jonathan Druart [Tue, 17 Mar 2020 10:37:12 +0000]
Bug 24878: Add auth check for copy-holidays

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 6ef4c45b845b67326e1b115f3c13986135c96222)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24878: Add authentication checks to the calendar tool
Jonathan Druart [Mon, 16 Mar 2020 15:26:48 +0000]
Bug 24878: Add authentication checks to the calendar tool

There is a security hole in 2 scripts that are used by the UI to edit
holidays.

To test:
1) Go to Tools -> Calendar, for Centerville
   Check no holiday for 30/4/2020
2) To add a new holiday without login execute
   a curl command with necessary parameters
3) Reload page from 1), verify the new holiday
   edit and delete the holiday
4) Apply the patch
5) Do 2) again, this time you get a lengthy output,
   with the magic words:

   <title>Koha &rsaquo;
       Log in to Koha
   </title>

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Only tested newHoliday but the fix is the same.
No errors

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 656e7814b34d07534fa3a044f9cc7a8f4f4feea6)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoUpdate release notes for 18.11.15 release
Hayley Mapley [Mon, 23 Mar 2020 20:39:28 +0000]
Update release notes for 18.11.15 release

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoIncrement version for 18.11.15 release
Hayley Mapley [Mon, 23 Mar 2020 20:02:15 +0000]
Increment version for 18.11.15 release

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoTranslation updates for Koha 18.11.15
Koha translators [Mon, 23 Mar 2020 19:43:57 +0000]
Translation updates for Koha 18.11.15

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24389: Better error handle when claiming late orders
Jonathan Druart [Mon, 16 Dec 2019 16:15:19 +0000]
Bug 24389: Better error handle when claiming late orders

A successful message says that the email has been sent and the order has
been claimed, but nothing happened.

Test plan:
0. Do not apply this patch
1. Create a new vendor, does not create a contact
2. Create some orders, close the basket
3. Go to the late orders page and claims some orders
=> You get a successful message, but the claim has not been done!
4. Apply this patch
5. Claim the orders
=> You get an error
6. Set a contact for the vendor
7. Claim the orders
=> Success

In the docker container, you may need to:
% apt install postfix
% postfix start
Edit /etc/hosts
127.0.0.1       localhost localhost.localdomain

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit c2c7c6e754c0cf44ce0f99798f5115731a61868e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5bccfa152ab90183e84b7e5b03536b05efc71abd)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 21296: [18.11.x] Fix wrong resolution conflict
Jonathan Druart [Mon, 16 Mar 2020 15:56:13 +0000]
Bug 21296: [18.11.x] Fix wrong resolution conflict

On
  commit a230878b6f3d3afa5d7f33c9d816bd6272c5b1a1
  Bug 21296: suspend hold ignores system preference on intranet

See comment 10.

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 21296: suspend hold ignores system preference on intranet
Owen Leonard [Wed, 20 Nov 2019 20:04:10 +0000]
Bug 21296: suspend hold ignores system preference on intranet

This patch modifies the DataTable configuration for the table of holds
which displays under the "Holds" tab on the patron's checkout and
details pages. A variable is now defined in the JavaScript with the
value of the "SuspendHoldsIntranet" system preference. This variable is
passed to the DataTable configuration to determine whether the column is
visible or not.

One of the changes made in this patch moves a <script> block so that it
appears before some of the JS includes on the page. This helps keep the
string-defining JS together in one block.

To test, apply the patch and set the "SuspendHoldsIntranet" system
preference to "Allow."

 - Open the checkout page for a patron with one or more holds.
 - Under the "Holds" tab, the table of holds should have a "Suspend"
   column with controls for suspending or resuming holds.
 - Check that the same is true on the patron detail page.
 - Set the "SuspendHoldsIntranet" system preference to "Don't allow."
 - Test the checkout and detail pages again and confirm that the
   "Suspend" column does not appear.

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 541dfa7ddeec9fc72dd764165087dcfb601ddf07)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit cc87e68e0d1b90eed67ca2f614ca0f6a93b57054)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 23980: Revert "Bug 23229: Only load ILL table JS when needed"
Andrew Isherwood [Wed, 11 Dec 2019 11:10:26 +0000]
Bug 23980: Revert "Bug 23229: Only load ILL table JS when needed"

This reverts commit f95749a66bb5dad53fa2cf00224fc38f52c1e788.

https://bugs.koha-community.org/show_bug.cgi?id=23980

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Fixed commit title, no errors

Revised test plan:
- Do not apply the patch
- View koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt
- TEST: Verify that it includes a "jsinclude" block near the bottom of the template
- Apply the patch
- Re-open the template
- TEST: Verify that the "jsinclude" block is now gone

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 23980: Revert "Bug 23229: (QA follow-up) Fix indentation"
Andrew Isherwood [Wed, 11 Dec 2019 11:10:17 +0000]
Bug 23980: Revert "Bug 23229: (QA follow-up) Fix indentation"

This reverts commit d4676ff4532f41abec87ba2d1128e3f219d9c920.

https://bugs.koha-community.org/show_bug.cgi?id=23980

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Fixed commit title

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 23064: Use Koha::Subscription in ModSubscription
Jonathan Druart [Wed, 20 Nov 2019 11:22:58 +0000]
Bug 23064: Use Koha::Subscription in ModSubscription

We must use Koha::Subscription instead of raw SQL.
It will fix issue with default and integer values.

Test plan:
Edit a subscription and set number of issues = "f"
Save
=> Without this patch there is a SQL error in the log:
  Incorrect integer value: 'f' for column 'numberlength'
=> With this patch the other changes are effective.

Note: We also could change the type attribute of the input to "number",
to have a client-side check

Also, the return value of ModSuggestion is never used, so we are safe
with that.

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
The <strict_sql_modes> flag must be present and set to 1 in the <config> section of koha-conf.xml

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 23290: [RMaint version] Mitigate XML/XSLT vulnerabilities v18.11.14
Marcel de Rooy [Mon, 20 Jan 2020 09:55:52 +0000]
Bug 23290: [RMaint version] Mitigate XML/XSLT vulnerabilities

This is a squashed version for backporting to stable branches.
IMPORTANT: It does not move XSLT_Handler to XSLT/Base as in master.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d8bf40281b93faa944d48dddc52e418e588b01ec)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoUpdate release notes for 18.11.14 release
Hayley Mapley [Fri, 21 Feb 2020 01:06:36 +0000]
Update release notes for 18.11.14 release

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoIncrement version for 18.11.14 release
Hayley Mapley [Fri, 21 Feb 2020 00:36:45 +0000]
Increment version for 18.11.14 release

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoTranslation updates for Koha 18.11.14
Koha translators [Fri, 21 Feb 2020 00:46:58 +0000]
Translation updates for Koha 18.11.14

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 14759: Replace Text::Unaccent with Unicode::Normalize
Martin Renvoize [Wed, 8 Jan 2020 09:13:18 +0000]
Bug 14759: Replace Text::Unaccent with Unicode::Normalize

As shown in the comments on the bug, it appears that Unicode::Normalize
is the most reliable way to strip accents from strings for this use
case.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 27de0d61792d46e4fbf8bd8dba2d1d6f0a48c091)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 708fd8b4b12a954f80fc4630edef4d6fa1ef5c5e)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 14759: Add test
Jonathan Druart [Thu, 9 Jan 2020 15:17:12 +0000]
Bug 14759: Add test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit ad92c140587657a2cb2fb2fbd4c7ebce8dd15eb3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7ad9807353e43b4295364424c8da1106b370d41f)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24313: Always display XSLT errors in logs
Jonathan Druart [Fri, 27 Dec 2019 13:55:36 +0000]
Bug 24313: Always display XSLT errors in logs

From
  commit 295ae33800a322facfdf56795f4c02b2fd53432b
  Bug 20272: Replace error numbers by codes in XSLT_Handler

"""
    Make XSLT_Handler a little bit less noisy by defaulting print_warns to
    false unless $ENV{DEBUG} is set. (See also bug 19018).
"""

I think we should warn the errors in the logs. They are not debug messages here, we should not rely on DEBUG.
If too noisy we should fix the original issues, not hide all the errors (which make the XSLT debugging super hard)

Test plan:
Break a XSLT, reload the page and confirm that there are useful errors in the Koha log file

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit ec79582374c829049ebac891644fb9f6e30a9614)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8bcafbe3cfa15974b34c8bb8dc9d10f72205283e)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24016: (QA follow-up) Format code to adhere to perltidy format
Joonas Kylmälä [Tue, 17 Dec 2019 13:59:55 +0000]
Bug 24016: (QA follow-up) Format code to adhere to perltidy format

Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 3bfbf2589788474f0d37acc5d6df2d1fc7cc0005)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8ecc071915c4117a712d6b03cd34f6d20f9a0cb8)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24016: manager_id in Koha::Patron::Message->store should not depend on userenv...
Lari Taskula [Tue, 12 Nov 2019 12:18:27 +0000]
Bug 24016: manager_id in Koha::Patron::Message->store should not depend on userenv alone

Koha::Patron::Message->store has this

    my $userenv = C4::Context->userenv;
    $self->manager_id( $userenv ? $userenv->{number} : undef);

This breaks in REST API when userenv is not set.

Let API user pass manager_id without relying on C4::Context->userenv.

To test:
1. prove t/db_dependent/Koha/Patron/Messages.t
2. Observe success

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 49eac22b1f977b439e5d3f8f313dee3164719b60)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e13770ad11b4b504413ef020770cd15e8ee55bbc)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24016: Add a failing test for overwrite-able manager_id in Koha::Patron::Message
Lari Taskula [Tue, 12 Nov 2019 12:24:30 +0000]
Bug 24016: Add a failing test for overwrite-able manager_id in Koha::Patron::Message

To test:
1. prove t/db_dependent/Koha/Patron/Messages.t
2. Observe failure

t/db_dependent/Koha/Patron/Messages.t .. 2/12
   Failed test 'Manager id should be overwrite-able even if defined in userenv'
   at t/db_dependent/Koha/Patron/Messages.t line 90.
          got: '1100'
     expected: '1101'
 Looks like you failed 1 test of 12.
t/db_dependent/Koha/Patron/Messages.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/12 subtests

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit c74820c2273393825c73b90769424544579a1aae)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3d73723a9ff618d2d7b5685ce2ac969b27899d31)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 22302: Unit tests
Nick Clemens [Tue, 4 Feb 2020 14:15:36 +0000]
Bug 22302: Unit tests

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 91294e26237e60353dd36dae13029e9ee8d157cb)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dd5d08d66bf787eab865562e482a85b5f41a5df6)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 22302: Make ITEMTYPECAT descriptions fallback to lib description if no opac descr...
Nick Clemens [Tue, 4 Feb 2020 14:16:26 +0000]
Bug 22302: Make ITEMTYPECAT descriptions fallback to lib description if no opac description

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit b985cf5b88fa5e04e7b3dcca263e3c9ce4d0b27a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2a6c77f6aaba704e90fa8bc7976696233816ad50)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 9993: On editing basket group delivery place resets to logged in branch
Owen Leonard [Wed, 20 Nov 2019 17:00:52 +0000]
Bug 9993: On editing basket group delivery place resets to logged in branch

This patch modifies basketgroups.pl so that existing data about a basket
group's billing and delivery place are correctly preselected in the edit
form. These fields shouldn't reset to the logged-in user's home branch
just because they have an empty value.

To test, apply the patch and go to Acquisitions -> Vendor -> Basket
groups.

When adding or editing a basket group the pre-selected value for
"Billing place" and "Delivery place" should be correct:

   - When creating a new basket group: The logged-in user's library
     should be pre-selected.

   - When editing a basket group which has a library defined for either
     the billing or delivery places, the correct library should be
     pre-selected.

   - When editing a basket group which has no library defined for either
     the billing or delivery place there should be no library
     pre-selected (the "--" option should be pre-selected).

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 69afaa42391d358fac90a0fab8e00f1d10b75dc1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ed5e9732d9d078483918f594c9fdca7da737faec)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoRevert "Bug 24054: Typo in ClaimReturnedWarningThreshold system preference"
Hayley Mapley [Wed, 19 Feb 2020 20:41:31 +0000]
Revert "Bug 24054: Typo in ClaimReturnedWarningThreshold system preference"

This reverts commit 43a1e7600dda1c2612f33e2198fc160f6fa11b09.
Fixed typo in dependency which did not exist in 18.11.

4 years agoBug 24213: Fix Koha::Object->get_from_storage if the object has been deleted
Jonathan Druart [Wed, 11 Dec 2019 08:39:30 +0000]
Bug 24213: Fix Koha::Object->get_from_storage if the object has been deleted

Without this patch it fails with something like:
  DBIC result _type  isn't of the _type Subscription at t/db_dependent/Biblio.t line 627.

Test plan:
- Apply the first patch (Add tests)
- Confirm that they fail
- Apply this patch
- Confirm that the tests pass

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit a27c5c9dcd5f5f8cbe9af7b9b5ae0f73ac81b2cb)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f79f4dc5b1c78db56d43e097d5188aef49a75fe7)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24213: Add tests
Jonathan Druart [Wed, 11 Dec 2019 08:39:15 +0000]
Bug 24213: Add tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit d3462a97cc00ed882edf83cbb5b0fde3eeb9aabe)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f45c4b8f3a03e84e36bca002896cebbab8640bd8)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 22868: DBRev 18.11.13.001 (fix)
Hayley Mapley [Tue, 18 Feb 2020 01:11:00 +0000]
Bug 22868: DBRev 18.11.13.001 (fix)

Previous DBRev contained wrong version number in updatedatabase.pl.

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24330: When importing patrons from CSV, automatically strip BOM from file if...
Kyle M Hall [Thu, 2 Jan 2020 15:30:54 +0000]
Bug 24330: When importing patrons from CSV, automatically strip BOM from file if it exists

We have a partner that exports UTF-8 CSV files, and is experiencing the same thing as the author of this article: https://www.freecodecamp.org/news/a-quick-tale-about-feff-the-invisible-character-cd25cd4630e7/

In short, Excel is inserting an invisible UTF-8 character at the start of the file, so that the column name "cardnumber" is actually named "\x{feff}cardnumber", causing "cardnumber" to be blank.

A simple solution is provided here: https://stackoverflow.com/questions/24390034/remove-bom-from-string-with-perl

Test Plan:
1) Download the example.csv file
2) Attempt to import it using the patron import tool
3) Note the invalid column name error
4) Apply this patch, restart all the things!
5) Attempt the import again
6) Assuming you have a branchcode MPL and a cataegory code S, the patron should import!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Maggie Wong <maggie.wong@yccece.edu.hk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 91980f27a30b2f57c59ea0da955b697ed6a98528)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 40ae65e32655e555e30bafec874c7724638a64a0)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 23896: logaction should pass the correct interface to Koha::Logger
Marcel de Rooy [Fri, 25 Oct 2019 08:49:15 +0000]
Bug 23896: logaction should pass the correct interface to Koha::Logger

Trivial fix.

Test plan:
Run t/db../Log.t to ensure that we did not break stuff.
If you set opac to debug in log4perl config, inspect opac-error.log to see
if you have extra loglines from running the test script.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit b078794fcb1705769dd78e5b156b3def35d7e195)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 87eb710ad024da8a2018eba6442ed37d76a8bf98)

4 years agoBug 22868: DBRev 18.11.14.001
Hayley Mapley [Mon, 17 Feb 2020 21:19:08 +0000]
Bug 22868: DBRev 18.11.14.001

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 22868: Move suggestions_manage subperm out of acquisition perm
Jonathan Druart [Tue, 14 Jan 2020 09:02:11 +0000]
Bug 22868: Move suggestions_manage subperm out of acquisition perm

Bug 11911 replaced the permission of suggestions.pl (create a purchase
suggestion) from catalogue => 1 to acquisition => 'suggestions_manage'.
However we have a lot of acquisition scripts that have lax permissions
(acquisition => '*' which means any sub permissions of acquisition is
enough).

That causes problem when a circulation staff can create purchase
suggestions but not access acquisition information.

One solution is to move the suggestions_manage subpermission out of the
acquisition permission and create a new suggestion permission.

Test plan:
0. Setup
* Create a patron with several permission (and full acquisition
permission)
* Create another patron with several permission, and suggestions_manage
permission
* Create another patron without the suggestions_manage permission
1. Apply the patch and execute the update database entry
2. Note that the third patron you create still does not have
suggestions_manage
3. Confirm that you can create a purchase suggestion if you have
suggestions_manage, but cannot access acquisition pages if you do not
have any subpermissions of the acquisition permission

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 462db680242b4a6cbfb82b3469ebec8912e69af3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f0c60dfe6f53ef32b2046fdfd1e0732e1d89dd95)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 23113: members/pay.tt account_grp is not longer used
Owen Leonard [Tue, 7 Jan 2020 12:33:02 +0000]
Bug 23113: members/pay.tt account_grp is not longer used

This patch removes obsolete markup from pay.tt.

To test, apply the patch and search the Koha codebase for instances of
"account_grp" There should be none.

Log in to the staff client and go to the account of a patron who has
fines. Confirm that the "Accounting" page ("Make a payment" tab) works
correctly.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 39b9750f8e01d9a0f00eb2b939c5e70cd9c81294)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bd2d76f68b3c2d1330320bf771274d0d450ce60e)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24497: Turn off smartIndent for SQL
Lucas Gass [Fri, 24 Jan 2020 18:18:33 +0000]
Bug 24497: Turn off smartIndent for SQL

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit c9f03be65ad5da374ce453e5bdedc65bcfdcaab3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 527196aa8845f4da38a66bd4a1ec78721901dea5)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24061: Close after timeout if onafterprint no supported
Jonathan Druart [Fri, 22 Nov 2019 09:16:15 +0000]
Bug 24061: Close after timeout if onafterprint no supported

Not supported on Chrome < 63
https://www.w3schools.com/tags/ev_onafterprint.asp

Signed-off-by: Gabriel DeCarufel <gabriel@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit f01e98801daadd71ef9b57e3a0f2411a0bbf6625)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9052160d6016c98e94eb47c9f26902a0c1661764)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24061: Close the window after the page has been printed
Jonathan Druart [Wed, 20 Nov 2019 08:19:51 +0000]
Bug 24061: Close the window after the page has been printed

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 1bcff5d39f441c57ffc12fa596976e1a3d099ba1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a7b296fd2615724d8747c1aff5e0369fe66c0f50)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 17667: Do not modify quantity of the original standing order when a receipt is...
Jonathan Druart [Wed, 18 Dec 2019 17:10:15 +0000]
Bug 17667: Do not modify quantity of the original standing order when a receipt is cancelled

When cancelling a receipt, the quantity of the original order is
increased.

Test plan:
Create a basket, mark is as "standing orders"
Create an order
receive it
cancel the receipt
=> Without this patch the quantity of the original order is 2
=> With this patch applied the quantity it always 1

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 31832c35e3bfe71a58dce9359319cba9a6eaa159)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5c5afa4ffb0eb86face5692eec7a39bbd7cc3a6d)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24333: Add password class to AutoSelfCheck syspref
Nick Clemens [Thu, 9 Jan 2020 12:48:04 +0000]
Bug 24333: Add password class to AutoSelfCheck syspref

To test:
1 - Go to Administration
2 - Search sysprefs for AutoSelfCheck
3 - Enter something into AutoSelfCheckPass
4 - Note it is not masked
5 - Apply patch
6 - Reload page
7 - Note password is now masked

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 0941debbf67eaf95a9550c3a7891be3b34628d27)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9ac54d258155b1834a5133f4c704937a14f80cad)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 23528: Show 'log in to add tags' link on all search result entries
Owen Leonard [Fri, 11 Oct 2019 14:53:24 +0000]
Bug 23528: Show 'log in to add tags' link on all search result entries

This patch modifies the OPAC search result template so that each result
shows the "Log in to add tags" link instead of just the first.

To test, apply the patch and make sure TagsEnabled and TagsInputOnList
are both enabled.

Perform a search in the OPAC while not logged in. In the list of
results, the "Log in to add tags" link should appear with every result.

Log in to the OPAC and confirm that the "Add tag" link appears as
expected.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 04cd884d10a4b9b6a889c084d40b44742e3d7279)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 95d398d34b32c8b09c365e418ab7a580a14dd765)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24484: Add explanatory text to batch patron deletion
David Roberts [Thu, 23 Jan 2020 12:18:17 +0000]
Bug 24484: Add explanatory text to batch patron deletion

This patch adds a more detailed explanation about what the tool can do.

To test:

1) Open up the Batch patron deletion and anonymisation tool
2) Check the help text near the top of the screen
3) Install the patch and repeat steps 1 and 2
4) Check the help text has changed to the new version

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 8b98dfa41d6004e6d6204c682b23043cb314e623)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a4b63af5dc4f1662ed46c6743029d1d33dfbbac0)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24423: Add biblionumber to modify items link
Nick Clemens [Wed, 15 Jan 2020 15:27:56 +0000]
Bug 24423: Add biblionumber to modify items link

To test:
- Find/create a bib with at least one item
- From detail.pl, use the checkboxes in the holdings table to select one or more items
- click the "Modify Selected Items" link just above the holdings table to take your item(s) to batch modification
- Change something and click save
- Observe that the Return to the Record link points to a url without a biblionumber: "/cgi-bin/koha/catalogue/detail.pl?biblionumber="
- Apply patch
- Repeat
- The link now works!

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: David Nind <david@davidnind.com>

Bug 24423: Fix for deletion - cleanup accidental debug inclusiopm

To test:
Repeat prior test plan with 'Delete selected'

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit a1479015edfe2ba14c67090dea2c682ef5c3f48f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 33d60b305e94afdd6f2584707f4b10516f513810)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 23987: "return to cataloguing" if the record is deleted from bachMod-del
Jonathan Druart [Wed, 20 Nov 2019 09:56:24 +0000]
Bug 23987: "return to cataloguing" if the record is deleted from bachMod-del

If a bibliographic record is deleted after having deleted all their items in a batch,
we should not display a "return to the record" button but "return to cataloguing" instead

Test plan:
1 - Have/make a bib with items
2 - On details page select Edit->Delete items in a batch
3 - Select all items and check "Delete record if no items remain"
4 - Delete the things
5 - On confirmation screen you have a count of items/bibs deleted
=> Without the patch there is a 'Return to record' button that leads to nowhere
=> With this patch there is a "Return to cataloging module" button
6 - Repeat using the "Delete selected items" link on top of the items table
=> Without the patch there is a 'Return to where you were' button that leads to nowhere
=> With this patch there is a "Return to cataloging module" button

Note that there is a link AND a button, coming from
  commit 928c0af2b6a2c7aa6ed54019c5bd7dbddbccf4ee
  Bug 15824 - 'Done' button is unclear on batch item modification and deletion
I do not think it makes sense to have both.

Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 7c5a0759acf5f5a5a51e54f69d65067b6f22a0c5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 371723e94e39ad9750831007bf5fe47305e2da65)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 23987: Use src=CATALOGUING for edition/deletion in batch from items table
Jonathan Druart [Wed, 20 Nov 2019 09:53:32 +0000]
Bug 23987: Use src=CATALOGUING for edition/deletion in batch from items table

There are 2 ways to land in batchMod from the detail page of a bib
record: from the Edit menu, and the action buttons on top of the items
table.

We want the same behavior for both and so use src=CATALOGUING
It will make batchMod to behave identically for the "return" button

Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 54e114833260055cd2b0131bc0548f80a5d7ff29)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5d78c86daa6ea264f7238792da679cf36bf6b328)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24323: Advanced editor - Display an error message if the record did not save
Cori Lynn Arnold [Tue, 31 Dec 2019 17:10:14 +0000]
Bug 24323: Advanced editor - Display an error message if the record did not save

Invalid 008 with helper silently fails to save.

This patch adds a "else if" to fall through if the error message isn't
one of the previously defined ones ("syntax" and "invalid") and presents
the human with a generic message that "Something went wrong, cannot
save."

Prior to testing:
a/Verify that Advanced Editor is enabled
b/Download the errorrecord.mrc from bug

To test:
1/Apply patch
2/Go to Cataloging->Advanced Editor
3/Click "Import Record" button and navigate to the record saved from
step b/
4/Add an 003 field (as required by the default cataloging config)
5/Hit "Save to catalog"
6/Verify that a message is passed to the user that the file was unable
to be saved

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit ae4c86e87e26a06611519510c386723e3a904371)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit df8a536bbc40348699552e336d5bf7dc3e7a7203)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24371: Fix "Show all items" avaibility link (use $raw filter) - intra
Jonathan Druart [Fri, 10 Jan 2020 08:56:12 +0000]
Bug 24371: Fix "Show all items" avaibility link (use $raw filter) - intra

Same fix for the intranet side

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit ff78c70ccb540dfe5d2b2a263f3701bd8aa52cc3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 14803de78d5b3c5b7325e9f3f721a0b17ebfbfa0)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24371: Fix "Show all items" avaibility link (use $raw filter) - opac
Lucas Gass [Tue, 7 Jan 2020 18:54:49 +0000]
Bug 24371: Fix "Show all items" avaibility link (use $raw filter) - opac

TO TEST:
1. Make an OPAC search with plenty of results.
2. Use the search facets to limit the search in some way, item type, author, etc.
3. Click on 'Limit to currently available items', everything is still fine.
4. Attempt to return to 'Show all items', there will be no search results.
5. Apply patch
6. Ateempt steps 1-4 again.
7. Should work this time.

Signed-off-by: Rhonda Kuiper <rkuiper@roundrocktexas.gov>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 756a95098d858d63cc0971c950f02278bbe242fe)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9f1961d58c5d9785122414fdf014bcf07c06c876)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24277: Fix date received editing when receiving an order
Jonathan Druart [Mon, 23 Dec 2019 15:19:47 +0000]
Bug 24277: Fix date received editing when receiving an order

Bug 8417 added the ability to edit the date received, but a merge
conflict was wrongly resolved during a rebase of
  commit 20d9ed618fbe3cdcb9c04444a1f8a584b0364069
  Bug 13321: Rename variables

Test plan:
Create an order
Receive it
Set a date (different from today)
=> The date you picked should have been set in DB for the order

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 028a77abce1aa0c9dc9f1bab8fc3069df811c2a1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a273c604db5ebad8aef2b1076a0a5870783ba06e)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24277: Regression tests
Tomas Cohen Arazi [Wed, 8 Jan 2020 13:55:40 +0000]
Bug 24277: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 76f7c46613687b712fa2342049557f2a769db8bf)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b57a0462ecf12c1353d8650febf6feab89e4ff60)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24054: Typo in ClaimReturnedWarningThreshold system preference
Bernardo Gonzalez Kriegel [Sun, 29 Dec 2019 10:40:37 +0000]
Bug 24054: Typo in ClaimReturnedWarningThreshold system preference

Fixed type: cliams -> claims

To test:
1) Apply the patch
2) Go to System preferences > Circulation preferences > ClaimReturnedWarningThreshold
3) Check the text is fixed.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit b84aee8a0f636eddf0ac7bb2bdebce0b1c520407)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d272c0330b2c767b9a337275162320dd4947d398)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoUpdate release notes for 18.11.13 release v18.11.13
Hayley Mapley [Tue, 21 Jan 2020 01:28:27 +0000]
Update release notes for 18.11.13 release

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoIncrement version for 18.11.13 release
Hayley Mapley [Mon, 20 Jan 2020 23:25:04 +0000]
Increment version for 18.11.13 release

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoTranslation updates for Koha 18.11.13
Koha translators [Mon, 20 Jan 2020 20:50:11 +0000]
Translation updates for Koha 18.11.13

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24104: Item search - Prevent "Edit" dropdown button to overflow
Jonathan Druart [Mon, 25 Nov 2019 15:48:15 +0000]
Bug 24104: Item search - Prevent "Edit" dropdown button to overflow

Making it displays on the left fixes the problem.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 49a175e4adae35bd0376de8535a668608368546a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c756d149f81711e7fbc644ca55ce339048636fcd)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24166: Do not hang when displaying checkout list if barcode is not set
Jonathan Druart [Wed, 18 Dec 2019 10:09:51 +0000]
Bug 24166: Do not hang when displaying checkout list if barcode is not set

If a barcode is not set, there is a JS error in the log:
  TypeError: oObj.barcode is null
We should not call escapeHtml() on it if not barcode is set for a given
item.

Test plan:
Check an item out
Remove its barcode
Load the checkout list
=> Without this patch you get the "loading" popup and the table is never
displayed
=> With this patch applied you see the checkout list

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit d2e1034084c9310498607e1d5e4156c40d7b2245)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 69a7644360a62693c07beb52806a525c2c28b891)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24121: Item types icons in intra search results are requesting icons from opac...
Pedro Amorim [Wed, 11 Dec 2019 11:28:34 +0000]
Bug 24121: Item types icons in intra search results are requesting icons from opac images path

When searching in INTRA you'll notice the item type icons not showing.

To test:
1) Set syspref item-level_itypes to biblio
2) Confirm that there is a biblioitems.itemtype mapping to a MARC field
3) Verify that item type icons are set for all the types
4) Perform a search where biblios with said MARC field is filled with a type value
5) Verify that where the icon should appear, it's showing the browser icon for image not found
6) Apply patch.
7) Repeat step 4.
8) Observe the icons are now displayed correctly

Sponsored-by: Governo Regional dos Açores
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 433d578418759946db723e33ce719b27464af5c1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c0f4bd11cceb61538e972351acd68e4024062dc5)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 18688: Warnings about UTF-8 charset when creating a new language
Bernardo Gonzalez Kriegel [Mon, 9 Dec 2019 23:41:45 +0000]
Bug 18688: Warnings about UTF-8 charset when creating a new language

This patch removes some warnings when creating new languages,
those related with uft8 and two not related.

Tipical messages are:
>Warning: Can't determine original templates' charset, defaulting to UTF-8
>Warning: Charset Out defaulting to UTF-8
>...
>Removing empty file /../xx-YY-marc-NORMARC.po
>I UTF-8 O UTF-8 at /../kohaclone/misc/translator/tmpl_process3.pl line 365.
>Use of uninitialized value $pref_name in concatenation (.) or string at /.../misc/translator/LangInstaller.pm line 197.
>Created /../misc/translator/po/xx-YY-messages.po.

First four are 'normal' messages
The fifth one correspond to an unquoted preference string
The sixth one is a normal output message from msgint command
We will hide them unless verbose '-v' option is selected,
and fix the error.

To test:
1) Go to misc/translator
2) Create new language files
  $ perl translate create xx-YY
3) Check warnings and messages
4) Apply the patch
5) Remove created files, and create them again
   Ther must be no messages
6) Repeat 5) with verbose option '-v', check
   old messages

7) BONUS: without the patch update a language,
   for example de-DE:
   $ perl translate update de-DE
   Note (git status) a new file, po/de-DE-messages.po~
   This is a backup file from msgmerge command
   With the patch this backup is removed.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit bfa74fa8fc158ecacc9faced059c8a5781f98f96)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 196c6cfa288aa43cd9d25a48ffe60fcbf80e1f88)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24046: Untranslatable 'Activate filters'
Maryse Simard [Mon, 18 Nov 2019 13:50:52 +0000]
Bug 24046: Untranslatable 'Activate filters'

Bug 9573 moved the code for the table filters activation to it's
own javascript file. The strings contained in this file are not
translatable. This patch moves the strings to the datatables
include file since the filters are related to datatables.

Test plan:
Visit the catalogue/detail.pl and reports/itemslost.pl and test
that the 'Activate/Deactivate filters' option still work correctly.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 423cc1053d8740fe220325d2ec1821320e057e14)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1bafa0e1eab3e93785a637745a2028e6866429ce)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 23970: Make search with "Publication date" field work at any position
Jonathan Druart [Mon, 25 Nov 2019 12:35:25 +0000]
Bug 23970: Make search with "Publication date" field work at any position

The changes made in the following commit:
  commit 0d2e83bca5b91376e9262b6cb0b993f09b919018
  Bug 14636: Item search - fix search and sort by publication date for MARC21
was put at the wrong place. It was inside a "if $i == 1" test that
impacts the first field only.

Test plan:
0/ Use a MARC21 installation
1/ Search items by publication date, use twice the field using different
values.
For instance:
  publication date: 2005 OR
  publication date: 2006
=> Without this patch you only get results for 2005
=> With this patch applied you get results for both years.

Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit c589da3c2931bbe0cc1c4f31899b71044c860082)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 837604d935f355904b46a878469390ab4a858c03)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 23181: [18.11] Extend unit tests
Katrin Fischer [Sat, 2 Nov 2019 01:05:06 +0000]
Bug 23181: [18.11] Extend unit tests

Run t/db_dependent/Accounts.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 23181: Unable to use payment library in ACCOUNT_PAYMENT or ACCOUNT_WRITEOFF notices
Kyle M Hall [Fri, 21 Jun 2019 12:51:15 +0000]
Bug 23181: Unable to use payment library in ACCOUNT_PAYMENT or ACCOUNT_WRITEOFF notices

Do to a simple semantic typo, the branches key will always be null for the tables key of the parameters for GetPreparedLetter.

Test Plan:
0) Activate UseEmailReceipts
1) Attempt to use [% branch.branchname %] in the ACCOUNT_PAYMENT notice
2) Note it produces no output
3) Apply this patch
4) Make another payment
5) You should now see the branche's name!

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Also requires UseEmailReceipts to be activated.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c4466e7d714d32808ee2e553320431005ec7cc69)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 73cf79940707ac9fcf74f5ea43e7711f058305f5)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 5365: Make more clear how to reopen a basket in a basket group
Jonathan Druart [Wed, 6 Nov 2019 09:45:56 +0000]
Bug 5365: Make more clear how to reopen a basket in a basket group

The "reopen basket" button will be visible but disabled if the basket
cannot be reopened. A tooltip is attached to the button to add more
information.

Note that the export button is still hidden, would it makes sense to
display it (visible and active)?

Test plan:
- Create a basket
- Close it
- Go to the basket detail view
=> The reopen button should be displayed and enabled

- Attach it to a basket group
- Go to the basket detail view
=> The reopen button should be displayed but disabled

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b687c60b27fa5a813b148bd5730b2d8278062ad5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 89434a8a8d2afb0821e1cb7ff899b56a244bdede)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 23731: Give staff detail/OPAC detail option to display LOC classification
Lucas Gass [Thu, 3 Oct 2019 06:27:27 +0000]
Bug 23731: Give staff detail/OPAC detail option to display LOC classification

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0b84e1e25fafdb06f3dfea05dd1ea4d8f5e41553)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24245: rename self reg confirm page body id
Lucas Gass [Sat, 14 Dec 2019 00:55:39 +0000]
Bug 24245: rename self reg confirm page body id

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit b5ef6bea2db7a65de489db8831a26b5f923ffe04)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 38476f972c5ff05274626e8b9070df135414e8b3)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 24240: Move form closing tag outside of conditional
Nick Clemens [Fri, 13 Dec 2019 14:24:33 +0000]
Bug 24240: Move form closing tag outside of conditional

To test:
1 - Create a public list
2 - View the list as a user not signed in
3 - Validate the HTML, note the div closed with open elements, and a form tag unclosed
4 - Apply patch
5 - Those errors are fixed

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 1d57597e7334e6e183bbad1aa01c6eb9ff44f306)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c2afcb9a75d1689d79b27cd6608d63be5288f0bd)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 21270: Display "Make an Interlibrary loan request" even if "suggestions" is turne...
Jonathan Druart [Thu, 5 Dec 2019 12:19:20 +0000]
Bug 21270: Display "Make an Interlibrary loan request" even if "suggestions" is turned off

Test plan:
- Turn off "suggestions"
- Turn on "ILLModule"
=> When logged in you should see the "Make an Interlibrary loan request"

- Turn on "suggestions"
- Turn off "ILLModule"
=> When logged in you should see the "Make a purchase suggestion"

- Turn on "suggestions"
- Turn on "ILLModule"
=> When logged in you should see both links.

- Turn off "suggestions"
- Turn off "ILLModule"
=> You should not see the "Not finding what you're looking for?" block

- Turn on "suggestions"
- Turn on AnonSuggestions
=> You should see the "Make a purchase suggestion" even when logged out

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 0e1d6ffcf7fac1894abc097fa37f2704b22ca4d9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 391378996527cecd01e2367b15833c3872a69f3b)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 21270: "Not finding what you're looking for" displaying uselessly
Blou [Fri, 24 Aug 2018 15:46:54 +0000]
Bug 21270: "Not finding what you're looking for" displaying uselessly

When doing OPAC search, at the bottom you have an offer presented with "Not finding what you're looking for" to introduce Suggestions or ILL if enabled.

Bug 7317 modified the if-else and now if you enable ILLModule but not AnonSuggestions and are not logged, you have this little string sitting there, offering nothing to the user.

Just taunting them...

TEST:
0) Set IllModule to true, AnonSuggestions to false.
1) Without login, just to an OPAC search.  At the bottom will be a nice string laughing at your failed search
2) Apply the patch.
3) Problem at 1) is fixed.
4) Login to validate that ILL link now appear.
5) Modify combination of IllModule and AnonSuggestions to validate links appearing.

Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 489cfb4b19b72dc1b156b0a4fa38add79ee3f05b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c3c0a1228f134df0a5bc0a2f692310c3451a88b8)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 20948: Add missing html filter
Jonathan Druart [Tue, 10 Dec 2019 10:17:36 +0000]
Bug 20948: Add missing html filter

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit dc0952200fe22693624722f3b7db15f9022527c1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ea2e4bdb866e356295bd68f6a9a0818d5acc7a35)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

4 years agoBug 20948: Only display item-level hold info if first hold
Jonathan Druart [Mon, 18 Nov 2019 09:30:04 +0000]
Bug 20948: Only display item-level hold info if first hold

On the item list of the catalogue detail page we display next item-level
hold info even if it is not the next hold. That leads to confusion as it
will not necessarily be the accurate info.

This patch makes the following changes:
- Display the item-level hold only if it is the next hold (priority ==
1)
- Display "There is an item level hold on this item (priority=X)"
if there is at least 1 item-level hold placed on this item

Test plan:
- Place several next available holds on a single item record
- Place an item level hold on the item
- Go the the biblio detail page
=> Without this patch, the item will show the item level hold
=> With the patch you see "There is an item level hold on this item"
- Check the item in, confirm the hold
=> No changes, the item will show the waiting hold info
- Cancel all the holds except the item-level one
=> No changes, the item will how the item-level one

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 6998a32ca4e29313a02b020d9e36c0c75f129fb1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e46289d12c99f3fabf0d00cdd71ec8f921d69be2)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>