Owen Leonard [Thu, 21 Nov 2019 16:26:53 +0000 (16:26 +0000)]
Bug 16683: Help links to fields 59X in cataloguing form are broken
This patch adds more specificity to handling of MARC21 documentation
links in the basic MARC editor.
To test, apply the patch and make sure the "advancedMARCeditor" system
preference is set to "Display."
You may need to edit a bibliographic framework so that 09x, 59x, and 69x
tags will display in the editor.
Edit or create a bibliographic record using that framework. Next to each
tag label in the editor should be a "?" link. Clicking this link should
open a new window with the correct Library of Congress documentation
page.
Check the links for 09x, 59x, and 69x tags as well as others to confirm
they open the correct pages.
Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Wed, 18 Dec 2019 17:10:07 +0000 (18:10 +0100)]
Bug 17667: Add tests
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Wed, 18 Dec 2019 17:10:15 +0000 (18:10 +0100)]
Bug 17667: Do not modify quantity of the original standing order when a receipt is cancelled
When cancelling a receipt, the quantity of the original order is
increased.
Test plan:
Create a basket, mark is as "standing orders"
Create an order
receive it
cancel the receipt
=> Without this patch the quantity of the original order is 2
=> With this patch applied the quantity it always 1
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Thu, 16 Jan 2020 14:52:00 +0000 (14:52 +0000)]
Bug 24433: OPAC account page no longer asks for confirmation before deleting hold
This patch restores markup added by Bug 21870 and subsequently removed
accidentally by Bug 21772. This allows the OPAC user summary page to
display a confirmation dialog before deleting a hold.
To test, apply the patch and log in to the OPAC as a user with holds.
- On the "Your summary" page, click the "Holds" tab.
- Click the "Cancel" button next to any hold.
- You should see a modal dialog asking for confirmation, showing the
correct title.
- Test both the "Yes" and "No" actions.
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>
Owen Leonard [Fri, 3 Jan 2020 17:40:34 +0000 (17:40 +0000)]
Bug 24341: Allow for more complex markup in OPAC confirmation dialogs
This patch changes the globally-available confirmModal() function in the
OPAC so that it uses jQuery's html() function for adding information to
the confirmation modal's body. This will allow for more than just plain
text to be added.
This patch also removes some obsolete lines from the JavaScript in
opac-user.tt and renames some variable for clarity.
To test, apply the patch log in to the OPAC as a user who has holds and
article requests.
- Test the following interactions, both the confirmation and cancel
options for each:
- Cancel a hold
- Suspend all holds
- Resume all holds
- Cancel an article request
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>
Owen Leonard [Wed, 20 Nov 2019 20:04:10 +0000 (20:04 +0000)]
Bug 21296: suspend hold ignores system preference on intranet
This patch modifies the DataTable configuration for the table of holds
which displays under the "Holds" tab on the patron's checkout and
details pages. A variable is now defined in the JavaScript with the
value of the "SuspendHoldsIntranet" system preference. This variable is
passed to the DataTable configuration to determine whether the column is
visible or not.
One of the changes made in this patch moves a <script> block so that it
appears before some of the JS includes on the page. This helps keep the
string-defining JS together in one block.
To test, apply the patch and set the "SuspendHoldsIntranet" system
preference to "Allow."
- Open the checkout page for a patron with one or more holds.
- Under the "Holds" tab, the table of holds should have a "Suspend"
column with controls for suspending or resuming holds.
- Check that the same is true on the patron detail page.
- Set the "SuspendHoldsIntranet" system preference to "Don't allow."
- Test the checkout and detail pages again and confirm that the
"Suspend" column does not appear.
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Katrin Fischer [Sun, 12 Jan 2020 09:32:17 +0000 (10:32 +0100)]
Bug 24404: Add missing space on invoices page / remove . from status
On the bottom of the invoices page the summary of adjustments and
shipping shows as:
Adjustments plus shipping:2.00
The patch adds the missing space between text and amount.
To test:
- 'Receive shipment' from a result in your vendor search
- Start a new invoice by entering an invoice number, amount
for shipping cost and fund.
- Finish receive (you don't need to receive anything)
- You should now be on invoice.pl
- Verify Status is 'Open.' and in 'Invoice details' we
have the amount with the missing space.
- Apply patch, reload the page.
- Verify the missing space is there and the . is gone.
- Close invoice, no . there either.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Thu, 9 Jan 2020 12:48:04 +0000 (12:48 +0000)]
Bug 24333: Add password class to AutoSelfCheck syspref
To test:
1 - Go to Administration
2 - Search sysprefs for AutoSelfCheck
3 - Enter something into AutoSelfCheckPass
4 - Note it is not masked
5 - Apply patch
6 - Reload page
7 - Note password is now masked
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Tue, 12 Nov 2019 15:10:53 +0000 (16:10 +0100)]
Bug 24018: Remove die "Not logged in"
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Wed, 15 Jan 2020 15:27:56 +0000 (15:27 +0000)]
Bug 24423: Add biblionumber to modify items link
To test:
- Find/create a bib with at least one item
- From detail.pl, use the checkboxes in the holdings table to select one or more items
- click the "Modify Selected Items" link just above the holdings table to take your item(s) to batch modification
- Change something and click save
- Observe that the Return to the Record link points to a url without a biblionumber: "/cgi-bin/koha/catalogue/detail.pl?biblionumber="
- Apply patch
- Repeat
- The link now works!
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: David Nind <david@davidnind.com>
Bug 24423: Fix for deletion - cleanup accidental debug inclusiopm
To test:
Repeat prior test plan with 'Delete selected'
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Katrin Fischer [Tue, 14 Jan 2020 18:44:01 +0000 (18:44 +0000)]
Bug 24395: Show initial float using the Price TT plugin on summary page
For displaying monetary amounts, we should be using the Price TT
plugin everywhere. This adds it to the cash register summary page.
To test:
- Create a cash register
- Check the cash register table for "Initial float"
- Verify the amount shows with more than 2 decimals
- Edit cash register - verify the same display there
- Apply patch
- Check again - it should display now with only 2 decimals
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Marcel de Rooy [Thu, 16 Jan 2020 14:33:39 +0000 (14:33 +0000)]
Bug 22220: Fix bib Apache rewrite rule for intranet
Trivial change. Speaks for itself.
Since koha/detail.pl does not exist, we cannot break things ;)
Test plan:
[1] Copy the change in apache-shared-intranet.conf to your actual
apache configuration. Probably in /etc/koha/.
[2] Restart Apache.
[3] Try a biblionumber say 123 on intranet with [your_staff_client]/bib/123.
Does the detail page come up?
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Thu, 19 Dec 2019 13:19:11 +0000 (13:19 +0000)]
Bug 24275: Apply anti-the to title column in inventory table
To test:
1 - Go to Tools->Inventory
2 - Click submit (or add options to get a subset of titles)
3 - Try sorting by title, note that titles with leading articles sort including the articles
4 - Apply patch
5 - Reload the page
6 - Note that leading articles are ignored for sorting
Signed-off-by: Deb <dstephen@dubuque.lib.ia.us> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Currently, the rules used to create OAI sets are processed with the 'or'
boolean operator between each rule.
This patch allows to use 'or' or 'and' between the rules.
The evaluation of the rules is done according to the boolean operators
precedence: AND has a higher precedence than OR.
For example:
A and B or C and D
will be evaluated as follow:
(A and B) or (C and D)
Test plan:
- Apply the patch
- Apply the atomicupdate
- Prove t/db_dependant/OAI/AndSets.t
- Check that existing mappings still work
- Try modifying existing mappings
- Try creating new mappings
- Check that the boolean operators precedence is correctly taken into account
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Tue, 14 Jan 2020 09:34:48 +0000 (10:34 +0100)]
Bug 20567: Count found holds for holds limit
Signed-off-by: Hans Palsson <hans.palsson@hkr.se> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Tue, 14 Jan 2020 09:33:03 +0000 (10:33 +0100)]
Bug 20567: Add tests
Signed-off-by: Hans Palsson <hans.palsson@hkr.se> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch acknowledges the fact that in D8 the Mojo::JSON->true and
Mojo::JSON->false values don't translate into integers when passed to
DBIC. It works correctly on D9 onwards, but we haven't formally
deprecated Jessie. This is adding back this translation, in the right
place now that all mappings code has been integrated into
Koha::Object(s) directly.
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Object.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Thu, 9 Jan 2020 17:45:47 +0000 (17:45 +0000)]
Bug 24391: Remove event attributes from patron clubs edit template
This patch removes "onclick" attributes from the template for adding and
editing patron club templates.
To test, apply the patch and go to Tools -> Patron clubs -> New club
template.
Test the process of adding and deleting both club and enrollment fields.
Test during the template add process and when editing an existing
template.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 24366: Merge biblioitem in Koha::Biblio->to_api
This patch moves the bilbioitem object merge into the
Koha::Biblio->to_api method, as opposed to doing it in the controller.
This is an inevitable change as other endpoints might require to embed
biblio objects, and they need to carry the biblioitem information.
Also, if we merge the tables, the transition will be straightforward
(remove the tests this patch introduces, and merge the mappings from
Koha::Biblioitem into Koha::Biblio).
To test:
1. Apply this patches
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Biblio.t \
t/db_dependent/api/v1/biblios.t
=> SUCCESS: Tests pass! i.e. the new to_api method is tested, and the
API tests don't expect any behavior change.
3. Sign off :-D
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Wed, 20 Nov 2019 12:52:13 +0000 (12:52 +0000)]
Bug 23354: Prevent negatives from being entered
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Wed, 20 Nov 2019 12:38:57 +0000 (12:38 +0000)]
Bug 23354: Format price on item add
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Wed, 20 Nov 2019 09:30:48 +0000 (09:30 +0000)]
Bug 23354: (follow-up) Fix for sending code instead of description
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Wed, 20 Nov 2019 07:53:05 +0000 (07:53 +0000)]
Bug 23354: (follow-up) Update for bugs 23049 and 23805
Remove all mentions of accounttype and replace with debit_type_code and
credit_type_code as appropriate.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Fri, 25 Oct 2019 13:37:34 +0000 (14:37 +0100)]
Bug 23354: (follow-up) Ensure 'CASH' payment type is present
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Thu, 17 Oct 2019 12:19:34 +0000 (13:19 +0100)]
Bug 23354: (follow-up) Make display of debit types configurable
This patch adds a the ability to define where a debit type will be
available as a option for use.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Thu, 3 Oct 2019 16:13:25 +0000 (17:13 +0100)]
Bug 23354: Update to account for bug 23049
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Thu, 3 Oct 2019 13:39:00 +0000 (14:39 +0100)]
Bug 23354: Add Icon for POS system
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Mon, 23 Sep 2019 13:12:13 +0000 (14:12 +0100)]
Bug 23354: (follow-up) Use 'format_price' for totals
Sponsored-by: PTFS Europe Sponsored-by: Cheshire Libraries Shared Services Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Mon, 23 Sep 2019 12:51:11 +0000 (13:51 +0100)]
Bug 23354: (follow-up) Input type on jEditable
Update the jEditable plugin to a maintained version and use the new
'number' type to enable increment arrows on click and remap onblur event
to submit.
Sponsored-by: PTFS Europe Sponsored-by: Cheshire Libraries Shared Services Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Tue, 17 Sep 2019 11:28:56 +0000 (12:28 +0100)]
Bug 23354: Add tests for Koha::Charges::Sales
Sponsored-by: PTFS Europe Sponsored-by: Cheshire Libraries Shared Services Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Wed, 11 Sep 2019 09:44:56 +0000 (10:44 +0100)]
Bug 23354: Add permissions
Sponsored-by: PTFS Europe Sponsored-by: Cheshire Libraries Shared Services Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Thu, 5 Sep 2019 09:13:57 +0000 (10:13 +0100)]
Bug 23354: (follow-up) Responses to feedback
This patch impliments a number of refinements requested after the first
round of feedback from the sponsors.
1) Fix padding on pay page
2) Switch 'items to add' from right to left on the page
3) Fix editable columns on pay page
4) Add explanitory text to pay page
Sponsored-by: PTFS Europe Sponsored-by: Cheshire Libraries Shared Services Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Tue, 13 Aug 2019 10:16:25 +0000 (11:16 +0100)]
Bug 23354: Add ability to remove items
This patch adds the ability to remove items from a transactions on the
new Point of Sale pay page.
Test plan:
1) Populate a transaction with at least one item.
2) Note the new button to 'Remove item' on the items table.
3) Click the button and confirm the item is removed
4) Signoff
Sponsored-by: PTFS Europe Sponsored-by: Cheshire Libraries Shared Services Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Tue, 17 Sep 2019 11:28:30 +0000 (12:28 +0100)]
Bug 23354: Add receipting to Pay page
This patch adds receipt printing to the new Point of Sale pay page.
Test plan:
1) Apply patch and run database update
2) Enable automatic receipt printing via the `` system preference.
3) Make a payment for an item via the new POS pay page.
4) Note that a receipt printing dialogue is shown automatically after
payment.
5) Note that a new notice is available under tools where you can alter
the content of the receipt.
6) Signoff
Sponsored-by: PTFS Europe Sponsored-by: Cheshire Libraries Shared Services Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Tue, 23 Jul 2019 16:23:55 +0000 (17:23 +0100)]
Bug 23354: Add a Point Of Sale 'pay' screen
This patch adds a new Point Of Sale module to Koha's staff client front
page. The module button leads directly to a 'Pay' page giving the staff
user the ability to record anonymous payments for items that would not
normally require a patron to be registered at the library.
Test plan:
1) Enable `UseCashRegisters` via the system preferences.
2) Ensure your user has the 'manage_cash_registers' permission.
3) Add a cash register for your current branch.
4) Add at least one 'MANUAL_INV' authorized value.
5) Navigate to the new 'POS' pay page via the main menu.
6) Add an item to the 'sale' by clicking 'add' from the right side of
the screen.
7) Note that said item was added to the table of items this sale on the
left.
8) At this point you should be able to 'click to edit' the quantity or
price of the item in the table on the left.
9) Enter an amount greater than the price of the item into the 'amount
collected from patron' box.
10) Click 'Confirm'
11) Varify that the same change to give modal from the paycollect pages
appears here.
12) Click 'Confirm'
13) Payment will have been recorded (check the database) and you will be
back at a fresh 'Pay' page ready for the next transaction.
14) Signoff
Sponsored-by: PTFS Europe Sponsored-by: Cheshire Libraries Shared Services Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 23790: fr-CA translation of ACCOUNT_DEBIT and ACCOUNT_CREDIT notices
This patch provides the fr-CA translation of the ACCOUNT_DEBIT and ACCOUNT_CREDIT notices.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested deleting from letter table, then loading the file.
File loads without problem, no errors.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comments were hard to read (for me) but tastes differ..
Code should reflect that permanent_location is a code and that location
may be already an authval. See detail.pl:
$item->{'location'} = $shelflocations->{$shelfcode} if ( defined( $shelfcode ) && defined($shelflocations) && exists( $shelflocations->{$shelfcode} ) );
Obviously, this kind of logic divided over two places should be reduced.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Mon, 1 Oct 2018 14:23:48 +0000 (11:23 -0300)]
Bug 18355: Display permanent location with cart location
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Fri, 6 Dec 2019 15:35:27 +0000 (15:35 +0000)]
Bug 24146: Illustrate increasing and decreasing fine
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Fri, 6 Dec 2019 15:10:17 +0000 (15:10 +0000)]
Bug 24146: Corrections to UpdateFine logic concerning maxFine
The `maxFine` system preference actually refers to the amount of
outsanding debt (in fines) a patron may have at a given time. This patch
corrects the functionality of UpdateFine such that it properly respects
that counter given the payment of accruing fines scenario.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Thu, 5 Dec 2019 10:14:51 +0000 (10:14 +0000)]
Bug 24146: Increment existing fine
We should increment an existing fine even if it has been fully paid off
whilst it is still incrementing and not create a new fine.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Wed, 4 Dec 2019 14:23:14 +0000 (14:23 +0000)]
Bug 24146: Add test cases
This patch adds test cases for both checking amountoutstanding values
are handled correctly and also that the paid down accruing fines do not
add additional fines on increment.
Test plan:
Read the changeset and asses whether the changes/additional tests are
correct as per the expected behaviour.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Mon, 13 Jan 2020 09:22:20 +0000 (09:22 +0000)]
Bug 15142: (RM follow-up) Fix tests
We removed the su-ut facet from zebra config for UNIMARC as it makes no
sense for that case, but we neglected to remove it form the test that
checks the config response.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Fridolin Somers [Mon, 17 Jun 2019 14:09:38 +0000 (16:09 +0200)]
Bug 22426: Map 'loc' to 'location' when building ES queries
A search made on Shelving location tab in advanced search gives 0 result.
Test plan :
Without patch:
- in advanced search, choose a location in shelving location tab and start search (opac-search.pl?idx=kw&op=and&idx=kw&op=and&idx=kw&do=Search&limit=mc-loc)
- 0 result
- check that location exist by doing a simple search and filtering on the location facet
- have some results
With patch:
- in advanced search, choose a location in shelving location tab and start search (opac-search.pl?idx=kw&op=and&idx=kw&op=and&idx=kw&do=Search&limit=mc-loc)
- found results
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Wed, 25 Sep 2019 19:04:13 +0000 (19:04 +0000)]
Bug 23676: Use 'false' for opac suppression
To test:
1 - Enable ES
2 - Enable OpacSuppression
3 - Suppress a bib in staff client
Edit 942n to be 1
4 - Search the opac for anything
5 - Tail the plack logs and note a deprecation warning
6 - Apply patch
7 - Restart all the things
8 - Repeat search on opac
9 - No error/warn in logs
10 - Record is correctly suppressed
Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
When executing
Koha::SearchEngine::Elasticsearch->reset_elasticsearch_mappings()
against populated search engine mappings tables, one gets this
exception:
DBD::mysql::st execute failed: Duplicate entry '388-73' for key
'PRIMARY' [for Statement \"INSERT INTO `search_marc_to_field` ( `facet`,
`search_field_id`, `search_marc_map_id`, `sort`, `suggestible`) VALUES (
?, ?, ?, ?, ? )\" with ParamValues: 0='', 1='73', 2='388', 3=undef,
4=''] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line
1834.\nDBIx::Class::Storage::DBI::_dbh_execute(): Duplicate entry
'388-73' for key 'PRIMARY' at /home/koha/Koha/Koha/SearchField.pm line
38"
This patch fixes this, by first deleting all entries, then adding the
default ones.
If a subroutine says reset_elasticsearch_mappings(), I expect it to
reset the elasticsearch mappings without errors. When writing tests it
is better to call that one subroutine reset_elasticsearch_mappings
instead of the bunch of code in
admin/searchengine/elasticsearch/mappings.pl?op=reset_confirmed
Also this promotes code reuse.
TEST PLAN:
a. perl -e 'use Koha::SearchEngine::Elasticsearch; Koha::SearchEngine::Elasticsearch->reset_elasticsearch_mappings'
b. Run misc/devel/populate_db.pl on an already populated DB and you eventually
face this problem.
After this patch, step a. works.
This patch is adapted from the original patch made by Olli-Antti
Kivilahti <olli-antti.kivilahti@jns.fi>.
Signed-off-by: Johanna Raisa <johanna.raisa@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Kyle M Hall [Thu, 31 Oct 2019 17:52:05 +0000 (13:52 -0400)]
Bug 23934: Item level holds not checked for LocalHoldsPriority in Holds Queue
Test plan:
- Set LocalHoldsPriority to "Give priority for filling holds to patrons
whose pickup library matches the item's holding library"
- set yourself at Library A
- find at item at Library A
- place an item-level hold (Hold 1) for item for pickup at Library B
- set an item-level hold (Hold 2) for item for pickup at Library A
- Confirm Hold 1 shows priority=1
- Check in item
- confirm item would be captured for Hold 2, ignore hold
- run holds queue
- check item in
- confirm item is captured for Hold 2
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Katrin Fischer [Tue, 31 Dec 2019 09:30:32 +0000 (10:30 +0100)]
Bug 15142: (follow-up) Remove facet configuration from .xsl file
Removes last remaining bit of configuration for the Titles facet
configuration.
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>
Fridolin Somers [Tue, 26 Nov 2019 08:44:08 +0000 (09:44 +0100)]
Bug 15142: (follow-up) remove from Zebra UNIMARC config files
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>
Fridolin Somers [Fri, 22 Nov 2019 14:16:51 +0000 (15:16 +0100)]
Bug 15142: Remove titles facet for UNIMARC
There is a facet using 500$a, 501$a and 503$a and Subject index.
In UNIMARC 500$a, 501$a and 503$a are not indexed as Subject.
I propose to remove this facet for UNIMARC, looks like it does not make
sens.
Test plan:
1) Install UNIMARC database
2) Edit some records to have 500$a
3) Perform a search to find those records
4) Check you dont see the titles facet
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>
Nick Clemens [Thu, 19 Dec 2019 19:05:36 +0000 (19:05 +0000)]
Bug 9156: (follow-up) Simplify code
The MARC::Field as_string method can join multiple subfield using a delimiter, this simplifies the code here
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Tue, 19 Nov 2019 14:56:05 +0000 (14:56 +0000)]
Bug 9156: itemcallnumber not pulling more than 2 subfields
When the itemcallnumber system preference is defined, the item add form
pulls data from the specified tag and subfield(s) to pre-populate the
call number field. This update makes it possible to build the
prepopulated callnumber from more than just the first two subfields.
To test, apply the patch and update the itemcallnumber system preference
so that it includes more than two subfields. For instance, "092abef"
- Edit a bibliographic record and populate the specified subfields.
e.g. subfield a -> "One", b-> "Two", e-> "Three", f-> "Four".
- Save the record and go to the add/edit items screen.
- The call number field should contain a string which contains each of
the subfields you populated, concatenated with spaces: "One Two Three
Four."
- Test with other numbers of subfields.
- Test with an empty itemcallnumber preference.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Katrin Fischer [Sun, 22 Dec 2019 13:07:46 +0000 (13:07 +0000)]
Bug 24206: Update content of OpacSearchForTitleIn for existing installations
This includes a database update for existing installations.
Using the REPLACE function it makes the same changes to the URLs
as the previous patch did for new installations:
- Worldcat: now https
- BookFinder: now https
- OpenLibrary: remove / before search parameters
To test:
- Verify the current content of your preference OpacSearchForTitleIn
(without changes from first patch!)
- Run the database update
- Verify everything still works, but changes have been made
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Katrin Fischer [Sun, 22 Dec 2019 13:05:34 +0000 (13:05 +0000)]
Bug 24206: Update URLs for default options in OPACSearchForTitleIn
- Worldcat: now https
- BookFinder: now https
- OpenLibrary: remove / before search parameters
To test:
- Verify changes to the installer files are correct
- Bonus: run the web installer for en, de-DE and nb-NO and
verfiy the content of OPACSearchForTitleIn is correct
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Mon, 6 Jan 2020 22:08:55 +0000 (23:08 +0100)]
Bug 24358: (bug 21232) Make the alert string translatable
"Bibliographic record does not exist!" was not translatable as it was
defined in the .js file
Test plan:
Repeat test plan from bug 21232
Bonus point: update and install a localized version and confirm that the
message is translatable
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Ian Walls [Wed, 31 Jul 2019 16:32:23 +0000 (16:32 +0000)]
Bug 23377: use ENV syspref override instead of complete disable
In an attempt to save time, bulkmarcimport temporarily sets CataloguingLog
and AuthoritiesLog to 0. It does this by disabling syspref caching and saving
the changes to the database (then replacing the original values at completion).
Unfortunately, this disables other key sysprefs from being cached, and results in
a 50% increase in processing time for the script.
This patch instead utilizes the ENV variable override feature of sysprefs, which
preempts the cache in C4::Context->preference().
To test:
1. Perform a bulkmarcimport with a reasonable number of biblios (~1000 will do)
2. Note the time taken to complete
3. Apply patch
4. Revert the biblio load performed
5. Perform another bulkmarcimport with the same biblios and commandline options
6. Note the time taken to complete
7. Compare times. The time from step 6 should be about 33% less than the time from step 2
8. Check Cataloguing and Authorities Logs to verify imported records were not logged
9. Profit!
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Fri, 10 Jan 2020 10:29:15 +0000 (11:29 +0100)]
Bug 24396: Fix Suggestions.t with MySQL 8
# Failed test 'DelSuggestion deletes the correct suggestion'
# at t/db_dependent/Suggestions.t line 413.
# got: 'my title 3'
# expected: 'my deleted title'
t/db_dependent/Suggestions.t .. 112/113 # Looks like you failed 1 test of 113.
Suggestions were returned in the reverse order. Adding an ORDER BY clause fixes the problem.
Test plan:
% prove t/db_dependent/Suggestions.t
must return green
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Fri, 3 Jan 2020 20:02:26 +0000 (20:02 +0000)]
Bug 24337: Checkout note cannot be marked seen if more than 20 exist
This patch modifies the event handler on the individual "Mark seen" /
"Mark unseen" buttons in the table of checkout notes. For an event to be
successfully attached to a hidden element it must be given a context.
To test you should have multiple checkout notes to work with, both seen
and unseen. Apply the patch and go to "Checkout notes pending" from the
staff client home page.
- Navigate to the second "page" of data in the DataTable.
- Test the functionality of the "Mark seen" and "Mark unseen" buttons.
They should work correctly.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Fri, 3 Jan 2020 18:43:15 +0000 (18:43 +0000)]
Bug 24335: Cannot mark checkout notes seen/not seen in bulk
This patch changes the way checkbox events are handled on the checkout
notes page so that checking a checkbox enables the batch operation
controls.
Note: The addition of a "markseen" class is a preventative measure to
avoid future problems where using the "btn-small" class might not be
specific enough.
To test you should have multiple checkout notes to work with, both seen
and unseen. Apply the patch and go to "Checkout notes pending" from the
staff client home page.
- Check any checkbox. The "Mark seen" and "Mark not seen" should go
from disabled to enabled.
- Test that the buttons work correctly.
- Click the "Select all" and "Clear all" controls and confirm that the
buttons are enabled and disabled correctly.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Tue, 26 Nov 2019 12:57:17 +0000 (12:57 +0000)]
Bug 23274: Mock simple_search_compat to cover both search engines
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Cori Lynn Arnold [Tue, 31 Dec 2019 17:10:14 +0000 (17:10 +0000)]
Bug 24323: Advanced editor - Display an error message if the record did not save
Invalid 008 with helper silently fails to save.
This patch adds a "else if" to fall through if the error message isn't
one of the previously defined ones ("syntax" and "invalid") and presents
the human with a generic message that "Something went wrong, cannot
save."
Prior to testing:
a/Verify that Advanced Editor is enabled
b/Download the errorrecord.mrc from bug
To test:
1/Apply patch
2/Go to Cataloging->Advanced Editor
3/Click "Import Record" button and navigate to the record saved from
step b/
4/Add an 003 field (as required by the default cataloging config)
5/Hit "Save to catalog"
6/Verify that a message is passed to the user that the file was unable
to be saved
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Lucas Gass [Tue, 7 Jan 2020 18:54:49 +0000 (18:54 +0000)]
Bug 24371: Fix "Show all items" avaibility link (use $raw filter) - opac
TO TEST:
1. Make an OPAC search with plenty of results.
2. Use the search facets to limit the search in some way, item type, author, etc.
3. Click on 'Limit to currently available items', everything is still fine.
4. Attempt to return to 'Show all items', there will be no search results.
5. Apply patch
6. Ateempt steps 1-4 again.
7. Should work this time.
Signed-off-by: Rhonda Kuiper <rkuiper@roundrocktexas.gov> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>