]> git.koha-community.org Git - koha.git/log
koha.git
5 years agoBug 23273: (RM follow-up) Add missing filters
Martin Renvoize [Tue, 20 Aug 2019 14:59:06 +0000 (15:59 +0100)]
Bug 23273: (RM follow-up) Add missing filters

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a5828bc7dccdfbc574b30a7f39c822d4a4cab8fe)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23273: Fix CSV export for overdues
Jonathan Druart [Mon, 19 Aug 2019 22:09:58 +0000 (18:09 -0400)]
Bug 23273: Fix CSV export for overdues

We should construct the URI parameters string manually to avoid
filtering problems.
We cannot send the full query_string to the template and expect that the
string will be escaped correctly.

Test plan:
- go to overdues.pl
- construct a search limiting by date due and library
- note number of overdues in results
- click "Download file of displayed overdues"
=> note that downloaded file contains just those in your search

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>
(cherry picked from commit b8f382b82172b70166db48d572f767b06a4834ef)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23437: Use authorities for tracing series
Nick Clemens [Wed, 7 Aug 2019 12:39:51 +0000 (12:39 +0000)]
Bug 23437: Use authorities for tracing series

To test:
1 - Set UseAuthoritiesForTracing to use
2 - Find some records with an 800 or 830 series entry
3 - View the record in staff and opac, note the series link does a search for title and author
4 - Apply patch
5 - restart all the things
6 - View the records, note the links now use the authority number

Signed-off-by: Ron Houk <RHouk@ottumwapubliclibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8c1d54dab1818ba212704442a37902e7a9ef089d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23324: (QA follow-up) Typo and remove unneeded use statement
Marcel de Rooy [Fri, 16 Aug 2019 06:03:55 +0000 (06:03 +0000)]
Bug 23324: (QA follow-up) Typo and remove unneeded use statement

Two typos in POD typo for routine name.
Remove "use Business::ISBN" from Normalize.pm.

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 b48e2d5e7a41511dccadb01808e1ece259c5f0b9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23324: (QA follow-up) Use existing NormalizeISBN function
Nick Clemens [Fri, 9 Aug 2019 10:47:17 +0000 (10:47 +0000)]
Bug 23324: (QA follow-up) Use existing NormalizeISBN function

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 5104d1eae67db94bebb05b2e9f1817685649b224)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23324: Add an ISBN normalization routine
Nick Clemens [Tue, 16 Jul 2019 13:11:06 +0000 (13:11 +0000)]
Bug 23324: Add an ISBN normalization routine

To test:
1 - Set SearchEngine to ElasticSearch
2 - Stage the sample file (import it if it doesn't already exist in your catalog and then stage again)
3 - Set matching rule to ISBN
4 - No matches found
5 - Apply patch
6 - Apply no matchign rule
7 - Change the ISBN matching rule to use ISBN normalizer
8 - Apply matching rule for ISBN
9 - It matches!

Signed-off-by: Ron Houk <rhouk@ottumwapubliclibrary.org>
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 3d15819443bd114a5e61a7a9ee947a3307d39b8f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23445: (RM follow-up) Missing filter
Martin Renvoize [Fri, 16 Aug 2019 12:47:49 +0000 (13:47 +0100)]
Bug 23445: (RM follow-up) Missing filter

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7e4f25e088305d9dd299bbfaa33b6140137c2f01)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23445: (RM follow-up) Add warning for unexpected lengthunit
Martin Renvoize [Fri, 16 Aug 2019 11:17:42 +0000 (12:17 +0100)]
Bug 23445: (RM follow-up) Add warning for unexpected lengthunit

Discussions on this bug highlighted worries about behind the scenes
fallbacks to 'days' as a lengthunit should the lengthunit be set to an
unrecognised value. This patch adds a warning to the about page for any
such occurrences so librarians may be made aware of and resolve the issue.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1aae63606caeb389a40bd644b1f9e30917325573)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23445: Make loan period unit translatable fixing editing issue
Katrin Fischer [Fri, 9 Aug 2019 15:49:34 +0000 (15:49 +0000)]
Bug 23445: Make loan period unit translatable fixing editing issue

In the circulation rules, the loan period displayed in the table
of circulation rules is not translatable, always displaying in English.
This causes an issue when editing a circ rule with unit hours in any
other language than English.
When editing these rules, instead of hours, days will be preselected.

To test:
- Before applying the patch:
- Install a translation
- Activate and switch to the tranlation
- Create a circulation rule using 'hours' as the unit
- Edit the circulation rule
- Verify that instead of 'hours' 'days' will be selected in the pull-down
- Apply patch
- Update po files (kshell, cd misc/translator, perl translate update <langcode>)
- Edit po file <langcode-staff..., search for Hours and translate line,
  make sure to also remove fuzzy, and that your translation matches the
  pull down values for your language
- Reinstall translation
- Repeat circ rule edit test
- Verify the unit now shows up with your translation and editing works

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>
(cherry picked from commit 16789351efd1f7dca88ed0797208ba5723922b62)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22799: Avoiding batch item modification case sensitivity when entering barcodes
Aleisha Amohia [Mon, 29 Apr 2019 01:25:46 +0000 (01:25 +0000)]
Bug 22799: Avoiding batch item modification case sensitivity when entering barcodes

Note: this fixes the bug that is present right now where batch item
modification barcode matching is case sensitive, but if Koha barcodes
ever do become case sensitive, this patch will need to be removed.

To test:
1) Make/use an item with a barcode with letters in it. For testing
purposes, I'll be using an item with the barcode 'abcde'.
2) Go to Tools -> Batch item modification and enter this barcode in the
barcode list text input field, but change the case of one or some
letters. (i.e. enter the barcode in the field as 'abCDE')
3) Click Continue
4) Notice that the next page shows an error 'the following barcodes were
not found', but the item still shows underneath (was correctly fetched from database).
5) Create a text file and put the changed-case barcode in it (i.e. put
the barcode 'abCDE' in the text file)
6) Go back to batch item modification and upload the
text file as a barcode file
7) Notice same error as in Step 4
8) Apply patch and refresh page
9) Run through steps 1 to 6. There should no longer be an error and the
barcodes should be found as expected.

Sponsored-by: South Taranaki District Council
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Donna Bachowski <donna@bywatersolutions.com>
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 2071fa4aca27f6748f32fd62037a203df2347141)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 11677: Use zebra not-onloan-count index for availability limit
Tomas Cohen Arazi [Mon, 12 Aug 2019 13:43:35 +0000 (10:43 -0300)]
Bug 11677: Use zebra not-onloan-count index for availability limit

This uses the work from bug 18098 to use the count of not-onloan items to
determine availability.

It keeps the allrecords,AlwaysMatches='' portion of the query so it still catches
records with the tested indexed missing.
These shouldn't exist except in the case of missing data, but kept for future use as well as
it has no negative impact and minimizes the change made.

Note that availability in this sense means not check out and not lost. Transfers, holds, and not for loan statuses
should probably have indexes built in the same way as bug 18098 (there are related FIXMEs in the code)

This updates the export_records file used for testing - adding three records with a not-onloan-count (999$x) of 1,
but marking the item on the third record lost to prevent its return

To test:
   1 - make sure SearchEngine pref is set to 'Zebra'
   2 - Do a search on the OPAC that returns some records
   3 - Find a record in those results with more than one 1 item, and checkout 1 leaving 1 (or more) available
   4 - Find another record with only 1 item, check that item out
   5 - Limit opac search to available items - both records disappear
   6 - Apply patch
   7 - Restart all the things
   8 - Repeat search
   9 - First record should show, but no second
  10 - Mark other items of first record as lost, return items on second record
  11 - Repeat search, first record should not be in results, second should
  12 - prove -v t/db_dependent/Search.t

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d4468c5f33f03cbd616527a558c1b67670089642)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22830: correct for loop in value_builder/unimarc_field_4XX.pl value_builder
Fridolin Somers [Thu, 2 May 2019 12:20:45 +0000 (14:20 +0200)]
Bug 22830: correct for loop in value_builder/unimarc_field_4XX.pl value_builder

