]> git.koha-community.org Git - koha.git/log
koha.git
2 years agoUpdate release notes for 21.11.09 release
Arthur Suzuki [Mon, 27 Jun 2022 13:11:20 +0000 (15:11 +0200)]
Update release notes for 21.11.09 release

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoRevert "Bug 30884: Fix jQuery selector to correctly detect active tab"
Arthur Suzuki [Mon, 27 Jun 2022 12:38:45 +0000 (14:38 +0200)]
Revert "Bug 30884: Fix jQuery selector to correctly detect active tab"

This reverts commit badc8ff6520ba98cb7fe4a1e3067c5d9919c4984.

2 years agoBug 30551: Make cash register report take branchcode from cash register
Shi Yao Wang [Fri, 15 Apr 2022 16:37:34 +0000 (12:37 -0400)]
Bug 30551: Make cash register report take branchcode from cash register

This patch makes it so cash register reports puts branchcode from the
cash register where the payment was made into "Transaction library"
column instead of taking the branchcode of the manager.

Test plan:
1- Use cash registers (administration > system preferences > UseCashRegisters)
2- Create another library if you only have one (administration > libraries > new library)
3- Create a cash register in each library if they don't already have one (administration > cash registers > new cash register)
4- Create a fee on your own account and pay it right after in both libraries.
5- Go to reports > cash register and generate the statistics.
6- Notice "transaction library" in both rows are the same even though the fees were paid in two different libraries and two different cash registers.
7- Apply the patch and click submit to re-generate statistics
8- Notice it now shows the correct library where the transactions were done

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 43299fe5cc1c8110112a76ba88e9ab03aaeda43c)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoUpdate release notes for 21.11.07 release v21.11.07
Arthur Suzuki [Wed, 22 Jun 2022 09:08:13 +0000 (11:08 +0200)]
Update release notes for 21.11.07 release

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoIncrement version for 21.11.07 release
Arthur Suzuki [Tue, 21 Jun 2022 15:34:35 +0000 (17:34 +0200)]
Increment version for 21.11.07 release

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoFix translations for Koha 21.11.07
Arthur Suzuki [Tue, 21 Jun 2022 15:31:31 +0000 (17:31 +0200)]
Fix translations for Koha 21.11.07

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoMerge remote-tracking branch 'translate/21.11.07-translate-20220621' into 21.11.x
Arthur Suzuki [Tue, 21 Jun 2022 14:55:18 +0000 (16:55 +0200)]
Merge remote-tracking branch 'translate/21.11.07-translate-20220621' into 21.11.x

2 years agoBug 30844: Ensure that allow_nonref is enabled when using older versions of JSON
Kevin Carnes [Thu, 9 Jun 2022 06:12:56 +0000 (08:12 +0200)]
Bug 30844: Ensure that allow_nonref is enabled when using older versions of JSON

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cc40bbf1952f67b2e46bae0cf71b8d4fbe0bea3d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 55fc22117fdb6f22e934327bab85dc2981009d5c)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30844: The OPAC detail page's browser is limited to the current page of results...
Kevin Carnes [Wed, 25 May 2022 10:54:25 +0000 (10:54 +0000)]
Bug 30844: The OPAC detail page's browser is limited to the current page of results when using Elasticsearch

When viewing the detail page of the first or last record of a result page,
it's not possible to browse to another page when using Elasticsearch.

To test:
1) Search for "*" in the OPAC
2) Click on the last result of the page
3) Observe that you cannot browse to the next page
4) Apply the patch
5) Search for "*" in the OPAC
6) Click on the last result of the page
7) Observe that you can browse to the next page
8) Sign off

Sponsored-by: Lund University Library
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 71f54a75713c5d5a6acfbdd3fefe1166ea0efafd)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a07e38eb1baa18741a53cd596a1ae8d1ee8cf0d9)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30726: Fix "yesterday" when limited to past dates
Jonathan Druart [Wed, 1 Jun 2022 12:36:52 +0000 (14:36 +0200)]
Bug 30726: Fix "yesterday" when limited to past dates

Test plan:
Go to "Patrons with no checkouts" report, /cgi-bin/koha/reports/borrowers_out.pl
Select "Yesterday"
=> it automatically selects the previous day's date and populates the form field

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 637c580663f2abc5005ed2c96ef324e28c4feb20)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4369c228b8291b7e9861b7bdb2ec25564866c7dc)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30746: Fix JS error on opac-memberentry
Jonathan Druart [Wed, 1 Jun 2022 12:54:34 +0000 (14:54 +0200)]
Bug 30746: Fix JS error on opac-memberentry

Empty PatronSelfRegistrationBorrowerMandatoryField and PatronSelfRegistrationBorrowerUnwantedField
Go to opac-memberentry.pl
Notice the JS error
  Uncaught TypeError: j is undefined
Apply this patch
Go to opac-memberentry.pl
=> no JS error
Fill the pref with some values
Go to opac-memberentry.pl
=> Confirm that the fields you marked as mandatory as flagged accordinly
on the UI

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ffddfb86aa5f6943012f47ee651dce9ea0891165)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30893: Fix documentation in update_patrons_category.pl
Nick Clemens [Fri, 3 Jun 2022 11:35:34 +0000 (11:35 +0000)]
Bug 30893: Fix documentation in update_patrons_category.pl

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5cf20b6ad1263d86674005b1443ac34eac17f58d)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30868: (bug 29684 follow-up) Fix borrowernumber var in template
Jonathan Druart [Tue, 31 May 2022 06:23:30 +0000 (08:23 +0200)]
Bug 30868: (bug 29684 follow-up) Fix borrowernumber var in template

borrower_data does not contain the borrowernumber, it is sent
separately.

Test plan:
1. Edit a patron record (for example: Henry Acevedo).
2. Note that the URL is http://127.0.0.1:8081/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=19
3. Change date of birth to yesterday.
4. Save.
5. Error message displayed above the Save and Cancel buttons:
   The following fields are wrong. Please fix them.
   - Patron's age is incorrect for their category. Ages allowed are 18-999.
6. Note that the URL is now http://127.0.0.1:8081/cgi-bin/koha/members/memberentry.pl
7. Fix date of birth (for example: change year to 2000).
8. Select Save.
=> Without this patch you get: "Patron not found. Return to search."
=> With this patch applied the patron's data is saved

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 9f1cfa0bd31abdf54cb2ccd9eddae674dcaedc97)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit eae79e1bd34338905fae44bc2b1e5b8ebaa5758a)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30884: Fix jQuery selector to correctly detect active tab
Slava Shishkin [Fri, 3 Jun 2022 14:47:46 +0000 (17:47 +0300)]
Bug 30884: Fix jQuery selector to correctly detect active tab

To reproduce:
1. Go to /tools/modborrowers.pl and fill form Card number list with data and click Continue.
2. It should give "No patron card numbers or borrowernumbers given." warning.
3. Using the browser inspector tool see that post fields cardnumberlist or borrowernumberlist
   is sent with empty data.

