Commit Graph

43282 Commits

Author SHA1 Message Date
Nick Clemens e77fe4e5df Bug 31643: Require only edit_catalogue, not full cataloging
To test:
1 - Grant a patron: catalogue, edit_catalogue, and editauthorities permissions
2 - Log in to staff client
3 - Browse to: http://localhost:8081/cgi-bin/koha/svc/cataloguing/automatic_linker.pl
4 - UNAUTHORIZED
5 - Apply patch, restart all
6 - Log in and go to link again
7 - status "OK"

Signed-off-by: Catrina <catrina@bywatersolutions.com>

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e3db0a35c3)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 7197149f6e)

Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
2022-12-15 12:02:48 +00:00
Owen Leonard b2c138252c Bug 31559: Staff results page doesn't always use up full available screen width
This patch adds an explicit "width: 100%" to tables which are contained
within a #searchresults <div>. The change affects staff interface
catalog search results and these other pages with the same markup:

- Advanced MARC editor search results
- Holds to pull
- Patron search results

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

- Test the catalog search results and other affected pages to confirm
  that the tables affected take up the full width of the page.

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

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fec7b1efa4)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>

Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
2022-12-15 11:50:29 +00:00
Shi Yao Wang ff7176bbda Bug 30517: Translation breaks editing parent type circulation rule fix
Test plan:
1. Install another language in the staff interface
   1. in commandline: `cd misc/translator/; ./translate install xx-XX`
   2. Check the box of the language in the 'language' system preference
and save
   3. Refresh and you should be able to choose languages
2. Create an item type with a parent
   1. Go to Administration > Item types
   2. Create a new item type or modify an existing one, assigning a parent type (I created a 'Children's books' type and assigned 'Books' as its parent)
3. Create a circulation rule for the parent type (I created All/Books, with 10 checkouts allowed)
4. Create a circulation rule for All/All (I created All/All with 30 checkouts allowed)
5. In English, click on "Edit" next to the parent type rule (All/Books)
--> Note that the item type in the bottom row (the modifiable row) is changed to 'Books (All)'
6. Modify the number of checkouts allowed (e.g. 99)
--> The All/Books rule is modified
7. Switch the interface to the other language
8. Click on "Edit" next to the parent type rule (All/Books)
--> Note that the item type in the bottom row stays on 'All'
9. Modify the number of checkouts allowed (e.g. 88)
--> The All/All rule is modified
10. Apply the patch, translate again and refresh the page
11. Do step 8-9 again and notice it now behaves as it should

Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 080d763c48)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
2022-12-15 11:45:55 +00:00
Marcel de Rooy 9f441c3976 Bug 31593: Remove Test::DBIx::Class from Context.t
No need to keep it.
Fixing a test description too.

Test plan:
Run t/db_dependent/Context.t

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

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3088c2f56a)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit fd0f1adceb)
2022-12-15 11:41:32 +00:00
Nick Clemens 154af0fae7 Bug 31540: Exclude expired holds from the reminder job
Some libraries don't want to auto-cancel holds, but we should not remind
a patron about a hold which has expired.

To test:
1 - Place a hold for a patron
2 - Set it waiting
3 - Run the holds reminder script in the future
    perl misc/cronjobs/holds/holds_reminder.pl -day 1 --date '2023-09-12' -v
4 - Note the holds would be reminded
5 - Set expirationdate for the hold less than today
    UPDATE reserves SET expirationdate = DATE_SUB(CURDATE(), INTERVAL 1 DAY);
6 - Run the remidner cron again
7 - No holds trigger!

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 4c3d18091d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6e3ff69730)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit fce44867ac)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit fce44867ac)
2022-12-15 11:29:12 +00:00
Isobel Graham 48f09bbc6b Bug 31412: Add focus to 'name' on SMTP Servers
This patch adds the focus class to ensure focus is given to the first form element on the SMTP server entry page.

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7a8a5177da)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 38b608eadb)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 38b608eadb)
2022-12-15 11:19:19 +00:00
Victor Grousset/tuxayo 072fb8ee82 Update release notes for 21.05.21 release
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-12-01 01:03:40 +01:00
Victor Grousset/tuxayo 23d5b1e771 Increment version for 21.05.21 release
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-12-01 00:48:48 +01:00
Victor Grousset/tuxayo 3769728d3a Fix translations for Koha 21.05.21
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-12-01 00:44:57 +01:00
Koha translators 695cc30e16 Translation updates for Koha 21.05.21
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-11-30 22:10:06 +01:00
David Cook aa6bb63999 Bug 28553: (QA follow-up) default to auto renew email when cron switched used
This patch defaults to using "email" rather than "sms" notices
when AutoRenewalNotices is set to use the --send-notices cron switch

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 88f63e01d2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 681730ee1a)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit dc92b692e2)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-11-24 21:49:18 +01:00
Kyle M Hall 54f563973d Bug 28553: Patrons can be set to receive auto_renew notices as SMS, but Koha does not generate them
Following bug 18532, one can set a patron's messaging prefs to deliver an auto-renew notice via SMS.
However, the auto_renewals cron only knows how to generate email notices. We should not allow the selection of non-functional transport types.