In value_builder/unimarc_field_4XX.pl value_builder gets search results
and runs a for loog with $i index. This loop is limiter with number of
results par page, it should also be limited by number of results if
lower that number of results par page.

Same in cataloguing/value_builder/marc21_linking_section.pl.

Test plan :
1) configure framework to use value builder
2) use value builder
3) perform a search with number of results lower than number of results
   per page
4) check number of records diplayed is OK
5) perform a search with number of results upper than number of results
   per page and check number of results is OK
6) you see number of results par page records and pagination link

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>
(cherry picked from commit 669864f4b0cb16fc9a8566bffdeb42d7875fd8aa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23446: Fix display issue in serials navigation
Katrin Fischer [Fri, 9 Aug 2019 16:02:54 +0000 (16:02 +0000)]
Bug 23446: Fix display issue in serials navigation

The serial navigation shows a little stangely on the
serial subscription detail page and other pages that show
information about a specific subscription with one of the menu items
having a different display height than the other items.

To test:
- Go to the serials module
- Add or search for an existing subscription
- Go to the subscription detail page
- Verify the display issue in the navigation on the left
- Apply patch
- Check again from different pages in the serials module
- Verify display is improved

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>
(cherry picked from commit d5152dfcdf9ba63fd04d0dc15f34c851e5c85836)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23242: Fix insert of Z3950 servers with strict SQL modes
Jonathan Druart [Sun, 4 Aug 2019 17:48:07 +0000 (12:48 -0500)]
Bug 23242: Fix insert of Z3950 servers with strict SQL modes

If strict SQL modes are set, the insertion of a new Z3950 server can
fail.

DBIx::Class::Storage::DBI::_dbh_execute(): Incorrect integer value: ''
for column 'checked' at row 1 at
/home/vagrant/kohaclone/admin/z3950servers.pl line 82

Using Koha::Z3950Servers fixes the issue (handled from
Koha::Object->store)

Test plan:
- Turn the strict SQL modes on (config strict_sql_modes)
- Create a new Z3950 server filling only the mandatory fields.
=> Without this patch you will get the failure, with this patch applied
the server will be inserted sucessfully
- Delete it
=> No regression should be found
- Search for servers
=> No regression should be found (the search is a start-with, LIKE "$pattern%")

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 a9c730244768ea355004e821d5be35dc2e617840)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23309: DBRev 19.05.03.002
Martin Renvoize [Thu, 15 Aug 2019 08:16:02 +0000 (09:16 +0100)]
Bug 23309: DBRev 19.05.03.002

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 347dc9589aa75edb1c64c21e5d057373dfd3ed84)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23309: Use Koha::MarcSubfieldStructures to create to subfields
Jonathan Druart [Thu, 8 Aug 2019 01:16:00 +0000 (20:16 -0500)]
Bug 23309: Use Koha::MarcSubfieldStructures to create to subfields

It will fix the insert of new subfields with SQL strict modes

DBD::mysql::st execute failed: Incorrect integer value: '' for column
'hidden' at row 1 [for Statement "

Test plan:
- Turn the config strict_sql_modes ON
- Add a new subfield to a field

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 144e753da65cafa3c4291eec701222784ec0893f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23309: Update DB
Jonathan Druart [Thu, 8 Aug 2019 01:08:22 +0000 (20:08 -0500)]
Bug 23309: Update DB

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0a0a8d874d9a46b0c53b9ce4691e36f5dc04e68e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 16219: (QA follow-up) Tiny regex change
Marcel de Rooy [Fri, 9 Aug 2019 10:17:41 +0000 (10:17 +0000)]
Bug 16219: (QA follow-up) Tiny regex change

The parameter <<>> does not work. There should be text inside.
The construction .*? does not look good completely.
Replacing it by the stricter [^>]+ So, no greater than's and at least one.

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 e66ccaa3a7743378f906612562889a9476bf6802)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 16219: (follow-up) Nicer message if params missing and note that they are not...
Nick Clemens [Fri, 19 Jul 2019 19:42:37 +0000 (19:42 +0000)]
Bug 16219: (follow-up) Nicer message if params missing and note that they are not combined

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 52587b4319d5d22436733f296021648d846f6359)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 16219: Add 'params' parameter to runreport.pl
Nick Clemens [Wed, 5 Sep 2018 11:15:01 +0000 (11:15 +0000)]
Bug 16219: Add 'params' parameter to runreport.pl

To test:
 1 - Apply patch
 2 - Write a report that takes no variables
 3 - Run this using runreport.pl
    perl misc/cronjobs/runreport.pl 1
 4 - Confirm results as expected
 5 - Write a report that takes one or more variables
 6 - Run using runreport.pl, but pass no params
 7 - You should get a SQL error
 8 - Now run passing the correct number of params
    perl misc/cronjobs/runreport.pl --param first --param=2nd 2
 9 - Verify results as expected
10 - call runreport with no parameters
    perl misc/cronjobs/runreport.pl
11 - Verify documentation is correct and helpful

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.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 72197a9574d8b27651a390b9f177a537e1bf994c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22272: Calendar: When entering date ranges grey out dates in the past from the...
Emmi [Wed, 10 Jul 2019 06:25:43 +0000 (09:25 +0300)]
Bug 22272: Calendar: When entering date ranges grey out dates in the past from the start date

In "Calendar" tool it's possible to pick dates before start
date as end date.

This patch sets end date calendars "minDate" as picked start day
to grey out past dates. Also reindents datepicker code for
better readability.

Test plan:
- Apply this patch
- Set start date from first calendar
- Set end date from second calendar
=> Dates before start date are greyed out

Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
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>
(cherry picked from commit 06e28c3ac5b708ce01ea1265fa993c1f85e98645)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23385: (follow-up) Update link
Owen Leonard [Mon, 29 Jul 2019 12:57:21 +0000 (12:57 +0000)]
Bug 23385: (follow-up) Update link

This follow-up adds a dummy href attribute to the link for showing and
hiding the default values form so that it behaves more like a link.

I removed "click to" from the link text and added Font Awesome icons
common to "show/hide" links.

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>
(cherry picked from commit 0a66d33d8c5d778e3a0961cb5953e2432d9ccb65)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23385: Hide 'Default values' fields by default
Nick Clemens [Fri, 26 Jul 2019 14:48:51 +0000 (14:48 +0000)]
Bug 23385: Hide 'Default values' fields by default

To test:
1 - Go to Tools->Import patrons
2 - Choose a file
3 - Scroll a long way to submit
4 - Apply patch
5 - Choose a file
6 - Can submit easily
7 - Click to expand and enter default fields
8 - Confirm can still submit and that values entered are used

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9258d385baa94a00f671dea6315c7738a8f38026)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23438: Compiled CSS
Fridolin Somers [Mon, 2 Sep 2019 12:43:44 +0000 (14:43 +0200)]
Bug 23438: Compiled CSS

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23438: Use Font Awesome icons in intranet search results browser
Fridolin Somers [Wed, 7 Aug 2019 13:33:52 +0000 (15:33 +0200)]
Bug 23438: Use Font Awesome icons in intranet search results browser

In intranet after a search you see a results browser top left of biblio record details.

Actually this uses text for links next and previous with a character for the arrows.
I propose to use Font Awesome icons arrows.

In fact the translated text is often too large for those buttons.
For example "Previous" is "Préédant" in french and it causes the next and previous buttons to display on two lines.
Using icons is more compact and easy to use.

This patch also adds the list icon to back to results link and changes for a minimal text "Results".