Apply the patch, and then:
1. Fill form Card number or Borrowernumber list and click Continue.
2. Get the result: table with patrons for editing or warning about not found number.
3. Using the inspector tool see that request has data from the active tab in the form.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6aa9f6dd503d5e7d2532a25e721cef2fd9ccb478)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30840: Add support for barcode filters to course reserves
Nick Clemens [Tue, 24 May 2022 18:27:30 +0000 (18:27 +0000)]
Bug 30840: Add support for barcode filters to course reserves

This bug adds support for barcode filters on the inputs in the course reserves module.

To test:
1 - Set itemBarcodeInputFilter to 'Remove spaces from'
2 - Find a barcode in your system and add spaces between each characters
    e.g. 3 9 9 9 9 0 0 0 0 0 0 8 1 8
3 - Past that barcode into the checkin box, success
4 - Browse to course reserves, ensure you have a course or create on
5 - Test adding a reserve, batch adding a reserve, and batch removing reserves
6 - The pasted barcode does not in any
7 - Apply patch and restart
8 - Pasted barcode with spaces can now successfuly be added, batch added, and batch removed from courses

Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b8a18702d291210f9d62ca9daa747ec06f2cc8f6)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 93cd916cc18e9180943cbb76ea3ba6740318a549)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 29961: Make horizontal scroll bar always visible on acqui/z3950_search.pl
Lucas Gass [Thu, 27 Jan 2022 16:55:34 +0000 (16:55 +0000)]
Bug 29961: Make horizontal scroll bar always visible on acqui/z3950_search.pl

To test:
1. In Acquisitions make a basket and add something "From an external source"
2. Search for a title and click on the 'MARC' button, make sure the MARC prview is both tall and wide.
3. You will not see the horizontal scroll bar unless you scroll all the way to the bottom of the preview.
4. Apply patch.
5. Try steps 1 & 2 again, this time you should see the horizontal scroll bar as soon as the MARC prveiw loads.

Note: I put the CSS on multiple lines for better readability

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 98c5ecd0d5bbced740c55c85ed1db226f1569b67)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e79fe19e67a5c485f0d24fe73907a7c6a98e4496)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30756: (follow-up) Restore MARC21 authority file
Tomas Cohen Arazi [Sun, 5 Jun 2022 23:24:03 +0000 (20:24 -0300)]
Bug 30756: (follow-up) Restore MARC21 authority file

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3dcb7492ecf847333a351b96171e7167a29f22ea)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30756: Rename to Koha_MetadataRecord_Authority
Marcel de Rooy [Sat, 14 May 2022 12:29:25 +0000 (12:29 +0000)]
Bug 30756: Rename to Koha_MetadataRecord_Authority

What we are actually testing here.

No test plan.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
JD amended patch: remove Dumper

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7cc6606c9723a0cf797dc3f93c8c16c230db5bbf)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30756: Further adjustments to Koha_Authority.t
Marcel de Rooy [Sat, 14 May 2022 12:07:17 +0000 (12:07 +0000)]
Bug 30756: Further adjustments to Koha_Authority.t

Remove use of exported_records file in favor of TestBuilder.
Remove conditional tests with SKIP block. Create reservoir record.

Test plan:
Run t/db_dependent/Koha_Authority.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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 24ff8b4a855680820761f6e6cfb7405526c82e2a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f70b564a18d92e9bad0c579816842ec4e719224a)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30756: Ground work for improving Koha_Authority.t
Marcel de Rooy [Sat, 14 May 2022 07:42:42 +0000 (07:42 +0000)]
Bug 30756: Ground work for improving Koha_Authority.t

Move stuff into two subtests.

Test plan:
Run t/db_dependent/Koha_Authority.t.
If you have no imported auths, you will still see skips.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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 96867a4fdcde290a260085b38b5e285c455828db)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit de503196c4d32d6f4b89bd4b9c417a544478f594)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 27697: Only preopulate search when we have found a single biblio
Nick Clemens [Wed, 18 May 2022 15:08:39 +0000 (15:08 +0000)]
Bug 27697: Only preopulate search when we have found a single biblio

This patch uses the url parameter we created in 23475 to determine whether
we should populate the search bar or not

Note - a bookmark with this param will still populate search term with last search

To test:
1 - Search staff client for 'cat'
2 - Browse to a patrons checkouts and click on a title, or just go directly to a details page:
    http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=2850
3 - Search bar says 'cat'
4 - Apply patch
5 - Repeat 1-2
6 - Search bar is not populated
7 - Search "dalek war box set" or a term that finds a single record in your instance
8 - Search bar is populated
9 - Note url like: http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=2850&found1=1

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 022330b8d26b81e53f9c4af7798fa42ff48bdaa3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c31ed9aaf124c866d14973b2deb6058197f3e64e)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30781: Fix warning in GetPreparedLetter
Fridolin Somers [Thu, 19 May 2022 03:50:13 +0000 (17:50 -1000)]
Bug 30781: Fix warning in GetPreparedLetter

Test by running :
  prove t/db_dependent/Letters.t
Check you dont see warning :
  Use of uninitialized value $val in substitution iterator

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 34b84b68e509c9172b850dad4dbc5b7e9f518225)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0783b96359e392b95538a7aca78f263ae178e1ca)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30781: Add unit test for substitute with undefined value
Fridolin Somers [Thu, 19 May 2022 03:47:18 +0000 (17:47 -1000)]
Bug 30781: Add unit test for substitute with undefined value

Add unit test that generates warn.
This may be usefull as no regression test.

Run prove t/db_dependent/Letters.t
You see warn :
t/db_dependent/Letters.t .. 1/84 Use of uninitialized value $val in substitution iterator at /kohadevbox/koha/C4/Letters.pm line 607.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2e0243c378158755660d7bc95e15ad32dd6d0ebf)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3b3b7f0ad9b46f3c17ebc8f0fda7e05184fa5547)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30337: Holds to Pull ( pendingreserves.pl ) ignores holds if priority 1 hold...
Kyle Hall [Tue, 22 Mar 2022 18:14:52 +0000 (14:14 -0400)]
Bug 30337: Holds to Pull ( pendingreserves.pl ) ignores holds if priority 1 hold is suspended

Holds to Pull ( pendingreserves.pl ) ignores holds if priority 1 hold is suspended,
and shows the wrong number of "patrons with holds" which presumably tells the
librarian how many copies to pull from the shelves.

Test Plan:
1) Create a record with one or more holdable items
2) Place two holds on the record
3) Note they show in the holds to pull report
4) Suspend the priority 2 hold
5) Note the report continues showing that 2 patrons have holds
6) Resume the priority 2 hold
7) Suspend the priority 1 hold
8) Note the hold disappears from the holds to pull report
9) Apply this patch
10) Restart all the things!
11) Reload the holds to pull report
12) The report should show one hold that needs an item pulled to fill it!

Signed-off-by: David Nind <david@davidnind.com>
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 e536229292617e2f6e5bade47e3fbad1a0101ea4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6a49c8a1b0fa18d5941d7786a1fadb25581c00d7)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30523: Quiet console warning about missing shortcut-buttons map file
Owen Leonard [Wed, 13 Apr 2022 12:18:13 +0000 (12:18 +0000)]
Bug 30523: Quiet console warning about missing shortcut-buttons map file

This patch updates the Flatpickr plugin shortcut-buttons which adds the
"Yesterday," "Today," and "Tomorrow" links to Flatpickr widgets.  This
updates it to the latest version, 0.4.0.

