]> git.koha-community.org Git - koha.git/log
koha.git
4 years agoBug 24494: Make the regex more exact
Jonathan Druart [Thu, 13 Feb 2020 16:01:06 +0000 (17:01 +0100)]
Bug 24494: Make the regex more exact

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 3c45a6ac63b93fcaa67b2c2d529cbc95bd2a44da)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24494: tests: 00-valid-xml.t shouldn't check node_modules
Victor Grousset/tuxayo [Thu, 23 Jan 2020 14:55:18 +0000 (15:55 +0100)]
Bug 24494: tests: 00-valid-xml.t shouldn't check node_modules

== Test plan ==
- work with SCSS (just recompile it if you never did)
  - https://wiki.koha-community.org/wiki/Working_with_staff_client_SCSS
- now you have a node_modules directory
- prove -r t/00-valid-xml.t
- it should fail on files in node_modules
- apply this patch
- prove -r t/00-valid-xml.t
- it should work
- sabotage a legitimate XML file, like etc/SIPconfig.xml
- prove -r t/00-valid-xml.t
- it should fail, good the test is still useful
- undo the sabotage

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 088a610682f1a1be3fd05b64c5080faa0ff7cfd7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 19791: Keep user in circ when viewing patron's logs
Jonathan Druart [Fri, 14 Feb 2020 10:44:44 +0000 (11:44 +0100)]
Bug 19791: Keep user in circ when viewing patron's logs

When a librarian is viewing the log for a given patron (tab "modification log"
from the circulation module), the "object" and "modules" parameter can
be modified. It does not make sense, we should stay in the circulation
module and avoid those fields to be modified.

Test plan:
- Modify several patrons (in order to have several modification logs)
- Go to the modification log tab of one of them
- Notice that the "Object" input is not a "Borrowernumber" labelled
input and that you cannot modify it.
Also notice that the "modules" is hidden.
- Go to the log viewer tool and notice that the view is still the same
as before this patch.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit d78feb1d2fed87f2f38b4d4b57a3c0e5cff63b9d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24051: Remove "search( %condition ) is deprecated" warning from batchMod.pl
Jonathan Druart [Mon, 18 Nov 2019 10:29:46 +0000 (11:29 +0100)]
Bug 24051: Remove "search( %condition ) is deprecated" warning from batchMod.pl

Test plan:
Go to Home › Tools › Batch item modification
Insert barcodes and continue
=> Without this patch you will get warning in the log
=> With this patch applied you warning does no longer appear
Confirm that the number of holds is correct

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit d833b9f957b5b537dd831ad4d9296b6163db2ba9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 22245: Allow copy/move from and to control fields
Jonathan Druart [Sat, 16 Feb 2019 14:46:08 +0000 (11:46 -0300)]
Bug 22245: Allow copy/move from and to control fields

The JS conditions were wrong, we want to allow copy and move between
control fields.

Test plan:
Create a new MARC modification template action using control fields.
Confirm that you are allowed to copy/move a control field to another one

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 72cbcf7c4b2d921721b520fd8e67d0c7d8c7f8e0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 17221: (follow-up) Orphan comma in shelf browser
Katrin Fischer [Sun, 12 Jan 2020 03:55:41 +0000 (03:55 +0000)]
Bug 17221: (follow-up) Orphan comma in shelf browser

This further improves the display if no location or no
collection has been set. Example output:

Browsing Centerville shelves, Collection: Non-fiction

Also changes 'Collection code' to 'collection' and takes
care of additional spaces before the comma.

To test:
- Make sure your OpacShelfBrowser pref is set to "Show"
- Search for a record with items and callnumbers in your OPAC
- "Browse shelf"
- Navigate back and forth, verify the information showing on
  top of the list is correctly formatted
- Try different combinations for the following prefs:
  - ShelfBrowserUsesCcode
  - ShelfBrowserUsesHomeBranch
  - ShelfBrowserUsesLocation
- Verify the display is always nicely formatted

Note: fixing capitalization here is tricky, as it also
depends on what was displayed before. If you have no
homebranch, you would want "Shelving...", if you have one
we'd like "shelving...". Left as I found it for now.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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 d54a0d81c51396d9a0f94a264fb33688894caebe)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 17221: Remove orphan commas in shelf browser
phette23 [Sun, 12 Jan 2020 10:32:53 +0000 (11:32 +0100)]
Bug 17221: Remove orphan commas in shelf browser

This patch adds more conditions to the shelf browser template
such that the displayed text reads as a proper list no matter
what combination of system preferences are utilized

Sponsored-by: California College of the Arts
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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 091133983b116e2b5a330223404187482e5d5e79)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24110: Do not html filter TT vars when dumped
Jonathan Druart [Tue, 26 Nov 2019 08:27:21 +0000 (09:27 +0100)]
Bug 24110: Do not html filter TT vars when dumped

DumpTemplateVarsIntranet and DumpTemplateVarsOpac are devs tools to
display the variables sent to the template. They should not be filtered
otherwise it's getting complicate to read.

For instance: $VAR1 = { var =&gt; val }

Test plan:
Turn DumpTemplateVarsIntranet on
Go to the main page
Show the source of the page
Confirm that the variable are displayed as it and not filtered

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 710a37220017025c039d64a06a307130bfdcae67)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24514: Add option to exclude title from patron-title.inc
Nick Clemens [Fri, 24 Jan 2020 17:33:48 +0000 (17:33 +0000)]
Bug 24514: Add option to exclude title from patron-title.inc

Without this patch sorting by patron name on the 'holds awaiting
pickup' report sorted by title, surname, firstname. With this
patch the list will sort by surname, firstname, ignoring the title.

To test:
- generate and capture a hold for a patron named "Mr. A A"
- generate and capture a hold for a patron named "A A"
- generste and capture a hold for patron named "Mr. B B"
- generste and capture a hold for patron named "B B"
- go to holds awaiting pickup
- sort by patron name ascending
- holds sort Mr. A, Mr. B, A, B
- sort by patron name descending
- holds sort B, A, Mr. B, Mr. A
- APPLY PATCH
- Reload holds awaiting pickup
- Confirm holds sort on Surname

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 fe86bf2b6c7a0afb8be0a0030f8013dd9f5d7f85)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 18933: Allow OPAC messaging SMS number to be set to empty
Aleisha Amohia [Sun, 9 Feb 2020 21:55:01 +0000 (21:55 +0000)]
Bug 18933: Allow OPAC messaging SMS number to be set to empty

To test:
1) Ensure EnhancedMessagingPreferences is enabled and
EnhancedMessagingPreferencesOPAC is set to Show. Set SMSSendDriver to
Email
2) Log in to OPAC, go to your messaging tab
3) Set an SMS number if you havent already
4) Try to remove it (set to empty)
5) Notice that it says the number has been updated, but it has not
been set to empty
6) Apply patch and refresh page
7) Attempt to set the number to empty
8) Confirm this is successful

