Nicolas Legrand [Mon, 23 Sep 2019 16:55:56 +0000 (18:55 +0200)]
Bug 23671: Elasticsearch shouldn't throw exception on an uppercase subfield identifier
Prevent Elasticsearch from throwing an exception when the mappings
include uppercase subfield identifier.
Though forbidden in MARC21, It doesn't seem to be the case for Unimarc
or ISO 2709 as a whole. It is also possible to define such a subfield
identifier in the Koha MARC Framework and in the Elasticsearch
mappings.
Test plan:
1. add a 995Z subfield identifier in Elasticsearch mappings
(Administration -> Search engine configuration)
2. run $KOHA_PATH/misc/search_tools/rebuild_elasticsearch.pl -v -d -b
3. see it throw: “Invalid MARC field expression: 995Z”
4. apply patch
5. rerun $KOHA_PATH/misc/search_tools/rebuild_elasticsearch.pl -v -d -b
6. sababa
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nicolas Legrand [Mon, 23 Sep 2019 16:27:32 +0000 (18:27 +0200)]
Bug 23670: Load Koha::Exceptions::ElasticSearch module in Koha::SearchEngine::Elasticsearch
Prevent Koha::SearchEngine::Elasticsearch from dying when trying to run
Koha::Exceptions::Elasticsearch::MARCFieldExprParseError->throw()
Plan test:
1. Go to Administration -> Searchengine configuration, and add a mapping
for 995Z, whatever the search field (I did it with local-classification),
save
2. run $KOHA_PATH/misc/search_tools/rebuild_elasticsearch.pl -v -d -b
3. see it die asking for Koha::Exceptions::Elasticsearch
4. apply patch
5. rerun $KOHA_PATH/misc/search_tools/rebuild_elasticsearch.pl -v -d -b
6. see it throw: Invalid MARC field expression: 995Z
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Wed, 12 Jun 2019 19:54:42 +0000 (19:54 +0000)]
Bug 23007: Retain focus on 'barcode' input if transfers don't block circ
To test:
1 - Apply patches
2 - Update database
3 - Confirm TransfersBlockCirc defaults to 'Block'
4 - Check in an item that needs transfer
5 - Confirm you must deal with the modal to proceed
6 - Repeat checking to get 'wrong-transfer-modal'
7 - Confirm you must deal with it to proceed
8 - Switch the pref to 'Don't block'
9 - Find a new item or cancel/fulfill the preceeding transfer
10 - Check in the item to generate transfer
11 - Note focus remains on the barcode field and you can continue scanning (or typing if you don't have a scanner)
12 - Note typing and pressing enter continues without requiring you to deal with modal
13 - Repeat for wrong transfer modal
14 - Verify hold and other modals still block continuing circulation
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>
Nick Clemens [Fri, 30 Aug 2019 19:56:28 +0000 (19:56 +0000)]
Bug 23039: Don't hide the checkin dialogs
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Tue, 30 Jul 2019 15:16:26 +0000 (15:16 +0000)]
Bug 23039: Hold found modal on checkin screen ( circulation.pl ) obscures Check in message info
This patch modifies the checkin process so that any errors or messages
related to the current checkin are displayed in any hold/transit modal
which is displayed. This prevents any information from being hidden by
the modal.
This patch also adds an "information" button to the checkout form which
the user can click to redisplay the last modal which was dismissed
(unless confirming the modal reloads the page).
To test, apply the patch and rebuild the staff client CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
- Test the checkin process with various types of items:
- Item not checked out
- Item not checked out, on hold
- Item not checked out, needs to be transferred
- Item is marked lost, needs to be transferred
- Item checked out, patron has waiting holds (with
WaitingNotifyAtCheckin enabled)
- Item checked out, patron has outstanding fines (with
FineNotifyAtCheckin enabled)
- Test that the modal redisplay button works in cases where the modal
is dismissed without triggering a page reload:
- Hold confirmation -> Ignore
- Transfer confirmation -> OK
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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>
Björn Nylén [Fri, 14 Sep 2018 06:19:46 +0000 (08:19 +0200)]
Bug 21343: Respect patron language preference in automtic renewals
To test:
1) Set up different automatic renewal notices for Default and one other language
2) Make sure you have checkouts due for auto-renewal to patrons with non-Default language pref
3) Run automatic_renewals.pl . All patrons will get the default-language notice
4) Apply patch.
5) Repeat 2)
6) Run automatic_renewals.pl . Patrons will receive notices according to their language preference.
Sponsored-by: Lund University Library Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
A change to the way we hide/expose the user menu in the opac resulted in
the authentication selenium tests failing. This was due to the logout
button being identified as hidden under the new code and as such the
logout action not being triggered correctly between each login test. The
was was simply to add an additonal 'click' event called on the menu
button to put the logout link into the visible viewport.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Fri, 4 Oct 2019 12:19:18 +0000 (13:19 +0100)]
Bug 23612: (RM follow-up) Fix failing tests
Trailing comma's were causing hidden javascript errors during selenium
tests.
Error was identified by adding a $s->capture($driver) line to the
relevant selenium test and using the following JS snippet to dump errors
to the screen.
(function () {
var ul = null;
function createErrorList() {
ul = document.createElement('ul');
ul.setAttribute('id', 'js_error_list');
//ul.style.display = 'none';
document.body.appendChild(ul);
}
window.onerror = function(msg){
if (ul === null)
createErrorList();
var li = document.createElement("li");
li.appendChild(document.createTextNode(msg));
ul.appendChild(li);
};
})();
Which clearly showed the following error.
ReferenceError: KohaTable is not defined
Removing the trailing comma's introduced in this bug resolved the issue.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Lucas Gass [Wed, 2 Oct 2019 14:05:25 +0000 (14:05 +0000)]
Bug 23711: Fix bad path
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>
Owen Leonard [Fri, 6 Sep 2019 15:37:43 +0000 (15:37 +0000)]
Bug 23543: Adding Withdrawn to the Item Search
This patch adds "Withdrawn" status to the item search form and item
search results.
To test you should have one or more items in your catalog which have a
'Withdrawn' status.
Perform an item search and limit to a widthdrawn status. Verify that the
search returns the correct results and that the withdrawn column in
search results shows the correct information.
Test the "Export results to CSV" button. The resulting file should
contain the correct data, including withdrawn status.
Signed-off-by: Joe Sikowitz <joe@flo.org> Signed-off-by: David Roberts <david.roberts@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Tue, 11 Jun 2019 18:29:32 +0000 (18:29 +0000)]
Bug 18084: Language selector hidden in user menu on mobile interfaces
This patch updates templates and CSS so that the language-selection menu
in the header will not be hidden if the browser width is too narrow.
This patch also makes some more general improvements to the responsive
adaptability of the header elements.
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 the changes by viewing pages in the OPAC and adjusting your browser
width, paying attention to how elements in the top menu adapt to
different sizes. Test under varying conditions:
- Logged in/not loggeed user
- Search history enabled and disabled
- OpacLangSelectorMode showing menu in header or not
- opacuserlogin enabled or disabled
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nicolas Legrand [Fri, 27 Sep 2019 08:14:35 +0000 (10:14 +0200)]
Bug 23686: Check onsite checkout when the last checkout was an onsite one
Prevent from checking again and again the onsite checkout box when
doing onsite checkouts in batches. If preceding checkout was an onsite
one, the box will be checked.
Test plan:
1. enable OnSiteCheckouts
2. make your circulation rules able to checkout onsite
3. onsite checkout a document
4. you should return to the checkout page, the box isn't checked
5. apply patch
6. updatedatabase.pl
7. redo steps 3, it should again print a checkout page with an
unchecked onsite checkout box
8. enable OnSiteCheckoutAutoCheck system preference
9. redo step 3
10. when returning to the checkout page, the onsite checkout box
should be already checked
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Fri, 13 Sep 2019 18:10:25 +0000 (18:10 +0000)]
Bug 23612: If no columns in a table can be toggled, don't show columns button
This patch makes a change to the JavaScript setup for DataTables button
controls so that if there are no toggle-able buttons (or there is no
columns configuration at all) the column selection menu button will not
appear.
To test, apply the patch and go to Administration -> Columns settings.
- In the Administration section, find the section for the "libraries"
table.
- In the "Cannot be toggled" column, check all the checkboxes.
- Save.
- Go to Administration -> Libraries.
- At the top of the table there should be no "Columns" button, only
"Clear filter" and "Export" buttons.
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>
Owen Leonard [Tue, 1 Oct 2019 15:55:19 +0000 (15:55 +0000)]
Bug 23713: Subscription add form broken for translations
This patch makes a change to the subscription entry template as a
workaround to a translation bug which is causing JavaScript errors when
using translated templates.
To test, apply the patch and update and install the de-DE template:
- Go to Administration -> System preferences and enable the "Deutsch
(de-DE)" language under I18N/L10N preferences -> language.
- Switch to the "Deutsch" translation.
- Go to Zeitschriften (Serials) -> Neues Abonnement (New subscription)
and open the browser console. There should be no errors.
- Links which trigger JavaScript events should work correctly:
"Lieferant suchen," "Nach Datensatz suchen," etc.
Reported-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Thanks-to: Michael Hoffert and Alexander Arlt from koha-de for reporting
it initially and figuring out the root of the issue Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Kyle M Hall [Wed, 2 Oct 2019 18:58:55 +0000 (14:58 -0400)]
Bug 23722: Document allow_empty_passwords in the example SIP config file
The example SIP config file in Koha is kind of a kitchen sink document where
all available SIP2 options should be demonstrated.
The allow_empty_passwords flag should be included in it.
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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>
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>
Owen Leonard [Fri, 19 Jul 2019 14:06:59 +0000 (14:06 +0000)]
Bug 23351: Clean up localization template
This patch modifies the template used for translation of item type
descriptions. It is updated with more consistent Bootstrap grid markup
and improved handling of adding and removing rows from the DataTable.
To test you should have more than one translation installed.
- Apply the patch and go to Administration -> Item types.
- Edit an item type.
- Click the translate link.
- Add a new translation. The table of translations should be updated
with your new translation.
- Test the "Delete" link corresponding to your new entry. It should
work correctly.
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
David Gustafsson [Mon, 30 Sep 2019 13:15:35 +0000 (15:15 +0200)]
Bug 20589: DBRev 19.06.00.032
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick [Tue, 1 Oct 2019 09:02:20 +0000 (09:02 +0000)]
Bug 20589: Remove expanded_facet variable and fix tests
Thi is a rebase from 14419 to remove an unused variable
Also update tests to expect the new expected result
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Fri, 23 Aug 2019 16:45:05 +0000 (16:45 +0000)]
Bug 20589: Add option for searching entire record if record stored as array
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
David Gustafsson [Mon, 14 Jan 2019 14:59:55 +0000 (15:59 +0100)]
Bug 20589: Exclude boolean fields from search fields
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
David Gustafsson [Fri, 13 Apr 2018 13:46:55 +0000 (15:46 +0200)]
Bug 20589: Add field boosting and use query_string fields parameter
Generate a list of fields for the query_string query fields parameter,
with possible boosts, instead of using "_all"-field. Also add "search"
flag in search_marc_to_field table so that certain mappings can be
excluded from searches. Add option to include/exclude fields in
query_string "fields" parameter depending on searching in OPAC or staff
client. Refactor code to remove all other dependencies on "_all"-field.
How to test:
1) Reindex authorities and biblios.
2) Search biblios and try to verify that this works as expected.
3) Search authorities and try to verify that this works as expected.
4) Go to "Search engine configuration"
5) Change some "Boost", "Staff client", and "OPAC" settings and save.
6) Verify that those settings where saved accordingly.
7) Click the "Biblios" or "Authorities" tab and change one or more
"Searchable" settings
8) Verfiy that those settings where saved accordingly.
9) Try to verify that these settings has taken effect by peforming
some biblios and/or authorities searches.
Sponsorded-by: Gothenburg Univesity Library Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
When a high enough number of forks try to access for example system
preferences with Koha::Cache using memcached as backend the results of
different cache requests get mixed up.
The problem is fixed by using Cache::Memcached::Fast::Safe that is a
fork safe version of Cache::Memcached::Fast.
Sponsored-by: The National Library of Finland Signed-off-by: David Cook <dcook@prosentient.com.au>
Works as described, and solves an insidious difficult to debug
problem in Koha.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Magnus Enger [Tue, 1 Oct 2019 08:54:41 +0000 (10:54 +0200)]
Bug 22280: Add a unit test
This patch adds a unit test to t/db_dependent/Illrequests.t, where
a new node without any next_actions or prev_actions is added to the
core status graph.
Running the tests show a lot of warnings about "no query in
themelanguage", but that should not be related to the current bug.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Wed, 25 Sep 2019 17:10:46 +0000 (17:10 +0000)]
Bug 23566: Continue on device - with QR codes
This patch adds the option to show a QR code on the OPAC bibliographic
detail page. The URL of the page is encoded in the image so that
scanning it will take the user to that page on their device. The feature
is controlled by a new system preference, OPACDetailQRCode, which is
disabled by default.
The QR Code is generated by a JavaScript library, "kjua"
(https://github.com/lrsjng/kjua), which has been added to the "About"
page in the staff client.
To test, apply the patch and run the database update. Rebuild the OPAC
CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
- In the staff client, go to Administration -> System preferences.
- Locate the OPACDetailQRCode system preferences under OPAC ->
Features. It should be disabled.
- Enable the preference and switch to the OPAC.
- Locate a title in the catalog and view the detail page.
- In the sidebar menu there should be a "Send to device" link.
- Clicking the link should display a QR Code.
- Scan the code using a QR Code-capable device.
- The URL should be correct.
- Disable the system preference and confirm that the "Send to device"
link no longer appears on the OPAC detail page.
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Katrin Fischer [Fri, 9 Aug 2019 14:42:38 +0000 (14:42 +0000)]
Bug 7074: Show subtitle, part and number of a record in list of checkins
Shows the subtitle, part and number information from the biblio tables
as part of the title in the list of checkins (for MARC21: 245$b$n$p).
To test:
- Apply patch
- Catalog a record with 245$a$b$n$p filled out
- Check the item out to any patron
- Verify that in the list of checkouts the information shows
- Check out any other items with different 245
- Verify information is correct
- In a new tab, return the items
- Verify that in the list of checkins the information now
matches the checkouts list
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>
Martin Renvoize [Thu, 12 Sep 2019 15:55:17 +0000 (16:55 +0100)]
Bug 19618: (QA follow-up) POD Fix
Sponsored-by: Southeast Kansas Library - SEKLS Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
To test:
1) prove t/db_dependent/Koha/Club/Enrollment.t
2) prove t/db_dependent/Koha/Club/Hold.t
3) prove t/db_dependent/api/v1/clubs_holds.t
4) Sign off
Sponsored-by: Southeast Kansas Library - SEKLS Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds an endpoint in thi api in /api/v1/clubs/{club_id}/holds whith the verb POST that maps to Koha::REST::V1::Clubs::Holds#add controller.
Classes for club_holds and club_holds_to_patron_holds new tables where also added.
To test:
1) Reach SUCCESS.3 test point of previous patch with club that has no enrollments
2) Click on "Place Hold"
SUCCESS => an alert should appear that you cannot place hold on a club without patrons
3) Reach SUCCESS.3 test point of previous patch with club that has enrollments
4) Click on "Place Hold"
SUCCESS => holds priority list should appear with holds for every patron in club
5) Repeat steps 3 and 4.
SUCCESS => new holds should appear in different order
6) Sign off
Sponsored-by: Southeast Kansas Library - SEKLS Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 19618: Add ability to place holds for members of a club in intranet
This patch adds the ability to place a hold for each member of a club in random order.
To test:
1) apply this patch
2) create 2 clubs, (club names should have some part in common, and some part different for each other)
3) in one of them add at least 6 members
4) enter patron clubs management and click on "Actions" button
SUCCESS.1 => club with members has a new action called "search to hold"
5) click on search to hold
SUCCESS.2 => in the list of bilios there appears an action called "Place hold for <club name>"
6) click on "Place hold for <club name>"
SUCCESS.3 => a new window appears where you can select pickup location (defaults to club's library, if any), and the list of members.
7) go back to the list of bilios in the catalog and click on "Forget <club name>"
8) click on "Holds" action of any biblio
SUCCESS.4 => a search box appears with two tabs: Patrons and Clubs
9) click on Clubs tab and search by the common part of clubs names
SUCCESS.5 => a list of clubs that matches the search appears. If you click on any of them, the same page as SUCCESS.3 appears.
10) go back to the search box in SUCCESS.4 and search by the different part of the name.
SUCCESS.6 => because there is only one club that matches search criteria, the same page as SUCCESS.3 appears;
11) Sign off
Sponsored-by: Southeast Kansas Library - SEKLS Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 19618: Add club_holds and club_holds_to_patron_holds tables
This patch adds 2 new tables
1. club_holds
2. club_holds_to_patron_holds
They are ment to keep info about hold requests made in name of a club
To test:
1) apply this patch
2) perl installer/data/mysql/updatedatabase.pl
SUCCESS => 2 new tables were created
Sponsored-by: Southeast Kansas Library - SEKLS Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Wed, 25 Sep 2019 11:58:38 +0000 (11:58 +0000)]
Bug 23648: The logged in link (class "loggedinusername") needs data-patroncategory
This patch adds a "data-categorycode" attribte to the logged in link in
the global header of the OPAC. This will allow access to the patron
category for use in customization and whatnot.
To test, apply the patch and log in to the OPAC. Use the browser's DOM
inspector tool to examine the logged-in user's name in the header. It
should have a "data-categorycode" attribute with the correct value.
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Katrin Fischer [Sat, 10 Aug 2019 19:55:52 +0000 (21:55 +0200)]
Bug 23447: Fix capitalization and other minor edits on patron batch edit template
Just some small fixes:
- Category => Patron category (more specific for translation)
- Attribute => Patron attribute
- Opac Note => OPAC note
- Add missing colons (:) after some of the labels
To test:
- Find an existing cardnumber
- Go to Tools > Patron batch modification
- Use cardnumber in input field and continue
- Verify strings show as noted above
- Apply patch
- Repeat and verify strings have changed, everything still works
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Martin Renvoize [Fri, 27 Sep 2019 12:13:05 +0000 (13:13 +0100)]
Bug 23602: (follow-up) Improve tooltip formatting
This follow-up changes the formatting of the tooltip to add a newline for
library limit.
To test, apply the patch and go to Administration -> Item types.
In the table of item types, find one with library limitations. Hovering
over the "# library limitations" test should trigger a Bootstrap-styled
tooltip showing the library name and code, one per line.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This follow-up changes the use of "branch" to the Koha standard
"library." The patch also adds the use of a Bootstrap tooltip for
showing an item type's library limitations in the main table of item
types.
To test, apply the patch and go to Administration -> Item types.
In the table of item types, find one with library limitations. Hovering
over the "# library limitations" test should trigger a Bootstrap-styled
tooltip showing the library name and code.
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 23602: Display branch limitations in itemtype table
This patch adds a column in itemtype table to display branch limitations.
To test:
1) Open item types admin page.
CHECK => there is no column for branch limitations, even if you add a limitation in an item type.
2) Apply this patch
SUCCESS => A new column appears that displays branch limitations per item type
3) Sign off
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Agustin Moyano [Wed, 26 Jun 2019 05:02:39 +0000 (02:02 -0300)]
Bug 23213: Enable minimum payment threshold check in OPAC
This patch enables OPAC to check for the miminum payment threshold per payment method.
If the total amount to pay is less than the threshold, payment for that method is disabled.
To test:
1) apply dependencies
2) get 2 payment plugins, one with threshold as https://gitlab.com/thekesolutions/plugins/koha-plugin-pay-via-paypal/uploads/4c66444ff697586dff3d8759c1e5746c/koha-plugin-pay-via-paypal-v1.0.0.kpz and one without threshold as https://github.com/bywatersolutions/koha-plugin-pay-via-paygov/releases/download/v1.0.5/koha-plugin-pay-via-paygov-v1.0.5.kpz
3) install both plugins
4) Configure both plugins to work correctly (can be invented data.. we are not interested in the actual payment page, but to test if payment method is allowed)
5) In plugin with threshold, set minimum threshold to 10
6) Fetch any user, and create 2 manual invoices, both for the amount of 5
7) Enter OPAC as user, and go to "my fines" tab
CHECK => both plugins appear as payment method
8) Check the checkbox of one of the fines
SUCCESS => plugin with threshold is now disabled, and has a warning message that says "Minimum amount needed by this service is 10.00"
=> plugin without threshold is enabled
=> if plugin with threshold was selected, "Make payment" button is disabled until an enabled payment method is selected
9) Check the second checkbox
SUCCESS => both payment methods are now enabled
10) Sign off
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Agustin Moyano [Thu, 13 Jun 2019 05:57:52 +0000 (02:57 -0300)]
Bug 23214: Modify account-table.inc to enable payment of guarantees fines
This patch enables a guarantor to pay guarantees fines in OPAC
To test:
1. Apply dependencies
2. On intranet, search for AllowStaffToSetFinesVisibilityForGuarantor preference and set to "Allow"
3. Enable some payment method
4. Find a patron with guarantor and edit
5. Change "Show fines to guarantor" select to "Yes" and save
6. Create a manual invoice for the patron (guarantee)
7. Enter OPAC with guarantor user
8. Go to "your fines" tab
SUCCESS => Guarantees fines appear, and is selectable to pay
9. Sign off
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Martin Renvoize [Fri, 27 Sep 2019 11:53:46 +0000 (12:53 +0100)]
Bug 23272: (RM followup) Fix edit action
This bug introduced a regression whereby if an authorized value has no
branch limitations then the authorized value cannot be edited once it
has been created. The edit page would display an error and not load.
This is the second case of a simple ternary correcting the issue, but
the logic of returning 'undef' from 'get_branch_limits' being called
into question.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 23517: Add the controller method for holds priorities handling
This patch implements the PUT /holds/:hold_id/priority endpoint
To test:
- Apply this patches
- Run:
$ kshell
k$ prove t/db_dependent/api/v1/holds.t
=> SUCCESS: Tests pass!
- Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 23517: Add a spec for PUT /holds/{hold_id}/priority
This patch adds the OpenAPI spec for the endpoint, and tests for the
desired behaviour.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>