Commit graph

19038 commits

Author SHA1 Message Date
0f234f9209 Bug 30992: Improve translatability for 'for'
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 92f5e02a8c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-29 16:57:26 +00:00
75f2d9742e Bug 30992: Improve translatability for Waiting at|On hold
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit eedec9e929)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-29 16:57:12 +00:00
905fef6ca2 Bug 30879: Add option to syspref and update display
To test:
1 - Update ComponentSortField system preference and verify biblionumber is an option
2 - Repeat test plan from 30327 and confirm sorting with biblionumber works

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 505e12970d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-29 16:47:39 +00:00
44c7010fc1 Bug 31274: Make sure OPACSuggestionAutoFill is handled as a boolean everywhere
The YAML preference definition defines it as a string ('yes' or 'no' the
possible values). And the opac-suggestions.tt template has one occurence
of the variable being compared to a string.

This patch does:
- fix the template
- fixes opac.pref for 0|1
- adds an atomicupdate that takes care of moving 'yes' and 'no' to their
  respective boolean values.

To test:
1. Change the syspref value to enable/disable
2. Check on the DB that the value is wrong:
   $ koha-mysql kohadev
   > SELECT value FROM systempreferences WHERE variable='OPACSuggestionAutoFill';
=> FAIL: It is either 'yes' or 'no' depending on what you choose.
3. Apply this patch
4. Run:
   $ updatedatabase
5. Repeat 2
=> SUCCESS: Values are now 0 or 1
6. Sign off :-D

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1c0b7bf01f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-29 16:03:53 +00:00
Michael Hafen
a1b1b82945 Bug 28864: Have patron card creator use PatronsPerPage
Add pageLength to members/member.tt
Add aLengthMenu and pageLength to
 patroncards/add_user_search (common/patron_search.tt).
Add aLengthMenu, pageLength, and iDisplayLength to patroncards/edit-batch

Test plan:
1.  Set the PatronsPerPage system preference to any integer other than 20.

2.  Go to Tools -> Patron card creator.
3.  Start a new Card Batch.
4.  Click the 'Add patron(s)' button to open the patron search window.
5.  Do a search.
6.  Add more than 20 patrons to the batch.
7.  Close patron search window.
8.  Click the 'Add patron(s)' button to add the selected patrons to the batch.
9.  Observe that the table of patrons is has 20 as the default per page setting.

10. Apply patch.
11. Reload the batch.
12. Observe that the per page drop down includes the value of PatronsPerPage
     and that value is selected by default.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5ca665f6aa)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-29 15:35:58 +00:00
7dcbbb7437 Bug 31269: Define sDefaultContent for DataTables
1. Stage a MARC record for import
2. Once you have one click on 'Manage staged records'
3. You will see an alert that says "Something went wrong when loading the table."
4. If you dismiss that you should see the following error:

DataTables warning: table id=records-table - Requested unknown parameter '' for row 0, column 4. For more information about this error, please see http://datatables.net/tn/4

5. Appy patch
6. Try ssteps 1 & 2 again
7. No DataTable errors

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 573db0fca1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-29 15:20:08 +00:00
Shi Yao Wang
f28a904348 Bug 30028: Fix patron message delete confirmation to be translatable
Make the message deletion confirmation popup translatable. Test plan
uses fr-CA translations.

Test plan:
1) Switch language to french (fr-CA)
If you do not have the translations, go to
  misc/translator
then do
  ./translate install fr-CA
After it is done, go to administration > global system preference >
l18N/L10N then select Français (fr-CA) under language preference.
Refresh then you should be able to switch languages.
2) Add a message to a patron account from your own branch (or make sure AllowAllMessageDeletion is on)
3) Click "Delete" next to the message
--> a confirmation message appears "Are you sure you want to delete this message? This cannot be undone." with options "Cancel" and "OK".
4) Apply the patch
5) Write a translation in misc/translator/po/fr-CA-messages-js.po :
msgid "Are you sure you want to delete this message? This cannot be undone."
msgstr "Êtes-vous sûr de vouloir supprimer ce message? Cette opération est irréversible."
6) Refresh the translations by going to misc/translator and execute ./translate install fr-CA
7) Refresh and click "Delete" again
--> now the confirmation message is "Êtes-vous sûr de vouloir supprimer ce message? Cette opération est irréversible." with options "Cancel" and "OK"

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 622137294a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-29 15:16:54 +00:00
Tim McMahon
ab884f60f2 Bug 30499: Move the include for catalogue-search-box.inc in circ-search.inc to correct keyboard shortcuts
Keyboard shortcuts for catalog search, check in and renew should be following:
1) Alt-q for catalog search
2) Alt-r for check in
3) Alt-w for renew

