]> git.koha-community.org Git - koha.git/log
koha.git
4 years agoBug 23551: Fix AddRenewal call in circ/renew.pl
Martin Renvoize [Fri, 4 Oct 2019 13:06:27 +0000 (14:06 +0100)]
Bug 23551: Fix AddRenewal call in circ/renew.pl

Without the patch, renewing from the renewal tab/page
led to wrong renewal/due dates.

To test:
- Check an item out to your patron account
- Renew it from the patron account
- Note the due date
- Return the item
- Check the item out again
- Renew it using the renewal tab
- Verify a different due date was calculated
- Apply patch
- Repeat test - due dates now should be the same

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a24c17a2aa2053da1317c29e47a3946af2962afb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23863: Add signoff line for recognition
Martin Renvoize [Thu, 24 Oct 2019 12:50:35 +0000 (13:50 +0100)]
Bug 23863: Add signoff line for recognition

Signed-off-by: Sarah Cornell <sbcornell@cityofportsmouth.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e428c5a4b0aea4779f743abbf8a61abe90b20dbc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23863: (QA follow-up) Add missing html filter
Katrin Fischer [Mon, 21 Oct 2019 22:08:45 +0000 (22:08 +0000)]
Bug 23863: (QA follow-up) Add missing html filter

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 346f8b163a45a15b522c05ab6da532f922588559)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23863: Editing a basket clears create_items value
Kyle M Hall [Tue, 22 Oct 2019 18:07:46 +0000 (14:07 -0400)]
Bug 23863: Editing a basket clears create_items value

Test Plan:
1) Create a basket with a non-default value for aqbasket.create_items
2) Click Edit from basket.pl
3) Click Save without changing anything
4) Note that aqbasket.create_items is no longer set
5) Apply this patch
6) Restart all the things!
7) Repeat steps 1-3
8) Note create_items is unchanged!

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>
(cherry picked from commit 2f315139e213ca9241d385dfea0aa747999c8464)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23855: Fix "Mark selected suggestion as" status
Jonathan Druart [Mon, 21 Oct 2019 15:55:17 +0000 (17:55 +0200)]
Bug 23855: Fix "Mark selected suggestion as" status

On the suggestions management page (suggestion/suggestion.pl) you can
select suggestions and change their status.
But it only works for "ACCEPTED" or "REJECTED".

Maybe caused by bug 22905.

Test plan:
Select at least one suggestion on the screen and select the "Pending"
status.
=> The status of the selected suggestions must have been updated

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>
(cherry picked from commit 030eb694a87029e3220e8f930f509556c9e816ea)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23826: Correction for missing "F" -> "OVERDUE" change
Martin Renvoize [Wed, 16 Oct 2019 15:21:46 +0000 (16:21 +0100)]
Bug 23826: Correction for missing "F" -> "OVERDUE" change

When replacing F and FU with 'OVERDUE' + status in bug 22521 I missed
the cases inside the maninvoice template. This patch should correct
that mistake.

Signed-off-by: Andrew Fuerste-Henry <andrew@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 9d33b82fe8ada8aee4e62bed5e147fe15f72e2e0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23809: Correction to selectall_arrayref call.
Martin Renvoize [Mon, 14 Oct 2019 08:56:18 +0000 (09:56 +0100)]
Bug 23809: Correction to selectall_arrayref call.

This patch adds the missing `{ Slice => {} }` attribute to the database
call introduced in bug 23265 to fix the use of Koha::Objects introduced
originally in bug 12063.

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 ea1f6986692d3658bcd7ea72f3c27ee2cdde1727)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23771: Don't look for patrons if we don't have a userid
Nick [Mon, 7 Oct 2019 20:09:04 +0000 (20:09 +0000)]
Bug 23771: Don't look for patrons if we don't have a userid

While the code requires external auth to test, the change is simple enough I
think a good read would suffice

To test:
1 - You either need Shib or CAS enabled and setup
2 - Add two users with blank.null cardnumbers
3 - Lock those user accounts
    Set failedloginattempts to 1
    Try a bad login with the userid
    Or set via the DB
4 - Try a good login via the external auth
5 - Note it fails
6 - Apply patch
7 - Login now succeeds

Signed-off-by: Mike Somers - Bridgewater State University <msomers@bridgew.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c9c6dd10167bc4c60cb384651f4dc802944c4228)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 22997: Unit test
Fridolin Somers [Fri, 9 Aug 2019 11:51:46 +0000 (13:51 +0200)]
Bug 22997: Unit test

Run prove t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ce8896f17d99cbbc663b8cc59110ce01d8e70afd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 22997: Searching gives no results in auth_finder.pl
Fridolin Somers [Tue, 28 May 2019 13:48:54 +0000 (15:48 +0200)]
Bug 22997: Searching gives no results in auth_finder.pl

During cataloguing of an existing biblio, on an heading field,
the use of tag editor fills authorities finder with existing value :
  Search main heading ($a only)
  Search main heading
Default operator beeing 'contains'.

Actually with Elasticsearch those search give no results.

Example with heading :
200
  $a Casaubon
  $b Isaac
  $f 1559-1614

Call to Elasticsearch :
    "query" : {
        "bool" : {
           "must" : [
              {
             "query_string" : {
                  "query" : "Casaubon*",
                  "default_field" : "heading-main",
                   }
              },
              {
             "query_string" : {
                  "query" : "(Isaac*) AND (1559-1614*)",
                  "default_field" : "heading"
                   }
              }
            ]
         }
      },
    "sort" : [
       {
      "heading__sort.phrase" : "asc"
       }
     ]
  }

Patch adds to "query_string" :
  analyze_wildcard : true.

Test plan :
1) Use Elasticsearch
2) Edit an existing biblio record
3) Use tag editor on a heading
4) Click search => You get correct results
5) Check also search in authorities-home.pl

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 a94e863c3ed17c177c9ce5d284616791fd5cd380)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23723: using exit inside eval to stop sending output to browser doesn't work...
Dobrica Pavlinusic [Thu, 3 Oct 2019 07:34:17 +0000 (09:34 +0200)]
Bug 23723: using exit inside eval to stop sending output to browser doesn't work under plack

When fixing Bug 23589 Theodoros Theodoropoulos noticed that we are sending
headers and html after pdf output to browser.

Using exit inside eval block doesn't stop plack from generating
headers and html page after exit since CGI::Compile will catch
exit but doesn't stop emiting output. Example is:

eval {
warn "in eval";
exit;
};
warn "after eval";

Under CGI, this would print just "in eval", but under plack we get both lines
and thus generate additional header and html after we already sent pdf data.