1) Go to intranet
2) Perform a search with a few results
3) Click on first record
4) Check browser displays well
5) Click on next icon, check you go to next search result
6) Click on revious icon, check you go to previous search result
7) Click on "Results", you come back to search results
8) Clik on "Last" and click on last record
9) Check browser displays well

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>
(cherry picked from commit 2fade168c81bc05d24164780cbddc100302dd71f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23408: Move relatives-issues-table to an include
Nick Clemens [Thu, 1 Aug 2019 11:44:39 +0000 (11:44 +0000)]
Bug 23408: Move relatives-issues-table to an include

TO test:
1 - Find and adult patron
2 - Add a child account
3 - Check out some things to the child
4 - View the adults account, click 'Relatives checkouts'
5 - Observe table is oddly formatted
6 - View on both the 'Check out' and 'Details' tabs
7 - Apply patch
8 - Tables are displayed correctly

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>
(cherry picked from commit 0548bfcd67ab8e0445ff7f0f52d3c7c10b98ed1b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23319: Implement blocking errors for neworderbiblio and basket.pl
Nick Clemens [Mon, 15 Jul 2019 17:46:36 +0000 (17:46 +0000)]
Bug 23319: Implement blocking errors for neworderbiblio and basket.pl

To test:
1 - Hit neworderbiblio with a query and no vendor
    http://localhost:8081/cgi-bin/koha/acqui/neworderbiblio.pl?q=cat
    Or, add to basket from existing record with a search
    Refresh the page (url has no parameters)
2 - Get an internal server error
3 - Add bookseller
    http://localhost:8081/cgi-bin/koha/acqui/neworderbiblio.pl?q=cat&booksellerid=1
4 - Click 'Order' on a result
5 - Internal server error
6 - Apply patch
7 - Repeat 1-4, you get 'Vendor not found' or 'Basket not found'

Signed-off-by: Maryse Simard <maryse.simard@inlibro.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 2782a039aa7883107c74ab6e446aa51b9f555683)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23436: add a label for duplicate backend
Alex Arnaud [Wed, 7 Aug 2019 08:57:01 +0000 (10:57 +0200)]
Bug 23436: add a label for duplicate backend

Reproduce issue:
 - Enable "EnableAdvancedCatalogingEditor" preference
 - Go to cataloguing and click on advanced editor
 - Click on the down arrow in "Save to catalog" menu
 - You should see an undefined named save backend

Test patch:
 - Enable "EnableAdvancedCatalogingEditor" preference
 - Go to cataloguing and click on advanced editor to save preference to
   the cookie
 - Click on the down arrow in "Save to catalog" menu
 - You should see a "Duplicate" named backend

Test Bug 16232 for no regression:
 - Search for a biblio in catalog
 - Click in "Edit record"
 - Advanced editor should appear.
   SUCCESS => browser url ends with #duplicate/{original biblionumber}
           => Title above toolbar is "Editing duplicate record of
              #{original biblionumber}"
 - Save
   SUCCESS => browser url ends with #catalog/{new biblionumber}
           => Title above toolbar is "Editing catalog record #{new
biblionumber}"

More test:
 - Search for a biblio in catalog
 - Click on "Edit record"
 - Advanced editor should appear
 - Click on the down arrow in "Save to catalog" menu and click on
   Duplicate,
 - Record should be saved as a new one (same behavior)

Signed-off-by: cori <corilynn.arnold@gmail.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 a8ddf55667f60a3cdc23ef0b6272921bc975bc73)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23416: DBRev 19.05.03.001
Martin Renvoize [Mon, 12 Aug 2019 13:37:23 +0000 (14:37 +0100)]
Bug 23416: DBRev 19.05.03.001

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 78c2800bc833759302bf68e1dc3a4fed26a5163e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23416: (QA follow-up) Add IGNORE to updatedatabase SQL statement
Katrin Fischer [Thu, 8 Aug 2019 13:37:58 +0000 (13:37 +0000)]
Bug 23416: (QA follow-up) Add IGNORE to updatedatabase SQL statement

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d559e89596cef1848c5eaef5554a1fc49d899f88)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23416: Add PreserveSerialNotes system preference
Nick Clemens [Fri, 2 Aug 2019 13:22:37 +0000 (13:22 +0000)]
Bug 23416: Add PreserveSerialNotes system preference

Bug 11492 intended to pass routinglists forward. It also passed forward serial notes.
This may or not me desired behvaiour, to avoid changing functionality twice I add a syspref
to control this behaviour.

To test:
 1 - Have or create a subscription in the serials module
 2 - Recieve an issue, making sure ot ad a note
 3 - Go to receive again, note the note from the last serial is set for the expected issue
 4 - Apply patch
 5 - Update database, restart all the things
 6 - Receive the issue leaving the note in place
 7 - Note the next expected issue has the note
 8 - Find the syspref PreserveSerialNotes
 9 - Confirm it defaulted to Do
10 - Set it to 'Do not'
11 - Receive the expected serial leavign the note
12 - Note the newly generated expected serial has no note
13 - prove -v t/db_dependent/Serials.t

Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Maryse Simard <maryse.simard@inlibro.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 a64c8cd1a4b2c237b3abf777480d7fc8733986d3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23294: Show actual price when ordering
Nick Clemens [Mon, 15 Jul 2019 18:29:45 +0000 (18:29 +0000)]
Bug 23294: Show actual price when ordering

To test:
1 - Have a basket
2 - Add an order
3 - Modify the order, note you cannot see the unitprice/Actual cost
4 - Apply patch
5 - Note it is there
6 - Add to IntranetUserCSS:
    .ordering_unitprice{ display:none; }
7 - Reload
8 - Note it is hidden

Signed-off-by: Maryse Simard <maryse.simard@inlibro.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 d2e85ac9949ba6ccbe7470ae2caf446c05e0b941)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23338: Allow specifying order level replacement price when adding to basket from...
Nick Clemens [Thu, 18 Jul 2019 13:08:18 +0000 (13:08 +0000)]
Bug 23338: Allow specifying order level replacement price when adding to basket from file

To test:
 0 - Clear MarcFieldsToOrder and MarcItemFieldsToOrder preferences
 1 - Have a budget/fund/vendor in acquisitions
 2 - Create or find a basket for vendor
 3 - Add to basket from a file or staged batch (can use any record)
 4 - Note there is no option for replacement price
 5 - Add the order
 6 - Replacement price is 0 - you must modify order or set upon receiving
 7 - Apply patch
 8 - Repeat
 9 - Disable matchign check during add to basket
10 - Note you can specify a replacement price
11 - Do so
12 - Note it is saved in order

Signed-off-by: Maryse Simard <maryse.simard@inlibro.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 95fe32e224af1c4ac9deb7d1b5dbe668053f8a47)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoUpdate release notes for 19.05.03 release v19.05.03
Fridolin Somers [Wed, 28 Aug 2019 13:36:51 +0000 (15:36 +0200)]
Update release notes for 19.05.03 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoIncrement version for 19.05.03 release
Fridolin Somers [Wed, 28 Aug 2019 13:30:55 +0000 (15:30 +0200)]
Increment version for 19.05.03 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoTranslation updates for Koha 19.05.03
Koha translators [Wed, 28 Aug 2019 13:29:09 +0000 (10:29 -0300)]
Translation updates for Koha 19.05.03

5 years agoBug 22142: Do not revert data if 'unchanged' was set
Jonathan Druart [Mon, 5 Aug 2019 15:54:57 +0000 (10:54 -0500)]
Bug 22142: Do not revert data if 'unchanged' was set

Signed-off-by: Kyle M Hall <kyle@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 cec6f46b47ae9625222f35014f6693ba7bb365e8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22142: Highlight the issue
Nick Clemens [Thu, 13 Jun 2019 14:20:25 +0000 (14:20 +0000)]
Bug 22142: Highlight the issue

Signed-off-by: Kyle M Hall <kyle@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 52885ff55b1cac4b09129cc504bb23d169b22c13)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23253: Fix OpacNavRight for self reg by email
Jonathan Druart [Mon, 5 Aug 2019 14:04:25 +0000 (09:04 -0500)]
Bug 23253: Fix OpacNavRight for self reg by email

The code expects to display OpacNavRight content at the bottom of the
login form when a user just registered.

Test plan:
- Turn PatronSelfRegistrationVerifyByEmail on
- Register a patron
- Confirm by clicking on the link you received by email (or see the
message_queue table)
=> The OpacNavRight content should be displayed

QA Note: This code smells, the code in the pl should not be needed.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f9572dd1acd9f39229d8cd864050a536b9c2815d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23253: (bug 22318 follow-up) Fix OpacNavRight even if opacuserlogin is off
Jonathan Druart [Mon, 5 Aug 2019 14:02:15 +0000 (09:02 -0500)]
Bug 23253: (bug 22318 follow-up) Fix OpacNavRight even if opacuserlogin is off