The file is modified in two ways: The version information is added to
the top of the file, and the sourceMappingURL line is removed from the
bottom. This quiets browser console warnings about a missing map file.

To test:
- apply the patch and clear your browser cache.
- Go to Circulation -> Check out and check out to a patron.
- Click "Checkout settings" and click the "Specify due date" field.
- In the pop-up calendar, test all controls, including the shortcut
  links, to confirm that everything works as before.
- In the browser console there should be no warning related to
  shortcut-buttons-flatpickr. (Firefox didn't have the warning, Chromium
  can be used.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9371bc6ef3c70079ce7d2d2a79b2d105e8fbab7a)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 28723: Replace "No title" by an empty string
Julian Maurice [Tue, 31 May 2022 09:36:37 +0000 (11:36 +0200)]
Bug 28723: Replace "No title" by an empty string

This is to be consistent with what is done in checkouts.js

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ccbe7141f93c9a652f28060d705d2f91f45a1342)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 28723: Fix holds table display when a biblio has no title
Julian Maurice [Tue, 20 Jul 2021 12:45:35 +0000 (14:45 +0200)]
Bug 28723: Fix holds table display when a biblio has no title

Test plan:
1. Create a biblio without title, then create an item for this biblio.
2. Place a hold on it.
3. Go to the patron detail page and click on the Holds tab
4. Confirm that holds are correctly 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 35874fa380707ba8eedda825e9cdc7ad47755958)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 95172bffec604385f557fb56366cf44720248f0c)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30731: Remove Readonly::XS::MAGIC_COOKIE
Marcel de Rooy [Thu, 12 May 2022 07:05:50 +0000 (07:05 +0000)]
Bug 30731: Remove Readonly::XS::MAGIC_COOKIE

This variable does not make sense anymore, since the Readonly::XS
module is not listed in the cpanfile. So it will not be required
the versions_info loop.

Test plan:
Run t/Installer_PerlModules.t again.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 900aa4bf51b131c9f362cb647edf1bb0de2fbcc0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dbb9d056029e32c860c9484f8db990bf0aa4fce0)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30731: Silence noisy CPAN modules in C4::Installer::PerlModules
Marcel de Rooy [Wed, 11 May 2022 14:26:06 +0000 (14:26 +0000)]
Bug 30731: Silence noisy CPAN modules in C4::Installer::PerlModules

Main change is replacing 'no warnings' by local $SIG{__WARN__}.

The modules are sorted now too. This will make results of requiring
them one after the other a more predictable experience and improves
the output of koha_perl_deps.

Test plan:
Run about. Check plack intranet log.
Run koha_perl_deps.pl -a

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit da1115336bfab44eb9eebaae214c355fa19fc36d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 847c25500322c74e1ee4c7612419be92f7f467e9)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30731: Unit tests
Marcel de Rooy [Wed, 11 May 2022 14:35:18 +0000 (14:35 +0000)]
Bug 30731: Unit tests

Installer_pm.t can safely be discarded, having Installer_PerlModules.t.

Note: Without the second patch, the test about versions_info being silent
might fail. With the second patch, it should pass.
Note that since the order of requiring the cpan modules varies (without
the second patch), the results (potential warnings) vary too.

Test plan:
Run t/Installer_PerlModules.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2265739a378c1d31c5ea3d4beb07cbaa4d04e62b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 39e250a6f3d3e1bdf0fa1c00359a4823b77b5083)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30828: Remove useless 'type' parameter in placerequest.pl
Joonas Kylmälä [Sat, 21 May 2022 19:23:32 +0000 (19:23 +0000)]
Bug 30828: Remove useless 'type' parameter in placerequest.pl

To test:
 1) Grep for placerequest.pl in the source code and check that
    request.tt is the only place where the type parameter is passed.

Signed-off-by: David Nind <david@davidnind.com>
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 54a6c73c6d6e94554b7e4c15554e08d79e3eb578)
(cherry picked from commit 88f257ba55e4f0a4c58c0f64815b9995b7072080)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoTranslation updates for Koha 21.11.07
Koha translators [Tue, 21 Jun 2022 07:18:37 +0000 (04:18 -0300)]
Translation updates for Koha 21.11.07

2 years agoBug 28955: Impact News as well
Jonathan Druart [Fri, 18 Feb 2022 14:54:56 +0000 (15:54 +0100)]
Bug 28955: Impact News as well

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 28955: (follow-up) Set to fall back
Martin Renvoize [Wed, 15 Dec 2021 14:36:47 +0000 (14:36 +0000)]
Bug 28955: (follow-up) Set to fall back

This patch updates the original fix to only set the template parameter
for opac sessions and updates all occurences in templats to check first
for logged_in_user.branchcode before falling back to default_branch

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 28955: Add OPAC_BRANCH_DEFAULT
Martin Renvoize [Wed, 27 Oct 2021 10:27:18 +0000 (11:27 +0100)]
Bug 28955: Add OPAC_BRANCH_DEFAULT

This patch adds support for OPAC_BRANCH_DEFAULT as an environment option
that can be passed via apache with either SetEnv or as a header for
plack.  It allows setting a default branch for the anonymous opac
session such that you can display the right opac content blocks prior to
login if you have set up per branch URI's.

To test (on top of bug 29691)
1 - Add to apache conf (/etc/apache2/sites-available/kohadev.conf)
    SetEnv OPAC_BRANCH_DEFAULT "CPL"
    RequestHeader add X-Koha-SetEnv "OPAC_BRANCH_DEFAULT CPL"
2 - Restart all
3 - Confirm that news for all and CPL show on opac mainpage
4 - Sign in as a different library
5 - Confirm users library news shows

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30717: (QA follow-up) Move to module
Marcel de Rooy [Fri, 13 May 2022 07:29:04 +0000 (07:29 +0000)]
Bug 30717: (QA follow-up) Move to module

We will probably use this a bit more :)
Let's put it in a module (with a trivial test).

Test plan:
Repeat item edit.
Run  t/DateUtils.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e0814f2cc051d52a128a2f23f76169cd2e2716a3)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30717: Format dates when editing items
Jonathan Druart [Mon, 9 May 2022 08:28:51 +0000 (10:28 +0200)]
Bug 30717: Format dates when editing items

This is a result of bug 29369 and bug 27526.
Bug 29369 removed the format of the dates, and bug 27526 assumed that it
was the correct behaviour.

Here we don't want to let the controller know which fields is a date, or
we will have to access the subfield structure to know which subfields
have the "date cataloguing plugin".

This patch suggests to use the altFormat options from flatpickr that
will "Show the user a readable date (as per altFormat), but return
something totally different to the server."

It's actually an option we want to use for all our dates, that will
reduce a lot the overhead in our controllers.

Test plan:
Edit items (additem.pl and in batch) and confirm that the subfields
using the dateaccessioned plugin are displayed according to the
dateformat syspref. Make sure the date is stored correctly.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a3870cc25b40379e0f538c3b3c08fb8fe3540a8e)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30742: Prevent placing holds on items/records where all items notforloan Bug...
Nick Clemens [Thu, 9 Jun 2022 15:27:56 +0000 (15:27 +0000)]
Bug 30742: Prevent placing holds on items/records where all items notforloan Bug 30742: Remove 'bad_bibs' and send a list of holdable bibs Bug 30892: (bug 30742 follow-up) Send single bib as a holdable bib