Signed-off-by: Theodoros Theodoropoulos <theod@lib.auth.gr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 43d999cc7c7edc54e3df7482b3ab3607755e4b6d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23252: Adds noEnterSubmit class in ajax context
Christophe Croullebois [Thu, 29 Aug 2019 13:23:01 +0000 (15:23 +0200)]
Bug 23252: Adds noEnterSubmit class in ajax context

In cataloging.js $(document).ready adds noEnterSubmit class.
This does not work in ajax context, it works with $(document).ajaxSuccess.

Test plan :
1)
1.1) Verify you have an item subfield linked to items.itemnotes, ie 952$z
1.2) Verify 952$z exists in ACQ framework
2)
2.1) Verify system preference "AcqCreateItem" is on "placing an order"
2.2) Go to an acquisition basket
2.3) Click "Add to basket" and "From a new (empty) record"
2.4) Go to "Item" block
2.5) Verify that $z has "noEnterSubmit" class
2.6) Verify that typing enter in $z does not submit the form
3)
3.1) Change system preference "AcqCreateItem" to "receiving an order"
3.2) Go to "Receive shipment"
3.3) Receive an order
3.4) Go to "Item" block
3.5) Verify that $z has "noEnterSubmit" class
3.6) Verify that typing enter in $z does not submit the form

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c66cebf744778dbfc15597079549c161a7836d63)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23252: Add missing input_marceditor class in item editor
Fridolin Somers [Tue, 2 Jul 2019 13:57:09 +0000 (15:57 +0200)]
Bug 23252: Add missing input_marceditor class in item editor

In serials receive and acquisition order creation from iso2709, the item edition form shows inputs that are missing "input_marceditor" class.
They are also missing tabindex and id.

The side effect is that those inputs dont get the "noEnterSubmit" class so form is posted if a barcode scanner is used or if enter is used on keyboard.

Test plan :
1)
1.1) Verify you have an item subfield linked to items.itemnotes, ie 952$z
1.2) Verify system preference "AcqCreateItem" is on "placing an order"
2)
2.2) Go to cataloguing module and edit an item
2.3) Verify that $z has an id, tabindex and "input_marceditor" class.
2.4) Verify that typing enter in $z does not submit the form
3)
3.1) Go to a serial with items creation, click on receive
3.2) Change status to "Arrived"
3.3) Verify that $z has an id, tabindex and "input_marceditor" class.
3.4) Verify that typing enter in $z does not submit the form
4)
4.1) Go to an acquisition basket
4.2) Click "Add to basket" and "From a staged file"
4.3) Click "Add orders" on a staged file
4.4) Go in tab "Item information"
4.5) Verify that $z has an id, tabindex and "input_marceditor" class.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c855b1ca287758b535fe5ba885949accac4e474a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 21985: Fix further occurences
Nick [Mon, 30 Sep 2019 13:37:19 +0000 (13:37 +0000)]
Bug 21985: Fix further occurences

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b63b55cda70604041c9f04f5f1e302540bff29eb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 21985: Trying to fix the next failure
Jonathan Druart [Thu, 14 Mar 2019 22:19:45 +0000 (19:19 -0300)]
Bug 21985: Trying to fix the next failure

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 95a2ffc542c2c93dfbc5c09d7c06186a1f58f458)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 21985: Fix Circulation tests when ES it set, by using build_sample_item
Jonathan Druart [Sun, 16 Dec 2018 15:28:48 +0000 (12:28 -0300)]
Bug 21985: Fix Circulation tests when ES it set, by using build_sample_item

We should use build_sample item (from bug 21971) to create items,
otherwise we may not have a valid biblioitem and/or MARC record.

Test plan:
Set SearchEngine to ES
prove that the tests in Circulation.t now pass

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 18f9ed465dc990252a0462f86010b874fdde5d77)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23484: (follow-up) add parenthesis in JOIN
Fridolin Somers [Fri, 4 Oct 2019 10:02:59 +0000 (12:02 +0200)]
Bug 23484: (follow-up) add parenthesis in JOIN

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 77b681b5843dabd8808e6ad3e62999f1e9421280)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23484: Update pendingreserves.pl to use circulation_rules
Nick Clemens [Wed, 21 Aug 2019 13:39:14 +0000 (13:39 +0000)]
Bug 23484: Update pendingreserves.pl to use circulation_rules

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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 c21a9cf0b0b8fc03629837c8651c10781ddfe3c7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23101: (follow-up) use NoSort class in datatable
Fridolin Somers [Tue, 8 Oct 2019 12:05:49 +0000 (14:05 +0200)]
Bug 23101: (follow-up) use NoSort class in datatable

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 95c43ebe7206ee68711f5bc7d7b24b6a81d7ec81)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23101: Hide action buttons on contracts if user lacks permission
Katrin Fischer [Fri, 12 Jul 2019 12:40:22 +0000 (12:40 +0000)]
Bug 23101: Hide action buttons on contracts if user lacks permission

When the user doesn't have superlibrarian, full acq or
contracts_manage permission, don't show buttons for editing
and deleting contracts.

To test:
- Create a vendor with a few contracts
- Create a staff user with
  - superlibrarian = can view edit/delete contracts
  - full acq perms = same
  - without manage_contracts = can view, but action buttons are gone
- Make sure the sorting of the contracts table works in all cases

Signed-off-by: Holly Cooper <hc@interleaf.ie>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.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 d0a06e365b693de6609998b3d649d9ef4d083880)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23689: (follow-up) Use Library limitations to match other occurrences
Katrin Fischer [Mon, 30 Sep 2019 12:59:20 +0000 (14:59 +0200)]
Bug 23689: (follow-up) Use Library limitations to match other occurrences

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7e35c3d14b63a49ea16d248b2d4260555e8fcb3f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23689: Fix terminology for branches limitations on authorized values
Martin Renvoize [Fri, 27 Sep 2019 13:41:51 +0000 (14:41 +0100)]
Bug 23689: Fix terminology for branches limitations on authorized values

This patch corrects the terminology and also updates the tooltip to use
the current bootstrap tooltip library.

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 47c2e215875127b843c9720976f2c94e1cd66662)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23688: System preference uppercasesurnames broken by typo
Kyle M Hall [Fri, 27 Sep 2019 11:23:28 +0000 (07:23 -0400)]
Bug 23688: System preference uppercasesurnames broken by typo

In the process of moving this feature from memberentry.pl to Patron.pm, the 's' on uppercasesurnames was dropped, breaking the feature.

Test Plan:
1) Test uppercasesurnames, note it does not work
2) Apply this patch
3) Test uppercasesurnames, note it works now!

Signed-off-by: Kyle 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 62ad053894c57ae990a9724cf58beaa4441448c6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23679: add Unit Test t/db_dependent/Circulation/transferbook.t
Fridolin Somers [Thu, 26 Sep 2019 07:08:40 +0000 (09:08 +0200)]
Bug 23679: add Unit Test t/db_dependent/Circulation/transferbook.t

