Commit graph

17179 commits

Author SHA1 Message Date
Eden Bacani
d6d7a6d3e1 Bug 27473: Improved link text in installer
Test Plan
1. run reset_all to run koha installer
2. Check that after importing sample data step that link says 'Continue
to the next stage'

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-03 15:53:59 +01:00
7369fa5e50 Bug 26618: (QA follow-up) Update messages syntax
As highlighted, we were not using the standard form of message passing
here. This patch updates the template and controller to adopt the more
usual syntax.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-03 15:36:13 +01:00
87c3911bb8 Bug 26618: Remove use of transferbook in RotatingCollections
This patch replaces the use of C4::Circulation::transferbook in
C4::RotatingCollections with calls to Koha::Item->request_transfer and
adds handling for the various failure cases which that can throw.

We also introduce additional feedback for the end user where it did not
exist before. Now we notify the user if some of the collection could not
be transfers or if transfers were queued rather than set to request
immediately.

Test plan
1/ Set up a rotating collection
2/ Transfer the collection
3/ Confirm the action succeeds
4/ Set up some branch transfer limits that will affect items in your
collection
5/ Transfer the collection
6/ Note that the transfer succeeds but some items are returned as
failures

Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-03 15:36:13 +01:00
7e919d12d8 Bug 24446: Catch daterequested in circ returns
Update C4::Circulation::AddReturn to use Koha::Item->get_transfer to
find requested transfers and use Koha::Item::Transfer->receipt to complete
transfer requests if they have arrived at their destination or return the
relevant 'WrongTransfer', 'WasTransfered' and 'TransferTrigger' messages
to the end user.

Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-03 15:36:13 +01:00
f1845ff19b Bug 25846: Compiled CSS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-03 15:36:12 +01:00
fa349d4cf1 Bug 27703: Make ID of category select field unique
Duplicate element IDs on the authorized values page are invalid and
cause a problem with the JavaScript intended to submit the form when the
category select field changes.

This patch changes the ID of the label and the field and makes the
corresponding change to the JavaScript.

To test, apply the patch and go to Administration -> Authorized values.

 - Click an authorized value category to view its contents.
 - Using mouse or keyboard, make a selection from the "Show category"
   dropdown menu.
 - The form should submit automatically and direct you to the
   corresponding category.
 - Validate the HTML of the page and confirm that there are no errors.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-03 11:59:01 +01:00
Aleisha Amohia
3c75c48249 Bug 27803: Ensure publicationyear or copyrightdate shows in Holds to Pull
If marcflavour is set to MARC21, use biblio.copyrightdate. If
marcflavour is set to something other than MARC21, use
biblioitem.publicationyear. This is to match previous behaviour of this
feature.

To test:
1) Set your marcflavour system preferenece to MARC21.
2) Go to Administration -> Koha to MARC mapping to confirm what MARC tag
maps to biblio.copyrightdate.
3) In your terminal, run misc/batchRebuildBiblioTables.pl from the shell
to confirm the mapping is locked.
4) Edit a biblio, fill in whichever field is mapped to biblio.copyrightdate
and Save.
5) Place a hold on this biblio. (It must have an available item to allow
placing holds.)
6) Go to Circulation -> Holds to Pull.
7) Confirm your hold shows in the table with the copyrightdate.
8) Set your marcflavour system preference to something other thatn
MARC21.
9) Go to Administration -> Koha to MARC mapping to confirm what MARC tag
maps to biblioitem.publicationyear.
10) In your terminal, run misc/batchRebuildBiblioTables.pl from the shell
to confirm the mapping is locked.
11) Edit a biblio, fill in whichever field is mapped to biblioitem.publicationyear
and Save.
12) Place a hold on this biblio. (It must have an available item to allow
placing holds.)
13) Go to Circulation -> Holds to Pull.
14) Confirm your hold shows in the table with the publicationyear.

Sponsored-by: Catalyst IT
Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-03 11:57:51 +01:00
bfaae61487 Bug 8976: (follow-up) Code cleaning
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-03 11:57:51 +01:00
12d50cb5d8 Bug 27794: Add link to biblio in lateorders page
This patch modifies the late orders page so that the late order title
uses the "biblio-title" include to display a standard title with a link
to the bibliographic detail page.

To test, apply the patch and go to Acquisitions -> Late orders.