Test Plan:
 1 - Set pref AutoRenewalNotices - 'according to patron messaging preferences'
 2 - Set circ rule with:
    Loan period: 5 days
    No renewal before: 5
    AutoRenewal: Yes
    Renewals allowed: 5
 3 - Set SMS Send driver to Email
 4 - Find a patron and set them to receive auto renewal notices via SMS and no other transport
 5 - Provide a proivder and sms number for the patron
 6 - Checkout an item to the patron, set due date to yesterday
 7 - Run auto renewals:
    perl misc/cronjobs/automatic_renewals.pl -v --send-notices -c
 8 - Item renewed, no message sent
 9 - Check in item, checkout again due yesterday
10 - Apply patch
11 - Browse to Tools->notices and slips
12 - Edit AUTO_RENEWALS and AUTO_RENEWALS_DIGEST to copy email template to sms and add a title
13 - perl misc/cronjobs/automatic_renewals.pl -v --send-notices -c
14 - Item renewed, confirm patron has a notice in their account
15 - Check the digest option, check in item, checkout again as due, repeat cronjob and note digest notic
16 - sign off

https://bugs.koha-community.org/show_bug.cgi?id=30355

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

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fef29151e0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e672ea6892)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit ff27eecd56)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-11-24 21:49:15 +01:00
Victor Grousset/tuxayo fc2d96b317 Bug 29603: Compiled SCSS
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-11-18 00:46:43 +01:00
Owen Leonard d49f04237f Bug 29603: Fix responsive behavior of facets menu in OPAC search results
The OPAC was originally featured a search results facets box that would
collapse at narrower browser widths and show a "Refine your search" link
under the breadcrumbs menu. At some point this broke, with the "Refine
your search" link appearing at the bottom instead.

This patch revises the page to restore the previous behavior.

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).

- Perform catalog search in the OPAC which will return multiple results.
- View the page at various browser widths. At narrower widths the facets
  menu should appear as a "collapsed" box with a "Refine your search"
  link.
- Clicking the link should toggle the facets menu visibility.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 915815ddae)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 2e72aae7e4)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-11-18 00:42:32 +01:00
Victor Grousset/tuxayo e8d9c094fe Bug ?????: Compiled SCSS due to compiler change or previous oversight
Likely compiler change.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-11-18 00:34:19 +01:00
Victor Grousset/tuxayo 208abb7413 Update release notes for 21.05.20 release
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-10-24 18:24:09 +02:00
Victor Grousset/tuxayo c84dcf2b62 Increment version for 21.05.20 release
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-10-24 18:08:46 +02:00
Victor Grousset/tuxayo dd75ad9e4e Fix translations for Koha 21.05.20
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-10-24 18:05:08 +02:00
Koha translators e7e5b0ac37 Translation updates for Koha 21.05.20
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-10-24 18:05:07 +02:00
Jonathan Druart 40d22a14c6 Bug 31219: Prevent JS injection in patron extended attributes
We are sanitizing other attributes but "extended patron attributes".

Test plan:
Make a patron attribute editable at the OPAC
Edit an existing patron, or register a new one
Use a script tag in the new value ("<script>alert("booh!")</script>" for
instance)
With this patch the value is remove if containing an HTML tag that is
not br b i em big small strong (see C4::Scrubber)

Signed-off-by: Mark Hofstetter <koha@trust-box.at>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ddaa78bdab)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-10-24 18:05:06 +02:00
Mason James 66b25af88f Bug 30252: lower version of 'Locale::XGettext::TT2' to 0.6
this patch reduces the required version of 'Locale::XGettext::TT2' to 0.6

version 0.7 of of Locale::XGettext::TT2 is incompatible with the current version of libintl-perl (1.26), so we use 0.6 instead

 https://packages.debian.org/stretch/libintl-perl
 https://metacpan.org/release/GUIDO/Template-Plugin-Gettext-0.6/view/lib/Locale/XGettext/TT2.pm

we will move to 'Locale::XGettext::TT2' 0.7 when libintl-perl-1.32 arrives
 https://tracker.debian.org/pkg/libintl-perl