Sponsored-by: Catalyst IT
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 7535b5072329cc38ef7f0cef2616d51b289efb0b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24388: Remove uneeded test in lateorders.tt
Jonathan Druart [Mon, 16 Dec 2019 17:50:16 +0000 (18:50 +0100)]
Bug 24388: Remove uneeded test in lateorders.tt

The budget_lock is never set (and has never been).

Test plan:
For QAer only, make sure this never worked

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 aa8cdebe0c6b9b0dfb0819648e217553e675d2f5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24664: Add missing *-messages-js.po
Bernardo Gonzalez Kriegel [Fri, 14 Feb 2020 14:33:44 +0000 (11:33 -0300)]
Bug 24664: Add missing *-messages-js.po

If you try to update some language translation files
translate script will complain of missing *-messajes-js.po
file.

This patch adds those missing files

To test:
1) Go to misc translation
2) Update some language, eg- fr-FR
Check error
/usr/bin/msgmerge: error while opening "/.../misc/translator/po/es-ES-messages-js.po" for reading: No such file or directory
3) Apply this patch
4) Repeat 2), no error message

Signed-off-by: Julian Maurice <julian.maurice@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 2d60c61cf778940597eea24e330f6ddbdaa9fddf)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24881: [19.05.x] Try to fix random failure from Circulation.t
Jonathan Druart [Mon, 16 Mar 2020 16:19:22 +0000 (17:19 +0100)]
Bug 24881: [19.05.x] Try to fix random failure from Circulation.t

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23527: BakerTaylorBookstoreURL is converted to escaped characters by template...
David Kuhn [Sat, 31 Aug 2019 23:23:16 +0000 (16:23 -0700)]
Bug 23527: BakerTaylorBookstoreURL is converted to escaped characters by template, rendering it invalid

Changing the template toolkit filter for rendering the value of
BakerTaylorBookstoreURL in opac-detail.tt and opac-results.tt from uri
to url fixes the problem.

To test (requires a Baker & Taylor username and password):

1. Enter the B&T url into BakerTaylorBookstoreURL.
2. Set BakerTaylorEnabled to "add" and enter your username and password.
3. Look up a title in the OPAC.
4. Locate a title with a cover image.
5. Click on the cover image. You are not redirected to the url stored
   in BakerTaylorBookstoreURL.
6. Display the full record for the title
7. Click on the cover image. You are not redirected to the url stored
   in BakerTaylorBookstoreURL.
8. Apply the patch.
9. Refresh the OPAC display.
10. Click on the cover image. You are now redirected to the specified url.
11. Return to the results list.
12. Click on a cover image. You are now redirected to the specified url.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Although I don't have valid Baker & Taylor credentials I was able to use
dummy data to verify that the links in the template are correctly
encoded with this patch.

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 07af2a5645303ad35b45fabc3ed966f2ab55899e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24260: DBRev 19.05.08.002
Lucas Gass [Tue, 10 Mar 2020 22:40:07 +0000 (22:40 +0000)]
Bug 24260: DBRev 19.05.08.002

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24640: Allow quotes.timestamp to be NULL
Jonathan Druart [Wed, 12 Feb 2020 11:26:25 +0000 (12:26 +0100)]
Bug 24640: Allow quotes.timestamp to be NULL

It is broken with strict mode enable, timestamp is created without
default value.

Note that the .sql installer file init the value with NOW(), which is
wrong.

DBD::mysql::st execute failed: Field 'timestamp' doesn't have a default
value [for Statement "INSERT INTO quotes (source, text) VALUES (?, ?);"
with ParamValues: 0="poeut", 1="pouet"] at
/kohadevbox/koha/tools/quotes/quotes_ajax.pl line 49.

Test plan:
Create a new quote of the day
=> Without this patch you will get an error

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 9bf4f492d82196f10bb017dd761ff6fa022a9bb9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24654: Remove trailing quote in rda264 XSLT
Nick Clemens [Thu, 13 Feb 2020 15:43:30 +0000 (15:43 +0000)]
Bug 24654: Remove trailing quote in rda264 XSLT

To test:
1 - Find or add a recod with a 264 field
2 - Make sure there is a subfield b
3 - View the record in opac
4 - Right click on publisher link and copy and paste into a text editor
5 - Note the trailing " in the search
6 - Apply patch
7 - Refresh
8 - Link is correctly formed now

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 91c16e9e7a8e9eccf37024b0efde14819b7093b9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24621: Phase out jquery.cookie.js: Basic MARC editor
Owen Leonard [Mon, 10 Feb 2020 19:04:57 +0000 (19:04 +0000)]
Bug 24621: Phase out jquery.cookie.js: Basic MARC editor

This patch removes the use of the jquery.cookie plugin by the basic MARC
editor for setting two interface preferences: Showing MARC tag numbers
and showing MARC documentation links.

To test, apply the patch and open the basic MARC editor.

 - From the "Settings" menu, select the "Show MARC tag documentation
   links" link. This should toggle the display of the "?" link next to
   MARC tag descriptions.
 - Reload the page to confirm that your selection has been saved.
 - Perform the same test with the "Show tags" menu item.

You can also follow the changes to the cookie using the browser's
developer console. Look for cookies named 'marcdocs_***' and
'marctags_***' (where *** is the borrowernumber of the logged-in
user) and confirm that the value of each flips from "show" to "hide" and
back.

https://developer.mozilla.org/en-US/docs/Tools/Storage_Inspector
https://developers.google.com/web/tools/chrome-devtools/storage/cookies

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 a2fe9fa991bc074c4703729b0f459a40a2cc0eb4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24619: Phase out jquery.cookie.js: MARC Frameworks
Owen Leonard [Mon, 10 Feb 2020 17:58:04 +0000 (17:58 +0000)]
Bug 24619: Phase out jquery.cookie.js: MARC Frameworks

This patch removes the use of the jquery.cookie plugin on the MARC
Frameworks page and replaces it with a call to the new js-cookie
library.

To test, apply the patch and go to Administration -> MARC
bibliographic frameworks.

 - Choose the 'MARC structure' menu item for one of the frameworks
   listed.
 - On the page which lists the tags in the framework, check the box
   labeled "Display only used tags/subfields." The page should reload.
 - The checkbox should remain checked and the list of tags should now
   show only used tags.
 - Uncheck the checkbox and the page should reload again.

You can also follow the changes to the cookie using the browser's
developer console. Look for a cookie named
'marctagstructure_selectdisplay' and confirm that the value flips from 0
to 1 and back.