I've choosen to add it to db_dependent because we may add other tests
to cover transferbook() cases that will change DB

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d096eeab8a7d23cf460b1ad5f10df746f3d62dda)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23679: fix software error when trying to transfer an unknown barcode
Fridolin Somers [Thu, 26 Sep 2019 07:09:15 +0000 (09:09 +0200)]
Bug 23679: fix software error when trying to transfer an unknown barcode

When trying to transfer an unknown barcode in
/cgi-bin/koha/circ/branchtransfers.pl you get the error :

Can't call method "itemnumber" on an undefined value at
/home/koha/src/C4/Circulation.pm line 319.

This comes from C4::Circulation::transferbook which should stop when
finding unknown barcode.

Test plan :
1) Go to /cgi-bin/koha/circ/branchtransfers.pl
2) Enter a barcode not existing in database
3) Without patch you get a software error, with patch you get a message
   saying 'No Item with barcode'
4) Enter a barcode existing in database and check transfer is OK

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3848a3a772e2202ac3339bd241adcef987e48361)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22804: OPAC Overdrive JavaScript contains untranslatable strings
Owen Leonard [Thu, 2 May 2019 16:26:55 +0000 (16:26 +0000)]
Bug 22804: OPAC Overdrive JavaScript contains untranslatable strings

This patch moves untranslatable strings out of overdrive.js and into
opac-bottom.inc where other strings are defined for use in JavaScript
files.

To test you must have OverDrive integration set up, including
OverDriveCirculation. Test the various Overdrive integration features:

 - Placing holds
 - Cancelling holds
 - Checking out
 - Checking in

These features should work as expected.

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 740d0bde7860c1d67f1612d5fd3c4a68d0714ef0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23624: (RM follow-up) Sponsorship Line
Martin Renvoize [Mon, 30 Sep 2019 14:52:02 +0000 (15:52 +0100)]
Bug 23624: (RM follow-up) Sponsorship Line

Sponsored-by: Higher Education Libraries of Massachusetts
Sponsored-by: Fenway Libraries Online
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ace678ba6f19821bbdaaa9b31c96db2c2ce5e026)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23624: (QA follow-up) Test error cases
Tomas Cohen Arazi [Wed, 25 Sep 2019 13:44:03 +0000 (10:44 -0300)]
Bug 23624: (QA follow-up) Test error cases

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6c90c6f7d9e0f04ce148b723fc3a4828f03e9079)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23624: (QA follow-up) Don't fetch the count unless the query was successful
Kyle M Hall [Fri, 20 Sep 2019 11:14:34 +0000 (07:14 -0400)]
Bug 23624: (QA follow-up) Don't fetch the count unless the query was successful

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f2b27975679e64722f06b175e759801227a313fc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23624: (QA follow-up) Optimize even more
Tomas Cohen Arazi [Thu, 19 Sep 2019 14:13:28 +0000 (11:13 -0300)]
Bug 23624: (QA follow-up) Optimize even more

This patch makes counting the results have no memory footprint by
leveraging on the DB to count the rows.

To test:
- Without this path, run:
  $ kshell
 k$ prove t/db_dependent/Reports/Guided.t
=> SUCCESS: Tests pass
- Apply this patch
- Run:
 k$ prove t/db_dependent/Reports/Guided.t
=> SUCCESS: Tests still pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit bca4453c50d8b5b1d3c7029ded2b522a9a2bf868)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23624: Unit tests
Tomas Cohen Arazi [Thu, 19 Sep 2019 13:50:46 +0000 (10:50 -0300)]
Bug 23624: Unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7958e7f3f9b4275cd8da0ed2e04dfbc90d863a60)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23624: Count rows in report without (potentially) consuming all memory
Paul Hoffman [Tue, 17 Sep 2019 17:00:03 +0000 (13:00 -0400)]
Bug 23624: Count rows in report without (potentially) consuming all memory

C4::Reports::Guided::nb_rows (called by get_prepped_report in reports/guided_reports.pl) uses DBI::fetchall_arrayref to retrieve all rows at once; counts them; and then discards the rows and returns the count.  This has the potential, if the number of rows is very large, to exhaust all available memory.

(Other code in guided_reports.pl has the same potential effect, but because the solution to that is much less straightforward it will be addressed in a separate bug report.)

This patch uses the second ($max_rows) parameter to DBI::fetchall_arrayref to retrieve a smaller number (1,000) of rows at a time, looping until all results have been retrieved.  This will only use as much memory as the maximum amount used by a single call to DBI::fetchall_arrayref.

Test Plan:
1) Create a report the will generate a huge number of results
2) Run the report, watch your memory usage spike
3) Apply this patch
4) Restart all the things!
5) Run the report again, note your memory usage is much lower

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 79e15278f718768fa082b7b3d7b48e6adde164da)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23631: fr-CA translation of NEW_SUGGESTION notice
caroline [Tue, 17 Sep 2019 21:59:21 +0000 (17:59 -0400)]
Bug 23631: fr-CA translation of NEW_SUGGESTION notice

This patch provides the fr-CA translation for the NEW_SUGGESTION notice.

Signed-off-by: Bin Wen <bin.wen@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 4ca44685bb56c6e172ec5d9ad3dd769fe2eabfa2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23683: Course reserves public notes on specific items should allow for HTML
Lucas Gass [Sun, 22 Sep 2019 02:01:23 +0000 (02:01 +0000)]
Bug 23683: Course reserves public notes on specific items should allow for HTML

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d8187991a40f58ab815fd1e75d6a3671ca72a668)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23607: Make /patrons/:patron_id/account staff only
Tomas Cohen Arazi [Fri, 13 Sep 2019 14:26:03 +0000 (11:26 -0300)]
Bug 23607: Make /patrons/:patron_id/account staff only

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.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 8171c9d05dc3adf0014a727e304f666606f7f751)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23625: Make new 'required' attributes match the currently used syntax in other...
Kyle M Hall [Tue, 17 Sep 2019 19:41:12 +0000 (15:41 -0400)]
Bug 23625: Make new 'required' attributes match the currently used syntax in other templates

Signed-off-by: Kyle M Hall <kyle@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 0aeb5998481a28fb72c8f184bd3f85f7491dc858)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23625: ArticleRequestsMandatoryFields* only affects field labels, does not make...
Eric Phetteplace [Mon, 16 Sep 2019 19:53:32 +0000 (12:53 -0700)]
Bug 23625: ArticleRequestsMandatoryFields* only affects field labels, does not make inputs required

Test plan:

1. Enable article requests ( syspref: ArticleRequests => Enable, Circ and fine rules ALL/ALL (or a given category/itemtype): Article requests => Yes )
2. Set one or more fields to require in the ArticleRequestsMandatoryFields, ArticleRequestsMandatoryFieldsItemOnly, and/or ArticleRequestsMandatoryFieldsRecordOnly settings (all these settings are affected in the same manner)
3. Search for a title and select the "Request Article" button from the OPAC search results
4. Authenticate as a patron
5. Neglect to fill out at least one of the mandatory fields
6. Select the "Place Request" button at the bottom of the form
7. The form submits despite the empty mandatory fields
8. Apply patch
9. Repeat steps 3, 5, & 6
10 . The form should refuse to submit, show a browser-native message about the missing required fields.

Sponsored-by: California College of the Arts
Signed-off-by: Kyle M Hall <kyle@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 64148cf4ac6f20787a809b36243672430faa6e8f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22602: Fix OverDrive circulation when coming from another site
Nick Clemens [Fri, 6 Sep 2019 11:13:27 +0000 (11:13 +0000)]
Bug 22602: Fix OverDrive circulation when coming from another site

On bug 21078 we caught an error and returned, this makes us skip some variable setting that we need.

This patch moves that code into its own function.

To test:
0 - Have OverDrive circulation setup and working
1 - Place a link to your kohadev installation on another site
2 - Follow that link to the opac
3 - Note all items show as 'Place hold' even if available copies
4 - Apply patch
5 - Repeat 1&2
6 - Note the items availability shows correctly

Signed-off-by: Elizabeth Quinn <EQuinn@chplnj.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 4b642386d8983a12c1a79924ae1fac180b10c3d0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23651: Add address of restricted page to syspref description
Nick [Fri, 20 Sep 2019 16:44:53 +0000 (16:44 +0000)]
Bug 23651: Add address of restricted page to syspref description

To test:
1 - Look at the restricted page syspref
2 - Check that the url is listed
3 - Add some content to the page
4 - Save the prefs
5 - Verify the address listed takes you to the page on the opac

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fa97bc90df532720287eaf296c15f7facdaa730d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 18710: Wrong subfield modified in batch item modification
Fridolin Somers [Wed, 31 May 2017 14:54:32 +0000 (16:54 +0200)]
Bug 18710: Wrong subfield modified in batch item modification

In Tools > Batch item modification, one can modify or delete a subfield.
When deleting a subfield et modifying another, the wrong subfield gets modified.

This is caused by the fact that disabled inputs are not posted in form.
So for a subfield to delete :
Input name=field_value is not posted. But input name=subfield is posted with subfield code.
So these 2 arrays does not have the same size :
    my @subfields = $input->multi_param('subfield');
    my @values    = $input->multi_param('field_value');

For exemple, deleting $2, not changing $u and modidying $v will modify $u with value for $v o_O

This patch correts but setting disabled all inputs of a deleted subfield : field_value, tag, subfield and mandatory. Like it was not present in the form.

Test plan :
- Go to Tools > Batch item modification
- Enter a barcode and submit
- Lets say there are subfields : $2 (not mandatory), $u and $v
- Check the subfield $2 to be deleted
=> $2 input is disabled
- Enter a text in $v
- Submit the form
=> Without patch, the text for $v gets into $u
=> With patch, the text for $v gets into $v
- Check the subfield $2 is well deleted

Signed-off-by: Nick Clemens <nick@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 adb232c8f0f4bf8574ca3dce9548196430c57fb0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23627: Reduce Koha::Biblio->get_coins noise if no 245
Tomas Cohen Arazi [Mon, 16 Sep 2019 20:22:17 +0000 (17:22 -0300)]
Bug 23627: Reduce Koha::Biblio->get_coins noise if no 245

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Maryse Simard <maryse.simard@inlibro.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 8766689d34c63416f38a8248367483c573c5036e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23605: Fix terminology for branches limitations on patron category admin page
Katrin Fischer [Fri, 13 Sep 2019 12:18:09 +0000 (12:18 +0000)]
Bug 23605: Fix terminology for branches limitations on patron category admin page

Fix branches to library.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 921cf9b35297c8ea57cc5482385f040c2734a027)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23526: (RM follow-up) Fix failing test
Martin Renvoize [Tue, 24 Sep 2019 07:21:13 +0000 (08:21 +0100)]
Bug 23526: (RM follow-up) Fix failing test

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fca3a267c61b3db9d16f01b0c46d03dbfc6dad63)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoUpdate release notes for 19.05.04 release v19.05.04
Fridolin Somers [Tue, 24 Sep 2019 07:40:11 +0000 (09:40 +0200)]
Update release notes for 19.05.04 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoIncrement version for 19.05.04 release
Fridolin Somers [Tue, 24 Sep 2019 07:33:00 +0000 (09:33 +0200)]
Increment version for 19.05.04 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoTranslation updates for Koha 19.05.04
Koha translators [Tue, 24 Sep 2019 07:27:56 +0000 (04:27 -0300)]
Translation updates for Koha 19.05.04

5 years agoBug 22744: Changes for opac and remove JS
Nick Clemens [Mon, 23 Sep 2019 10:25:13 +0000 (10:25 +0000)]
Bug 22744: Changes for opac and remove JS

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 87302a1abfe9d44bf302ee9ce83ec0639ea4f849)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22744: Remove the 'do not notify' buttons
Nick Clemens [Thu, 13 Jun 2019 10:56:34 +0000 (10:56 +0000)]
Bug 22744: Remove the 'do not notify' buttons

These checkboxes are simply a way to clear the prefs before editing. We are not saving
a lot of click, and we are confusing people, this patch simply removes them

To test:
1 - Edit a patron's messaging preferences
2 - Think too hard about the 'Do not notify' boxes
3 - Feel confused
4 - Apply this patch
5 - Edit a patron's messaging preferences
6 - Confirm it feels better

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ff21f979081b3c20d313129a7b4da671bf0fd635)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23537: Overdrive won't show complete results at all times
Liz Rea [Wed, 4 Sep 2019 02:10:21 +0000 (02:10 +0000)]
Bug 23537: Overdrive won't show complete results at all times

To test:

On an overdrive enabled OPAC (tough sell, I know)

    Do a search for something you know has magazines, the collection I
    was looking at had "knit" as one

    Without this patch, the results will show "(many) items found in
    overdrive collection" but only show a small number of them.

    With the patch, the number of results should match the number
    shown/paginated.

    A site that has this fix applied, is
    https://tracy.bywatersolutions.com/cgi-bin/koha/opac-overdrive-search.pl?q=knit

    Before this patch, the number of results was 44, but there were only
    8 shown. Now we see all 44

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 98e4b5c04a1f89fb168fbc6e7dc40f374cb40ad1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23526: Don't use encoded question mark in shib_login_url
Nick [Tue, 10 Sep 2019 14:04:43 +0000 (14:04 +0000)]
Bug 23526: Don't use encoded question mark in shib_login_url