There are other occurrences of OpavNavRight that bug 22318 forgot to
adjust to use the news system instead of the syspref.

Test plan:
- turn off opacuserlogin
- create a news for OpacNavRight
- go to the opac main page
=> Confirm that the OpacNavRight content is displayed correctly.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ee7ba48bfe9d3f43bbc1bb88f62bf12854e5a838)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23455: Patron card printing from Patron lists is broken
Owen Leonard [Thu, 15 Aug 2019 13:46:35 +0000 (13:46 +0000)]
Bug 23455: Patron card printing from Patron lists is broken

This patch makes a few corrections to the process of printing patron
cards from the patron lists page. These changes are necessitated by Bug
20650: Changes to the markup in patroncards/print.tt were not reflected
in the JavaScript in patron_lists/lists.tt.

Also fixed: A missing quotation mark, a missing semicolon, and
incorrect template variable filter.

To test, apply the patch and go to Tools -> Patron lists.

 - Click the "Actions" menu corresponding to a patron list.
 - Select "Print patron cards."
 - In the "Print patron cards" modal, click the "Export" button.
 - The modal should reload with a link to download a patron card PDF.
   The link should work correctly.

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 a57aea15a7f86e71bdfb6d6540aed18b2702b226)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23428: (bug 23151 follow-up) Fix self registration with a verification email
Jonathan Druart [Mon, 5 Aug 2019 13:40:12 +0000 (08:40 -0500)]
Bug 23428: (bug 23151 follow-up) Fix self registration with a verification email

DBIx::Class::Row::store_column(): No such column 'changed_fields' on
Koha::Schema::Result::Borrower at /home/vagrant/kohaclone/Koha/Object.pm
line 75

Test plan:
- Turn PatronSelfRegistrationVerifyByEmail on
- Register a new account
- Click on the link (see the message_queue table)
=> Without this patch you get the error
=> With this patch you will see the login form

Signed-off-by: Michal Denar <black23@gmail.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 c5f73575ab07e75b45e5e9495820b602225c75f5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23322: Correct case for boolean in ES search
Nick Clemens [Tue, 16 Jul 2019 12:08:47 +0000 (12:08 +0000)]
Bug 23322: Correct case for boolean in ES search

I did not include tests only because this is a very small reasonable change and routine has no tests.
It does not affect behaviour, it only touches syntax lightly.

To test:
  0 - Set SearchEngine to ElasticSearch
  1 - Import the example record (a version is included in sample data in devbox/testing docker so you can skip)
  2 - Stage the attached example record
  3 - Match using 'ISBN' rule
  4 - No matches found
  5 - Apply patch
  6 - Restart all the things
  7 - Reapply matching with no rule
  8 - Reapply with ISBN matcing
  9 - It matches!
 10 - Set SearchEngine to Zebra
 11 - Reapply matching with no rule
 12 - Reapply with ISBN matching
 13 - Matching works as before in Zebra

Signed-off-by: Ron Houk <rhouk@ottumwapubliclibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ce1b79d55d421d6d173d644ee7061ebb5b93919a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23405: Circulation autocomplete for patron lookup broken if cardnumber is empty
Owen Leonard [Wed, 31 Jul 2019 16:01:39 +0000 (16:01 +0000)]
Bug 23405: Circulation autocomplete for patron lookup broken if cardnumber is empty

This patch modifies the JavaScript behind the patron search
results autocomplete widget which is displayed when typing in the search
header's "Check out" tab.

The script is modified to use the patron's borrowernumber instead of
cardnumber when redirecting to the checkout page.

Instead of copying the patron's card number into the search form and
triggering a submit, the autocomplete output uses direct links to each
result.

To better handle patrons with no card number, the output is modified to
show card number with parentheses only if card number is present.

To test you should have a patron in your database which has no card
number. Make sure CircAutocompl is enabled.

- From the circulation home page, type a patron name in the "Check out"
  form and wait for autocomplete search results to display.

- Patrons with a card number should be listed in the format: Surname,
  First name (Card number) Address.

- Patrons without a card number should be listed as: Surname, First
  name Address.

- Clicking on either kind of result should link you the checkout screen
  for that patron.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Ian Walls <ian@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 82a0f5913974155bd79f82cf2075936de7b0c431)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22741: Add a test
Jonathan Druart [Tue, 6 Aug 2019 14:44:40 +0000 (09:44 -0500)]
Bug 22741: Add a test

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 75168e4ae5bad0806f96a39ce38f5f3f04e96c51)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22741: Make updated_on timezone aware in Koha::Patron
Martin Renvoize [Thu, 20 Jun 2019 15:00:59 +0000 (16:00 +0100)]
Bug 22741: Make updated_on timezone aware in Koha::Patron

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 e5c05344c0c182703965f77060e6595226047eea)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23237: Fix POD and typos
Nick Clemens [Tue, 30 Jul 2019 13:52:05 +0000 (13:52 +0000)]
Bug 23237: Fix POD and typos

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a6fb4e4f2af100c867da3434756a82f65c04b971)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23237: Plugin allow [% INCLUDE %] from template
Frédéric Demians [Sat, 29 Jun 2019 06:55:34 +0000 (08:55 +0200)]
Bug 23237: Plugin allow [% INCLUDE %] from template

From a plugin template it is useful to be able to include other templates with
[% INCLUDE %] directives. But TT module is used by Koha with absolute paths.
Relative paths are forbidden for security reasons. A new param [% PLUGIN_DIR %]
allow plugin templates to know where to find plugin home directory.

How to test:

1. Install kitchen-sink plugin.

2. Find tool-step1.tt file, and add this at the begining of the file:
   [% INCLUDE "$PLUGIN_DIR/header.tt" %]
   It ask to include a template header.tt which doesn't exit.

3. Run kitchen-sink plugin tool. You must have this error message:

   Template process failed: file error - _path to plugin
   directory_/Koha/Plugin/Com/ByWaterSolutions/KitchenSink/header.tt: not found

   quod erat demonstrandum

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8c517d2f2860c08263f44dfde8d3cadea418694e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23099: Compiled CSS
Fridolin Somers [Fri, 9 Aug 2019 13:35:09 +0000 (15:35 +0200)]
Bug 23099: Compiled CSS

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23099: OPAC Search result sorting "go" button flashes on page load
Owen Leonard [Tue, 11 Jun 2019 18:13:08 +0000 (18:13 +0000)]
Bug 23099: OPAC Search result sorting "go" button flashes on page load

There are a few places in the OPAC where we hide the submit button on a
sorting form because the form auto-submits when the selection changes.
These should be hidden using CSS instead of JS to prevent the temporary
appearance of the submit button while the page loads.

To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

Test OPAC search results and OPAC checkout history. On both pages you
should not see a "Go" button next to the <select> input for changing the
sort order.

Disable JavaScript in your browser and test those pages again. The "Go"
button should appear.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a89a203c1c85841a09b49771adbd77eeb76180c2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 14549: POD and variable cleanup
Nick Clemens [Fri, 28 Jun 2019 12:53:20 +0000 (12:53 +0000)]
Bug 14549: POD and variable cleanup

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3352d75bfeea1dd5d9d6e025b6884a190044003c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 14549: Check patrons reserves for any holds on a bib when checking out an item
Nick Clemens [Fri, 28 Jun 2019 12:37:25 +0000 (12:37 +0000)]
Bug 14549: Check patrons reserves for any holds on a bib when checking out an item

MoveReserve uses CheckReserves to see if the current patron has any holds
on the title they are checking out, however, CheckReserves doesn't return
all holds on a biblio, it returns holds on the item from the holdsqueue
if they exist

This can create a condition where we check holds on an item, find we have it planned for
another borrower, confirm checkout to the current borrower, but don't fill their hold