However on some of the pages shortcuts get mixed up:

1) Alt-w for catalog search
2) Alt-q for check in
3) Alt-r for renew

Affected files are:
circ/pendingreserves.tt
circ/circulation_batch_checkouts.tt
circ/circulation-home.tt
circ/branchtransfers.tt
circ/branchoverdues.tt
circ/set-library.tt
circ/checkout-notes.tt
circ/renew.tt
circ/waitingreserves.tt
circ/transferstoreceive.tt
circ/offline.tt
circ/bookcount.tt
circ/on-site_checkouts.tt
circ/circulation.tt
circ/transfers_to_send.tt
circ/request-article.tt
circ/overdue.tt
circ/reserveratios.tt
offline_circ/list.tt
offline_circ/process_koc.tt
offline_circ/enqueue_koc.tt
plugins/plugins-upload.tt
plugins/plugins-disabled.tt
pos/registers.tt
pos/register.tt
pos/pay.tt
reports/reports-home.tt
reports/dictionary.tt
reports/guided_reports_start.tt
reserve/request.tt
tools/scheduler.tt

This is because the include statement for catalogue-search-box.inc is in the wrong line in circ-search.inc.

To test:
1) Go to an affected page (circulation-home was the first one I noticed)
2) Try the keyboard shortcuts and notice they are incorrect
3) Apply patch and refresh the page
4) Notice that the keys work properly

Signed-off-by: Andrew <andrewfh@dubcolib.org>

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 94191e5bfe)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-29 15:13:19 +00:00
25b2ebf8b2 Bug 31251: Use jQuery val() to clear_entry
1. Add some patron attributes that are textarea and some that have an AV category so they are select dropdowns
2. Go to the patron form and add some values to the patron attributes
3. Use the "Clear" button to try and clear the values, doesnt work.
4. Apply patch
5. Try clearing values from patron attributes that are both select dropdowns and textarea. The "Clear" button should work.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a3198f6474)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-29 15:08:42 +00:00
Kevin Carnes
387900a65c Bug 29012: Add default values for blank circulation rules that weren't saved to the database
There are 5 fields that are not set if no value is provided when saving/editing a rule in Administration->Circulation and fines rules
- issuelength
- hardduedate
- unseenrenewalsallowed
- rentaldiscount
- decreaseloanholds

This is problematic because it gives the impression these rules are set as blank, but in reality they don't exist and the rule will fal back to the higher level

To test:
1 - Set a rule for
    Patron category: Teacher
    Itemtype: All
    Hard due date: (Today)
    Lona period: 10
2 - Set a rule for
    Patron category: Teacher
    Itemtype: Books
    Hard due date: (leave blank)
    Loan period: 10
3 - Expected behaviour is Book item will checkout to teacher for 10 days, all other types will be due yesterday at 25:59:00
4 - Checkout an non-book item type to teacher
5 - Hard due date applies
6 - Checkout a 'book' item type to teacher
7 - Hard due date applies - FAIL

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cf397ac3bc)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-29 14:27:30 +00:00
d8956d387d Bug 31455: Make batchMod sort by order scanned
To test:
1. In batch item deletion and batch item modification add some
   barcodes.
2. Notice they are being sorted by item number, not in the order
   scanned.
3. Appply patch and restart services.
4. Try scanning items again in both batch item deletion and batch item
   modification.
5. The found barcodes should now sort by order scanned.

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

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5c2b2ac09a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-16 15:21:38 +00:00
Johanna Raisa
cf96c9802a Bug 23202: Fix screen freeze when ordereing several items
This patch fixes adding multiple items on order acquisitions

The error is: Uncaught TypeError: $(...).parent(...).attr(...) is undefined