Rebeased/rewritten patch - includes fix from 30892

This patch does a few things:
1 - Adds itemtype not for loan status to display
2 - Adds a conditional to display notforlaon status as the reason a hold cannot be placed
3 - Seperates the lower 'Place hold(s)' buttons for single and multi holds into two template sections
4 - Handles the case where all bibs in a multi hold have no items available
5 - Disables the button for single hlds when all items are unavailable

To test:
 1 - Find or create a record with all items of itemtype marked 'notforloan'
 2 - Attempt to place single hold on this record from staff client
 3 - See one disab;ed button, one enabled 'Place holds' button
 4 - Click 'Place holds' - hold placed
 5 - Cancel hold
 6 - Place multiple holds with some bibs that can be held, and this one that cannot
 7 - Notice message that 'Cannot place hold on some items'
 8 - Click 'Place holds' - hold is generated for the notforloan bib
 9 - Apply patch
10 - Place single hold
11 - Note you now see not for loan status on items
12 - Note the red x also includes message abnout not for loan status
13 - Note the 'Place hold' button is disabled
14 - Attempt multi hold
15 - Message now includes "No items available: One or more records have no items that can be held"
16 - Click 'Place holds'
17 - Above still places the hold - this is for a followup patch

Currently place request gets a list of bad_bibs that is created via javascript on the
template. It ignores this list

Ths patch instead doesn't add info for bad bibs, and provides a list of the bibs that
can be held

To test:
1 - Attempt multi hold with some items that can be held, and one that cannot due to notforloan
2 - Fill in pickup locations and place hold
3 - Note hold is place on bib with no avilable items and hsows twice in results
4 - Apply patch
5 - repeat with another patron
6 - Note no aidditonal hold on record with notforloan items
7 - Note with with not for loan items appears only once in results

Bug 30892
To test:
1. Try placing hold
2. Everything seems to work but no hold gets placed.
3. Apply patch
4. Verify holds are no placed correctly.

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 29860: Remove item type-related warnings
Tomas Cohen Arazi [Wed, 12 Jan 2022 14:15:10 +0000 (11:15 -0300)]
Bug 29860: Remove item type-related warnings

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/selenium/regressions.t
=> FAIL: You see several
item-level_itypes set but no itemtype set for item (985) at /kohadevbox/koha/Koha/Schema/Result/Item.pm line 905.
2. Apply this patch
3. Repeat 1
=> SUCCESS: No more item type warnings
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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 169c535e880bf1233622042cab76351b7dbc65ca)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 57a58a79b4f82afba57020370fa0ebb38a7f44ce)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30721: Markup error in detail page's component parts tab
Owen Leonard [Mon, 9 May 2022 15:22:16 +0000 (15:22 +0000)]
Bug 30721: Markup error in detail page's component parts tab

This patch adds a missing </div> to the bibliographic detail
page template in the section for showing component parts.
Some comments are added to clarify the markup structure.

To test you should have a record in your catalog with component
parts. Bug 11175 provides one you can import if necessary:
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=78023

To see the error, go to the staff interface, locate the record
in question and view the detail page. Under the Components tag,
scroll to the bottom. You will see content from "later" tabs at
the bottom, e.g. "There is no order for this bibliographic record"
or "No images have been uploaded for this bibliograhpic record yet."

Apply the patch and reload the page. The tabs should still look
correct, and now the tab content should be correctly isolated.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 656e864e6b3234a5d493bd2b44bc3b831bd458f1)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30862: Typo: langues
Caroline Cyr La Rose [Fri, 27 May 2022 21:52:06 +0000 (17:52 -0400)]
Bug 30862: Typo: langues

This patch changes the word 'langues' to 'languages' in the description
of the following system preferences:

- OPACXSLTDetailsDisplay

- OPACXSLTListsDisplay

- OPACXSLTResultsDisplay

- XSLTDetailsDisplay

- XSLTListsDisplay

- XSLTResultsDisplay

To test:
1- Apply patch
2- Check the aforementioned system preferences and make sure the descriptions say 'languages'

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 58de13cb9a5efa3fd9c9fd50865eea62ee18ec5b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 706c478a406422d8dff26d13bf97dbbc12526a1a)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30528: Process limits before handling CCL query
Nick Clemens [Thu, 14 Apr 2022 12:20:09 +0000 (12:20 +0000)]
Bug 30528: Process limits before handling CCL query

This patch moves the code that handles limit processing before that for CCL queries to ensure that special limit cases (branch, multibranch, etc) are handled before adding the limits to the query string

To test:
1 - Apply unit tests patch only
2 - prove -v t/db_dependent/Search.t
3 - It fails
4 - Apply this patch
5 - It passes!
6 - Test searching and confirm things work as epxected

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2da14cf8c10c2d5165220e6657b279b37aa02f81)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit eb07e2c47560caabd9f3b4b1469db6fbaa394867)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30528: Unit tests
Nick Clemens [Thu, 14 Apr 2022 12:19:22 +0000 (12:19 +0000)]
Bug 30528: Unit tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fde3aefba821c43554adaa53324c81cbe7d2d95a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f9290c5465214bea72c7aa3f0a98d85260ab525f)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30870: Don't skip tests if Test::Deep if not installed
Jonathan Druart [Tue, 31 May 2022 09:29:57 +0000 (11:29 +0200)]
Bug 30870: Don't skip tests if Test::Deep if not installed

We are using Test::Deep in different tests, but from t/db_dependent/Koha.t the tests are skippted if the module is not installed.
We must assume the module is installed

Test plan:
  prove t/db_dependent/Koha.t
should return green in ktd

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 42290cb43deb7dde668d9a55467c44ba705e665c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a97d5c93ab61a790f1d25b770682c9832fb8e9de)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 29883: Add test
Jonathan Druart [Tue, 31 May 2022 09:26:36 +0000 (11:26 +0200)]
Bug 29883: Add test

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 26272432a106d8d1b560548aa70dc91aaaa31ced)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 29883: avoid uninitialized value warn in GetAuthorisedValues sub
Petro Vashchuk [Fri, 14 Jan 2022 09:57:39 +0000 (11:57 +0200)]
Bug 29883: avoid uninitialized value warn in GetAuthorisedValues sub

GetAuthorisedValues is defined with optional parameter $category but it
is instantly interpolated without preventing "Use of uninitialized value
$category in concatenation (.) or string at .../C4/Koha.pm line 491."
warning.
As category param is optional, we can avoid throwing that warn as it is
something that can happen and is not an actual error:
C<$category> returns authorized values for just one category (optional).

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 44e126bcc7fae369e13c533eea79f00ef41f2ff1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 36cbd69763dc8e8162781ee22bc7d5e234443b9d)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30831: Unit test
Nick Clemens [Mon, 23 May 2022 12:18:11 +0000 (12:18 +0000)]
Bug 30831: Unit test

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>
Edit: minor typo fix
(cherry picked from commit f08951f044e2cdac7a9bdf4cdfb6897b9de9e1f2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f9bdca4adff37dabf01322b0e287675af9c1a21c)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30830: Add Koha Objects for Koha Import Items
Nick Clemens [Mon, 23 May 2022 12:25:53 +0000 (12:25 +0000)]
Bug 30830: Add Koha Objects for Koha Import Items