To test:
  1) Find record
  2) place record level holds for 2 different patrons (record level)
  3) Run holds queue builder, check the queue to confirm an item was selected for patron 1
     Circulation->Holds queue->Library="All"
  4) Check out the item queued for patron with priority 1 to the second patron
  5) You should be asked to confirm, do so
  6) Note the item checks out, but both holds remain
  7) Apply patch
  8) Check in the item
  9) Don't confirm the hold
 10) Check the holds on the record and the holds queue
 11) Patron 1 should be priority 1 with an item selected from the holds queue
 12) Checkout to patron 2 as before
 13) Note the hold for patron 2 is filled this time
 14) Prove -v t/db_dependent/Reserves.t

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 36ee00ed952ed9081eeeca5e98fe006fbaa12db6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 14549: Unit tests
Nick Clemens [Fri, 28 Jun 2019 12:36:16 +0000 (12:36 +0000)]
Bug 14549: Unit tests

To test:
1 - Apply just this patch
2 - prove -v t/db_dependent/Reserves.t
3 - Failure
4 - Apply second patch
5 - prove -v t/db_dependent/Reserves.t
6 - Success!

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 33bd28fb856d496370f7132171aa479c77b28af8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23396: (19.05.x) remove toggle_keyboard comming from Bug 17178
Fridolin Somers [Fri, 9 Aug 2019 13:12:09 +0000 (15:12 +0200)]
Bug 23396: (19.05.x) remove toggle_keyboard comming from Bug 17178

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23396: DBRev 19.05.02.002
Martin Renvoize [Mon, 5 Aug 2019 10:36:40 +0000 (11:36 +0100)]
Bug 23396: DBRev 19.05.02.002

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3eadb87fd86b2331d4ea58aa86f1810bbf952c89)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23396: (QA follow-up) Add atomic update
Tomas Cohen Arazi [Fri, 2 Aug 2019 18:53:01 +0000 (15:53 -0300)]
Bug 23396: (QA follow-up) Add atomic update

New installs before the fix won't have the table populated, this patch
adds a fix for that, including the shortcut added by bug 17178.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5e4e26dd0f7516bd3dca4758bbc3c72e4b9723d5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23396: Add keyboard_shortcuts.sql to C4/Installer.pm
Nick Clemens [Tue, 30 Jul 2019 13:37:28 +0000 (13:37 +0000)]
Bug 23396: Add keyboard_shortcuts.sql to C4/Installer.pm

To test:
1 - Back up your DB if you want to save it
2 - sudo koha-mysql kohadev
    DROP database koha_kohadev;
    CREATE database koha_kohadev;
3 - http://localhost:8081
4 - Go through the web installer
5 - Enable AdvancedCatalogingEditor
6 - Try to load it, fails with JS console error: insert_copyright is not defined
7 - Apply patch
8 - Repeat
9 - This time editor loads

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 484b8245af189edcaba64f191981cd5374237125)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 10492: Translation problems with TT directives in po files
Bernardo Gonzalez Kriegel [Sun, 5 May 2019 18:12:15 +0000 (15:12 -0300)]
Bug 10492: Translation problems with TT directives in po files

This patch implements the replacement of TTvariables
'[%...%]' with normal placeholders '%s' for text
inside HTML tags (eg. img, meta, input)

The replacement is done in two files:
* xgettext.pl, used on create/update, so TTvars are not
found on the text to translate (msgid)
* tmpl_proccess3.pl, used on install time, so the correct
translation is found (msgstr) and the right TTvar is put on
the translated text.

To test:
Before applying the patch
1) Update your favorite language
   cd misc/traslator
   perl translate update xx-YY

2) Build a list (ini.txt) of 'msgid' to do a comparison
   msgcat --no-wrap --use-first po/xx-YY-*po -o - | egrep "^msgid" | sort > ini.txt

3) Apply the patch

4) Update your favorite language, again
   cd misc/traslator
   perl translate update xx-YY

5) Build a final list (end.txt) of 'msgid' to do a comparison
   msgcat --no-wrap --use-first po/xx-YY-*po -o - | egrep "^msgid" | sort > end.txt

6) Compare both files, you must find (most) TTvars replaced by '%s'
   diff ini.txt end.txt

   for example:
   < msgid "Translate item type [% itemtype.itemtype | html %]"
   > msgid "Translate item type %s"

   < msgid "Holds on this item: [% item_loo.item_holds | html %] / Total holds on this record: [% item_loo.holds | html -%]"
   > msgid "Holds on this item: %s / Total holds on this record: %s"

   < msgid "tag_anchor_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]"
   > msgid "tag_anchor_%s_%s%s"

   < msgid "[% innerloo.tag_lib | html %] - Click to Expand this Tag"
   > msgid "%s - Click to Expand this Tag"

7) Translate one of the examples, with more than one variable if
possible, for example this text in xx-YY-staff-prog.po
   > msgid "Holds on this item: %s / Total holds on this record: %s"
Check it's not marked as 'fuzzy'

8) Apply the translation
   perl translate install xx-YY

9) Check the translated string has all variables in the right order
   edit koha-tmpl/intranet-tmpl/prog/es-ES/modules/tools/batchMod-edit.tt
   around line '187', first '[% item_loo.item_holds | html %]', then
   '[% item_loo.holds | html -%]' on this case,
   or use another example

If approved this patch can be backported to current stable
versions.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0f5d14f70792d5406857a81c415bc3f58cbd8b96)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 21518: Material type "three-dimensional artifact" displays as "visual material"
Owen Leonard [Wed, 31 Jul 2019 12:38:16 +0000 (12:38 +0000)]
Bug 21518: Material type "three-dimensional artifact" displays as "visual material"

This patch makes a few corrections to the staff client MARC21 XSLT so
that the correct material type icons are displayed for pictures and
realia. The more-specific material type handling has been adapted from
the corresponding XSL files in the OPAC.

To test you must have default XSLT enabled and the DisplayIconsXSLT and
DisplayOPACiconsXSLT system preferences enabled.

 - Apply the patch and locate records with "type of record" specified in
   the leader as 'g', 'k', and 'r'.

   A sample MARC file will be attached to the bug report with one of
   each type of record. Import the records and search your catalog for
   "Bug_21518."

 - View the records in search results and their detail pages, both in
   the OPAC and the staff client. In all cases the correct material type
   icon should be displayed.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 88ff22bb5a5d535893cf238ae784bb62a5b7d676)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23251: Correct formatting of IMD data ending in apostrophe
Colin Campbell [Tue, 2 Jul 2019 09:58:41 +0000 (10:58 +0100)]
Bug 23251: Correct formatting of IMD data ending in apostrophe

IMD text data may end in an apostrophe (e.g. dreamin' )
This was causing the segment to be incorrectly formatted
as only the last character was checked, not the preceding
character to check whether it was quoted

add a test for this specific occurence

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0c4112a200bfdcdbdba4ce7870aeced1f960cfd9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23345: Rename include-indexes to exclude-indexes in koha-dump
Marcel de Rooy [Fri, 19 Jul 2019 09:55:41 +0000 (09:55 +0000)]
Bug 23345: Rename include-indexes to exclude-indexes in koha-dump

Trivial edit. The usage statement is wrong.

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>
(cherry picked from commit fea1d135be0f7e9ee55ae27f510861fe4c159307)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23226: Remove type attribute from script tags: Cataloging
Owen Leonard [Thu, 27 Jun 2019 13:24:36 +0000 (13:24 +0000)]
Bug 23226: Remove type attribute from script tags: Cataloging

This patch removes the "type" attribute from <script> tags one
cataloging and one authorities template.

To test, apply the patch and confirm that examples of affected pages
work properly without any JavaScript errors in the browser console:

 - Cataloging -> Cataloging home page
 - Cataloging -> Cataloging home page -> Search results
 - Authorities -> New authority -> New from Z39.50/SRU

Validating the HTML source of any of these pages should return no errors
related to the "type" attribute.

Signed-off-by: frederik chenier <frederik.chenier@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b52a17dade474530103f1b05a2efd39de9879c31)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23217: Remove SQL error when batch patron mod and not attribute selected
Jonathan Druart [Sat, 29 Jun 2019 15:55:17 +0000 (10:55 -0500)]
Bug 23217: Remove SQL error when batch patron mod and not attribute selected

On the batch patron modification tool, if no patron attribute is selected then
an UPDATE query will be executed anyway. Indeed the form will send a
an empty "patron_attributes" parameter. We need to handle it.