To test:
1 - Enable shib
2 - Do a search
3 - Try to login from search
4 - Get an error
5 - Apply patch
6 - Retry

Note: You do have to fully configure shibboleth, you can simply enable it in koha-conf.xml and check the URLs.
Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 16aa7d1c8afe249318767a8a023f7dbddb6843ea)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23425: (QA follow-up) Keep it generic
Tomas Cohen Arazi [Tue, 17 Sep 2019 18:08:06 +0000 (15:08 -0300)]
Bug 23425: (QA follow-up) Keep it generic

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2ae6e95a40b4da7f77f241cbe941662ff773db44)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23425: Display the MARCXML error in the Metadata::Invalid exception message
Jonathan Druart [Sun, 4 Aug 2019 15:47:02 +0000 (10:47 -0500)]
Bug 23425: Display the MARCXML error in the Metadata::Invalid exception message

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5d3b46df3f3ca1ae04bd9574b29cfe291aff48f5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 21390: Send registration verification emails immediately
Chris Cormack [Wed, 4 Sep 2019 21:43:13 +0000 (21:43 +0000)]
Bug 21390: Send registration verification emails immediately

To test
1/ Enable self registration
2/ Register, notice message is queued in the table but not sent
3/ Apply patch
4/ Register again, notice message is queued, but immediately sent

Sponsored by: Goethe-Institut
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 957d583d2efce66e31fe05f229fda91c58324bc2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23597: Add missing reserved query parameters to GET /holds
Tomas Cohen Arazi [Wed, 11 Sep 2019 17:33:45 +0000 (14:33 -0300)]
Bug 23597: Add missing reserved query parameters to GET /holds

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 410e9bc0e88007cdff850afed83ee55a240a7517)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23575: Template error causes item search to be submitted multiple times
Owen Leonard [Mon, 9 Sep 2019 16:58:04 +0000 (16:58 +0000)]
Bug 23575: Template error causes item search to be submitted multiple times

This patch corrects the item search template so that the submit handler
is not nested inside an unrelated loop. The change should have no
outward effect on the behavior of the item search other than making it
faster.

To observe the bug in action, open your browser's developer tools and
click the "Network" tab. Filter the output to only "XHR" and perform an
item search. You should see multiple requests.

To test, apply the patch and perform an item search. It should behave
normally.

Check the browser's "Network" monitor again to verify that only one
request is being sent.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Bouzid Fergani <bouzid.fergani@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 075261645e1650629038c9a09e8d9e387bcc5474)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22037: (QA follow-up) Correct misleading comment
Marcel de Rooy [Fri, 13 Sep 2019 07:36:25 +0000 (07:36 +0000)]
Bug 22037: (QA follow-up) Correct misleading comment

Comment needs to be corrected, and now applies to the whole code
paragraph following it.

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 766814ffa3c4592b9b7dcde83873ef12e796ae68)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22037: (QA follow-up) Implement use of CHARGES_GUARANTEES
Kyle M Hall [Thu, 22 Aug 2019 13:25:54 +0000 (09:25 -0400)]
Bug 22037: (QA follow-up) Implement use of CHARGES_GUARANTEES

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 9a5e519d70c168bb44cfea2d8a4490fad9049ab8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22037: Block SIP checkout if guarantees have debt
Jonathan Druart [Thu, 20 Dec 2018 22:39:34 +0000 (19:39 -0300)]
Bug 22037: Block SIP checkout if guarantees have debt

Signed-off-by: Kyle M Hall <kyle@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 2e91d33381cb29da30bfe16f022f1d07fe2b327f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 21058: Added HTML class to showRDAtag264
David Bourgault [Wed, 7 Aug 2019 18:01:58 +0000 (18:01 +0000)]
Bug 21058: Added HTML class to showRDAtag264

Adds the HTML class "rda264" to the span generated by the XSLT function
showRDAtag264.

To test, same as previous, using a notice with a 264 tag. Both patches
only apply to MARC21.

I was unsure how to name the class, so I've chose the simplest, most
explicit name.

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 072a901d35844e99db65c1069b52f4f8b5ad6e5a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 21058: Added HTML classes in MARC21slim2_Detail.xsl
David Bourgault [Wed, 7 Aug 2019 16:42:30 +0000 (16:42 +0000)]
Bug 21058: Added HTML classes in MARC21slim2_Detail.xsl

This is a very small patch. I've simply added the following classes to
their respective spans in the detail XSLs for both interfaces.

- in_note (773$n)
- preceeding_entry_note (780$n)
- succeeding_entry_note (785$n)

To test:

1. Apply patch
2. Open details page of notice with a 773$n, 780$n or 785$n field
3. Inspect element. The class should be visible.

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 b65fc8e176f600894a98be526922f05e9d4f000d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 16825: Add API route for getting an item
Lari Taskula [Mon, 27 Jun 2016 13:03:49 +0000 (16:03 +0300)]
Bug 16825: Add API route for getting an item

GET /api/v1/items/{item_id} Gets one Item

This patch adds route to get one item from koha.items table.

To test:
1. Apply patch
2. Open a browser tab on Koha staff and log in (to create CGISESSID
   cookie).
3. Send GET request to http://yourlibrary/api/v1/items/YYY
   where YYY is an existing itemnumber.
4. Make sure the returned data is correct.
5. Run unit tests in t/db_dependent/api/v1/items.t

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Johanna Raisa <johanna.raisa@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e9e6537fae1dd921a95f55394ff2b463be8c834a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23004: Unit test
Fridolin Somers [Thu, 8 Aug 2019 06:51:14 +0000 (08:51 +0200)]
Bug 23004: Unit test

Run prove t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b26c2a18630538ee515f8e383293efd2c2928c70)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23004: Missing authtype filter in auth_finder.pl
Fridolin Somers [Wed, 29 May 2019 06:15:08 +0000 (08:15 +0200)]
Bug 23004: Missing authtype filter in auth_finder.pl

In cataloguing, the use of tag editor opens authorities finder with a limit on specific authorities type.
This limit is missing with Elasticsearch.

This patch adds in query a "filter" on "term" which is the most performant way because there must be no ranking computed on this part.