Test plan:
1) Set dateaccessioned.pl plugin to ACQ framework's 952$d field.
2) Create basket to a vendor and add order from a new empty record.
3) Add date acquired value from calendar.
4) Add multiple items and see that the view freezes.
5) Apply the patch
6) Reload the page and repeat the steps 3 and 4.
7) See that the items are added.

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

JD Amended patch: adjust commit title
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d2d78e2581)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-08 14:44:33 +00:00
1ce81043ca Bug 31246: <span> displayed in 'Additional fields' section
This patch avoids escaping HMTL data in the additional fields section.

To test:
1. Open the additional fields section
   http://kohadev-intra.mydnsname.org:8081/cgi-bin/koha/admin/additional-fields.pl
=> FAIL: there are some nasty <span> </span> texts in there
2. Apply this patch
3. Reload
=> SUCCESS: Things display nicely again!
4. Sign off :-D

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

Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a7272f9886)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-02 20:25:10 +00:00
Lari Taskula
1b8bb46ced Bug 30878: Avoid resetting waiting reserves tab
When canceling holds waiting over X days in "Holds awaiting pickup"
view, form submission resets the selected tab to "Holds waiting". This
tab reset may cause confusion for the user and lead to unwanted
actions. Instead, the user should be returned to the same tab that they
began with.

To test:
1. Apply patch
2. Navigate to /cgi-bin/koha/circ/waitingreserves.pl
3. Select "Holds waiting over X days" tab
4. Refresh page
5. Observe "Holds waiting over X days" is still selected
6. Have some holds waiting over X days
7. Select one of them and press "Cancel selected (1)" and confirm
8. Observe "Holds waiting over X days" is still selected after form
   submission

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 30235d3188)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-02 19:17:31 +00:00
a75cacaf34 Bug 31121: Fix date formatting in cashup summary modal
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c12d037da2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-02 17:42:07 +00:00
eeaeb57f25 Bug 31204: Clearly indicate edit buttons are for record modification
To test:
1. Apply patch
2. Do a search and select some records
3. On the toolbar (#selection_ops) open the Edit dropdown.
4. The labels should read 'Batch edit records' and 'Batch delete records'.

Note: To see both you must have batchmod and batchdelete permission.

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

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7ce420ed82)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-02 17:40:26 +00:00
56f452c173 Bug 31086: Prevent placing hold with no pickup location
To test:
1 - Apply patch
2 - Repeat test on previous patch
3 - You should get a warning popup when attempting to save hold
4 - Reload page
5 - Inspect the HTML and manualy set #pickup value of selected option to ""
6 - Attempt to save hold
7 - You get the popup
8 - Place a hold normally (with location) and verify it works

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e609e20c04)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-02 17:07:30 +00:00
7a5d048b51 Bug 31138: Don't ignore DataTables errors and raise them to the end-user
DataTables is not raising error to the end user, it's only displaying a generic message in the console.
This leads to lot of questions on IRC or the mailing list ("the table is empty").
We can do better and display what went wrong.

We could also imagine add a link to the wiki for the more common problems (won't be implemented here however).

Test plan:
Revert "Bug 31104: Put each link on a separate header" and search for a
patron using a very long string
You should get an alert with the reponse of the server.
In my case:
"""
Something went wrong when loading the table.
414: Request-URI Too Long
"""

You can also make the REST API returns a 500 (bad specs or simply with a
die statement).

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 76b984bb6c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-02 15:10:10 +00:00
c92a1cf501 Bug 30471: Correct display of default rules
To test:
1 - Browse to 'Administration->Circulation and fines rules'
2 - Make sure you are editing 'Standard rules for all libraries'
3 - Set 'Lost item fee refund on return policy' to 'Refund lost item charge and charge new overdue fine'
4 - Swtich to edit rules for a specific library, click on the dropdown for 'Lost item fee refund on return policy' and note default says 'Use default (Refund lost item charge and restore overdue fine)'
5 - Switch default/all libraries rule to 'Refund lost item charge and restore overdue fine'
6 - On specific branch note the default option is now 'Use default (Refund lost item charge and charge new overdue fine)'
7 - Apply patch and repeat, note the default descriptions now display correctly

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

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 417d8df61b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-02 14:53:48 +00:00
Joonas Kylmälä
5c4006ecc6 Bug 29001: (QA follow-up) Remove code duplication
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0df59817bf)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-02 14:50:32 +00:00
b8e74a0774 Bug 29001: Fix framework edition when subfields are reordered
There is a flaw when subfields are ordered, the inputs are not retrieved
correctly.
We should not rely on the order but use an id instead.
Test plan:
Create, edit subfields
Modify values from the different subfields
Confirm that values are correctly saved