https://developer.mozilla.org/en-US/docs/Tools/Storage_Inspector
https://developers.google.com/web/tools/chrome-devtools/storage/cookies

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 fb45f5bb98c07ac544184b8ffa029f1f5702e993)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24389: Better error handle when claiming late orders
Jonathan Druart [Mon, 16 Dec 2019 16:15:19 +0000 (17:15 +0100)]
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>
4 years agoBug 18499: (QA follow-up) Add missing colon after label description
Katrin Fischer [Sat, 15 Feb 2020 01:15:35 +0000 (01:15 +0000)]
Bug 18499: (QA follow-up) Add missing colon after label description

To match the line above, a colon (:) was added after the description:

Callnumber classification scheme: [pull down]

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 329796c7a95ed30a4e0ff4963518bf6f88a0f679)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 18499: (follow-up) Add missing filters
Nick Clemens [Fri, 14 Feb 2020 17:59:38 +0000 (17:59 +0000)]
Bug 18499: (follow-up) Add missing filters

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 c64ac9504fc72ee8e6b95ac26b679dc1701ca2bf)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 18499: Use items cn_source in cn_browser.pl
Nick Clemens [Thu, 6 Feb 2020 13:14:30 +0000 (13:14 +0000)]
Bug 18499: Use items cn_source in cn_browser.pl

This does a few things:
 * We fetch the cn_sort from the DB and use this rather than calculating based on DefaultClassificationSource
   We were already pulling based on the items source, so this should not change things
 * Rather than using JS to submit the form, it submits via html
 * Fix subtitle display and add barcode (it was retrieved in one query but not used)
 * Add option to apply different classification scheme to the search

To test:
 1 - Add cn_browser.pl to the 'plugin' field in a framework for 952$o
 2 - Edit an item on a record in that framework
 3 - Enter an itemcallnumber
 4 - Click the two dots to launch the callnumber browser
 5 - Note the results
 6 - Apply patch
 7 - Repeat
 8 - Note subtitles and barcodes are displayed in results
 9 - Note callnumbers are appropriate
10 - Try changing the class source used
11 - Try this with differing dewey,lcc, and other callnumbers
12 - Ensure results are as expected

Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu>
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 0f7d7a8c2faf5777655a9b67c8cea8ffade56071)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 20882: DBRev 19.05.08.001
Lucas Gass [Mon, 9 Mar 2020 21:04:00 +0000 (21:04 +0000)]
Bug 20882: DBRev 19.05.08.001

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 20882: Move items.uri to mediumtext
Marcel de Rooy [Mon, 10 Feb 2020 14:28:51 +0000 (14:28 +0000)]
Bug 20882: Move items.uri to mediumtext

Applies to items and deleteditems.

Test plan:
Run new install or upgrade. Check field size.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@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 853d0ee468d1f5ba1efb3a9746855486f4d25e6c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24506: Multibranch limit does not work with ElasticSearch
Andreas Jonsson [Fri, 24 Jan 2020 10:13:05 +0000 (10:13 +0000)]
Bug 24506: Multibranch limit does not work with ElasticSearch

Test plan
1. Set up a system with ElasticSearch
2. Set up or make sure ther are at least two branches
3. create a group of branches
4. make sure there are items associated with any library in the group
5. make a search in opac limited by the library group
6. make an advanced search in intra limited by the library group
7. change SearchEngine system preference to Zebra and repeat 5. and 6.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 947db3b6cb77ea6cf68fa9218729068a303aab03)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 13574: Fix display of repeatable item subfields
Marcel de Rooy [Mon, 10 Feb 2020 15:17:38 +0000 (15:17 +0000)]
Bug 13574: Fix display of repeatable item subfields

Applies to OPAC and staff: opac-MARCdetail and catalogue/MARCdetail.

Test plan:
[1] Pick an item. Pick two fields say URI and copy number, and fill these
with a value like A | B. (The pipe char is important.)
[2] Verify that the display of the item block on opac-MARCdetail shows
both A and B in those columns. (Previously only B was shown.)
[3] Verify the same on catalogue MARC detail, items tab.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Holly Cooper <hc@interleaf.ie>
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 3b3a84d272fd6ee1259273e132739a4caa8bc616)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24649: Fix two other missing <li> tags for cloned subfields
Marcel de Rooy [Thu, 13 Feb 2020 09:27:26 +0000 (09:27 +0000)]
Bug 24649: Fix two other missing <li> tags for cloned subfields

Same problem as previous patch in Batch item modification as well as
serial-edit.pl.

Test plan:
[1] Go to Tools/Batch item modification.
    Test cloning subfield on batchMod-edit.
[2] Go to a serial with "Create item when receiving".
    Receive an issue. Click add item.
    Test cloning subfield.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.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 d024f3dd860856f0e0a878353af08fa6773743e7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24649: Fix missing <li> tag on item editor for cloned subfield
Marcel de Rooy [Thu, 13 Feb 2020 08:56:35 +0000 (08:56 +0000)]
Bug 24649: Fix missing <li> tag on item editor for cloned subfield

Instead of the parentNode (which is a div), we need the parent of the div
(which is a li).
So a simple fix.

Test plan:
To see the difference, test first without patch applied:
Mark item subfield, say URI, as repeatable.
Clone that subfield in item editor.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.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 a6dc3c436c6cc01b9fd4f4e5fb576b9734d8a204)

4 years agoBug 24643: Add test to cover the timezone
Jonathan Druart [Thu, 13 Feb 2020 13:24:52 +0000 (14:24 +0100)]
Bug 24643: Add test to cover the timezone

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 cc43ee0685ff3c895442fdb2c6c13fe076a1ba7d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24643: Add unit tests
Andrew Isherwood [Wed, 12 Feb 2020 16:28:58 +0000 (16:28 +0000)]
Bug 24643: Add unit tests

Signed-off-by: David Nind <david@davidnind.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 d4405602bc7b3edc1ef66a40c22880e644172db6)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24643: Support fractional seconds
Andrew Isherwood [Wed, 12 Feb 2020 16:04:07 +0000 (16:04 +0000)]
Bug 24643: Support fractional seconds

This patch allows dt_from_string to handle RFC3339 strings containing
fractional seconds up to one thousandth of a second.

Test plan:

- Apply patch
- prove t/DateUtils.t

Signed-off-by: David Nind <david@davidnind.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 07aa0a562b35faaa8d04b479c33cec032ece6464)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 11281: Printing holds awaiting pickup prints both tabs
Owen Leonard [Fri, 22 Nov 2019 19:29:53 +0000 (19:29 +0000)]
Bug 11281: Printing holds awaiting pickup prints both tabs

This patch adds columns configuration to the holds awaiting pickup
tables. Doing so helps solve the printing issue by adding a "Print"
option to both tables. Using this print function will provide a
printable version of only that table.

To test you should have multiple holds in your system which are marked
"waiting" and some which have been waiting longer than the value
specified in the ReservesMaxPickUpDelay system preference.