To test:
prove -v t/db_dependent/Koha/Import/Record/Items.t

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 6cd0249725f211f0df77ba367c379f0e5c5e1d4e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a0790249cb5b6ad5c9dfbeee03bc1d8276947bf2)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 28152: Log the "duplicate item barcode" error
Jonathan Druart [Mon, 10 Jan 2022 10:22:54 +0000 (11:22 +0100)]
Bug 28152: Log the "duplicate item barcode" error

Looking at the code this 'import_error' column is empty for the last 9 years. Not sure it makes much sense to have this single error now.

commit 1dba9c6409d78cb1f90de6c1300cb5b63fb1b851
Date:   Wed Oct 10 14:21:22 2012 -0500
    Bug 7131: teach MARC import how to overlay items

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Nick Clemens <nick@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 3c0c375d8e073c9eb765179fa7b3c3d0136b5174)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2d19940f7e6a3b50e3dedee909a419cf1923a2e4)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 28152: Fix import_items row creation if duplicate barcode
Jonathan Druart [Thu, 15 Apr 2021 10:12:23 +0000 (12:12 +0200)]
Bug 28152: Fix import_items row creation if duplicate barcode

We are trying to insert "duplicate item barcode" into import_items.itemnumber (integer),
it fails with "Incorrect integer value: 'duplicate item barcode' for column 'itemnumber' at row 1"

To reproduce:
Export a biblio with an item
Import it
=> The item is not added, and there is no new row in import_items.

The error only appears in the log if you comment the close STDERR and
close STDOUT lines

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Nick Clemens <nick@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 c7a8a456c7dcc0bc2a015968f7a2c0e9ac2370f0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e5d97a001d3b70d1a2e436fd490c2820f448784f)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 29828: Prevent additional content to be created without default
Jonathan Druart [Mon, 10 Jan 2022 09:15:35 +0000 (10:15 +0100)]
Bug 29828: Prevent additional content to be created without default

When creating or editing an additional content, the form is submitted if
only the title of the 'default' tab is filled in.
We should submit the form only if both title and content exist.

Test plan:
Create a new content using text editor (codemirror)
Confirm that the form is submitted only if title and content from the
default tab are not empty
Try again with wysiwyg (tinymce)

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 05934b89b1b43ceb88928b48a4e1fd69708ac61b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit be11af15e61653f2f853a22870468bc8987fbdd4)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30204: Add subtitle to serial search results
Lucas Gass [Tue, 1 Mar 2022 16:11:40 +0000 (16:11 +0000)]
Bug 30204: Add subtitle to serial search results

To test:
1. Make some new serial subscriptions and connect them to biblios that contain subtitles.
2. Do a serial search that will return your newly created subscription.
3. Notice the subtitle doesn't appear.
4. Apply patch and restart_all
5. Again try step 2.
6. Notice the subtitle appears alongside the title now.
7. Make sure it still sorts that column correctly.

Signed-off-by: shiyao <shiyao@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 30204: Add unit test
Kyle M Hall [Tue, 5 Apr 2022 16:54:37 +0000 (12:54 -0400)]
Bug 30204: Add unit test

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 29617: exclude categorycode from BorrowerUnwantedField
Lucas Gass [Thu, 2 Dec 2021 01:36:26 +0000 (01:36 +0000)]
Bug 29617: exclude categorycode from BorrowerUnwantedField

To test:
1. Go to BorrowerUnwantedField and select categorycode as unwanted
2. Try adding a new patron, you will see an error message in the staff client "Something went wrong when creating the patron. Check the logs." You will be unable to make a new patron.
3. Apply patch
4. Go to BorrowerUnwantedField, you are unable to exlcude it. Patrons need categorycodes

Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoUpdate release notes for 21.11.06 release v21.11.06
Kyle Hall [Wed, 25 May 2022 16:04:09 +0000 (12:04 -0400)]
Update release notes for 21.11.06 release

2 years agoIncrement version for 21.11.06 release
Kyle Hall [Wed, 25 May 2022 15:21:00 +0000 (11:21 -0400)]
Increment version for 21.11.06 release

Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
2 years agoFix translations for Koha 21.11.06
Kyle Hall [Wed, 25 May 2022 15:15:35 +0000 (11:15 -0400)]
Fix translations for Koha 21.11.06

Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
2 years agoTranslation updates for Koha 21.11.06
Koha translators [Wed, 25 May 2022 14:02:04 +0000 (11:02 -0300)]
Translation updates for Koha 21.11.06

2 years agoBug 30663: Implement overrides handling in POST /suggestions
Tomas Cohen Arazi [Tue, 3 May 2022 14:23:23 +0000 (11:23 -0300)]
Bug 30663: Implement overrides handling in POST /suggestions

This patch implements the override checks in the controller as expected
by the previous patch.

To test:
1. Apply this bug patches up to 'Add x-koha-override options...'
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/suggestions.t
=> FAIL: Tests fail! The controller doesn't care about overrides or
         sysprefs about suggestions limits.
3. Apply this patch
4. Repeat 2
=> SUCCESS: Things work!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 30663: Add x-koha-override options to /suggestions
Tomas Cohen Arazi [Tue, 3 May 2022 14:20:46 +0000 (11:20 -0300)]
Bug 30663: Add x-koha-override options to /suggestions

This patch adds the x-koha-override header parameter to the route that
is used to create suggestions, POST /suggestions.

The idea is that adding suggestions will be rejected under certain
conditions unless x-koha-override is passed with appropriate values. The
added overrides are:

* any
* max_total
* max_pending

Tests are added for the expected behavior.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 30354: Don't assign warn as letter
Nick Clemens [Thu, 24 Mar 2022 15:31:05 +0000 (15:31 +0000)]
Bug 30354: Don't assign warn as letter

TO test:
1 - Check out an item marked for autop renewal to a patron and make it overdue
2 - Set system preference AutoRenewalNotices to follow messaging prefs
3 - set that borrower to receive both email and SMS AUTO_RENEWALS_DGST
4 - confirm your AUTO_RENEWALS_DGST does not have SMS content but does have email
5 - run the auto_renew cron
6 - item is renewed, but error from cron, and cron dies:

No circulation AUTO_RENEWALS_DGST letter transported by sms at /kohadevbox/koha/C4/Letters.pm line 583.
no letter of type 'AUTO_RENEWALS_DGST' found for borrowernumber 5. Please see sample_notices.sql at misc/cronjobs/automatic_renewals.pl line 305.
Can't use string ("1") as a HASH ref while "strict refs" in use at /kohadevbox/koha/C4/Letters.pm line 898.

7 - Apply patch
8 - Make item eligible for auto renewal agian (or checkin/checkout)
9 - Run the cron
10 - There is still 2 warn, but cron does not die:

No circulation AUTO_RENEWALS_DGST letter transported by sms at /kohadevbox/koha/C4/Letters.pm line 583.
no letter of type 'AUTO_RENEWALS_DGST' found for borrowernumber 5. Please see sample_notices.sql at misc/cronjobs/    automatic_renewals.pl line 305.

11 - Patron receives email and item is renewed

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 30572: (QA follow-up) Fix failing unit test
Martin Renvoize [Thu, 5 May 2022 16:12:29 +0000 (17:12 +0100)]
Bug 30572: (QA follow-up) Fix failing unit test

We changed from 'null' being meainingful to using a tinyint and
explicitly requiring '0'.  This patch simply updates the unit test to
reflect that change.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 30663: Add Koha::Suggestions helper methods
Tomas Cohen Arazi [Tue, 3 May 2022 14:18:10 +0000 (11:18 -0300)]
Bug 30663: Add Koha::Suggestions helper methods

This patch adds the following helper methods:

* filter_by_pending
* filter_by_suggested_days_range

This methods follow basically what's done in opac-suggestions.pl
I chose 'pending' as opposed to 'open' to follow what we use in the UI
which might be the case because of being more accurate for end users.

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 years agoBug 10517: (QA follow-up) No need to remove second true
Marcel de Rooy [Fri, 29 Apr 2022 09:18:24 +0000 (09:18 +0000)]
Bug 10517: (QA follow-up) No need to remove second true

This is just theoretical, but by removing the second true you
could end the script on another error.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 10517: Use `DROP USER IF EXISTS` and remove ` || true`.
Rudolf Byker [Wed, 8 Jan 2020 09:20:02 +0000 (11:20 +0200)]
Bug 10517: Use `DROP USER IF EXISTS` and remove ` || true`.

When restoring a Koha instance, and the database user does not exist, an error is shown,
although it is prevented from stopping the script by ` || true`. This patch removes the
` || true` guard, and rather uses `DROP USER IF EXISTS` which does exactly what one
would expect, without confusing error messages, whether the user existed or not.

To test:
1) Assume your Koha instance is called `asdf`.
1) Export the Koha instance using `koha-dump`.
2) Remove the instance completely using `koha-remove`.
3) Import it again using `koha-restore`.
4) No error should be shown, and the import should work. There was NO user to drop, therefore `DROP USER IF EXISTS` did nothing.
5) A database user called `koha_asdf` should exist, and have all privileges on the database of the same name.
6) Remove the instance again using `koha-remove`.
7) Now create a database user in MySQL called `koha_instance` where instance is the name of your dumped koha instance.
8) Import your koha instance again using `koha-restore`.
9) Again, no error should be shown, and the import should work. There WAS a user to drop, therefore `DROP USER IF EXISTS` dropped the user before creating a new one.
10) Again, a database user called `koha_asdf` should exist, and have all privileges on the database of the same name.

Sponsored-by: Reformational Study Centre
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 30143: OAI-PMH: Fix SQL query used to fetch deleted records
Ere Maijala [Mon, 21 Feb 2022 14:07:00 +0000 (16:07 +0200)]
Bug 30143: OAI-PMH: Fix SQL query used to fetch deleted records

The query was missing the "ORDER BY" and "LIMIT" clauses, which could make retrieve a wrong set of records.

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 29537: Remove unnecessary if-else checks for soonest renew date
Nick Clemens [Thu, 24 Mar 2022 11:42:55 +0000 (11:42 +0000)]
Bug 29537: Remove unnecessary if-else checks for soonest renew date

GetSoonestRenewDate() calculates the renewal due date now also
correctly for auto-renewals after the fixes from bug 29476 so we don't
have to add any if-else checks because of it being buggy anymore.

To test:
 1) prove t/db_dependent/Circulation.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 30628: Fix patron selection in batch patron modification tool
Jonathan Druart [Thu, 28 Apr 2022 08:32:28 +0000 (10:32 +0200)]
Bug 30628: Fix patron selection in batch patron modification tool

bug 28014 added Datatables to this view, but the form is submitted with
only the checkboxes from the first page.

Solution adapted from https://stackoverflow.com/questions/33240409/how-to-submit-checkboxes-from-all-pages-with-jquery-datatables

Test plan:
Have more than 20 cardnumbers, use the batch patron modification tool
Select (not all) patrons from the first page and second page
Submit the form
Notice that the patrons you have selected appear on the confirmation
page.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 30599: Add an 'Archive selected' button
Nick Clemens [Fri, 22 Apr 2022 19:15:43 +0000 (19:15 +0000)]
Bug 30599: Add an 'Archive selected' button

This patch simply adds a new button on the suggestions interface to allow
for archiving multiple suggestions.