Signed-off-by: Thibault Kero <thibault.keromnes@univ-paris8.fr>

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 16a919d919)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-02 14:50:16 +00:00
Janusz Kaczmarek
e40a76bd78 Bug 30658: (bug 29496 follow-up) CheckMandatorySubfields don't work properly with select field in serials-edit.tt for Supplemental issue
CheckMandatorySubfields use the class "input_marceditor" but in file
serials-edit.tt this class is not set for select input in Supplemental
issue form. In consequence if a select field is set as mandatory, it is
detected as missing even if it is filed and so you can't submit the form
and receive the new supplemantal issue.

Test plan:
1- Create (or find) a subscription for a biblio record and select the
   option "Create an item record when receiving this serial"
2- Be sure to have at least one mandatory subfield that is filed with a
   select input in the framework used by the biblio record. (ex: 952$a,
   952$b or 952$c).
3- From the subscription-detail page click on "Receive"
4- In the lower part--Supplemental issue--fill the suppelemant details,
   change the status to "Arrived" and fill the item form that appears.
5- Click on "Save"
6- Check that an error box appear with the message " Form not submitted
   because of the following problem(s) 1 mandatory fields empty
   (highlighted)" (the number can be different according to the number of
   concerned subfields)
7- Apply the patch
8- Repeat step 3 to 5
9- Check that no error appear and that your item has been created

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4f6164d194)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-24 13:57:06 +00:00
Julian Maurice
7faeaf4aef Bug 30268: Check mandatory fields in addorderiso2709.pl
Test plan:
1. Make sure you have mandatory item subfields in the MARC bibliographic
   framework used in acquisitions ("ACQ" if it exists, the default framework
   otherwise).
2. Use the "Stage MARC records for import" tool to upload a file. Do not import
   the bibliographic records.
3. Create a new acquisition basket ("Create items when:" must be set to
   "placing an order") and add a new order from a staged file
4. Select the file you just uploaded
5. In the "Items information" tab, make sure at least one mandatory subfield is
   empty
6. Try to submit the form. If there are errors about other mandatory fields
   (like the fund for instance), fix those errors and resubmit. There should be
   an error message about mandatory item subfields.
7. Enter a value for the mandatory item subfields and resubmit the form. Verify
   that the order and the item have been correctly created.

Signed-off-by: Thibault Kero <thibault.keromnes@univ-paris8.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e37359cae9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-23 20:07:52 +00:00
962155d0ec Bug 30570: Compiled CSS
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-23 20:00:28 +00:00
ebc552cac6 Bug 30570: Replace the use of jQueryUI tabs in OPAC templates
This patch switches to Bootstrap tabs anywhere in the OPAC where
jQueryUI tabs were used.

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 item type/collection/shelvinglocation tabs on the advanced
  search page. Test that it works correctly with different variations of
  the OpacAdvancedSearchTypes system preference.
- Search for an authority record and view the details. The "Notes"
  tab should be styled correctly.
- Locate a bibliographic record and view the detail page. Verify
  that tabs are working, including all the options:
- Holdings
- Other holdings ( If OpacSeparateHoldings is enabled)
- Descriptions ( MARC notes )
- Subscriptions
- Serial collection (UNIMARC, untested)
- Components ( If ShowComponentRecords is enabled. Link to sample
  record:
  https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=78023 )