Test plan:
Go to the patron modification tool
Enter a cardnumber
Change a field (like city)
Do not change anything in the patron's attributes
Save
=> Without this patch a SQL error is generated:

DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (`koha_kohadev`.`borrower_attributes`, CONSTRAINT `borrower_attributes_ibfk_2` FOREIGN KEY (`code`) REFERENCES `borrower_attribute_types` (`code`) ON DELETE CASCADE ON UPDATE CASCADE) [for Statement "INSERT INTO borrower_attributes SET attribute = ?, code = ?, borrowernumber = ?" with ParamValues: 0=undef, 1="", 2="51"] at /home/vagrant/kohaclone/C4/Members/Attributes.pm line 287.

=> With this patch applied you will not see it

You should also test that you can modify patron's attributes ;)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0b2a9b5872c72ee6b0f17d32e20c8e59231f03f3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 21716: Escape publisher in item search
Liz Rea [Thu, 25 Apr 2019 15:34:36 +0000 (15:34 +0000)]
Bug 21716: Escape publisher in item search

To prevent endless processing errors.

To test:

* create a biblio with a publisher with a backslash - i.e. 260$b with
graham\lineham
* do an item search that will include that title in the results
* wait forever, because it won't work.
* apply this patch
* repeat steps, notice that you
    a. get results
    b. your result is listed with it's correct publisher
* rejoice

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fbeb22802f41f8daf99498303146d1916c851507)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22249: Mana - Move comment process in a dedicated sub
Alex Arnaud [Thu, 6 Jun 2019 15:05:24 +0000 (17:05 +0200)]
Bug 22249: Mana - Move comment process in a dedicated sub

Test plan:
  - Go to a subscription's detail page,
  - click on "Report mistake" => "New comment",
  - check Koha logs file,
  - you can see the following warning:
    Can't locate object method "find" via package "Koha::Resource_comments"
  - Apply this patch,
  - same test again,
  - no wraning

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a72d8dbb0ff3aa6f56aafcca2c3a0c820b5325f6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23316: (follow-up) for bug 22521 to fix GetFine
Martin Renvoize [Mon, 15 Jul 2019 14:06:14 +0000 (15:06 +0100)]
Bug 23316: (follow-up) for bug 22521 to fix GetFine

We changed the way we classify fines with bug 22521 but missed one
instance.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b43602ee7d2cf5407b987224be8554251a9f80f6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23363: (QA follow-up) Fix indentation
Josef Moravec [Thu, 25 Jul 2019 17:50:57 +0000 (17:50 +0000)]
Bug 23363: (QA follow-up) Fix indentation

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 68f128939b940f167fc14c3060a52da16b13a253)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23363: Fix Internal Server Error when clicking on shipment cost invoice link
Liz Rea [Tue, 23 Jul 2019 15:22:20 +0000 (10:22 -0500)]
Bug 23363: Fix Internal Server Error when clicking on shipment cost invoice link

To test:

On the fund detail page, have some shipment costs associated with a fund

an example would be cgi-bin/koha/acqui/spent.pl?fund=<your fund>&fund_code=<your
code>

Click the link for the fund, without this patch it will give an internal
server error.

With this patch, the shipment invoice will be loaded.
Signed-off-by: Jason DeShaw <JDeShaw@fargolibrary.org>
Signed-off-by: Laurel Moran <lmoran@sdlawlibrary.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit be4c4f8040ba9485f1cc72937ae77027568c0779)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23229: (QA follow-up) Fix indentation
Kyle M Hall [Fri, 28 Jun 2019 15:04:21 +0000 (11:04 -0400)]
Bug 23229: (QA follow-up) Fix indentation

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 95b6f56026c0381ffdd49a25bba9b5c170e141dc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23229: Only load ILL table JS when needed
Andrew Isherwood [Fri, 28 Jun 2019 09:24:32 +0000 (10:24 +0100)]
Bug 23229: Only load ILL table JS when needed

This patch prevents the JS associated with the ILL table from loading
unless we're actually displaying the table. This has the knock on effect
of not causing the "get all ILL requests" API request to fire when
loading any ILL page.

Test plan:

- Go to "ILL requests" page
- TEST: Observe that the table loads all ILL requests
- Go to the "New ILL request" page for any installed backend
- TEST: Check the browser dev tools "Network" panel, observe that the
/api/v1/illrequests?embed=metadata,patron,capabilities,library,status_alias,comments,requested_partners
request is not made.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f79da166ae7f910648266b98d89f19f4307d10ea)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23431: Don't nullify DOB if it's hidden by sysprefs
Liz Rea [Mon, 5 Aug 2019 22:39:37 +0000 (22:39 +0000)]
Bug 23431: Don't nullify DOB if it's hidden by sysprefs

To test:

Turn on  OPACPatronDetails
put dateofbirth in PatronSelfModificationBorrowerUnwantedField
Have a patron with a set date of birth
Attempt any modification on that patron through the OPAC
The date of birth will be one of the fields changed for that borrower
when you check it in the staff intranet.

Apply this patch, repeat the above.
Date of birth will not be one of the changed fields.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d71b263a89839e3b2f9aa7166dba2657a2aecf14)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22524: DBRev 19.05.02.001
Martin Renvoize [Fri, 26 Jul 2019 15:21:58 +0000 (16:21 +0100)]
Bug 22524: DBRev 19.05.02.001

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f292b4ff29a0aa1a109c3f1af9c2f5412dd1a5e8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22524: Fix date/time-last-modified search with Elasticsearch
Ere Maijala [Mon, 29 Apr 2019 08:03:22 +0000 (11:03 +0300)]
Bug 22524: Fix date/time-last-modified search with Elasticsearch

Avoid using slash in the field name since it would need to be escaped. Fix conversion of dtlm and any existing mapping.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5d27fb71cbd91fdf196b6568a590f2eef54d7cd1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22524: Fix publication date and year search with Elasticsearch
Ere Maijala [Tue, 16 Apr 2019 13:26:40 +0000 (16:26 +0300)]
Bug 22524: Fix publication date and year search with Elasticsearch

Also fixes the mappings.yaml to use correct field name (left over issue from bug 19575), so reset mappings and reindex before testing.

Test plan:
1. Reset mappings and reindex biblios.
2. Check that tests in t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t pass.
3. Try that all of the following year range type work in publication date search and year limit in advanced search:
yyyy
yyyy-yyyy
-yyyy
yyyy-

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2293e6597c69d55ce5916b7a31029f13d65d4fea)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23078: (follow-up) Update self checkout help page
Owen Leonard [Tue, 9 Jul 2019 13:51:24 +0000 (13:51 +0000)]
Bug 23078: (follow-up) Update self checkout help page

This patch takes care of some preference instances I missed in the self
checkout module's help page. It also removes some obsolete lines from
Auth.pm.

To test, apply the patch and re-test based on the previous test plan.
Also test in the self-checkout module by logging into self checkout and
clicking the "Help" link in the upper right of the screen.

The settings of the following preferences should be shown correctly:

 - OpacFavicon
 - OPACUserCSS

Signed-off-by: frederik chenier <frederik.chenier@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b5588958981a24c25536afff0b2091506bf7f92b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23078: Use Koha.Preference in OPAC global header include
Owen Leonard [Fri, 7 Jun 2019 12:52:45 +0000 (12:52 +0000)]
Bug 23078: Use Koha.Preference in OPAC global header include

This patch updates the OPAC's doc-head-close.inc so that it uses
'Koha.Preference' syntax to output system preference data. The patch
removes handling of two preferences from Auth.pm which which are covered
by this template change.

This patch also makes some minor changes to consolidate multiple
template checks for "bidi"

To test, apply the patch and test the affected OPAC system preferences:

 - OpacFavicon
 - opaclayoutstylesheet
 - OPACUserCSS
 - OPACBaseURL

Confirm that changes made to these preferences are reflected in the
OPAC.

Signed-off-by: frederik <frederik@inlibro.com>
Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6a222fa2afd367257b7e0c9815a92521883128d4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23278: Reopen last panel upon "Save and continue" in notices
Owen Leonard [Fri, 5 Jul 2019 17:28:06 +0000 (17:28 +0000)]
Bug 23278: Reopen last panel upon "Save and continue" in notices