Apply the patch and go to Circulation -> Holds awaiting pickup.

 - On both the "Holds waiting" and "Holds waiting over..." tabs the
   DataTable should display correctly and all the controls should work,
   including the columns settings and the choices in the export menu.
 - Confirm that the "Print" action creates a printable version of only
   the table you are viewing.

 - Go to Administration -> Columns settings -> Circulation.
 - Change some visibility controls for the tables under the
   "holds_awaiting_pickup" heading (id=holdso and id=holdst). Confirm
   that these changes are reflected in the "Holds waiting" interface.

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 30145385916935464ccbc52a1a13755464863ef9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 22860: Remove 1 remaining patron after authentication.t is ran
Jonathan Druart [Mon, 6 May 2019 20:37:38 +0000 (15:37 -0500)]
Bug 22860: Remove 1 remaining patron after authentication.t is ran

Test plan:
0/ Do not apply the patch
1/ select count(*) from borrowers;
2/ Run the tests
=> Notice that you have 1 more patron
3/ Apply the patch and repeat 1/ and 2/
=> Notice that you have the same number of patrons before and after the
tests

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 905c0bc5e0831148c8334a92863ec9289e2c67b5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24516: Add account_type to the columns settings on boraccount
Jonathan Druart [Mon, 3 Feb 2020 16:31:42 +0000 (17:31 +0100)]
Bug 24516: Add account_type to the columns settings on boraccount

The column was missing from the yml file.

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 e9f0e0c6308746cc83e0aa0bbb4309c9f9013c8e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 13305: Remove tabindex from PrepareItemsRecordDisplay
Marcel de Rooy [Mon, 20 Jan 2020 12:41:51 +0000 (12:41 +0000)]
Bug 13305: Remove tabindex from PrepareItemsRecordDisplay

Test plan:
Check the tab order of the item block on additem.pl (item editor),
Acquisition (neworderempty or addiso2709), serials-edit.pl.
You could also check services/itemrecorddisplay.pl and pass a
biblionumber; this script is used in additem.js for cataloguing and
acquisition.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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 5b043c6b4cd71455e0c342d74b9952d8231d069b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 16719: (QA follow-up) Remove tabs
Nick Clemens [Fri, 7 Feb 2020 16:52:52 +0000 (16:52 +0000)]
Bug 16719: (QA follow-up) Remove tabs

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit fdb9bbe40ad60ab7da6153c836396c395b6df3a7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 16719: (follow-up) Update check on password mapping
Oliver Behnke [Fri, 7 Feb 2020 12:35:21 +0000 (12:35 +0000)]
Bug 16719: (follow-up) Update check on password mapping

Change to allow for unmapped default passwords

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 1914e1016cd9b0315dc19d1c22cdbc6eec7efe40)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 16719: Pass through undef rather than empty string in LDAP mapping
Oliver Behnke [Fri, 7 Feb 2020 12:31:31 +0000 (12:31 +0000)]
Bug 16719: Pass through undef rather than empty string in LDAP mapping

Nullable DB fields should be passed null in cases where ldap fields are
empty and not replaced with empty strings.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 0dac0b874779bc7617490199944af1d2b807e656)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23640: Flushing L1 on every SIP connection
Jonathan Druart [Thu, 14 Nov 2019 09:50:24 +0000 (10:50 +0100)]
Bug 23640: Flushing L1 on every SIP connection

This patch flushes the L1 cache on each SIP connection
(ie every invocation of process_request).

This means each SIP connection will fetch values from the
L2 cache (ie memcached) and persist the L1 cache (in Perl
memory cache) only until a new SIP connection comes in.

Without this patch, the L1 cache persists for the length
of the server process, which means the L1 cache will become
stale very quickly, which can lead to unexpected behaviour.

Test plan:
1. Enable IssueLog
2. Start SIP server
    2a. change to Koha git directory
    2b. koha-shell kohadev
    2c. perl C4/SIP/SIPServer.pm /etc/koha/sites/kohadev/SIPconfig.xml
3. Issue book via SIP

    perl misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su term1 -sp term1 -l CPL --patron 1 --item 3999900000001 -m checkout

4. Check action_logs for "CIRCULATION ISSUE <borrowernumber> <biblionumber>" line

    http://localhost:8081/cgi-bin/koha/tools/viewlog.pl

5. Disable IssueLog

6. Check in the book and then check it out again

    perl misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su term1 -sp term1 -l CPL --patron 1 --item 3999900000001 -m checkin
    perl misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su term1 -sp term1 -l CPL --patron 1 --item 3999900000001 -m checkout

7. Check action_logs for "CIRCULATION ISSUE <borrowernumber> <biblionumber>" line

    http://localhost:8081/cgi-bin/koha/tools/viewlog.pl

8. Note results

Without the patch, you'll see a 2nd checkout.

With the patch, you won't see the 2nd checkout.

(Note: After applying the patch, you have to restart the SIP server.)

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit fdc568afa932a03838b71679fbd4d1c50c9ed0cc)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 13420: (QA follow-up): Fix typo itemdate -> itemdata
Josef Moravec [Wed, 5 Feb 2020 21:13:22 +0000 (21:13 +0000)]
Bug 13420: (QA follow-up): Fix typo itemdate -> itemdata

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 724f090717eac58750bfd856c925dcc431705832)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 13420: Fallback to the previous behavior if published date is not used
Jonathan Druart [Tue, 6 Aug 2019 13:56:44 +0000 (08:56 -0500)]
Bug 13420: Fallback to the previous behavior if published date is not used

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 34083b5ddeac98566b389269fc0e082eb1603414)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 13420: Sort "Serial enumeration" by published date
Jonathan Druart [Mon, 29 Apr 2019 02:53:55 +0000 (22:53 -0400)]
Bug 13420: Sort "Serial enumeration" by published date

So far the sorting on volume information is incorrect. It sorts by the
string displayed in the cell, which may not have any logics.

A better solution would be to use Kyle's suggestion, see comments 7, 8,
but it will need much more work.

This patch suggests to use the publication date to sort this column.
Note: In the code there is a switch depending on the existence of
items.publisheddate, but I do not think it is valid, this valid should
always exist if the item is received (did I miss something?)

Test plan:
You need to have different existing subscription, using different
numbering.
On the detail page of the bibliographic record you should be able to
sort the serials (tab "Holdings") by "Serial enumeration".
The sort will now use the publication dates.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit d9485314eb86c8c5a466aba57c54680f053c79c3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24449: Add too_many_overdue to patron status for SIP
Nick Clemens [Fri, 17 Jan 2020 14:29:42 +0000 (14:29 +0000)]
Bug 24449: Add too_many_overdue to patron status for SIP