- Comments
- Editions (OPACFRBRizeEditions)
- Html5media ( If HTML5MediaEnabled is on. Link to sample records:
  (https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=10685)
- Images ( If OPACLocalCoverImages is enabled )

Bonus points for testing these tabs for which I don't have
credentials:
- Syndetics TOC
- Syndetics Excerpt
- Syndetics Reviews
- Syndetics AuthorNotes
- LibraryThing for Libraries (with LibraryThingForLibrariesTabbedView
  set to "in tabs."
- NovelistSelect

- Check tabs on these patron-related pages:
  - Checkout history
  - Search history
  - Patron summary. The following tabs are
    ✓ Checkouts
    ✓ Relatives' checkouts
    ✓ Overdues
    ✓ Fines
    ✓ Relatives' fines
    ✓ Holds
    ✓ Recalls
    ✓ Article requests
    ✓ Overdrive

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Bug 30570: (follow-up) Correct rebase errors

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 894f7013eb)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-23 19:59:16 +00:00
Katrin Fischer
4f5b10118a Bug 30039: (QA follow-up) Change published on to publication date
As the issue might not have been published yet, but should have
been that seemed a better fit.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 44d0f585d1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-23 19:56:14 +00:00
0984389460 Bug 30039: Add published on column to claims.pl
To test:
1. Have a vendor setup
2. Go to serials and add a new serial w/ that vendor.
3. When creating a serial make this first issues sometime in the past.
4. Go to Claims, choose your vendor and load the table.
5. No published on column.
6. Apply patch
7. Try step 4 again and now you should see a published on column.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d8b63b05e9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-23 19:56:01 +00:00
3e2fb1ce24 Bug 26377: Simplify JS code
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0d19d7bcc5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-23 19:53:58 +00:00
10afd92e52 Bug 26377: Show when loading the page if needed
Prevent a blink

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 97e8a5b00d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-23 19:53:47 +00:00
5db848f2ce Bug 26377: Clearly label parts of subscription-add.pl that relate to optional item records
This patch modifies the form for adding a new subscription so that the
collection and item type fields are shown only when the subscription is
configured to create an item when receiving.

To test, apply the patch and go to Serials -> New subscription.

- When the page first loads, the "Do not create an item record when
  receiving this serial" radio button should be selected.
- Under the "Location" field there should be no item type or collection
  field.
- Select the "Create an item when receiving this serial" radio button.
- The item type and collection fields should appear.
- Test that the values are correctly saved when you add or edit a
  subscription.
- If you edit a subscription which had item type and collection defined,
  and you switch to "Do not create an item..." the record should save with
  empty values for those fields.
- Confirm that existing subscriptions open with the correct settings
  applied: Only records with "Create an item..." checked should open
  with the item type and collection fields displayed.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 13525cff5c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-23 19:53:33 +00:00
f70fd04521 Bug 31020: Fix PassItemMarcToXSLT in system preferences description
Bug 28373 added system preference PassItemMarcToXSLT is referenced is all XSLT system preferences.
But it only applies on results pages.
The only use in perl code is in C4::Search :
 > $marcrecord->delete_fields( @fields ) unless C4::Context->preference('PassItemMarcToXSLT');

I've tested by adding in all XSLT files :
  <strong>ITEMS <xsl:value-of select="count(marc:datafield[@tag=952])"/> </strong>
Number of items only appears in OPAC and staff interface results pages.

In fact only search pages get MARC record from search engine, in which items datas have been embedded for indexing.
In other pages MARC record does not embed items datas.

This patch adds "MARC21 952, UNIMARC 995" to be explicit we talk about
MARC datas not item tags build in XML recieved by XSLT.

Test plan :
1) Apply patch
2) Search for PassItemMarcToXSLT in system preferencies
3) Look at description of PassItemMarcToXSLT
4) Check PassItemMarcToXSLT only apprears in OPACXSLTResultsDisplay and XSLTResultsDisplay

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f6dbad91c4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-23 19:51:32 +00:00
ef0dbcc6b5 Bug 30905: (follow-up) Get logged in branch once
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fc919fc796)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-23 19:44:09 +00:00
Aleisha Amohia
8c667c13c2 Bug 30905: Show waiting recalls in patron account
This enhancement shows recalls ready for pick-up on the patron's account
so they can't be missed.

To test:
1) Enable the UseRecalls system preference and set up your
recalls-related circulation rules.
2) Check out an item to Patron B.
3) Log into the OPAC as Patron A and search for the item.
4) Place a recall on that item. Note the pickup library.
5) Go back to the staff client. At the top right of the page, confirm
your logged in library matches the recall pickup library. Set the
library to the recall pickup library if needed.
6) Check in the recalled item and confirm the recall as waiting for
Patron A.
7) Go to Patron A's account (members/moremember.pl). Confirm the recall
shows under 'Recalls waiting here' and all the information is correct.
8) Go to Patron A's checkouts (circ/circulation.pl). Confirm the recall
shows under 'Recalls waiting here' and all the information is correct.
9) Click on the menu at the top right of the page and choose 'Set
library'. Change the library to some other library.
10) Repeat steps 7 and 8, however this time the recall should show under
'Recalls waiting at other libraries'.