In the table of late orders, confirm that the title display correctly
and links to the correct bibliographic record.

Signed-off-by: Severine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 15:14:23 +01:00
f8a92cb8e8 Bug 27792: (follow-up) Double escape the escape
The JSON patturn wasn't getting interpreted correctly for me.. the `\`
characters needed escaping with a second `\`.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 15:14:23 +01:00
50c4efb18d Bug 27792: Improve jEditable configuration for point of sale fields
This patch alters the configuration of the "cost" and "quantity"
editable fields in the "This sale" table on the Point of Sale page:

 - Reduce field with to reduce jumpy table re-draws.
 - Replace "numeric" input type with "text"
 - Add pattern attribute for enforcing currency/number entry

To test you must have EnablePointOfSale and UseCashRegisters enabled and
configured.

 - Apply the patch and go to the Point of Sale page.
 - Add some items for purchase.
 - In the "This sale" table, click the values in the "cost" and
   "quantity" columns and try editing their values.
 - The form field which appears should not fill the width of the table
   column.
 - The fields should enforce the correct input: Currency for the "cost"
   column, digits for the "quantity" column.
 - The fields should update when you click out of them and the correct
   values should appear in the "Collect payment" area.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 15:14:23 +01:00
c4f17c10ff Bug 27592: Link audio alerts to corresponding preference and back
This patch adds links from the audio alerts page to system preferences
and back.

To test, apply the patch and disable the "AudioAlerts" system
preference.

- Log in to the staff interface as a user with permission to access
  audio alerts and system preferences.
- Go to Administration -> Audio alerts.
- You should see an alert, "Audio alerts are disabled."
  - Test the link to system preferences. It should take you a
    preferences search which returns only "AudioAlerts."
- On the system preference page, test that the link to audio alerts
  works correctly.

- Disable audio alerts again.
- Log in to the staf interface as a user with permission to access audio
  alerts but WITHOUT permission to access system preferences.
- Go to Administration -> Audio alerts.
- You should see an alert, "Audio alerts are disabled."
- There should be no link to system preferences.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 15:14:23 +01:00
927a62ba6f Bug 25846: Improve handling of multiple covers on catalog search results in the staff client
This patch modifies the template, JS, and CSS for the staff
interface catalog search results in order to gracefully handle multiple
cover images.

The changed version loops through any cover images which might be
embedded and checks that they are successfully loaded. Only
successfully-loaded images are shown. Only the first image is shown, and
the others can be "paged through" using generated navigation controls.

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

Enable multiple cover image services. The patch was developed with these
services available:

 - Amazon
 - Local cover images (including multiple local cover images)
 - Coce (serving up Amazon, Google, and OpenLibrary images)
 - Images from the CustomCoverImages preference

Perform a variet of searches and confirm that cover images are
displaying correctly, whether there be 0, 1, 2, or more covers
available for each.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 15:14:23 +01:00
Katrin Fischer
d55746004b Bug 26937: (QA follow-up) Rephrase and link CheckPrevCheckoutDelay description
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 15:14:22 +01:00
Matthias Meusburger
5a31f88d52 Bug 26937: Add an optional delay to the CheckPrevCheckout syspref.
The CheckPrevCheckout allows to check a borrower's checkout history to see if
the current item has been checked out before.

This patch adds an optional syspref: CheckPrevCheckoutDelay

It allows to specify the maximum number of days since the last checkin
that will trigger CheckPrevCheckout's warning.

Test plan:

 - Apply the patch.

 - Set CheckPrevCheckout to "Do" and CheckPrevCheckoutDelay to n.

 - Checkout and check-in an item for a patron.

 - Try to checkout the same item.

 - Check that you have a warning:
   "Patron has previously checked out this title: Check out anyway?"

 - Update the returndate column from the old_issues table to have a returndate
   older than n days ago.

 - Try to checkout the same item.

 - Check that you don't have the warning.

 - Prove t/db_dependent/Patron/Borrower_PrevCheckout.t

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 15:14:22 +01:00
8650f8111b Bug 8976: Code cleaning
It was tricky to write the previous patch so I decided to clean the
ground (a bit) for later, taking advantage of having people who are
going to test the whole area.
We can move it to its own bug report if QA wants to.

Sponsored-by: Orex Digital

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 15:14:22 +01:00
ebe11f70e2 Bug 8976: Sort subfields for authority records
Same patch for the authority frameworks/records

Sponsored-by: Orex Digital

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 15:14:22 +01:00
b387502eaf Bug 8976: Add the ability to sort subfields for the MARC frameworks
This new enhancement adds the ability to change the default order the subfields.

Both bibliographic and authority MARC subfield structure are taken into
account. And so the item edition as well (in the different screens when
item can be added/edited).

This will answer the following needs that have been listed in the
comments of the bug report:
- $i in 7xx fields should be the first subfield in the sequence
- 300 fields are sorted number first when cataloguers enter the letter fields first
- 100 field, it's commonly $a, $q, $d.

Test plan:
1. Edit a MARC frameworks, field 300
2. Resort the subfield (drag and drop the tab of the subfield) as you
like
3. Save
=> Notice that the list of fields are displayed following the order you
chose
4. Edit it again
=> The order is correctly kept!
5. Create a new bibliographic record
6. Notice that the subfields are order in the same sequence
7. Fill different subfields, not all
8. Save, edit again
9. Note that the subfields that have been filled are listed first, then
the empty ones. But the sequence defined at the framework level is kept.
10. Do the same for an authority framework and create/edit an authority
record
11. Modify item (952) subfields order
12. Create an item and confirm that the order is correct
13. Modify the ACQ framework, 952, modify the order of the subfield
14. Create a new order and confirm that the item form has the subfield
ordered following the sequence defined at the framework level

QA: Note that this patch is about bibliographic records only, next
patches deal with authotiries and items.

Sponsored-by: Orex Digital

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 15:14:22 +01:00
9dd997e2d3 Bug 27316: Convert 'undef' for sort to Yes and use Yes/No instead of 0/1
This patch changes the interface to remove the undef option
We also update existing mappings and set default of 1

Comment previously indicated undef was treated differently, but in the code we treat undef as 1
That code is untoched to avoid creating problems for older mappings that may be reloaded

To test:
1 - View the ES mappings, note you can set columns to Undef, 0, 1
2 - Set some to undef
3 - Apply patches
4 - Update database
5 - Undef now show as 'Yes'
6 - Confirm you can set columns as Yes/no
7 - Confirm that mandatory columns display correct value when readonly (see issues field)

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 13:50:03 +01:00
fa1671aba5 Bug 27680: Add support for sorting fields with multiple data points
This patch adds proper handling for sorting a single column that is
constructed of multiple data entities.. i.e `"data": "string1:string2"`

It does NOT add support for filtering on multiple columns yet.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 13:50:03 +01:00
ba7f51f3d1 Bug 27680: Take first order column for ordering
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 13:50:03 +01:00
ae62da0ff6 Bug 27754: Correct eslint errors in basket.js
This patch makes minor changes to basket.js in the staff interface
templates in order to quiet warnings from ESLint. Besides whitespace,
most changes are to correct undeclared or unnecessarily declared
variables.

To test, apply the patch and verify that the cart still works
correctly.

 - Perform a catalog search in the staff interface.
 - Test adding single or multiple items to the cart from the search
   results page.
 - Testing adding and removing titles to the cart from the bibliographic
   detail page.
 - Open the cart and test the various controls in the toolbar to confirm
   that they still work correctly.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 11:28:03 +01:00
2a2a04a641 Bug 25777: Disable misleading datatables table information display z3950
This patch disables the table information display on z3950_search.pl,
since it only includes search result counts for that page, which is
misleading to end users.

To test:
1)  Do not apply the patch
2)  Do a Z39.50 search from cataloguing for "test" against Library of
    Congress.
3)  Note the bottom of the page says "Show 1 to 20 of 20" and
    "Showing page 1 of 501"
4)  Do a Z39.50 search from Acquisitions for "test" against Library of
    Congress (Acquisitions -> Vendor -> Basket -> Add to basket -> From
    external source).
5)  Apply the patch and restart Plack
6)  Repeat Step #2
7)  Note the bottom of the page now only says "Showing page 1 of 501"
8)  Note the search bar is gone
9)  Repeat step #4
10) Note the bottom of the page now only says "Showing page 1 of 501"
11) Note the search bar is gone

Squashed and mixed authorship added below
Co-authored-by: Owen Leonard <oleonard@myacpl.org>
Co-authored-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 11:28:03 +01:00
fa8a60ddc8 Bug 27798: Add warning to IndependentBranches system preference
Test Plan:
1) Apply this patch
2) Search system preferences for IndependentBranches
3) Note the warning about changing the setting on a production system

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

JD Amended patch:
* Fix commit title
* Don't split the syspref's description, otherwise the sentence will be
split in the POs

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 11:28:03 +01:00
3e8e15cc64 Bug 27071: (follow-up) Provide a more meaningful error message
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 09:56:19 +01:00
83277da4e2 Bug 27661: Compiled CSS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-23 13:20:08 +01:00
1b1939fe92 Bug 27733: Add "_sort_by" paramter to pickup_locations API query
On the place hold page in the staff interface, add a "_sort_by"
parameter with the "name" value so that the list of libraries is
returned in name order.

To test, apply the patch and locate a title in the staff interface which
has holds on it.

- View the holds information for that title.
- In the table of exising holds, expand the "Pickup library" dropdown
  for any of the entries. The list of libraries should be in order by
  library name.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-23 13:16:07 +01:00
9a9865d40a Bug 27732: JavaScript error on place hold page in the staff interface
This patch moves the "$.fn.select2.defaults" definition from the top of
the page to the bottom so that jQuery will be loaded first.

The patch also changes the "dropdownAutoWidth" default so that the
dropdown is sized correctly for its contents, regardless of the width of
the initial <select>.

To test, apply the patch and place a hold in the staff interface for a
title which already has existing holds.

- On the "Place a hold" page, before selecting a patron, you should see
  a table of exising holds. Test the "Pickup library" dropdown. It should
  work correctly.
- The width of the dropdown should accommodate its contents without
  forcing any library name to wrap.
- There should be no errors in the browser console.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-23 13:16:07 +01:00
ebb70e4d16 Bug 27713: Duplicate search field IDs in MARC framework administration template
This patch makes a minor change to the MARC framework administration
template so that the ID of a form field on the page isn't a duplicate of
one in the header search form.

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

- Test the "Search for tag" form field to confirm that it works
  correctly.
- Validate the HTML of the page to confirm that there are no "Duplicate
  ID" errors.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-23 13:16:07 +01:00
d0182ab805 Bug 27332: Hide branchcode and note is RenewSerialAddsSuggestion if off
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-23 13:16:07 +01:00
6aa9f78258 Bug 27332: Use the branchcode from the subscription when renewing
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-23 13:16:07 +01:00
2029b7ef8b Bug 27661: Use td.bg-success for ES and memcached as well
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-23 13:16:07 +01:00
ab23dfa3a1 Bug 27661: (QA follow-up) Use bootstrap classes
This patch removes the local status_* css rules in favour of using the
bg-* rules that are shipped with the bootstrap version we are using and
then updates the relevant lines in the template to use those classes.

We also update the default table styling which adds background color to
the odd table rows so that our local classes take precidence.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-23 13:16:07 +01:00
Katrin Fischer
fdd6f94844 Bug 27661: (QA follow-up) Capitalization
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-23 13:16:07 +01:00
7ed120dfb5 Bug 27661: Update about for message broker status
This patch updates the about page with regards to the message broker
status and adds some small formatting improvements for displaying the
status.

Test plan
1/ Run through the yarn build process to update the CSS file.
2/ View the about page without RabbitMQ installed
3/ View the about page with RabbitMQ installed
4/ Note the formatting and message change and signoff

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-23 13:16:07 +01:00
Blou
bdfb78a69a Bug 23929: Invoice adjustments should filter inactive funds
Looking at invoice details, this makes the Adjustments Fund dropdown act
exactly like the Shipping Fund dropdown above, with a Show inactive
checkbox to help filter (by default) the inactive funds out of the list.

Test plan:
0) requires a database with inactive (old) funds along with active ones.
1) Go to invoice details page
2) Click "Add adjustment"
3) Open the drop down beside the Fund label, you should see EVERY fund in database.
4) Compare with behavior of Shipping fund dropdown above.  Not every fund is listed there
5) Apply patch
6) Now behavior is the same, only active fund are listed by default.
7) click "Show inactive" checkbox and see all the funds in the dropdown.

Signed-off-by: Sonia BOUIS <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-23 13:12:56 +01:00
f45d083f9a Bug 27731: Remove hold class from individual OPAC search result hold link
This patch removes the "hold" class from the "Place hold" link
associated with each search result in the OPAC. The class isn't required
for any functionality or style and it unintentionally triggers the "hold
multiple" JS function which requires that a checkbox be checked.

To test, apply the patch and log into the OPAC as a user who can place
holds.

- Perform a catalog search which will return multiple results.
- Click the "Place hold" link under any search result.
- You should be taken to the hold confirmation page.
- On the search results page, confirm that the "Place hold" link at the
  top of the search results still works to place multiple holds at once.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-23 13:12:56 +01:00
a825c72938 Bug 26208: Perform batch checkin/renewals serially rather than asynchronously
The issue here seems to be that when multiple requests hit at once they may not register that the renewal
performed by the request should lift restrictions on the account.

To mitigate this we can simply perform the renewals one after the other.

To test:
1 - have multiple overdue items on one patron
2 - run overdues.pl with triggers set to generate a restriction
3 - renew all overdues with the Renew All button
4 - restriction is not removed even though patron no longer has overdue items
5 - Apply patch
6 - Make all items overdue again
7 - Click Renew All
8 - Items are renewed and restriction removed
9 - Checkout items to patron again (overdue or not)
10 - Click 'Select all' in checkin column
11 - Click 'Renew/Checkin selected items'
12 - Confirm checkin succeeds as before patches

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Bug 26208: (follow-up) Remove debugging statements

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-23 13:07:45 +01:00
9d2092e36f Bug 27694: use HTML filtering on News Tool textarea
To test:
1. Add some HTML enties to your codemirror in the News Tool. Example: <option value="(itype:DVD and loc:*NEW) AND NOT index-term-genre:&quot;television&quot;">Movies</option>
2. Save and re-eneter the tool, the HTML entites have been converted
3. Apply patch
4. Try again, HTML entities should not be converted

Signed-off-by: Ron Houk <rhouk@ottumwapubliclibrary.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-18 11:53:18 +01:00
Agustin Moyano
740331c39e Bug 27719: Apply _escape_str and _escape_price where needed
This bug replaces calls for .escapeHtml and format_price for there null
checking counterparts

To test:

1: have a fresh Koha Testing Docker
2: have a basket set to create item records on ordering
3: populate basket from a marc file, only setting price and fund for the items
4: close basket
5: click to Receive, create invoice
6: on parcel.pl, "Processing" alert never resolves
CHECK => The console shows:
parcel.pl?invoiceid=1:810 Uncaught TypeError: Cannot read property 'format_price' of null
    at render (parcel.pl?invoiceid=1:810)
    at datatables.min_20.1200012.js:57
    at Object.b.fnGetData (datatables.min_20.1200012.js:51)
    at B (datatables.min_20.1200012.js:56)
    at Ha (datatables.min_20.1200012.js:64)
    at P (datatables.min_20.1200012.js:68)
    at vb (datatables.min_20.1200012.js:79)
    at datatables.min_20.1200012.js:76
    at i (datatables.min_20.1200012.js:74)
    at Object.success (datatables.min_20.1200012.js:75)

And that error points toward:
                        "data": "replacement_price",
                        "render": function(data, type, row, meta) {
                            return (row.replacement_price).format_price();
                        },
                    },
7: apply patch
8: redo steps 5 and 6
SUCCESS => "Processing" alert doesn't hangs, and prices with null values
are empty.

Sponsored-by: Virginia Polytechnic Institute and State University

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-18 11:52:01 +01:00
0269d2b30e Bug 24108: Remove extra spaces
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-17 16:28:25 +01:00
Katrin Fischer
3f755c3ab1 Bug 24108: (QA follow-up) Add staff detail page to syspref description
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-17 16:28:25 +01:00
234cced91d Bug 24108: Make export file names consistent
This patch renames the systempreference to be a bit clearer and uses
explicit options rather than a yes/no

Additionally it standardizes the export from the advanced cataloging editor
with that from the details page

To test:
 1 - Apply patches
 2 - Update database and restart all the things
 3 - Open a record in the advanced editor and save it as marc and xml
 4 - Note the file name is 'bib-{biblionumber.{format}'
 5 - Edit the syspref 'DefaultSaveRecordFileID' to be control number
 6 - Repeate 3-4 on a record with and without a control number
 7 - If control number present fiule name should be 'record-{controlnumber}.{format}'
 8 - Otherwise it should be as above
 9 - Repeat tests from the details page of a record
10 - Repeat tests from the opac details page of a record

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-17 16:28:25 +01:00
0b1f162dcc Bug 24108: (QA follow-up) Adjust wording and use perl for update file
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-17 16:28:25 +01:00
John Doe
88b751e54f Bug 24108: (follow-up) Fix typo with .xml extension
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

JD amended patch:
* Fix author's patch

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-17 16:28:25 +01:00
Cori Lynn Arnold
227077c43d Bug 24108: Advanced editor: configure if biblionumber or control number is used for saved files
Creates a new system preference "SaveRecordbyControlNumber" (renamed in
follow-up patch with "DefaultSaveRecordFileID") which is
initially set to 0 (off/no). By default saving .mrc (and .xml) will be
saved by the biblionumber. If the record does not yet have a biblionumber,
the record will be saved as record.mrc or record.xml

Test plan:
1)  Apply the patch, flush_memcached and restart_all
2)  Enable the "EnableAdvancedCatalogingEditor" system preference
4)  Save the record using the drop down box selecting "Save as MARC (.mrc)
    file.
5)  Note that the file saved is the same as the biblionumber at the top of
    the Advanced Editor interface.
6)  Repeat steps 3-5 for the .xml save option
7)  Update the new system preference "SaveRecordbyControlNumber" and
    change to "Save by ControlNumber"
8)  Verify that there is not a 001 field in the record (delete it if
     there is)
9)  Repeat steps 3-5 for both .mrc and .xml options (the file should still
    be saved as the biblionumber if there is no control field)
10) Add a 001 field to the record such as "001  abc00012345"
11) Repeat step 4 for both .mrc and .xml and verify that the files
    saved are named abc00012345.mrc and abc00012345.xml
12) Sign off!

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

JD amended patch:
* Remove change to obsolete sysprefs.sql
* Fix author's patch
* Update commit message to tell the syspref has been renamed

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-17 16:28:25 +01:00
e0e64bde51 Bug 27706: (bug 24488 follow-up) Fix libraries column filter
From commit 2285c2d657
     Bug 24488: Show correct first patron details on Holds to pull

               $('select', this).change( function () {
-                  var filter_value = $(this).val();
-                  holdst.fnFilter( filter_value, 5, true );
+                  holdst.fnFilter( $(this).child().val(), 5 );
               });

This does not make sense, we need to filter on $(this).val(), it's a
select element.

Test plan:
Place some holds
Hit the pending holds page
Use the "libraries" column filter and confirm that it works correctly

Signed-off-by: Andrew Nugged <nugged@gmail.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-16 10:22:13 +01:00
701055f889 Bug 27598: (QA follow-up) Add category description and installer data
This follow-up makes two additions:

- The UPLOAD category is added to auth_val_cat.sql for new
  installations.
- A description of the category is added to the authorized values
  template.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-15 11:59:31 +01:00
289fe72614 Bug 27598: Add UPLOAD as a built-in system authorized value category
This patch updates the database so that it includes an "UPLOAD"
authorized value category with the "is_system" flag set to 1.

The upload tool template is updated to add a link to the authorized
value category from the hint which appears if no authorized values exist
in the UPLOAD category.

To test, apply the patch and run the database update.

- If you have manually added an UPLOAD category it should now be
  classified as a system category.
- If you did not have an UPLOAD category it should have been created for
  you.
- With no authorized values in the UPLOAD category, go to Tools ->
  Upload.
  - Logged in as a user with permission to manage authorized values you
    should see a note, "No upload categories are defined..." It should
    contain a link directly to the UPLOAD category of authorized values.
  - Logged in as a user without authorized value permission you should
    see a similar note without the link.
- Add an authorized value in the UPLOAD category and confirm that the
  note disappears.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-15 11:59:31 +01:00
d9a97d4802 Bug 12966: Add edition field to Card view
To test:
1 - Search Z3950 to add a record
2 - Find a record with an edition statement
3 - It shows in the table of results
4 - Check the card view
5 - No edition
6 - Apply patch
7 - Repeat
8 - Edition shows in card view

Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-15 11:57:27 +01:00