small change, no test plan

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6c49c489d6)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-10-22 01:39:55 +02:00
Tomas Cohen Arazi a6bab49771 Bug 29325: Fix commit_file.pl
This patch fixes the broken commit_file.pl script.

It doesn't deal with commiting the import from the UI.

To test:
1. Pick a file for staging:
   $ kshell
  k$ misc/stage_file.pl --file TestDataImportKoha.mrc
=> SUCCESS: All good
2. Commit!
  k$ misc/commit_file.pl --batch-number 1
=> FAIL: You see
DBIx::Class::Storage::DBI::_exec_txn_begin(): DBI Exception: DBD::mysql::db begin_work failed: Already in a transaction at /kohadevbox/koha/C4/Biblio.pm line 303
3. Apply this patch
4. Repeat 2
=> SUCCESS: Commit succeeds
5. Sign off :-D

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

Bug 29325: (QA follow-up) Remove unexisting parameters of BatchRevertRecords

There is no interval and callback as in BatchCommitRecords.

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

Bug 29325: Call progress callback one last time to confirm comppletion

Previously after finishing the loop we were still in a transaction that never completed - we should report progress when done
one final time to commit the last records

To test:
1 - Stage a file with > 100 records
2 - Commit file
3 - Confirm batch is imported and no records left as staged

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

Bug 29325: Fix import from staff client

same test as before, but via the staff client

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

Bug 29325: Handle the transaction in BatchCommitRecords

Requiring the callback to commit was breaking reversion, and likely elsewhere

Let's simplify and say that the routine iteself will handle the txn and commit

TO test:
1 - Stage a file
2 - Import a file
3 - Revert a file
4 - Test staff client and command line

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

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

Bug 29325: (QA follow-up) Tidy up

tools/manage-marc-import.pl: sub commit_batch does no longer need $schema
tools/manage-marc-import.pl: sub revert_batch: calling BatchRevertRecords which has no interval and callback
misc/commit_file.pl: sub print_progress_and_commit does no longer commit, renamed
misc/commit_file.pl: sub print_progress does no longer have a schema parameter
misc/commit_file.pl: sub revert_batch reported deleted items as added

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 514b662861)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-10-17 02:37:49 +02:00
Victor Grousset/tuxayo 21304e53cc Update release notes for 21.05.19 release
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-09-27 15:42:54 +02:00
Victor Grousset/tuxayo f548da0e9d Increment version for 21.05.19 release
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-09-27 14:05:55 +02:00
Victor Grousset/tuxayo 465f0f4d00 Fix translations for Koha 21.05.19
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-09-27 14:03:02 +02:00
Koha translators 2d418e077f Translation updates for Koha 21.05.19
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-09-27 11:30:25 +02:00
Frédéric Demians 0a419dd742 Bug 30308: Fix bulkmarcimport.pl broken by OAI-PMH:AutoUpdateSets(EmbedItemData)
Test plan:

(A) Reproduce the bug:

A1 In Administration > System preferences > Web services:
   - Enable OAI-PMH
   - Enable OAI-PMH:AutoUpdateSets
   - Enable OAI-PMH:AutoUpdateSetsEmbedItemData

A2 In Tools > Export data > Export bibliographic records, export 1 (one)
   biblio record. Be sure that this biblio record has at least one item.
   Don't tick "Don't export items".

A3 Delete the exported biblio record, and its items.

A4 In command line, on the server load the exported file:
   ./bulkmarcimport.pl -b -v -file /path/to/koha.mrc

A5 Retrieve the biblio record in Koha. Note the absence of the item(s). This is
   the bug.

(B) Apply the patch

B1 Delete the record (without item) loaded at A4.

B2 In command line, on the server load the exported file:
   ./bulkmarcimport.pl -b -v -file /path/to/koha.mrc

B2 Retrieve the biblio record in Koha. Note the presence of the item(s).

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 06b48f16e4)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 084c14787f)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-09-19 23:49:48 +02:00
Jonathan Druart 5081ea2243 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>
(cherry picked from commit 7a5d048b51)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 6ac8f34e99)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-09-19 23:44:00 +02:00
Katrin Fischer a05978b72f Bug 27045: (follow-up) Fix delimiter in header rows
The header rows still showed \t because the newly defined
variable wasn't used there.

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2eea061ca3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ed114537d3)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 6c47479066)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-09-19 23:43:52 +02:00
Jonathan Druart de0ff8caeb Bug 27045: Fix other exports using CSV profiles
This patch corrects the export of the 2 other reports
using CSV profiles:

* Late issues (serials)
* Basket (acquisitions)

To test:
1) Late issues
* Update the late issues sample report to use tab as separator
* Create a subscription
* Go to serial collection and 'generate next' to get some late issues
* Go to Claims
* Export the late issues and verify format is correct
* Verify exported file has tabs

2) Basket summary
* Create an order with several order lines
* Create an SQL type CSV profile for basket export using tab as separator
  Example: aqorders.quantity|aqordres.listprice|Title=biblio.title
* Export the basket using your configured CSV profile
* Verify exported file has tabs

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7cd84171ab)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9af01ea2e3)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit cdfecb6fb7)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-09-19 23:43:52 +02:00
Jonathan Druart ed7bf9c3b3 Bug 27045: Fix items lost report export if delimiter is tab
When choosing tabulation as the delimiter for a CSV profile
for the lost item report, the tabs appear in the file as \t
instead of as proper tabs.

title\tauthor\tstocknumber\tcallnumber
"E Street shuffle :"\"Heylin, Clinton."\\

To test:
* Upate the existing sample lost item CSV profile to use tabs as
  separator
* Make sure you have some lost items in your database or create some
* Go to Reports > Lost items
* Run the report
* Check all or some of the checkboxes in the result list
* Export using the link on top and the CSV profile
* Verify the tabs are not exported correctly
* Apply patch
* Verify tabs now are proper tabs instead of \t

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 983965ee47)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4db8368fd5)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit becbc5bec1)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-09-19 23:43:49 +02:00
Nick Clemens b494df730f Bug 14680: Always subtract discount from price to calculate estimated cost
This patch simply removes a discrepancty where when a discount is provided on the order form
we add the discount to the price, and when it comes form the vendor we subtract the discount.

Discounts should always descrease the estimated cost

To test:
 0 - Have a vendor with a discount of 10% specified
 1 - Export a record from your Koha
 2 - Stage the record for import and match on biblionumber
 3 - Add to a basket in acq from the staged file
 4 - Select the title, and set order price to $10 and do not fill the discount field
 5 - Add the order - note $10 RRP and $9 actual/budgeted cost
 6 - Repeat 2&3
 7 - Select the tile, set price $10 and discount 50%
 8 - Add the order - note $20 RRP and $10 actual/budgeted cost! FAIL
 9 - Apply patch, restart all
10 - Repeat 2-7
11 - Add the order, note $10 RRP and $5 actual.budgeted cost

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 96eed0f5e0)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit da1633125f)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-09-10 02:01:15 +02:00
Martin Renvoize 76095f9dc9 Bug 29051: Update svc api to allow seen renewals
This patch updates the svc/renew api endpoint to allow seen renewals
when appropriate

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 e3311ebffc)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e9153d7f15)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit e20d79123b)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-09-09 21:54:02 +02:00
Martin Renvoize 680e267425 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>
(cherry picked from commit 36e39cab65)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit b513d0b038)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-09-09 21:54:02 +02:00
Tomas Cohen Arazi f3b83357ba Bug 31473: Fix fragile test about bad OpacHiddenItems conf
There's been a behavior change in recent MariaDB that made some cases
deal with truncated data in DOUBLE context instead of DECIMAL.

Probably this:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-27380

This made the affected test fail consistently on those versions.

This trick for checking OpacHiddenItems is correct (as introduced on bug
28125 doesn't really make use of the warning, just prints it in
about.pl) so one option was to just check for a warning.

I decided to keep the test, but add the optional DECIMAL|DOUBLE check on
the qr. This way other eventual changes will make it fail and serve as a
warning in case something more relevant changes.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ t/db_dependent/Koha/Items.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-09-08 05:31:38 +02:00
Kevin Carnes 4086c1c4ff Bug 28610: Elasticsearch 7 - hits.total is now an object
In Elasticsearch 7 hits.total is now an object which is not always an exact
value. You can always get an exact total by adding a track_total_hits
parameter set to true when using the Elasticsearch search method

To test:
1) Run prove t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t
2) If you observe an error about types, apply patch for bug 25669
3) Run prove t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t
4) Observe that tests with count fail
5) Apply patch
6) Observe that tests with count pass
7) Sign off

Sponsored-by: Lund University Library
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 301ed1567b)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-09-08 05:26:38 +02:00
Mason James 1708317b7b Bug 30209: Upgrade 'libdbd-sqlite2-perl' package to 'libdbd-sqlite3-perl'
to test...

1/ apply patch, build and install new package