Sponsored-by: Catalyst IT

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 952f00f20b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-23 19:43:54 +00:00
9739eb738d Bug 31163: Sort cashups newest to oldest
The cashup history table was sorting from oldest to newest.. it's
perferable to show the most recent at the top by default.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit dbbaba3ee0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-23 19:30:48 +00:00
65292aaa86 Bug 27667: (QA follow-up) Fix singular index and rephrase heading
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 325d783419)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-23 19:26:45 +00:00
21ff480612 Bug 27667: Display a warning for records missing in Elasticsearch
On "About Koha" page are displayed the numbers of indexed biblios and authorities with ES.
It could be great if we could have comparison with the number of records in the database to display the number of missing records.
In the "System information" tab with the other "Data problems".

If Searchengine has any issue (index count will be -1), we do not
display missing records.

Test plan :
1) Use Elasticsearch searchengine
2) Rebuild all records : koha-elasticsearch --rebuild -d kohadev
3) Go to "About Koha" page and look at System information tab
=> you see no warning
4) On a biblio record delete the MARCXML in biblio_metadata.metadata
5) Rebuild all records : koha-elasticsearch --rebuild -d kohadev
6) Go to "About Koha" page and look at System information tab
=> you see warning : 1 record(s) missing on a total of 435 in indice koha_kohadev_biblios.
7) On a authority record delete the MARCXML in auth_header.marcxml
8) Rebuild all records : koha-elasticsearch --rebuild -d kohadev
9) Go to "About Koha" page and look at System information tab
=> you see warning : 1 record(s) missing on a total of 1705 in indice koha_kohadev_authorities.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fee0f29792)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-23 19:26:34 +00:00
f92f6a315d Bug 31144: When modifying an order we should not load the vendor default discount
After placing an order in a basket with a discount of "0" if you attempt to modify we will load the vendor default discount, this can lead to accidentally applying a discount when modifying other order parts

To test:
0 - Have a vendor with a discount set
1 - Add an order to a basket
2 - While adding, set discount to 0
3 - Add order - prices are calculated ocrrectly
4 - Modify order
5 - Note discount is populated with vendor discount
6 - Cancel
7 - Apply patch
8 - Modify order
9 - Discount remains at 0
10 - Repeat with a vendor with no discount set
11 - Placing order not specifiying discount it remains blank
12 - Modifying order discount remains blank
13 - Modify order and set discount
14 - Confirm it is retained on modifcation

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 73d2066837)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-23 19:22:51 +00:00
Caroline Cyr La Rose
a3f9c12be8 Bug 31068: Context for translation: Print (verb) vs. Print (noun)
This patch adds context to the term Print in the context of message transport types (as opposed to printing something/print button), for translation purposes.

To test:
0- Apply patch

Check the terms to be changed
1- Go to Tools > Notifications & slips
2- Edit a notification
** 3- In the tabs for different transport types, check the 'Print' term (letter.tt)
4- Go to Tools > Overdue notice/status triggers
** 5- In the transport types, check the 'Print' column heading (overduerules.tt)

Add a new language (fr-CA in the example, change for whatever language code you want)
6- In a terminal, run
gulp po:create --lang fr-CA
7- Then, run
gulp po:update --lang fr-CA
8- In system preferences, enable the new language in language and OpacLanguages
9- Switch the language in staff interface and OPAC

Change the translations
10- In your favourite text editor, open fr-CA-messages.po
11- Find the string msgctxt "Message transport type"
12- Enter a word in msgstr
13- Save the file
14- In a terminal, go to misc/translator
15- Run
./translate install fr-CA

Check the translations
16- Redo the steps to check the terms (steps 1-5) and make sure the terms in steps 3 and 5 are changed for the word you put in step 12.

17- Optionally, check the other pages where the term is supposed to be unchanged and make sure it is unchanged