To test:
1 - Have sip running and use the cli to get info for a patron
    example: perl misc/sip_cli_emulator.pl  -a localhost -p 6001 -su koha -sp koha -l CPL -m patron_status_request --patron koha
2 - Checkout an item to the patron, backdated so it is overdue
3 - Set syspref 'OverduesBlockCirc' to anything but "Don't Block"
4 - Get the patron status via SIP, note circ blocked flag is set, but too_many_overdue is not
5 - Apply patch
6 - Restart all the things
7 - Get the patron status via SIP
8 - Note the too_many_overdue flag is now triggered and there is a message
    example: READ: 24Y     Y       00120200117    142716AEEdna Acosta|AA23529001000463|BLY|CQN|BV0.25|AFGreetings from Koha.  -- Patron has overdues -- Patron owes 0.25|AOCPL|

Signed-off-by: David Nind <david@davidnind.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 cb59d155aede69111bfd9d4d013ae027ebf51ae3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24590: Fix Koha/Object.t on MySQL 8
Jonathan Druart [Wed, 5 Feb 2020 09:36:14 +0000 (10:36 +0100)]
Bug 24590: Fix Koha/Object.t on MySQL 8

% prove t/db_dependent/Koha/Object.t
is failing on MySQL 8 with:

 kohadev-koha@9bbf9ac68519:/kohadevbox/koha$ prove t/db_dependent/Koha/Object.t
 t/db_dependent/Koha/Object.t .. 15/18
     #   Failed test 'Exception field is correct'
     #   at t/db_dependent/Koha/Object.t line 650.
     #          got: 'api_keys.secret'
     #     expected: 'secret'
     # Looks like you failed 1 test of 16.
 t/db_dependent/Koha/Object.t .. 16/18
 #   Failed test 'store() tests'
 #   at t/db_dependent/Koha/Object.t line 723.

MySQL 8 displays the tablename in the error.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit d5cd348c27b0c0d18474d11a8b78d1e2468f9a7a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23719: [19.05.x] Allow searching specific fields for matching authorities in ES
Nick [Wed, 2 Oct 2019 11:17:13 +0000 (11:17 +0000)]
Bug 23719: [19.05.x] Allow searching specific fields for matching authorities in ES

To test:
1 - Export your authorities via Tools->Export data
2 - Define a record matching rule in Admin->Record matchign rules
    Use index: LC-card-number
    field: 010$a
3 - Stage the exported records for import and use the rule created above for matching
4 - The process does not complete
5 - Check intranet error logs - exception on unknown marclist
6 - Apply patch
7 - Repeat
8 - Success!
9 - prove -v t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 23719: (follow-up) Add warn when passed invalid search field in marclist

Note: I also remove warnings for undefined operation in this patch, is a trivial fix