This patch modifies the Notices edit process so that if the user chooses
the "Save and continue" option the page reloads with the same panel open
which they were previously editing in.

To test, apply the patch and go to Tools -> Notices and Slips.

 - Open a notice for editing.
 - Expand one of the sections.
 - Choose "Save and continue" from the button menu in the toolbar.
   - When the page reloads, the section you expanded should be open
     again.
 - Test each section and test with no sections expanded.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2c600bf439173c8a7a8ecd41a6433cd1199de078)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23304: (follow-up) Add markup structure comments
Owen Leonard [Fri, 12 Jul 2019 13:41:30 +0000 (13:41 +0000)]
Bug 23304: (follow-up) Add markup structure comments

This patch adds comments to the template to highlight the markup
structure. It also removes the obsolete "type" attribute from the
<script> tag.

This patch should have no effect on the interface or functionality.

Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b76aa551049edcb1575d8a4cce917cbc0eb8fa24)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23304: Reindent cataloguing/z3950_search.tt
Owen Leonard [Thu, 11 Jul 2019 18:59:21 +0000 (18:59 +0000)]
Bug 23304: Reindent cataloguing/z3950_search.tt

This patch reindents cataloguing/z3950_search.tt to use four spaces and
to eliminate tabs, following coding guidelines. Trailing white space has
been removed, and some minor markup errors have been corrected for
validity.

To test, apply the patch and use your preferred method for checking the
differences between files while ignoring whitespace. I use diff with the
"-w" flag, but I'm not giving orders, you do you.

Go to Cataloging -> New from Z39.50/SRU. Test that the search form and
results look correct and work correctly.

Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 377006ebe5a0e87a6f7517f0cb347a958c95a997)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22021: Improve item status display when placing holds in staff
Katrin Fischer [Sat, 13 Jul 2019 12:23:19 +0000 (14:23 +0200)]
Bug 22021: Improve item status display when placing holds in staff

This patch is a bit of a clean-up to bring the item status display
more in line with the display on the detail page:

- show descrpition of authorised value for not for loan instead of hardcoded text
- Show description of authorised value for lost instead of hardcoded text
  This is also a translatability fix, as the text came from the .pl
- Show description of authorised value damaged instead of hardcoded text
- Make sequence of status match display on details page:
  lost - damaged - not for loan

To test:
- On a record with multiple items
  - Add different status to the items
    damaged, lost, not for loan
  - Make sure you have items with one status and multiple status at the same time
- Look at how the status display on the detail page
- Place a hold, compare display
- Apply patch
- Repeat

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d7e6ae38e431c4d6397c057b0696e03f5a67ce14)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23218: (QA follow-up) Remove dummy value
Nick Clemens [Fri, 19 Jul 2019 10:49:00 +0000 (10:49 +0000)]
Bug 23218: (QA follow-up) Remove dummy value

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit bc188a9a54e28bd4fa2568dab5e85cf296fa87ab)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23218: Fix shift in patron's attributes in batch patron modification
Jonathan Druart [Sat, 29 Jun 2019 15:18:29 +0000 (10:18 -0500)]
Bug 23218: Fix shift in patron's attributes in batch patron modification

When the "new" button is clicked without selecting a patron's attribute, the update will have unexpected behaviors.

There is indeed a difference in the number of patron's attributes and the number of values.

Test plan:
Go to the batch patron modification
Enter a cardnumber
At the bottom of the page, click "new" without selecting an attribute
On the second line select one, and a value (different than an empty
string)
Save
=> The attribute will be updated with an empty string

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ea0127b7fa53335f3e9d3f0170fbc92b2ffd9e3c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23048: Hide non-pickup branches from hold modification select
Pasi Kallinen [Thu, 27 Jun 2019 11:03:02 +0000 (14:03 +0300)]
Bug 23048: Hide non-pickup branches from hold modification select

When modifying holds in staff client via reserve/request.pl or
the holds-tab in members/moremember.pl, the pickup library dropdown
lists libraries not marked for pickup. Hide those branches,
unless the branch is marked as a pick-up branch for already
existing hold.

The reason for showing a non-pickup branch for the holds created
before the branch was marked as non-pickup: If the non-pickup branch
wasn't shown, the branch in those holds would get set to the first
branch in the select if the hold was modified.

Test plan:
1) Create a hold for a patron, to be picked up from a certain branch.
2) Edit the branch and another branch so they are no longer
   pickup locations.
3) Go to members/moremember.pl for that patron, check the Holds-tab
   Pickup library -drop down. It lists both of the non-pickup branches.
4) Go to reserve/request.pl for that biblio. The hold-table
   Pickup library -drop down lists both of the non-pickup branches.
5) Apply patch.
6) Repeat 3 & 4, drop down no longer lists the non-pickup branch, but
   should still list the branch where the hold was marked to be picked
   from.

Signed-off-by: Pasi Kallinen <pasi.kallinen@koha-suomi.fi>
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 84855d75c1ddc770bf33b952b8f319ad1655a869)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23145: Confirming transfer during checkin clears the table of previously checked...
Owen Leonard [Tue, 16 Jul 2019 18:05:23 +0000 (18:05 +0000)]
Bug 23145: Confirming transfer during checkin clears the table of previously checked-in items

This patch corrects the checkin template so that checking in an item
with an existing transfer does not clear the page of previous checkouts.

To test, apply the patch and check in some items.

 - After each checkin the returned item should appear in the table of
   checkouts.
 - Check in an item which belongs to another branch. You will be asked
   to confirm that the items requires a transfer. When the page reloads
   you should see the same previous checkins in the table.
 - Check in that same item again. You will be again asked to confirm.

   Before this page, confirming the transfer would reload the page and
   clear the list of checkins. Now the page should reload and the table
   of checkins should still show the previously checked-in items.

Test all the actions when checking in an item which is already in
transit: OK, Print transfer slip, and Cancel transfer.

Signed-off-by: George Williams <george@nekls.org>
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 3cfd78788fe1bda05894a08c22f69ce1baa9482c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 20607: (QA follow-up) Test corrections
Nick Clemens [Tue, 16 Jul 2019 18:13:57 +0000 (18:13 +0000)]
Bug 20607: (QA follow-up) Test corrections

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 29ecb5b6c29e48cb6964029567bd2b7cc8b6e7ac)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 20607: Make Koha::SearchEngine::Elasticsearch::reset_elasticsearch_mappings take...
Alex Arnaud [Tue, 24 Apr 2018 13:10:38 +0000 (13:10 +0000)]
Bug 20607: Make Koha::SearchEngine::Elasticsearch::reset_elasticsearch_mappings take weight into account

Test plan:
  - apply this patch,
  - edit admin/searchengine/elasticsearch/mappings.yaml
    to add weight for some fields,
  - go to admin > search engine configuration,
  - reset your mappings (add ?op=reset&i_know_what_i_am_doing=1 to url),
  - check that weights you've added are set

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d8830da219f110aabd28fb65bd03bc882b847173)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 21316: Handle control fields in the ACQ frameworks
Jonathan Druart [Tue, 5 Mar 2019 19:09:07 +0000 (16:09 -0300)]
Bug 21316: Handle control fields in the ACQ frameworks

Test plan:
- Turn UseACQFrameworkForBiblioRecords on
- Add 003@ to the ACQ framework
- Create an order from an existing record
=> The 003 value will be displayed!

It fixes the following error:
Control fields (generally, just tags below 010) do not have subfields,
use data() at /home/vagrant/kohaclone/acqui/neworderempty.pl line 293.

Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>
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 5759d06747e356a60b3fac82b5ff03184a946f80)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23315: (follow-up) Add configuration to enable CodeMirror
Owen Leonard [Mon, 15 Jul 2019 13:11:13 +0000 (13:11 +0000)]
Bug 23315: (follow-up) Add configuration to enable CodeMirror

This patch adds the "syntax" parameter to the corrected system
preferences so that the textareas will be displayed as CodeMirror
editors.

To test, apply the patch and test the affected system preferences:

Circulation -> SelfCheckHelpMessage
Staff client -> IntranetmainUserblock
Staff client -> IntranetCirculationHomeHTML
Staff client -> IntranetReportsHomeHTML
Staff client -> StaffLoginInstructions

With UseWYSIWYGinSystemPreferences disabled, the preferences should be
displayed as CodeMirror editors. With  UseWYSIWYGinSystemPreferences
enabled they should be WYSIWYG editors.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
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 02c9246def1f19bdc8310c562ddaf5172cf0b3ad)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23315: Some systempreferences can not be edited
Chris Cormack [Mon, 15 Jul 2019 02:28:16 +0000 (14:28 +1200)]
Bug 23315: Some systempreferences can not be edited

To test
1/ Go to systempreferences
2/ Notice that SelfCheckHelpMessage IntranetmainUserblock
IntranetCirculationHomeHTML IntranetReportsHomeHTML
StaffLoginInstructions are not editable
3/ Apply patch, refresh page
4/ Now they can be edited

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>
(cherry picked from commit 63c23a9eacbe6ba5d61d8f47c5f74a46050338ad)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22768: Global search form keyboard navigation broken
Owen Leonard [Thu, 25 Apr 2019 11:45:58 +0000 (11:45 +0000)]
Bug 22768: Global search form keyboard navigation broken

Bug 22045 made changes to the global staff client JavaScript which
broken keyboard navigation for the most common forms in the resident
search form("Check out, Check in, Renew, Search). This patch
reimplements the tab selection code on the basic MARC editor page so
that the keyboard shortcut behavior can be restored.

To test, apply the patch go to Cataloging.

 - Search for an existing record and edit it in the basic MARC editor.
   - Test that the numbered tabs (0-9) at the top work correctly.
 - Select a tab other than 0 and choose Save -> Save and continue
   editing. When the page reloads you should be returned to the tab you
   were on when you saved.
 - Go to the Circulation home page. Test the keyboard shortcuts for
   switching tabs in header area:

   - Alt-u (Check out)
   - Alt-r (Check in)
   - Alt-w (Renew)
   - Alt-q (Search)

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.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 bb3a0e5dbc16b4249b3eacae98a26d3479a76f5a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23159: Add comments to addbiblio.tt
Mark Tompsett [Wed, 19 Jun 2019 14:06:28 +0000 (14:06 +0000)]
Bug 23159: Add comments to addbiblio.tt

This patch adds code comments to the template to clarify indenting over
the page boundary.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
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 1020fe5b1f95a606d445acb4ac16c0c30586e71d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23159: Reindent addbiblio.tt
Owen Leonard [Tue, 18 Jun 2019 15:32:24 +0000 (15:32 +0000)]
Bug 23159: Reindent addbiblio.tt

This patch corrects whitespace in the basic MARC editor template,
addbiblio.tt: Tabs converted to spaces, indentation corrected. Some
comments have been added in the markup to clarify the page structure.

To test, apply the patch and open the basic MARC editor. Confirm that
everything works correctly, including:

 - Showing/hiding subfields
 - Re-ordering subfields
 - Removing tags and subfields
 - Cloning tags and subfields
 - Plugin links

Use the "-w" flag when using diff to examine the patch. The only changes
should be places where single lines were broken up and where comments
were added.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
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 c7147fcde03f7ba1ac13e485adcac587f2dde85c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 11642: change / to and in related tools menu
Mark Tompsett [Tue, 11 Jun 2019 14:31:48 +0000 (14:31 +0000)]
Bug 11642: change / to and in related tools menu

Signed-off-by: Mark Tompsett <mtompset@hotmail.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 d7fec3af88d0ba6c2ae3246df47ee5ce29ebf78c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 11642: (follow-up) Improve Batch patron deletion and anonymization GUI to make...
Owen Leonard [Mon, 10 Jun 2019 13:30:56 +0000 (13:30 +0000)]
Bug 11642: (follow-up) Improve Batch patron deletion and anonymization GUI to make consequences clearer

This patch makes some template changes to try to make this interface
more consistent with other areas of Koha and to make warnings more
clear.

I have also changed the phrase "deletion/anonymization" to "deletion and
anonymization."

To test, apply the patch and test the patron deletion and anonymization
process and confirm that the interface is clear and works well.

Signed-off-by: Mark Tompsett <mtompset@hotmail.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 7e29b5775f4c378e93f5a4b06f90b50f14a6c1e1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 11642: Add confirmation and tooltips to batch deletion tool
Nick Clemens [Thu, 6 Jun 2019 15:16:35 +0000 (15:16 +0000)]
Bug 11642: Add confirmation and tooltips to batch deletion tool

Signed-off-by: Mark Tompsett <mtompset@hotmail.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 f897ff77c8774b1ad942665fc18b7a012312240f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 21027: Fix checkout statistics if 1+ of the fields is not defined
Jonathan Druart [Mon, 29 Apr 2019 00:55:02 +0000 (20:55 -0400)]
Bug 21027: Fix checkout statistics if 1+ of the fields is not defined

TEST

- Use a patron who hasn't checked out items before
- Set  StatisticsFields to itype|ccode
- Check out some items without location
- Verify that statistics stable shows the correct number of checkouts
- Check out one item with a location or just change one of your checked out items
- Verify the total is still correct
- Change  StatisticsFields to location|itype|ccode
- Verify the total has changed now - it's only 1 (the one with a location)

Apply the patch and try again

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 17a71b990076efd04c15de6b3165c33fffe037a3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23308: Change html to filter to $raw
Andrew Isherwood [Fri, 12 Jul 2019 14:37:26 +0000 (15:37 +0100)]
Bug 23308: Change html to filter to $raw

This patch changes the erroneous html filter to $raw

Test plan:
- Apply patch
- Enter some HTML into the OpacMaintenanceNotice syspref
- View the OPAC front page
=> TEST: Observe that the notice displays correctly and the HTML is not
escaped

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: frederik chenier <frederik.chenier@inlibro.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 f829221f818c1f7b7779f4bd74f633206deda2e1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23221: (follow-up) Add comments on markup structure
Owen Leonard [Wed, 26 Jun 2019 17:52:52 +0000 (17:52 +0000)]
Bug 23221: (follow-up) Add comments on markup structure

This patch adds a few comments to the markup in order to highlight the
structure of the page.

Signed-off-by: Mark Tompsett <mtompset@hotmail.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 4068484650cb76d0fa3d801a4a5f49bd65cffb0b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23221: Reindent tools/manage-marc-import.tt
Owen Leonard [Wed, 26 Jun 2019 14:29:24 +0000 (14:29 +0000)]
Bug 23221: Reindent tools/manage-marc-import.tt

This patch reformats the template for the Manage staged MARC records
page. It makes only whitespace changes. It should have no effect on the
behavior of the page.

In addition to re-indentation, some lines have been broken up. These
should be the only changes highlighted when using diff while ignoring
whitespace.

To test, apply the patch and view the Manage staged MARC records page.
The page should look correct and work correctly:

 - Paging through results
 - Viewing batches
 - Cleaning batches
 - Deleting batches

Signed-off-by: Mark Tompsett <mtompset@hotmail.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 cd66074205b571d1db6acbb57d8d8554d3d4fe85)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 13597: Make staff client Amazon no image results match OPAC
Nick Clemens [Mon, 1 Jul 2019 11:45:14 +0000 (11:45 +0000)]
Bug 13597: Make staff client Amazon no image results match OPAC

The point is to make staff client HTML for missing Amazon cover
images more equivalent to that of the OPAC

To test:
1 - Enable Amazon images everywhere
2 - Search on the staff and OPAC to get some results without
    Amazon covers (missing ISBNs and bad ISBNs)
3 - Note OPAC missing images are like:
<span class="no-image">No cover image available</span>
4 - Note staff client are like:
<img src="https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif" alt="" class="thumbnail" />
5 - The staff links do not lend themselves to easy CSS hiding/styling
6 - Apply patch
7 - Repeat
8 - Note increased consistency

Signed-off-by: Maryse Simard <maryse.simard@inlibro.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 fcc22df8ff277ac7041d5eb72e83821fb1ef1f37)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>