Test plan :
1) Use Elasticsearch
2) Create an autority of type author (NP in UNIMARC) with heading "Tolkien"
3) Create an autority of type subject-author (SAUT in UNIMARC) with heading "Tolkien"
4) Create a biblio record
5) Use tag editor on a author field (700 in UNIMARC)
6) Seach for "Tolkien" in $a
without patch : you see the 2 authorities in results
with patch : you see only the correct authority in results (NP in UNIMARC)
7) Check search in authorities-home.pl is still OK

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 949e36c7b8a11cd185025a4c9e102f0e26205009)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 21180: Allow Talking Tech outbound script to limit based on patron home library...
Martha Fuerst [Wed, 8 Aug 2018 16:51:39 +0000 (12:51 -0400)]
Bug 21180: Allow Talking Tech outbound script to limit based on patron home library branchcode

A library system has requested the ability to limit which patrons are sent to Itivia for phone notices.

Test Plan:
1) Enable phone notices for two patrons with overdues
2) Run the misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl with the new --patron-branchcode option
3) Note only the patron whose homebranch you specified is in the output file

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3cb66af150171abf44868f8b0bdca8f70132e4f0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22929: Allow SCI/SCO logins independent of GDPR_Policy
Marcel de Rooy [Fri, 17 May 2019 07:36:17 +0000 (07:36 +0000)]
Bug 22929: Allow SCI/SCO logins independent of GDPR_Policy

This patch makes Auth skip the GDPR policy check when get_template_and_user
is called for sci/sco (self checkin, checkout).
I do not really like the change in this form but the nature of self checkin
and checkout kind of dictate it (double hack).
I wanted to add a test but since that asks for mocking CGI, checkauth, etc.
the time needed for that is just too much for this simple change.

Test plan:
Enable GDPR_Policy and self checkin/checkout.
Verify that using patrons without consent is not blocking sci/sco.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3640130d1fbc49ddc2cc4baef53a4c4d7fea76bf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23404: (QA follow-up) Minor fix
Tomas Cohen Arazi [Fri, 6 Sep 2019 18:51:26 +0000 (15:51 -0300)]
Bug 23404: (QA follow-up) Minor fix

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cb432e7f522f2f052d561dad3b36bc97ca7868a4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23404: Change UT calls
Fridolin Somers [Wed, 31 Jul 2019 08:59:37 +0000 (10:59 +0200)]
Bug 23404: Change UT calls

Run prove t/db_dependent/Circulation/TooMany.t
Tests are OK

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e98af5828a56b52426ae7aa12d1c85e4f9fb41d2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23404: fix Circulation::TooMany error on itemtype when at biblio level
Fridolin Somers [Wed, 31 Jul 2019 13:56:22 +0000 (15:56 +0200)]
Bug 23404: fix Circulation::TooMany error on itemtype when at biblio level

Circulation::TooMany gets itemtype from $item var beeing a Koha::Item unblessed.
When itemtype is at biblio level, calling $item->{'itemtype'} is wrong.

Test plan :
1) On a catalog with itemtype at item level : pref item-level_itypes=1
2) Create a biblio record with itemtype BOOK
3) Create an item on this biblio record with itemtype BOOK
4) Delete all issuing rules
5) Create a issuing rule with itemtype BOOK, any catagorie, any branch
6) Check-out the item
7) => Checkout is allowed
8) Check-in item
9) Change itemtype at biblio level : pref item-level_itypes=0
10) Check-out the item
11) => Checkout is not allowed
    You see message "No circulation rule is defined for this patron and itemtype combination"

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9e1fa801d6f1ff718d8689c855483b8b9c735a9f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23404: add UT to show bug
Fridolin Somers [Wed, 31 Jul 2019 09:21:14 +0000 (11:21 +0200)]
Bug 23404: add UT to show bug

Run prove t/db_dependent/Circulation/TooMany.t
It fails on :
    #   Failed test 'We are only allowed one, and we have one (itemtype on biblioitem)'
    #   at t/db_dependent/Circulation/TooMany.t line 547.
    #     Structures begin differing at:
    #          $got->{reason} = 'NO_RULE_DEFINED'
    #     $expected->{reason} = 'TOO_MANY_CHECKOUTS'

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 445b0cb8b595136afdebaee2db3bc768b42b445b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23353: ACQ framework makes fr-CA web installer explode
Caroline Cyr La Rose [Fri, 16 Aug 2019 18:28:59 +0000 (14:28 -0400)]
Bug 23353: ACQ framework makes fr-CA web installer explode

This patch removes the standalone ACQ framework SQL file in the fr-CA
directory and adds the ACQ framework creation SQL in the default
framework file, as it is in other languages.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 811bee9bce57e67fd22562b3bb62397335b4eeb5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 16111: (QA follow-up) Few additional corrections
Marcel de Rooy [Fri, 6 Sep 2019 09:47:19 +0000 (09:47 +0000)]
Bug 16111: (QA follow-up) Few additional corrections

[1] Refining the regex on the format parameter in opac-search.pl
[2] Adding a colon to dc:identifier. The Dublin Core specs gives me this
    example:
    Identifier="ISBN:0385424728"
[3] Replacing last occurrence of rss2 in the rss template

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 2bbd811027172af1adb68f9904071951056ecbda)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 16111: (QA follow-up) Changes related to partial revert
Marcel de Rooy [Fri, 6 Sep 2019 09:02:38 +0000 (09:02 +0000)]
Bug 16111: (QA follow-up) Changes related to partial revert

When reverting the &amp; change, we need to go back to html filter for
query_cgi and limit_cgi. In this patch I only replaced it where it is
needed. The template contains more references to SEARCH_RESULT.query_cgi
and SEARCH_RESULT.limit_cgi which are useless, since searchResults does
not return these hash keys at all.

This patch fixes one occurrence where SEARCH_RESULT was copied outside
the loop that defines the template variable.

Obviously, the code for RSS still needs more attention.

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 062c3f9ab2e25b64dad1d4356a976a1416204c05)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 16111: Further fixes to the RSS to make feed work
Liz Rea [Mon, 19 Aug 2019 01:51:04 +0000 (01:51 +0000)]
Bug 16111: Further fixes to the RSS to make feed work

- fixed links per the WC3 spec
- fixed a problem in the ATOM link

To test:
do a search, click the RSS icon - it shows xml in most browsers but wont
do RSS type things.
Apply this patch, restart the things
refresh the page, it should do RSS things (i.e. firefox should render it
        as a nice looking thing, rather than raw XML.)

noting that there are a couple of validation errors still, but they
don't seem to be show stopping and moreover I wasn't sure how to fix them:

Misplaced Item
Self reference doesn't match document location (this is a "for widest
        compatibility you should fix" kind of thing)

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 fafd719dd34aeb4e96377f4404a53df589138efd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 16111: [CHANGED] Replace link href by link in rss part
Jonathan Druart [Mon, 19 Aug 2019 22:24:56 +0000 (18:24 -0400)]
Bug 16111: [CHANGED] Replace link href by link in rss part