To test:
prove -v t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoUpdate release notes for 19.05.08 release v19.05.08
Lucas Gass [Fri, 21 Feb 2020 16:52:57 +0000 (16:52 +0000)]
Update release notes for 19.05.08 release

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoIncrement version for 19.05.08 release
Lucas Gass [Fri, 21 Feb 2020 16:46:55 +0000 (16:46 +0000)]
Increment version for 19.05.08 release

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoTranslation updates for Koha 19.05.08
Koha translators [Fri, 21 Feb 2020 16:36:30 +0000 (13:36 -0300)]
Translation updates for Koha 19.05.08

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23290: [RMaint version] Mitigate XML/XSLT vulnerabilities
Marcel de Rooy [Mon, 20 Jan 2020 09:55:52 +0000 (09:55 +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>
4 years agoRevert "Bug 24054: Typo in ClaimReturnedWarningThreshold system preference"
Lucas Gass [Thu, 20 Feb 2020 15:49:51 +0000 (15:49 +0000)]
Revert "Bug 24054: Typo in ClaimReturnedWarningThreshold system preference"

This reverts commit d272c0330b2c767b9a337275162320dd4947d398.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24637: Add brancode in all pay circumstances
Lucas Gass [Tue, 11 Feb 2020 22:56:53 +0000 (22:56 +0000)]
Bug 24637: Add brancode in all pay circumstances

To TEST:
1. Have some fines. Pay them using the Pay Amount or Pay Selected buttons.
2. SELECT branchcode FROM accountlines where borrowernumber = '{borrowernumber}';
3. See that branchcode is NULL
4. Apply patch and restart_all
5. Make a partial payment using both the Pay select and Pay amount buttons.
6. SELECT branchcode FROM accountlines where borrowernumber = '{borrowernumber}';
7. Now you should see the branchcodes in the table and no NULL values.

Signed-off-by: Benjamin Daeuber <bdaeuber@fargolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
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 (14:16 +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>
4 years agoBug 22302: Unit tests
Nick Clemens [Tue, 4 Feb 2020 14:15:36 +0000 (14:15 +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>
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 (17:00 +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>
4 years agoBug 10879: OverDrive should check for OverDriveLibraryID before performing search
Owen Leonard [Tue, 19 Nov 2019 17:02:02 +0000 (17:02 +0000)]
Bug 10879: OverDrive should check for OverDriveLibraryID before performing search

This patch modifies the OPAC search results template to check for three
populated system preferences before performing an OverDrive search:
OverDriveLibraryID, OverDriveClientKey, and OverDriveClientSecret.
Previously OverDriveLibraryID was not checked, but without it the
interface reports an error performing the search.

To test you must have credentials for the OverDrive API as defined
in OverDriveClientKey, OverDriveClientSecret, and OverDriveLibraryID
system preferences.

 - With OverDriveLibraryID defined, the catalog search results page in
   the OPAC should show a link to results in the library's OverDrive
   collection.

 - With no value in the OverDriveLibraryID preference the catalog
   search page should not show any message about an OverDrive
   collection.

Signed-off-by: Lucas Gass <lucas@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 cf1c2c1a2a90a376309daee1f08b1dbe3df18bc1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
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 (09:39 +0100)]
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>
4 years agoBug 24213: Add tests
Jonathan Druart [Wed, 11 Dec 2019 08:39:15 +0000 (09:39 +0100)]
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>
4 years agoBug 24523: Add missing </p>
Lucas Gass [Mon, 27 Jan 2020 22:06:06 +0000 (22:06 +0000)]
Bug 24523: Add missing </p>

Signed-off-by: David Roberts <david.roberts@ptfs-europe.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 ce42283e450c63ece180751fb459d5c01f88f14c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
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 (10:30 -0500)]
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>
4 years agoBug 24543: Fix wrong test in api/v1/checkouts.t
Jonathan Druart [Thu, 30 Jan 2020 10:51:25 +0000 (11:51 +0100)]
Bug 24543: Fix wrong test in api/v1/checkouts.t

In t/db_dependent/api/v1/checkouts.t we define a circulation rule with renewalperiod=7.
But then the expected due date is today+14 days.
However, at the beginning of the script, the due_date of the issue is today+14 days.

That highlight that the renewal period is not taken into account.

The circulation rule is created with renewalperiod and renewalsallowed,
however GetLoanLength check the existence of issuelength to return the rule.
GetLoanLength finally return the default rule, with renewalperiod=0

Note that this has been found working on bug 18936, code will be cleaned on that patchset.

Test plan:
 % prove t/db_dependent/api/v1/checkouts.t
must return green before and after this patch

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 265f0c4041de9a109b0535d7fab3d95fdfcb34a8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23896: logaction should pass the correct interface to Koha::Logger
Marcel de Rooy [Fri, 25 Oct 2019 08:49:15 +0000 (08:49 +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>
4 years agoBug 17697: Improve NotesBlacklist system preference description
Katrin Fischer [Sun, 12 Jan 2020 10:16:05 +0000 (11:16 +0100)]
Bug 17697: Improve NotesBlacklist system preference description

- Switched 'separator' for more common 'tab' and rephrased sentence
- Added examples
- Added note to use hidden settings for hiding in other spots.

To test:
- Search for NotesBlacklist system preference and read the description
- Apply patch
- Refresh and read again
- If improved, sign off.

Signed-off-by: David Nind <david@davidnind.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 11b54eb159e49abe563d655bb031ca5c1aa9ea8f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 22868: DBRev 19.05.07.005
Lucas Gass [Fri, 14 Feb 2020 20:23:10 +0000 (20:23 +0000)]
Bug 22868: DBRev 19.05.07.005

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 22868: Move suggestions_manage subperm out of acquisition perm
Jonathan Druart [Tue, 14 Jan 2020 09:02:11 +0000 (10:02 +0100)]
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>
4 years agoBug 23947: Phase out jquery.cookie.js: Authority merge
Owen Leonard [Fri, 1 Nov 2019 18:15:53 +0000 (18:15 +0000)]
Bug 23947: Phase out jquery.cookie.js: Authority merge

This patch updates the JavaScript which sets cookies during the
authority merge process so that it uses the new js-cookie library.

To test, apply the patch and perform a search in the authority module
which will return multiple results.

 - Select "Merge" from the Actions menu next to any result.
   - A message should appear at the top of the page: "Merging with
     authority: <title>".
   - Click "Cancel merge." The message should disappear.
 - Select a record to merge again.
   - Select another record.
   - The page should redirect to the authority merge page.

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 a401f219481b3fc2a69c2ea5006e6e497d66b37b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23944: (follow-up) Update circulation to use new library
Owen Leonard [Fri, 1 Nov 2019 13:18:28 +0000 (13:18 +0000)]
Bug 23944: (follow-up) Update circulation to use new library

This patch updates the circulation page to use the new JavaScript Cookie
library for cookie management.

To test, apply the patch and open a patron record for checkout in the
staff client.

 - Click "Search to hold" in the toolbar and perform a catalog search
   which will return results.
 - On the search results page, the toolbar at the top of the results
   should include a split "Place hold" button. The button's menu should
   include "Place hold for <patron>" and "Forget <patron>" options. Test
   that these work correctly.
 - In the table of search results each title should include a "Place
   hold for <patron>" link.
 - Go to the checkouts page for a patron with one or more checked-out
   items.
   - Check the "Always show checkouts immediately" checkbox.
   - The patron's checkouts should load.
   - Open another patron for checkout who has checked-out items.
   - The table of checkouts should load automatically.

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 ec1073a23a7b93ec26feecd84e466b99d7748f99)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23944: Phase out use of jquery.cookie.js in favor of js.cookie.js
Owen Leonard [Fri, 1 Nov 2019 13:00:03 +0000 (13:00 +0000)]
Bug 23944: Phase out use of jquery.cookie.js in favor of js.cookie.js

This patch adds a new JavaScript file to the staff client's global
JavaScript include file: js.cookie-2.2.1.min.js. This "plugin" will
replace jquery.cookie.js which is no longer maintained.

The "About" page in the staff client is updated to include this new
resource as well as adding previously-missing information about the old
plugin which will remain until all instances of its usage have been
removed.

To test, apply the patch and check the About page to confirm the correct
information is included.

No functionality change is introduced by this bug. The only other
observable change is the existence of the new files and the inclusion of
the minified version of the file in any staff client page.

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 3d1b347be03267dd71302d4ea845471e3d6d43a9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24348: Pass marc record to _passes_required_checks
Andreas Jonsson [Sun, 5 Jan 2020 13:02:13 +0000 (13:02 +0000)]
Bug 24348: Pass marc record to _passes_required_checks

Test plan:

* Add record matching rule:

 Matching rule code: test
 Description: 001 and 003
 Match threshold: 1000
 Record type: Bibliografic record

 Match points:
    Search index: Control-number
    Score: 1000
    Tag: 001
    Subfields:
    Offset:
    Length:
    Normalization rule: none

 Required match checks:

    Source (incoming) record check field

    Tag: 003
    Subfields:
    Offset:
    Length:
    Normalization rule: none

    Target (database) record check field

    Tag: 003
    Subfields:
    Offset:
    Length:
    Normalization rule: none

* Note the match rule identity number.
* Stage a marc-file for import, for instance this one ftp://ftp.libris.kb.se/pub/export2/X/marc/X.20200104.marc

sudo /usr/sbin/koha-shell -c "perl /home/vagrant/kohaclone/misc/stage_file.pl --match 4 --file 'X.20200104.marc' --format ISO2709 --comment 'test'" kohadev

* Note the batch number and commit the file using the batch number:

sudo /usr/sbin/koha-shell -c "perl /home/vagrant/kohaclone/misc/commit_file.pl --batch-number 1" kohadev

* Again, stage the same marc-file  for import:

sudo /usr/sbin/koha-shell -c "perl /home/vagrant/kohaclone/misc/stage_file.pl --match 4 --file 'X.20200104.marc' --format ISO2709 --comment 'test'" kohadev

* Note the number of records matched.

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 9e58ee3a0df5af5a5832ca94194632135a3b2315)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23113: members/pay.tt account_grp is not longer used
Owen Leonard [Tue, 7 Jan 2020 12:33:02 +0000 (12:33 +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>
4 years agoBug 24486: Remove duplicated account information at the OPAC
Nick Clemens [Mon, 27 Jan 2020 11:48:31 +0000 (11:48 +0000)]
Bug 24486: Remove duplicated account information at the OPAC

Test plan:
Create a manual invoice
Pay it
Void it

Go to the opac, account
=> You should see only one "(Voided)"

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 4f283ebba5ded2e64e8df26d19e24310234956c9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24497: Turn off smartIndent for SQL
Lucas Gass [Fri, 24 Jan 2020 18:18:33 +0000 (18:18 +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>
4 years agoBug 24511: Update variable names to avoid confusion
Nick Clemens [Fri, 24 Jan 2020 14:58:25 +0000 (14:58 +0000)]
Bug 24511: Update variable names to avoid confusion

To test:
1 - Create a report
    SELECT borrowernumber, firstname, surname, email, emailpro FROM borrowers WHERE surname='acosta'
2 - Create or edit patron with surname acosta to have a separate email and emailpro
3 - perl misc/cronjobs/patron_emailer --notice HOLDS --module reserves --verbose --email emailpro --report ## --from 'me@you.us'
4 - Note email is used, not email pro
5 - Apply patch
6 - Repeat, correct eamil is used

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 24f68264d45efc4223a98c92c46f7bf5039bfc33)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24515: Column Configuration for pay-fines-table does not hide Account Type properly
Owen Leonard [Fri, 24 Jan 2020 23:25:20 +0000 (23:25 +0000)]
Bug 24515: Column Configuration for pay-fines-table does not hide Account Type properly

This patch corrects the order of the columns in the columns
configuration YML file. The incorrect order was causing the wrong column
to be hidden when changing the columns settings for the table in
Administration.

To test, apply the patch and go to Administration -> Columns settings.

 - Under Patrons -> pay-fines-table, test hiding the account_type and
   description columns, together and separately.
 - Verify that the correct columns are hidden on the pay fines screen
   (Patron -> Accounting -> Make a payment)

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 ed1b52a15d689a10cc522cfb5611a9d8036f2f84)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23407: (QA follow-up) Same change for UNIMARC XSLT
Marcel de Rooy [Fri, 24 Jan 2020 07:22:52 +0000 (07:22 +0000)]
Bug 23407: (QA follow-up) Same change for UNIMARC XSLT

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 9a9829d7dd1b2ad6f52528ef810b3dded6298de2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23407: (QA follow-up) Remove some XSLT item leftovers
Marcel de Rooy [Fri, 24 Jan 2020 07:12:31 +0000 (07:12 +0000)]
Bug 23407: (QA follow-up) Remove some XSLT item leftovers

Test plan:
Check intranet results and detail page.
Check opac detail.

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 e95ba5b8ddadd6f57391177126d1260ec4a129ee)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23407: Don't process items for XSLT on details pages
Nick Clemens [Wed, 31 Jul 2019 20:14:34 +0000 (20:14 +0000)]
Bug 23407: Don't process items for XSLT on details pages

To test:
1 - Add 1000 items to a record
    Go to biblio
    Edit items
    Add multiple copies of this item
    Add 1000 and confirm
    Wait..
2 - Load the record in staff client and OPAC, note how long it takes
    Press F12 in browser to open the console
    use the Network tab of the console
    note the load time
    refresh a few times to see average time
3 - Apply patch
4 - Restart all the things
5 - Reload the record in staff and opac
6 - Note decresed time
7 - Verify nothing on the page has changed

QA can grep the standard XSLT files for details pages for 'item' to note occurences do not use items information

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
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 768cd74241a012d4b24aaad7b188c04fc15f3452)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24443: Unit test
Fridolin Somers [Fri, 17 Jan 2020 09:48:50 +0000 (10:48 +0100)]
Bug 24443: Unit test

Signed-off-by: Maryse Simard <maryse.simard@inlibro.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 ef3c039e5d964da5da8ba253b52a46fffa66ad66)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24443: Consider NULL as 0 for issues in items search
Fridolin Somers [Fri, 17 Jan 2020 09:25:19 +0000 (10:25 +0100)]
Bug 24443: Consider NULL as 0 for issues in items search

In items search, we can filter by items issues count, data coming from items.issues.
Most of the time, for an item with no issues this column contains NULL.
This enhancement proposes to consider NULL as 0 to allow searching items with no issues.

Test plan:
1) Use SQL to count items with items.issues = NULL :
   select count(*) from items where issues is null;
2) Go to items search
3) Perform search with filter "Checkout count" = 0
4) Check you get the same number of results as SQL query