Check the terms to leave unchanged (optional)
18- Enable the HoldsAutoFill and UseCashRegisters system preferences
19- Go to Administration > Cash registers and create a cash register
20- Go to a patron's account
** 21- Check the 'Print' button in the menu bar or the patron's account (members-toolbar.inc)
22- Go to the 'Accounting' tab
23- Create a manual invoice
** 24- In the 'Transactions' tab, check the 'Print' button in the fee line (boraccount.tt)
25- Pay the fee (make sure to use the cash register)
** 26- In the 'Transactions' tab, check the 'Print' button in the payment line (boraccount.tt)
27- At the top of the transactions table, click the 'Export' option
** 28- Check the 'Print' option (columns_settings.inc)
29- Go to the 'Check out' tab and check out an item
30- Go to the item's bibliographic record
** 31- Check the 'Print' button in the menu bar of the detailed record (cat-toolbar.inc)
32- Add the record to the cart and open the cart
** 33- Check the 'Print' button in the cart (basket.tt)
34- Place a hold on the item
35- In the search bar at the top, click the 'Check in' tab and check in the item
** 36- Check the 'Print' button in the 'Hold filled for' message (returns.tt)
37- Go to Tools > Cash summary for Branch
38- Click 'record cashup' and confirm
39- Click the 'Summary' link in the 'Last cashup' column
** 40- Check the 'Print' button in the cashup summary modal (cashup_summary.inc)
41- Go to Serials
42- Create a subscription (if there aren't any)
43- Receive an issue
44- From the subscription detail page, go to Create routing list
45- Add a recipient to the list
46- Save the routing list
47- Click 'Save and preview routing slip'
** 48- Check the 'Print' button in the routing list preview (routing_preview_slip.tt)

Note: I can't find where the 'Print' from tinymce_i18n.inc is displayed in the staff interface

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 920529df42)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-23 19:21:22 +00:00
256ef4ee27 Bug 29632: Don't sort cn-sort numerically
When defining our sort fields in we defined all as 'numeric'

For other string containing numbers this is likely correct, however,
for callnumbers it is not. e.g. E45 should sort before E7

This patch adds a new 'callnumber' type and deifnes this for cn-sort and
adds to the field maping a sort without numeric set

To test:
0 - Be using ES with Koha
1 - On records with single item, add callnumbers:
    VA65 E7 R63 1984
    VA65 E7 T35 1990
    VA65 E45 R67 1985
2 - Add public note 'shrimp' or something to make them easily searchable as a group
3 - Search for 'shrimp', sort by callnumber
4 - Note E45 comes last, it should come first
5 - Apply patch
6 - Reset ES mappings
7 - Reindex ES
8 - Repeat search
9 - Sorting should be correct when set to callnumber

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Michal Urban <michalurban177@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b8b8a62f11)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-23 17:35:16 +00:00
e64d282b3a Bug 31153: Correct include for patron-search-header
To test:
1) Turn on recalls
   1.1) In Administration > Global system preferences, enable UseRecalls
   1.2) Add recalls permissions in your circulation rules
2) In the OPAC, log in as a patron
3) Find a record with checked out items and place a recall
4) In the staff interface, go to the patron's account
5) Click on any tab on the left in the patron's account (e.g. Holds history)
--> Note that the Koha logo and search bar is at the top of the page between the module menu and the breadcrumbs
6) Click on the 'Recalls history' tab
--> Note that the Koha logo and search bar disappear
7) Apply patch
8) Conform search bar is there

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6dc978375e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-23 17:32:51 +00:00
604da9beaa Bug 31036: (QA follow-up) Add a warning to the system preference
As suggested by Katrin, adding a warning to the system preference that
this has an effect on SIP configurations that needs to be understood.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f154fb0372)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-23 17:20:37 +00:00
c3c889e7f4 Bug 31036: Treat SIP00 that same as CASH
SIP00 is the code for CASH transactions that have taken place on a SIP
client.  Cash management treats CASH type transactions as a special case
for banking and register requirements. This patch brings SIP00 in line
with the CASH handling code of cash management.

Test plan
1) Enable cash management with 'EnablePointOfSale'
2) Enable cash registers with 'UseCashRegisters'
3) Add a cash register via 'Administration > Cash registers'
4) Make some payments against the ash register in the staff client
5) Attempt to make a payment via a SIP client without having associated
   a cash register to the SIP account config