Original patch title: Replace & with &amp;

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
EDIT:
Reverting the changes to C4/Search and opac-search.pl.
This requires a few changes, as supplied in the 5th patch.

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 0e1e5ca31fab861c85c9b6e0d3b788f0208402d4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 16111: Adjust some more filters
Jonathan Druart [Mon, 19 Aug 2019 20:33:06 +0000 (16:33 -0400)]
Bug 16111: Adjust some more filters

Signed-off-by: Liz Rea <wizzyrea@gmail.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 4de5d3dd428a23605e6dc49bfc05bfe780f647dc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 16111: Fix content type for RSS feed
Jonathan Druart [Mon, 18 Jun 2018 20:31:27 +0000 (17:31 -0300)]
Bug 16111: Fix content type for RSS feed

Test plan:
GET http://catalogue/cgi-bin/koha/opac-search.pl?idx=kw&q=perl&count=50&sort_by=acqdate_dsc&format=rss2

=> Without this patch it returns content type text/html
=> With this patch it returns text/xml

GET http://catalogue/cgi-bin/koha/opac-search.pl?idx=kw&q=perl&count=50&sort_by=acqdate_dsc&format=rss
=> Without this patch it does not work
=> With this patch it returns text/xml

Bug 16111: Fix atom support
Bug 16111: Remove 'rss2' which should be 'rss' or 'atom'
Bug 16111: Replace <link> with <link href...

Signed-off-by: Liz Rea <wizzyrea@gmail.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 b946e996ff208e71bbfd5cfb7714f9a656065093)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23539: (RM follow-up) Update DBIC classes
Martin Renvoize [Fri, 6 Sep 2019 12:24:10 +0000 (13:24 +0100)]
Bug 23539: (RM follow-up) Update DBIC classes

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 49e30bc67d91f300df2efd9b7a2cf0526221fb96)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23539: DBRev 19.05.03.003
Martin Renvoize [Fri, 6 Sep 2019 12:20:14 +0000 (13:20 +0100)]
Bug 23539: DBRev 19.05.03.003

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 38322b5a43b37575d4d1c2da1d4b5b0ef3b83bf4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23539: accountlines.accounttype should match authorised_values.authorised_value...
Kyle M Hall [Wed, 4 Sep 2019 17:48:41 +0000 (13:48 -0400)]
Bug 23539: accountlines.accounttype should match authorised_values.authorised_value in size

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 00c61beff999c12823111fb594bec2c57a5c0d58)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23289: Quote new 'rows' MariaDB reserved word
Jonathan Druart [Sun, 1 Sep 2019 19:26:02 +0000 (15:26 -0400)]
Bug 23289: Quote new 'rows' MariaDB reserved word

Since MariaDB 10.2.4 rows is a reserved word:
https://mariadb.com/kb/en/library/mariadb-1024-release-notes/

"""
New reserved word: ROWS. This can no longer be used as an identifier
without being quoted.
"""

Test plan:
With MariaDB >= 10.2.4, create a new label template.
Also, prove t/db_dependent/Labels/t_Template.t

Without this patch you will get the following SQL error: DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'rows, creator, template_code, page_height,

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 aede6896dd6ebc660894bcde117ccd213e2c3de6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23530: Fix cart showing only hidden items
Mason James [Tue, 3 Sep 2019 04:02:32 +0000 (16:02 +1200)]
Bug 23530: Fix cart showing only hidden items

Items hidden with the OpacHiddenItems system preference
were still displayed in the OPAC cart and the normal items
were hidden instead. This patch corrects the display.

To test:
- prep a test bib with hidden and other items using
  the OpacHiddenItems system preference
- add bib to cart
- observe that hidden items are displayed - non-hidden items are hidden
- apply patch, reload page
- observe that hidden items are hidden, non-hidden items are displayed

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 60ce66b6b658bfbe0d9ca459afc673042c7a854f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23079: Add tests
Jonathan Druart [Sun, 23 Jun 2019 01:33:45 +0000 (20:33 -0500)]
Bug 23079: Add tests

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6b6fe8f88b33e3455ae30526109674bfa4f3d185)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23079: Handle invalid timezones when adding/subtracting durations
Jonathan Druart [Sun, 23 Jun 2019 01:40:04 +0000 (20:40 -0500)]
Bug 23079: Handle invalid timezones when adding/subtracting durations

On Nov 3rd 2019, Brazil will skip from 00:00 to 1:00 (http://www.currenttimeonline.com/dst/dst.do?tz=America/Sao_Paulo), DateTime consider it as an invalid date.
It is a problem when we are playing with dates without the time part (always 00:00).
When we instantiate a DateTime (from dt_from_string) we are already handling this issue, and use the floating timezone (since bug 12669).

The problem remains when we generate a DateTime then add or subtract a duration, which will result in an invalid date:

DateTime->new(year => 2019, month => 12, day => 3, time_zone => 'America/Sao_Paulo')->subtract(days => 30);

=> Nov 3rd 2019, kaboom.

We should replace all the problematic occurrences of dt_from_string->subtract (or ->add)
with dt_from_string(undef, undef, 'floating'), to use the floating timezone and avoid the error.

Actually there are not many of them, I have found only 3 that could
produce real problems.

The other occurrences are:
- in tests => Not a big deal (for now)
- called on a datetime, so it will explode if called at midnight
00:00:00 (and nobody should work at that time).

Test plan:
0/ Define the timezone to 'America/Sao_Paulo' (in your koha-conf.xml file), restart_all
1/ Set a patron's expiry date to Dec 3rd 2019, and
NotifyBorrowerDeparture to 30 (default value)
2/ See the checkouts page for this user
=> Without this patch you get "Invalid local time for date in time zone:
America/Sao_Paulo"
=> With this patch apply the page displays correctly

QA will review the 2 other occurrences.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d0040dff9f435be65503e88afe45ce196bce9c4a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22786: Prevent fund creation for locked budgets
Jonathan Druart [Sun, 23 Jun 2019 00:29:42 +0000 (19:29 -0500)]
Bug 22786: Prevent fund creation for locked budgets

If a budget is locked, there is a "New fund for $budget" link that is
disabled but clickable.
We should ensure that the link is not clickable and prevent it at
controller level (do we need it at module level, ie.
Koha::Acquisition::Fund->store?)

Test plan:
- Create a budget, lock it
- Go to /cgi-bin/koha/admin/aqbudgetperiods.pl
- Click on the name of the budget you just created
=> The "New > New fund for $budget_name" button should be disabled
- Click it anyway
=> Without this patch the form to add a new fund is displayed
=> With this patch applied nothing happens
- Hit /cgi-bin/koha/admin/aqbudgets.pl?op=add_form&amp;budget_period_id=XXX
With XXX the budget's id
=> Without this patch the form is displayed
=> With this patch applied you get a message:
  "The budget is locked, fund creation is not possible."
And you are not able to create a new fund

QA notes:
1. See description
2. The add_validate op can still be forced, let trust librarians with
administration permissions for now.

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 9215ca42d28bec10f55a9c660bb5816045bb9656)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23518: Problem with borrower search autocomplete
Owen Leonard [Fri, 30 Aug 2019 12:25:45 +0000 (12:25 +0000)]
Bug 23518: Problem with borrower search autocomplete