Signed-off-by: Maryse Simard <maryse.simard@inlibro.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 2922249d92bad9a1df4ea95b48a7e28fdc68a315)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24289: (follow up) add dbic schema changes
Lucas Gass [Thu, 13 Feb 2020 22:00:42 +0000 (22:00 +0000)]
Bug 24289: (follow up) add dbic schema changes

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 21296: suspend hold ignores system preference on intranet
Owen Leonard [Wed, 20 Nov 2019 20:04:10 +0000 (20:04 +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>
4 years agoBug 16683: Help links to fields 59X in cataloguing form are broken
Owen Leonard [Thu, 21 Nov 2019 16:26:53 +0000 (16:26 +0000)]
Bug 16683: Help links to fields 59X in cataloguing form are broken

This patch adds more specificity to handling of MARC21 documentation
links in the basic MARC editor.

To test, apply the patch and make sure the "advancedMARCeditor" system
preference is set to "Display."

You may need to edit a bibliographic framework so that 09x, 59x, and 69x
tags will display in the editor.

Edit or create a bibliographic record using that framework. Next to each
tag label in the editor should be a "?" link. Clicking this link should
open a new window with the correct Library of Congress documentation
page.

Check the links for 09x, 59x, and 69x tags as well as others to confirm
they open the correct pages.

Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.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 6cc2c566ece46e36bd56a728d2208e1c0e865220)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24289: DBRev 19.05.07.004
Lucas Gass [Thu, 13 Feb 2020 21:09:05 +0000 (21:09 +0000)]
Bug 24289: DBRev 19.05.07.004

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24289: Make sure sample_holidays will load after sample_libraries
Jonathan Druart [Thu, 26 Dec 2019 11:06:10 +0000 (12:06 +0100)]
Bug 24289: Make sure sample_holidays will load after sample_libraries

They are inserted depending on their alpha order, and sample_holidays
will fail because of missing branchcode.
This patch suggests a simple fix: rename sample_holidays to
sample_libraries_holidays, to make sure it will be loaded after
sample_libraries

Test plan:
Start a fresh installation and select all sample data

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 d950985d17db7c142e6c99edb41a7dc9c2d906ef)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24289: Add foreign keys on *_holidays.branchcode tables
Jonathan Druart [Thu, 26 Dec 2019 10:42:43 +0000 (11:42 +0100)]
Bug 24289: Add foreign keys on *_holidays.branchcode tables

Those are missing foreign keys, it will also clean the holidays tables
and automatically remove the holidays when a library is removed.