5a) This should now fail
6) Attach the cash register to the SIP account used above
6a) Payment should now work again on SIP transactions
7) Look at the cash register details page for the cash register
7a) 'Bankale' should now include cash from both SIP and Staff client
sales

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9d8be887d0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-23 17:20:17 +00:00
e9fde507b6 Bug 31069: Remove ExplodedTerms dependency on templates
This patch removes the use of templates and CGI in ExplodedTerms by using the
Koha::I18N library.

The functionality on the package is too simple, and messing with the
template paths complexity on the tests was too much, given we have a
nice way to have translatable strings at the package level.

This patch does that, and cleans up the test file as well, that required
complex template and CGI mocking to run properly.

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/SuggestionEngine_ExplodedTerms.t
=> FAIL: It fails in master
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass
4. Follow the original test plan
=> SUCCESS: Things work
5. Enjoy the rest of the day and forget this ever happened

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ecd91d6089)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-23 17:15:18 +00:00
e90ddc67cf Bug 31069: fix <span> in OPAC search suggestions (Did you mean)
== test plan ==
1. Enable "Did you mean?":
   . go to Administration > Additional parameters > Did you mean?
   . put a tick in each plugin and save the configuration
2. In the OPAC, search for 'open source'
3. Without the patch you see escaped <span> after "Did you mean:"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1672d0c1c0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-23 17:14:55 +00:00
d09c6ab890 Bug 31146: Fix unclosed table element
To test:
1) Install another language and enable it in the OPACLanguages system preference
2) Also make sure opaclanguagesdisplay is set to Allow
3) Make sure OpacLangSelectorMode is set to display the switch in the footer (either top and bottom or footer only)
4) Turn on recalls
   4.1) In Administration > Global system preferences, enable UseRecalls
   4.2) Add recalls permissions in your circulation rules
5) In the OPAC, log in as a patron
6) Find a record with checked out items and place a recall
7) Go to your account
--> Note that the language switch is at the bottom left of the screen
8) Click on any tab in the patron's account
--> Note that the language switch is at the bottom left of the screen
9) Click on 'Your recalls history'
--> Note that the language switch is right under the recalls history table
10) Apply patch
11) The changelanguage div should now be properly placed at the bottom of the page.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 098866cab0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-23 16:15:19 +00:00
87d7ded490 Bug 31129: Fix debarment count on circulation page
This patch was split from bug 23681 where QA identified the issue.

This patch fixes the debarment count displayed on the circulation page
tabs

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b6afcdbf48)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-23 16:07:58 +00:00
3f0a70a271 Bug 31141: Remove 'select_column' from waiting_holds.inc
In the only place we use the waiting_holds include, we were hard coded
to always pass the 'select_column' variable as true.

We can simply and clarify the logic by just removing this superflous
variable.

Test plan
1. Confirm that the waiting holds tables continue to display as expected

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f58099a244)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-23 15:56:41 +00:00
b5d2c7d621 Bug 31039: (follow-up) Wrap jQuery in $(document).ready()
cashup_modal.js consists only of jQuery code, so the whole thing should
be contained in a $(document).ready() function. This may or may not be
contributing to the behavior this bug is trying to fix.

Please note that this patch contains whitespace changes, so diff
accordingly.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 743731949d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-23 15:35:24 +00:00
57c375999a Bug 31039: Remove duplicate modal printing JS
This patch removes the erroneos duplication of the modal printing js.

Test plan
1) Create some transactions and perform a cashup.
2) Open the cashup summary modal
3) Click 'Print'
4) Cancel the print dialogue
5) Note that the dialogue re-appears
6) Apply the patch
7) Repeat and note the dialogue closes first time now.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5e6f88e62f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-23 15:35:04 +00:00
36e39cab65 Bug 29051: Enable seen renewal in the staff client
This patch updates the javascript for the checkouts table to add the
checkbox back in for the case where too_unseen is the error returned by
CanBookBeRenewed, allowing such issues to be renewed.

Signed-off-by: Caroline <caroline.cyr-la-rose@inlibro.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 91a67e3c8a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-23 15:18:35 +00:00