This patch fixes a bug introduced by my patch for Bug 23405: Keyboard
navigation of patron autocomplete results was broken because I
incorrectly assumed that the autocomplete "select" action was redundant
because keyboard navigation would trigger the selected link. It doesn't!

This patch adds the "select" action back to the autocomplete
configuration, explicitly defining a redirect to match the URL which is
followed if the user uses the mouse to click a result.

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.

- Making a selection from the autocomplete results should work by
  clicking with a mouse OR using the arrow keys and TAB or ENTER.

- Test with patrons with and without card numbers.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
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 b94b58aa746188ee3699a2e4bc0a6b24d2dd86c5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23210: (follow-up) Log in for tags link should trigger modal
Owen Leonard [Mon, 5 Aug 2019 14:25:51 +0000 (14:25 +0000)]
Bug 23210: (follow-up) Log in for tags link should trigger modal

This patch modifies the "Log in to add tags" link on the OPAC search
results page, adding the class which is used elsewhere in the OPAC
templates for triggering the login modal.

Also: Removed an unnecessary period.

To test, apply the patch and follow the original test plan. Clicking the
"Log in to add tags" link should trigger the login modal. After logging
in you should be returned to the page you were on.

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 66b6c76d96b172bbd2b9f90640f7701a6ba4530c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23210: login4tags should be a link and included in every search result
Lucas Gass [Fri, 2 Aug 2019 22:21:40 +0000 (22:21 +0000)]
Bug 23210: login4tags should be a link and included in every search result

TEST PLAN:

1. Make sure TagsEnabled and TagsInputOnList are set to allow.
2. Don't be logged into the OPAC.
3. Make a search and notice the 'Log in to add tags' text is not a link
   on the results page.
4. Apply patch
5. Refresh OPAC results page
6. 'Log in to add tags' takes you to the login page.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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 99d8d2db2c4f44cbb91a069ed3a8dd7894e0218a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23397: (QA follow-up) Replace mod 2 by last
Marcel de Rooy [Fri, 23 Aug 2019 14:36:36 +0000 (14:36 +0000)]
Bug 23397: (QA follow-up) Replace mod 2 by last

Looks better: Maps | Books | Continuing Resources

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 4148b222b373b262a16a99faa314a47fa3994c0e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23397: (follow-up) Split and display itemtypes
Nick Clemens [Fri, 23 Aug 2019 13:14:57 +0000 (13:14 +0000)]
Bug 23397: (follow-up) Split and display itemtypes

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 36a16efec36b4c4d57231c0f459f76cb2bbaee7d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23397: Fix grouping of orders in acqui scripts
Nick Clemens [Mon, 29 Jul 2019 18:12:21 +0000 (18:12 +0000)]
Bug 23397: Fix grouping of orders in acqui scripts

Bug 21622 attempted to fix some grouping for strict mode, however, it failed to take into account that single order can have multiple item types.

To recreate:
1 - Place an order for 4 copies of a title in acq
2 - Make sure you are creating orders when ordering (AcqCreateItems syspref and/or when creating basket)
3 - Set three items to one type, and one to another
4 - Go to Acqui-Home and click 'ordered' for the used budget
5 - Note the line is duplicated for each itemtype in the order
6 - Recieve the items and note the same issue on 'Spent'
7 - Place another order as before so you have the problem in both ordered.pl and spent/pl
8 - Apply patch
9 - Note orders are no longer duplicated

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 1f40de2931f19cce0ca372151444ea05eb5f8e93)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23502: Staff client "revert status" buttons should not depend on SuspendHoldsIntr...
Owen Leonard [Fri, 23 Aug 2019 16:41:57 +0000 (16:41 +0000)]
Bug 23502: Staff client "revert status" buttons should not depend on SuspendHoldsIntranet preference

This bug corrects the template logic controlling the display of the
"Revert waiting status" and "Revert transit status" buttons on the staff
client holds page so that it doesn't depend on having
SuspendHoldsIntranet enabled.

To test, apply the patch and locate a title which has multiple holds,
including:

  - One waiting hold
  - One in-transit hold
  - At least one pending hold

View the page with the SuspendHoldsIntranet preference both on and off.
The "Revert transit status" and "Revert waiting status" buttons should
be displayed either way.

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 424cd4ed7f877d8bc7a45c77df0fa1b614efd1b7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23265: (bug 12063 follow-up) Remove Koha::Holds from updatedatabase
Jonathan Druart [Tue, 6 Aug 2019 14:09:18 +0000 (09:09 -0500)]
Bug 23265: (bug 12063 follow-up) Remove Koha::Holds from updatedatabase

Test plan:
Have a DB that fail the 16.12.00.032 update, then apply this patch and
verify the expiration dates

RM: Please inforce this rule, no use of Koha:: in updatedatabase!

Signed-off-by: Victor Grousset <victor.grousset@biblibre.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 18d8d3b38b367ee0ea10169a0433e4a273252f15)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23273: Remove debug statement
Jonathan Druart [Sun, 1 Sep 2019 15:35:33 +0000 (11:35 -0400)]
Bug 23273: Remove debug 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 1fd224ea65dabd53e9f386af3ee602a87c2bb6dd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23273: (RM follow-up) Correction to filters
Martin Renvoize [Fri, 6 Sep 2019 09:17:20 +0000 (10:17 +0100)]
Bug 23273: (RM follow-up) Correction to filters

My initial RM followup for this patchset added one bad filter which
resulted in double encoding. This patch corrects that oversight.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 910417e22b31b54e60bd7b98146f68ca7d66d0aa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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 agoRevert "Bug 23273: Fix CSV export for overdues"
Fridolin Somers [Fri, 6 Sep 2019 08:08:19 +0000 (10:08 +0200)]
Revert "Bug 23273: Fix CSV export for overdues"

This reverts commit 1e63658b308507bb5e23bff4250b0425f2b614e3.

5 years agoRevert "Bug 23273: (RM follow-up) Add missing filters"
Fridolin Somers [Fri, 6 Sep 2019 08:08:17 +0000 (10:08 +0200)]
Revert "Bug 23273: (RM follow-up) Add missing filters"

This reverts commit 72360fa80c38b88035b5d18100d5126b1017e809.

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>