To test:
1 - Apply patch
2 - Create some purchase suggestions
3 - Select several suggestions
4 - Click 'Archive selected'
5 - Suggestions are archived
6 - You can view archived suggestions by selecting 'Suggestion information'->'Include archived'

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Felicity Brown <felicity.brown@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 30620: Add a warning about /*!VERSION lines in kohastructure
Marcel de Rooy [Tue, 26 Apr 2022 11:45:52 +0000 (11:45 +0000)]
Bug 30620: Add a warning about /*!VERSION lines in kohastructure

Also adding a similar comment in C4::Installer.

No test plan, just documentation.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 22379: Unit tests for CancelHold service
Arthur Suzuki [Mon, 27 Jan 2020 04:41:05 +0000 (05:41 +0100)]
Bug 22379: Unit tests for CancelHold service

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 22379: Fix checks not made by ILS-DI method CancelHold
Arthur Suzuki [Wed, 20 Feb 2019 20:15:44 +0000 (21:15 +0100)]
Bug 22379: Fix checks not made by ILS-DI method CancelHold

Disable the possibility for a borrower to cancel a reservation
which is either in a Transit or Waiting state.
This reproduce the behaviour seen on the OPAC.
Also replaces previous checks on the borrowernumber
since CanReserveBeCanceledFromOpac already checks this.

--------------------------------

Test plan (before patch) :
-Put a reserve for a borrower
-Try to cancel the reserve providing another borrowernumber as argument
-> Should fail and reply "RecordNotFound"
-> Reserve still appears in the list of holds.

-Try to cancel the reserve providing the borrowernumber the reserve is
for.
-> Should succeed, reply with "Canceled"
-> Reserve do not show up in the list of holds for the borrower

-Put a new reserve with a pickup branch != from the homebranch
-Transfer the item to the pickup branch (reserve status = Transit)
-Try to cancel the reserve (with proper borrowernumber)
-> Should succeed, reply with "Canceled"
-> Reserve do not show up in the list of holds for the borrower

-Checkout the reserved item in the pickup branch (reserve status =
Waiting)
-Try to cancel the reserve (with proper borrowernumber)
-> Should succeed, reply with "Canceled"
-> Reserve do not show up in the list of holds for the borrower

--------------------------------

Test plan (after patch) :
-Put a reserve for a borrower
-Try to cancel the reserve providing another borrowernumber as argument
-> Should fail and reply "BorrowerCannotCancelHold"
-> Reserve still appears in the list of holds.

-Try to cancel the reserve providing the borrowernumber the reserve is
for.
-> Should succeed, reply with "Canceled"
-> Reserve do not show up in the list of holds for the borrower

-Put a new reserve with a pickup branch != from the homebranch
-Transfer the item to the pickup branch (reserve status = Transit)
-Try to cancel the reserve (with proper borrowernumber)
-> Should fail and reply "BorrowerCannotCancelHold"
-> Reserve still appears in the list of holds.

-Checkout the reserved item in the pickup branch (reserve status =
Waiting)
-Try to cancel the reserve (with proper borrowernumber)
-> Should fail and reply "BorrowerCannotCancelHold"
-> Reserve still appears in the list of holds.

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 30597: Update RestrictionBlockRenewing description to include auto renew
Andrew Fuerste-Henry [Fri, 22 Apr 2022 16:12:50 +0000 (16:12 +0000)]
Bug 30597: Update RestrictionBlockRenewing description to include auto renew

To test:
- apply the patch, find the syspref, see the new wording

To confirm the behavior:
- set the syspref to Block
- give a patron an auto-renewing checkout and a restriction
- run automatic_renewal.pl, see item does not renew
- switch syspref to allow, repeat, see renewal

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 30366: Remove warn when running automatic_item_modification_by_age.pl
Fridolin Somers [Mon, 25 Apr 2022 20:27:54 +0000 (10:27 -1000)]
Bug 30366: Remove warn when running automatic_item_modification_by_age.pl

When using the ./misc/cronjobs/automatic_item_modification_by_age.pl -v
after setting up rules under Tools > Automatic item modifications by
age the script outputs several lines of warnings:

Use of uninitialized value in string eq at /kohadevbox/koha/C4/Items.pm
line 1864.

This is because even when there is no condition defined, modification
rule is stored with empty hash, like :
[{"substitutions":[{"field":"items.new_status","value":"0"}],"conditions":[{}],"age":"60","agefield":"items.dateaccessioned"}]

Test plan :
1) Go to Tools > Automatic item modifications by age
2) Create a rule with no conditions, just a substitution
3) Run misc/cronjobs/automatic_item_modification_by_age.pl -v
4) Check there is no warning
5) Edit the rule to add a condition
6) Run misc/cronjobs/automatic_item_modification_by_age.pl -v
7) Check the condition is applied

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 30572: DBRev 21.11.05.005
Kyle Hall [Fri, 6 May 2022 18:01:05 +0000 (14:01 -0400)]
Bug 30572: DBRev 21.11.05.005

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 30572: DBIx schema change for SearchMarcToField
Marcel de Rooy [Thu, 21 Apr 2022 12:41:08 +0000 (12:41 +0000)]
Bug 30572: DBIx schema change for SearchMarcToField

No test plan.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 30572: Dbrev for search_marc_to_field.sort
Marcel de Rooy [Thu, 21 Apr 2022 12:42:53 +0000 (12:42 +0000)]
Bug 30572: Dbrev for search_marc_to_field.sort

Test plan:
Run updatedatabase.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 30572: Adjust search_marc_to_field.sort in kohastructure
Marcel de Rooy [Thu, 21 Apr 2022 12:29:48 +0000 (12:29 +0000)]
Bug 30572: Adjust search_marc_to_field.sort in kohastructure

Test plan:
New install or run kohastructure on empty database.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 20449: DBRev 21.11.05.004
Kyle Hall [Fri, 6 May 2022 17:57:04 +0000 (13:57 -0400)]
Bug 20449: DBRev 21.11.05.004

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 30449: (QA follow-up) Report back on problematic situations
Tomas Cohen Arazi [Mon, 25 Apr 2022 13:09:41 +0000 (10:09 -0300)]
Bug 30449: (QA follow-up) Report back on problematic situations

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 30449: DBIC updates
Tomas Cohen Arazi [Mon, 25 Apr 2022 12:51:24 +0000 (09:51 -0300)]
Bug 30449: DBIC updates

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 30449: Add missing FK constraint on borrower_attribute_types
Marcel de Rooy [Mon, 4 Apr 2022 13:20:37 +0000 (13:20 +0000)]
Bug 30449: Add missing FK constraint on borrower_attribute_types

Old Koha databases probably have it, newer ones might not.
See also BZ description.

Test plan:
[1} Check SHOW CREATE TABLE borrower_attribute_types to see if you
    have any index and FK constraint on category_code.
[2] Run updatedatabase.
[3] If you had category_code_fk, it should be replaced.
[4] Remove index and constraint again using things like:
    alter table borrower_attribute_types drop constraint `borrower_attribute_types_ibfk_1`;
    alter table borrower_attribute_types drop index category_code;
[5] Run updatedatabase.
[6] You should have KEY category_code and FK borrower_attribute_types_ibfk_1.
[7] Run updatedatabase. Idempotent, no changes.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 30610: Update on click binding for print receipt
Martin Renvoize [Mon, 25 Apr 2022 14:37:33 +0000 (15:37 +0100)]
Bug 30610: Update on click binding for print receipt

This patch updates the binding for the on click even of the print
receipt button so that subsequent pages in the datatable work with the
reciept printing button.

Test plan
1) Enable cash management and process enough transactions to display
   more than one page of transactions in the register details page.
2) Confirm the 'Print receipt' button works on the first page of
   transactions
3) Confirm the 'Print receipt' button works on subsequent transactions
   pages in the datatable.
4) Confirm the same for the past transactions table.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 30565: DBRev 21.11.05.003
Kyle Hall [Fri, 6 May 2022 17:54:30 +0000 (13:54 -0400)]
Bug 30565: DBRev 21.11.05.003

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 30565: DBIx schema change for stockrotationrotas
Marcel de Rooy [Wed, 20 Apr 2022 11:37:31 +0000 (11:37 +0000)]
Bug 30565: DBIx schema change for stockrotationrotas

No test plan.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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>
2 years agoBug 30565: Database revision for stockrotationrotas
Marcel de Rooy [Wed, 20 Apr 2022 11:29:58 +0000 (11:29 +0000)]
Bug 30565: Database revision for stockrotationrotas

Add unique key if needed.
Adjust description column to make it NOT NULL.

Test plan:
(Optionally:) Drop unique key, make description nullable.
Run dbrev.
Check if unique key present, and description not-nullable.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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>
2 years agoBug 30565: Correct kohastructure
Marcel de Rooy [Wed, 20 Apr 2022 11:22:15 +0000 (11:22 +0000)]
Bug 30565: Correct kohastructure

The unique key was added in a dbrev and is referred to in code.
But forgotten in kohastructure.

Test plan:
Run new install or kohastructure.sql on empty db.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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>
2 years agoBug 30630: Prevent crash on check-in if HoldsAutoFill is ON
Jonathan Druart [Thu, 28 Apr 2022 07:43:06 +0000 (09:43 +0200)]
Bug 30630: Prevent crash on check-in if HoldsAutoFill is ON

RevertWaitingStatus has already removed the itemnumber from the hold, passing $itemnumber (from scanned item) should work, as it will reattach the hold to the item

Test plan:
1 - Enable HoldsAutoFill
2 - Place a title level hold
3 - Check in an item and confirm hold
4 - Switch to another branch
5 - Checkin the item
Without this patch you got
Can't call method "biblionumber" on an undefined value at /kohadevbox/koha/C4/Reserves.pm line 1577.
 at /kohadevbox/koha/C4/Reserves.pm line 1576
With this patch applied the operation succeeds

Signed-off-by: David Nind <david@davidnind.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>
2 years agoBug 24001: (follow-up) Fix t_Profile.t
Fridolin Somers [Fri, 29 Apr 2022 06:24:45 +0000 (20:24 -1000)]
Bug 24001: (follow-up) Fix t_Profile.t

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 24001: Fix Card template/rpinter profile creation and edit
Nick Clemens [Fri, 4 Mar 2022 16:19:35 +0000 (16:19 +0000)]
Bug 24001: Fix Card template/rpinter profile creation and edit

This patch adjusts the template/profiles to use the default of '0'
This should probably be NULL, and the columns foreign keys, this code
could use a further rewrite, but this should fix a long standing bug

To test:
 1 - Using the fresh install, with all the sample data.
 2 - Go to Home › Tools › Patron card creator › Templates
 3 - New > Card template
 4 - Save
 5 - Error: DBD::mysql::st execute failed: Incorrect integer value: '' for column 'profile_id' at row 1
 6 - Edit an existing template
 7 - Save
 8 - Error: Can't bless non-reference value at /kohadevbox/koha/C4/Creators/Profile.pm line 89
 9 - Create a new 'Printer profile'
10 - Save
11 - Error: DBD::mysql::st execute failed: Incorrect integer value: '' for column 'template_id' at row 1
12 - Apply the attached patch.
13 - Verify you can create a new 'Card template' and 'Printer profile' with no errors
14 - Verify you can edit and save both of the newly created objects above

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 24001: Fix patron card template edition
Blou [Tue, 30 Jun 2020 16:50:09 +0000 (12:50 -0400)]
Bug 24001: Fix patron card template edition

Error when saving Patron card Template:
Can't bless non-reference value at
/home/vagrant/kohaclone/C4/Creators/Profile.pm line 89

This is caused by the profile dropdown offering invalid choices and is
fixed by adding a filter to limit options to creator = 'Patroncards'.
The UI already handles the case where no valid profile is avaiable.

Signed-off-by: Alexis Ripetti <alexis.ripetti@inLibro.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 29092: DBRev 21.11.05.002
Kyle Hall [Fri, 6 May 2022 17:45:24 +0000 (13:45 -0400)]
Bug 29092: DBRev 21.11.05.002

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 29092: Add timestamp to account-fines table column settings
Emmi Takkinen [Thu, 21 Apr 2022 06:27:17 +0000 (09:27 +0300)]
Bug 29092: Add timestamp to account-fines table column settings

Table settings for the account_fines table (in the Patrons section, the
"Transactions" table in a patron account) are missing a checkbox for the
"Updated On" column. Because of this, one cannot hide the Updated On
column and any other values one sets here get applied to the wrong
columns.

This patch adds timestamp to account-fines column settings.
To test:

1) Navigate to columns settings page and modify account-fines tables
   column.
   => Note that if you hide e.g. account_type column, column
   credit_number is hidden on patrons account page
2) Apply patch and update database.
   => Account-fines column settings has now a option to hide timestamp.
   => Correct columns should now be hidden.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 29077: (follow-up) Use another syntax
Fridolin Somers [Wed, 27 Apr 2022 00:59:59 +0000 (14:59 -1000)]
Bug 29077: (follow-up) Use another syntax

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 29077: Remove blank indexes before convert
Nick Clemens [Wed, 22 Sep 2021 12:55:19 +0000 (12:55 +0000)]
Bug 29077: Remove blank indexes before convert

To test:
1 - Be using Elasticsearch
2 - Search on OPAC with dropdown set to 'Library catalog'
3 - Warns in plack-opac-error.log
4 - Apply patch
5 - Repeat
6 - No warns
7 - Search returns correct results

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 30224: Show correct important field in cataloguing validation
Adam Styles [Fri, 4 Mar 2022 00:22:38 +0000 (11:22 +1100)]
Bug 30224: Show correct important field in cataloguing validation

This patch fxes the cataloguing validation messages to show the correct tag, when the whole field is important (not just a subfield).

Note: Look at Bug 30159 to fix the formatting of the validation popup.

1. Go to Administration -> MARC bibliographic frameworks
2. Click Actions next to a framework, view MARC structure
3. Edit multiple tags (at least 2) and check the Important checkbox.
4. Go to cataloguing and create a new record using the framework you just edited
5. Don't fill any of the important fields. Click Save to force the validation for the important tags
6. Notice that the error message shows that an important field isn't filled, but the tag number shown is repeated for each message. The 'Go to field' link goes to the right tag, but the tag number shown is incorrect.
7. Apply patch and refresh page
8. Click Save to force validation again.
9. Confirm the correct tag number is now showing for each error message.

Sponsored-by: Education Services Australia SCIS
Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 30482: Potential for bad string concatenation in cataloging validation error...
Owen Leonard [Thu, 7 Apr 2022 09:36:00 +0000 (09:36 +0000)]
Bug 30482: Potential for bad string concatenation in cataloging validation error message

In validating the basic MARC editor form before submission, we run
AreFieldsNotOk() twice (once with the parameter "false") and concatenate
the result for output. This creates the potential for the error string
to be appended with "0" if AreFieldsNotOk() returns false.

This patch improves the logic around building the error string.

To test, apply the patch and make sure one of your MARC frameworks
contains at least one mandatory field and at least one important field.

- Edit or create a MARC record in the basic MARC editor.
- Submit the form in various states of completion:
  - If a mandatory and an important field are empty, you should see two
    error messages at the top. "The following mandatory subfields aren't
    filled" and "The following important subfields aren’t filled."
  - If a mandatory OR an important field is empty, you should see a
    single message.
    - If it's the important field which is empty, a confirmation will
      ask if you want to save the record anyway. Test that both answers
      to this confirmation work correctly.
  - If no mandatory or important fields are empty the form should
    submit.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 30072: (followup) Fix random failure of Holds_hooks.t
Fridolin Somers [Wed, 27 Apr 2022 00:17:00 +0000 (14:17 -1000)]
Bug 30072: (followup) Fix random failure of Holds_hooks.t

When building Koha::Holds object,
do not let 'found' random otherwise it may take a valid value indicating
hold is found.

See other holds unit tests.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 30587: Fix acqui/supplier.tt translate issues
Tomas Cohen Arazi [Thu, 21 Apr 2022 16:48:47 +0000 (13:48 -0300)]
Bug 30587: Fix acqui/supplier.tt translate issues

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2 years agoBug 30587: Fix opac-tags.tt translate issues
Tomas Cohen Arazi [Thu, 21 Apr 2022 16:24:06 +0000 (13:24 -0300)]
Bug 30587: Fix opac-tags.tt translate issues

This patch addresses one specific case.

To test:
1. Run:
   $ kshell
  k$ cd misc/translator
  k$ perl translate update es-ES
2. On your git checkout run:
   $ git diff | grep '\[% limit or'
=> FAIL: That shouldn't be translated
3. Run:
   $ git reset --hard HEAD
4. Apply this patch
5. Repeat 1 and 2
=> SUCCESS: No attempt to translate that tag
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>