2/ check that libdbd-sqlite3-perl package is installed

     $ dpkg -l | grep libdbd-sqlite
     ii  libdbd-sqlite3-perl:amd64              1.62-3          amd64

    note: libdbd-sqlite3-perl package installs DBD::SQLite module, which uses sqlite3 :)

        https://packages.debian.org/stretch/libdbd-sqlite3-perl
        https://metacpan.org/pod/DBD::SQLite

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 2c5f49550b)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-08-29 23:28:07 +02:00
Victor Grousset/tuxayo 11507f0dd4 Update release notes for 21.05.18 release
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-08-28 01:17:39 +02:00
Victor Grousset/tuxayo 3903d9fed4 Increment version for 21.05.18 release
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-08-27 22:51:24 +02:00
Victor Grousset/tuxayo 35e1303ace Fix translations for Koha 21.05.18
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-08-27 01:57:42 +02:00
Koha translators fa8889dcb9 Translation updates for Koha 21.05.18
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-08-26 22:32:27 +02:00
Kevin Carnes d642eefc7a Bug 25669: (follow-up) Minor fixes
Bulk doesn't support include_type_name, update requirement to
Search::Elasticseach@6.80, and remove data type name from tests.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e926de5e8f)

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

(cherry picked from commit 22c9ea9737)
Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 3a46ff9702)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-08-26 22:30:57 +02:00
Nick Clemens 1ea2780871 Bug 25669: Use include_type_name parameter in ES calls
This patch includes the parameter:
include_type_name
on our ES calls

It removes the deprecation warning we are seeing, and should allow using ES7 with no other chnages.

For ES8 we will need to remove the hardcoded type,

I would suggest a second patch, with a new syspref "ElasticsearchLegacyType" set to 'True' by default.
Description can explain that this must be set to false, and data reindexed after upgrading to ES7 and before
upgrading to ES8 - then we can drop this pref when we drop ES7 support

When we drop ES6 support the pref can be set default true for upgrades, default 'false' for new installs

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 150a4b03f3)

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

(cherry picked from commit 99757c2d97)
Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit a1fdcc4f44)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-08-26 22:27:52 +02:00
Katrin Fischer 7e0e548f3f Bug 30567: Fix price formatting when adding a manual invoice with CurrencyFormat FR
In input fields we always use the decimal . while the display format
uses the decimal separtor definded by CurrencyFormat. When adding a
manual invoice without this patch, the amount is shown with comma, but
it should be . in the input field.

To test:
1- Go in Administration->Debit types
2- Click on New debit type
3- Fill the form:
   Code: USEDBOOK
   Default amount: 0.50
   Description: Used book
   Can be manually invoiced: Yes
4- Save
5- Go to any patron account
6- Go to the "Accounting" tab
7- Click on "Create manual invoice"
8- Fill the form
9- Choose the created debit (Used book)
10- Verify that the format is incorrect (0,50 instead of 0.50)
11- Apply the patch
12- Verify the amount is now using the correct format

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 c54e1de8b2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 533a858684)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 8a5ab91aed)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-08-20 22:36:47 +02:00
Jonathan Druart a0413bf20f Bug 30914: (24153 follow-up) Fix cleanup_database.pl --transfers --old-reserves
Silly mistake, 'delete if verbose' must be 'delete if confirm'

Test plan:
Try the cleanup_database.pl script to delete transfers and old issues.
Using --transfers --old-reserves and the --confirm flag the entries must be
removed

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b503c186e4)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 144372e72e)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-08-18 00:44:25 +02:00
Martin Renvoize 1e24be03e6 Bug 29958: Do not set dateaccessioned on updates
This patch reomves the second occurence of setting daeaccessioned today,
outside of the 'add/update' handling in Koha::Item->store.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1f5fbcf736)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e0fcd54a6e)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 898adc6ff6)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-08-17 23:45:35 +02:00
Tomas Cohen Arazi 65494643fa Bug 29958: Regression tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3684a53dc3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 91c4d41115)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 35643f28f9)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-08-17 23:43:43 +02:00
Victor Grousset/tuxayo 5265b8a92c Bug 30848: [21.05.x] Export C4::Biblio::GetMarcSubfieldStructure()
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-08-16 00:51:13 +02:00
Nick Clemens 83f552bdad Bug 30848: Add exec flag to test
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8c926c976a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4edaa27fc2)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit b10ac8189f)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-08-15 22:31:46 +02:00
Martin Renvoize 82b0ba4139 Bug 30848: Fix issue exposed by unit tests
This patch changes the 'map' to a simple for loop so that we can easily
map multiple subfields to a field without overwriting the first previous
subfields in the structure.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6c381c4b22)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 965e985619)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 4541f43789)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-08-15 22:31:46 +02:00