Test plan:
0. Do not apply this patch
1. Create a new library
2. Create special and repeatable holiday for this library
3. Remove the library
=> Notice that the holidays still exist in DB
4. Apply this patch
5. Execute the update database entry
=> Notice that the holidays for this library have been removed from the DB
6. Repeat 1-3
=> Notice that the holidays have been removed along with the library

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 8d42c6be904cf1e23c179063500d236fc5789d8f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24025: Make CodeMirror content searchable
Lucas Gass [Wed, 22 Jan 2020 16:31:10 +0000 (16:31 +0000)]
Bug 24025: Make CodeMirror content searchable

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1887f8a715944b80227171441b427d5ccf6177d1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24452: Advanced editor - show multiple spaces visually
Owen Leonard [Fri, 17 Jan 2020 15:00:31 +0000 (15:00 +0000)]
Bug 24452: Advanced editor - show multiple spaces visually

This patch updates the JavaScript and CSS for the advanced MARC editor
so that multiple consecutive spaces within a line will be detected and
highlighted.

To test the EnableAdvancedCatalogingEditor system preference should be
enabled. Apply the patch and clear your browser cache if necessary.

 - Go to Cataloging -> Advanced editor.
 - On any text entry line (e.g. 245), enter some words with one, two,
   and more spaces in between them. When there are two or more spaces
   between words the spaces between the words should have a dotted red
   underline.
 - Remove the extra spaces and confirm that the dotted line disappears.

Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.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 f33f46e6cde96b996739cbcce02e98c0bb6a2ca0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24105: Fix error when running longoverdue.pl with --itemtypes
Liz Rea [Mon, 25 Nov 2019 17:20:51 +0000 (11:20 -0600)]
Bug 24105: Fix error when running longoverdue.pl with --itemtypes

To test:

Run Longoverdue.pl as koha-shell with both 1 and several --itemtypes specified
notice that it has an error
apply this patch
run longoverdue.pl as koha-shell with both 1 and several --itemtypes specified
notice there isn't an error anymore!

Signed-off-by: David Roberts <david.roberts@ptfs-europe.com>
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 caba8dafb820448aca877c86682c28ff97953f3b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23064: Use Koha::Subscription in ModSubscription
Jonathan Druart [Wed, 20 Nov 2019 11:22:58 +0000 (12:22 +0100)]
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>
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 d79888822bba76c1eab3530f5b792bd7c88bbbde)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24236: Fix pagination to use query_cgi
Nick Clemens [Fri, 13 Dec 2019 16:08:16 +0000 (16:08 +0000)]
Bug 24236: Fix pagination to use query_cgi

This is still wrong, we should use page-numbers.inc, but that is a larger refactoring
This patch fixes non-QueryParser searches by simple getting an using the escaped query (query_cgi)

For QueryParser, we do what the QP code does, just uri escape the query - the way that SimpleSearch does the query parsing instead of the usual buildQuery suggest to me that we should probably switch all of this to use the general Zebra search.

The issues with reservoir should be their own bug

To test:
1 - Search for cat in cataloging search
2 - Get results and see you can paginate
3 - Search for "cat"
4 - Get results but subsequent pages empty
5 - Apply patch
6 - Repeat search for "cat"
7 - You can paginate
8 - Enable UseQueryParser syspref (don't worry about installing)
9 - Confirm can still search with quotes and paginate

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: George Williams <george@nekls.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 c2182118e130ac246b1f5ed790fb1659789e2fe5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24214: Fix due date formatting when sticky
Jonathan Druart [Wed, 11 Dec 2019 11:20:54 +0000 (12:20 +0100)]
Bug 24214: Fix due date formatting when sticky

When checking out and sticky due date is selected, on the next screen
the due date is displayed iso-formatted, instead of following the
dateformat syspref

Test plan:
0/ Do not apply the patch
1/ Check an item out, with a selected due date. Tick "Remember for
session"
2/ Next screen you see the date like YYYY-MM-DD HH:MM
regarless the value of the dateformat syspref
3/ Apply this patch
4/ Reload the page
=> The date is correctly formatted
5/ Check an item out
=> Due date is correctly set

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 fa65f818237d4df56deca97bc764b998af7f9bd2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24061: Close after timeout if onafterprint no supported
Jonathan Druart [Fri, 22 Nov 2019 09:16:15 +0000 (10:16 +0100)]
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>
4 years agoBug 24061: Close the window after the page has been printed
Jonathan Druart [Wed, 20 Nov 2019 08:19:51 +0000 (09:19 +0100)]
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>
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 (18:10 +0100)]
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>
4 years agoBug 17667: Add tests
Jonathan Druart [Wed, 18 Dec 2019 17:10:07 +0000 (18:10 +0100)]
Bug 17667: Add tests

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 5f918d4118e2e617ed32ebdb4732b9d4bbae08b4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24404: Add missing space on invoices page / remove . from status
Katrin Fischer [Sun, 12 Jan 2020 09:32:17 +0000 (10:32 +0100)]
Bug 24404: Add missing space on invoices page / remove . from status

On the bottom of the invoices page the summary of adjustments and
shipping shows as:

Adjustments plus shipping:2.00

The patch adds the missing space between text and amount.

To test:
- 'Receive shipment' from a result in your vendor search
- Start a new invoice by entering an invoice number, amount
  for shipping cost and fund.
- Finish receive (you don't need to receive anything)
- You should now be on invoice.pl
- Verify Status is 'Open.' and in 'Invoice details' we
  have the amount with the missing space.
- Apply patch, reload the page.
- Verify the missing space is there and the . is gone.
- Close invoice, no . there either.

Signed-off-by: Owen Leonard <oleonard@myacpl.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 53da28d371a260b38a3ebe9fbbf3b38839aeedda)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24333: Add password class to AutoSelfCheck syspref
Nick Clemens [Thu, 9 Jan 2020 12:48:04 +0000 (12:48 +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>
4 years agoBug 22220: Fix bib Apache rewrite rule for intranet
Marcel de Rooy [Thu, 16 Jan 2020 14:33:39 +0000 (14:33 +0000)]
Bug 22220: Fix bib Apache rewrite rule for intranet

Trivial change. Speaks for itself.
Since koha/detail.pl does not exist, we cannot break things ;)

Test plan:
[1] Copy the change in apache-shared-intranet.conf to your actual
    apache configuration. Probably in /etc/koha/.
[2] Restart Apache.
[3] Try a biblionumber say 123 on intranet with [your_staff_client]/bib/123.
    Does the detail page come up?

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 8d2324b467160e071339c303ac1184899f384dfc)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24206: (follow-up) fix typos in shebang
Lucas Gass [Thu, 13 Feb 2020 15:19:08 +0000 (15:19 +0000)]
Bug 24206: (follow-up) fix typos in shebang

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24206: (follow up) fix updatedatabase error
Lucas Gass [Wed, 12 Feb 2020 23:38:14 +0000 (23:38 +0000)]
Bug 24206: (follow up) fix updatedatabase error

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