Commit graph

49796 commits

Author SHA1 Message Date
61e5d46859 Bug 34848: (QA follow-up) Resolve warn on useless constant
Useless use of a constant ("Dies if sip user cannot be found") in void context at t/db_dependent/SIP/Message.t line 582.

We should remove the comma..

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b07842d243)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fa117f566b)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 12:20:41 +01:00
eca4b81d87 Bug 34848: Fix SIP/Message.t if DB has been upgraded
There were a lot of failures (in the context of bug 34841)

t/db_dependent/SIP/Message.t .. 2/16
    #   Failed test 'Found AH field as timestamp in response'
    #   at t/db_dependent/SIP/Message.t line 820.

    #   Failed test 'Found AH field as SQL date in response'
    #   at t/db_dependent/SIP/Message.t line 825.
    # Looks like you failed 2 tests of 8.
t/db_dependent/SIP/Message.t .. 3/16

    #   Failed test 'Desensitize flag was set for patron category not in inhouse_patron_categories'
    #   at t/db_dependent/SIP/Message.t line 1133.
    #          got: 'N'
    #     expected: 'Y'

    #   Failed test 'Desensitize flag was set for empty inhouse_patron_categories'
    #   at t/db_dependent/SIP/Message.t line 1139.
    #          got: 'N'
    #     expected: 'Y'

Because renewalsallowed is 0 for upgraded DB, when it's 5 for new
install.

We need to set the value.

This patch also adds some missing transaction

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 4fd7857e3f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3041af984a)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 12:20:26 +01:00
819b2fec54 Bug 34843: DBRev 22.11.10.003
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aea9fce4b0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9452ff0095)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 12:19:41 +01:00
b662886e99 Bug 34843: Fix database comment inconsistency on toc_request
Bug 29093 had a dbrev without comment, but added comment to
kohastructure.

Test plan:
Check (or remove) comment on article_requests.toc_request.
Run dbrev.
Check if comment was added (if you removed).
Run t/db/Koha/Database/Commenter.t

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f809c272af)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f5b5b1d90d)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 12:13:04 +01:00
bcb4327ea8 Bug 34054: Allow to embed biblio on GET /items
Test plan:
Request the /items REST API endpoint and ask for the biblio's info to be
embeded into the response passing x-koha-embed

curl -u koha:koha --request GET 'http://localhost:8081/api/v1/items' --header "x-koha-embed: biblio" --header "Content-Type: application/json"

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Andreas Roussos <a.roussos@dataly.gr>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9afc411a15)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cf017af80c)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 12:12:46 +01:00
1cb9b17325 Bug 34054: Add tests
Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Andreas Roussos <a.roussos@dataly.gr>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bd0380c272)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 66a790e6cd)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 12:12:34 +01:00
bd8272bebb Bug 34846: Fix SIP/ILS.t if DB has been upgraded
t/db_dependent/SIP/ILS.t .. 12/15
    #   Failed test 'Renewal succeeded'
    #   at t/db_dependent/SIP/ILS.t line 346.
    #          got: '0'
    #     expected: '1'
    # Looks like you failed 1 test of 2.
t/db_dependent/SIP/ILS.t .. 15/15
 #   Failed test 'renew'
 #   at t/db_dependent/SIP/ILS.t line 348.
 # Looks like you failed 1 test of 15.

Because renewalsallowed is 0 for upgraded DB, when it's 5 for new
install.

We need to set the value.

Test plan:
perl /kohadevbox/misc4dev/run_tests.pl --run-db-upgrade-only

prove t/db_dependent/SIP/ILS.t

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 5f55775f40)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bb19ca1618)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-10-17 11:06:18 +01:00
da3aef00f8 Bug 34844: DBRev 22.11.10.002
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aacbadb22f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bf1eb47651)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-10-17 10:41:44 +01:00
2f2962f43d Bug 34844: Add db update file
JD amended patch: tidy

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7b46b31998)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f4e867fe32)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-10-17 10:37:37 +01:00
3fbcf5d550 Bug 34844: Add manage_item_editor_templates to userpermissions.sql
Test Plan:
1) perl /kohadevbox/misc4dev/run_tests.pl --run-db-upgrade-only; prove t/Koha/Auth/Permissions.t
2) Note failure
3) Apply this patch
4) perl /kohadevbox/misc4dev/run_tests.pl --run-db-upgrade-only; prove t/Koha/Auth/Permissions.t
5) Tests pass!

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5d2f3ffe7d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c580aa2037)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-10-17 10:33:21 +01:00
9cfe5294ff Bug 34794: Fix typo in recalls_to_pull.tt
Fixed typo - it's v its

Test plan:
Look at the bug patch and confirm the change is correct

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9b385a2c36)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 445ec77de3)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:13:52 +00:00
263abb4dc6 Bug 34716: Fix typo
Fixes a typo where "it's" should be "its"

Test plan:
1) Check the commit and observe that the change has been made correctly

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b5540d8c94)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 61b0558a3c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:13:52 +00:00
6d275bb0f8 Bug 34847: Fix t/db_dependent/Search.t
If 01e still exists then the test will fail with
Truncated incorrect DECIMAL value: '01e' at t/db_dependent/Search.t line 945

Test plan:
% perl /kohadevbox/misc4dev/run_tests.pl --run-db-upgrade-only
% prove t/db_dependent/Search.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ca3243d00f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fae321c6a7)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:10:54 +00:00
40cef822bb Bug 34730: Add responsive behavior to more tables in the OPAC
This patch adds responsiveness to several DataTables which were not
updated in 32341. The patch removes the CSS-based responsive styling
which was previously used for these tables.

This patch also adds some additional configuration to the tables on the
user home page so that the title column is always prioritized when
DataTables collapses columns in narrow views.

To test, apply the patch and rebuild the OPAC CSS. Ideally this should
be tested with a user who has checkouts, overdues, holds, tags, and a
checkout history.

- Log in to the OPAC and test the user summary page. Check that each
  table adjusts well to narrow browser widths. In each case the column
  containing the title should never be hidden no matter how narrow the
  window:
  - Checkouts
  - Relatives' checkouts (requires that the user is a guarantor for a
    patron with checkouts and that the guarantee's account is set up to
    show checkouts to the guarantor).
  - Overdues
  - Holds
  - Article requests

The new places the responsive DataTables extension is being used:

- Checkout history
- Suggestions
- Tags (in the table of user-submitted tags)
- Most popular

Again, in each case the table should be responsive and the title column
should be prioritized so that it doesn't get hidden at narrow page
widths.

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 2661943214)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ff1b7f74d6)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:10:54 +00:00
Aleisha Amohia
58b17792e4 Bug 34760: Confirm session ID is set to save OPAC search history to logged in user
This patch confirms that a session ID has been set before trying to save search history to a logged in user on the OPAC.

This depends on EnableOpacSearchHistory system preference being enabled.

Apply the patch and test that you don't see an Error 500 page at any point through this plan:

1. Do an OPAC search, ensure you are not logged in
2. Confirm your search was saved to search history
3. Do another search, then log in
4. Confirm you are brought back to the search results after logging in
5. Confirm all search history from the session is visible

Sponsored-by: Toi Ohomai Institute of Technology
Signed-off-by: Salah Ghedda <salah.ghedda@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e7707b768b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f11452e2dc)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:10:53 +00:00
6de1ded81f Bug 33734: Remove incorrect URL escaping on search filters
This patch removes an incorrect URL escaping on search filter
facet URLs.

Without this patch, search filters using non-ASCII characters won't
return results.

To test:
0. Apply patch
1. Enable SavedSearchFilters syspref
2. Search for "the"
3. Save as search filter (to show on both OPAC and staff interface)
4. Search for "ü" in staff interface
5. Apply the "the" filter
6. Note that search results appear
7. Search for "ü" in OPAC
8. Apply the "the" filter
9. Note that search results appear

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 51e602e61c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4a3175b7cf)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:10:53 +00:00
d6dfe009e9 Bug 34732: (QA follow-up): tidy up code
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 703ecab2c6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 84ce5d3e2c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:10:53 +00:00
59f3cd7c21 Bug 34732: For Code39, append or prepend asterisk if missing from barcode
This patch appends or prepends an asterisk on Code39 barcodes if
they are missing from the input. This is so that they form correct
Code39 barcode images.

Test plan:
0. Apply the patch
1. koha-plack --reload kohadev
2. Go to http://localhost:8081/cgi-bin/koha/labels/barcode-print.pl
3. Type 39999000001310 into "Barcode" and click "Show barcode"
4. Note that the barcode text on the right includes asterisks around it
5. Type *39999000001310 into "Barcode" and click "Show barcode"
6. Note the same as above
7. Type 39999000001310* into "Barcode" and click "Show barcode"
8. Note the same as above
9. Type *39999000001310* into "Barcode" and click "Show barcode"
10. Note the same as above

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0f888f48fa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 66e179f905)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:10:52 +00:00
5447d72b93 Bug 32942: (follow-up) Restore missing statuses
At some stage we lost some of the core statuses. This patch simply
adds them back into the list.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4e33042105)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 555575745b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:00:24 +00:00
fe18d04f27 Bug 32942: (follow-up) Fix typo
Spelling typo fix

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 07a602d995)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6fb3ec5f74)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:00:24 +00:00
5d4f6d2d00 Bug 32942: (follow-up) Fix test
I missed a test case when doing follow-ups before.. this patch catches
that case and create the required authorized value to allow
ModSuggestion to succeed.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 078e98a7a3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8558dafce5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:00:24 +00:00
e03747678b Bug 32942: (QA follow-up) Fix regression test
With the move to checking status during store, we broke the api
regression test introduced earlier in the patch set.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8eb27c40e6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6444a30adc)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:00:23 +00:00
b735d4ad66 Bug 32942: (QA follow-up) Moving Suggestion->STATUS check to Suggestion::store
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 40ca7aa06c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8ea062497a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:00:23 +00:00
cb9e5aaf2a Bug 32942: (QA follow-up) Add tests for STATUS checking in Suggestion::store
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 672e8a9d71)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 84863736a4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:00:23 +00:00
fb8d4c7c4c Bug 32942: (QA follow-up) Document possible values
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 54c8aa9471)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 05b4ebf00d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:00:22 +00:00
6acfa90cc7 Bug 32942: Suggestion API route when non 'standard' status are present
The API route for listing all suggestion:

/api/v1/suggestions

send back an error message when there is a suugestion with non standard
status (ASKED, CHECKED, ACCEPTED, REJECTED).

This patch fixes this too restrictive restriction.

TO TEST:

1. Add a status in SUGGEST_STATUS AV list.
2. Create a suggestion, and assign it to the previsous status.
3. Call /api/v1/suggestion
3. You get an error message:
   {
    "errors": [ {
      "message":"Not in enum list: ASKED, CHECKED, ACCEPTED, REJECTED.",
      "path":"\/1\/status"
    }],
    "status":200
   }
4. Apply the patch. Call /api/v1/suggestion

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3dc9bf900b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 745a6bde5e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:00:22 +00:00
295497b557 Bug 32942: Regression tests
Having a custom status shouldn't cause issues

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e13f68965e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 585a816aff)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:00:22 +00:00
c49f87ca65 Bug 34789: (follow-up) Fix atomic update file
Atomic update file had a versioning issue - now changed to be compatible with older versions

Please backport

(cherry picked from commit b593f6b806)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 48ebd5a803)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:00:21 +00:00
5dcd47755f Bug 34694: Only check for IsAvailableForItemLevelRequest if is authenticated
- Go to circulation rules and set On shelf holds allowed to If all unavailable
- Log out
- Visit a bib record on OPAC:
http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=76
- Notice it blows up with error 500
- Apply patch. Repeat

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1742913a05)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6054c26215)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:00:21 +00:00
fe48529cc9 Bug 34740: Update sort options in ES config to by Yes/No
At some point the option for 'undef' was removed from te sort options
and was collapsed to yes/no

The dropdowns when adding a new field were missed, this patch corrects that.

While undef in a mappings file wil stil load, when saving we should not privde undef any longer

To test:
1 - Browse to bottom to add a new field on the 'Bibliographic records' tab in
    Administration > Search engine configuration (Elasticsearch)
2 - Set sortable column to undef, set other columns and provide a valid field
3 - Click '+Add'
4 - Click 'Save'
5 - At top of page you receive an error:
 An error occurred when updating mappings: DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Column 'sort' cannot be null at /kohadevbox/koha/Koha/SearchField.pm line 37 .
6 - Apply patch, restart all
7 - Add a new mapping, your only choices are Yes/No
8 - Save mapping
9 - Confirm it saves correctly

Signed-off-by: Salah Ghedda <salah.ghedda@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5f6e1a1cf7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a9b76c2254)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:00:21 +00:00
Laura Escamilla
f2e1e413cc Bug 32048: Added clear cache routine to delete_holiday_range_repeatable
When adding and deleting holidays, holidays might return
unexpectedly.

To test:
1 - Enter a holiday repeated yearly on a range from the 1st of the month to the 5th
2 - Delete it
3 - Add a new holiday from the 20th to the 25th
4 - When saved, the holiday from the 1st to the 5th is also added again.
5 - Apply patch and restart_all.
6 - Repeat steps 1-3. Notice that the holiday from the 1st to the 5th is no longer added and it has properly been cleared from the cache.
7 - Sign off! :D

Signed-off-by: Salah Ghedda <salah.ghedda@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d4be7b10ac)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c8cec2c52f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:00:20 +00:00
d84dba90af Bug 34728: (QA follow-up) Remove o modifier, bit more compact
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bda428399a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b9ad842dee)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:00:20 +00:00
09e574e87b Bug 34728: Make pre tag conditional
This patch makes the pre-formatting of notice templates conditional on the content type.

Test plan:
1) Navigate to tools > Notices and slips
2) Edit the notice with the code of HOLD
3) Under print, paste the following
<p>Please collect within 10 days from the date of this letter and don't forget to bring your library card with you.</p>
<p>Be aware that opening hours vary at different library branches so if in doubt double check the times before you visit.</p>
<p>Should you no longer require this item please contact us so we can make it available for another customer.</p>

<p>Thank you</p>
4) Check the box that says HTML message and save the notice
5) In Patrons, select a patron and in Patron messaging preferences, check the box in the Email column for Hold filled
6) Find a record in the catalogue
7) Copy the barcode for one of the items
8) Place a hold on the item for the patron you selected
9) Navigate to Circulation > Check-in
10) Paste the barcode in the Check-in box and click Check-in
11) In the pop-up box, click Confirm hold
12) In the command line, run perl misc/cronjobs/gather_print_notices.pl --letter_code=HOLD --html /tmp
13) cd /tmp
14) There should be a file in there called 'notices_HOLD-date.html
15) cat this file
16) The html you pasted in the template will be wrapped in a <pre> tag
17) Apply patch and restart_all
18) rm the notices file that was created
19) cd /kohadevbox/koha
20) Select a new record from the catalogue and repeat steps 7-15 for this record, using the same patron
21) This time, the html file should not contain the <pre> tag
22) Sign off!

Signed-off-by: Lucas Gass <lucas@bywatersolutions.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 d947ae3c1a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5cff31dd78)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:00:20 +00:00
e5a8ec34f2 Bug 34333: Add embed option for cancellation_requested for holds
This patch adds the `cancellation_requested` attribute to the hold
object definition, and allows embeding it as on the different holds
endpoints that migt be useful.

To test:
1. Apply this patches
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Hold.t \
           t/db_dependent/api/v1/*holds.t
=> SUCCESS: Tests pass!
3. Play with your REST tool (Postman?) on the following endpoints:
   GET http://localhost:8081/api/v1/holds
   GET http://localhost:8081/api/v1/patrons/:patron_id/holds
on both, pass and not pass the `x-koha-embed` header with
`cancellation_requested` on it.
=> SUCCESS: It is easy! You see the attribute and you don't, and the
content makes sense!
4. Sign off :-D

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 4ce7ce2a15)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e916ec22dd)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:00:19 +00:00
95e9d2c3bc Bug 34333: Add Koha::Hold->cancellation_requested
This patch adds a helper method for telling if a hold has cancellation
requests. To be used for embedding such information.

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/Hold.t
=> SUCCESS: Tests pass, the new method is covered by tests.
3. Sign off :-D

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 23cfdf97e3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e932dc8372)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:00:19 +00:00
77d9bfb93b Bug 34786: after_biblio_action hooks - No find when action is delete
Test plan:
Run t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ac7581e90a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4aedaed0bc)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:00:19 +00:00
30d98651b0 Bug 34613: Replace onclick attributes in midiplayer.js
This patch replaces the onclick attributes in midiplayer.js
with Javascript click handlers.

To test:
0. Apply patch
1. Clear browser cache (it may be necessary to go into the
   Network tab and explicitly disable cache)
2. Add 031 subfields 2gopnu to Default framework
3. Create a catalogue record with a 031 like follows:
2: pe
g: G-2
o: 4/4
p: 4bB''C2bE/2F4GbB/'bB2''C4D/F2.bE/4GG2bB/4'''C2C4''bB/4bE2G4bB/4bE2.F/
n: xFCGD
4. Enable the following sysprefs:
   OPACShowMusicalInscripts
   OPACPlayMusicalInscripts
5. Go to OPAC record view and click "Play this sample"
6. Play with the "Pause/Start" and "Stop" buttons
7. If the buttons work, it means the patch worked

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a4bdd27fd9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 87ec1caebc)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:00:18 +00:00
bdbe46c3fd Bug 33876: Add class for styling
To test:
1. Checkout and item that has a public and nonpublic note.
2. In the checkout table ( Title column ) notice the notes display. If you use the browser dev tools to inspect you'll notice a "-" outside of any HTML element.
3. Apply patch.
4. See the '-' is now inside of a html element with class of seperator.

Signed-off-by: Sam Lau <samalau@gmail.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 6091a938c1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 71b92c80c8)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:00:18 +00:00
bcd89d89b1 Bug 34711: Remove use of onclick for opac-privacy.pl
This change removes the "onclick" attribute for the buttons
on opac-privacy.pl.

Note: The Javascript is placed in a separate file, which is
the preferred way for Javascript to be handled by
Content-Security-Policy

Test plan:
0. Apply the patch
1. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=OPACPrivacy
2. Set syspref to "Allow"
3. Go to http://localhost:8080/cgi-bin/koha/opac-privacy.pl
4. The confirmation modal appears and "OK" and "Cancel" buttons work as
   expected

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c997fe863f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cdb5734ade)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:00:18 +00:00
8e7b3709c6 Bug 34724: (QA follow-up):
Replace href from thumbnail link with a # to keep pointer event. The href link gets reconstructed by showCover anyway
Remove return false from on click event, its not triggering a location change anymore because of the above
Remove check for imagenumber, its a non-null primary key, if the image exists, then the imagenumber must also exist

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bc8a062001)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 167f5aa3bb)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:00:17 +00:00
1c19a1cc14 Bug 34724: Remove inline onclick handler for opac-imageviewer.pl
This patch moves the click handler for thumbnails for opac-imageviewer.pl
out of the inline HTML and out to an existing <script> element.

Test plan:
0. Apply the patch (including dependent patches)
1. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=localcover
2. Change both *LocalCoverImages sysprefs to "Show"
3. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=AllowMultipleCovers
4. Change "AllowMultipleCovers" to "Allow"
5. Go to
http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=29
6. Click "Images (0)" tab
7. Download or make two JPEG images
8. Upload the images
9. Go to http://localhost:8080/cgi-bin/koha/opac-imageviewer.pl?biblionumber=29
10. See one large image in the centre and two smaller thumbnails on the right side
11. Click on the thumbnail of the image that isn't displayed in the centre
12. Note that the image changes
13. Click the other thumbnail and note that the image changes back

PA amended patch: Added missing test plan step

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 847b5f0777)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bebd213c87)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:00:17 +00:00
405bc8d39a Bug 34725: Remove use of onclick for OPAC cart
This patch moves the click handler in the OPAC cart from the inline HTML
and out to an existing <script> element.

Test plan:
0. Apply the patch
1. Go to http://localhost:8080/cgi-bin/koha/opac-search.pl?idx=&q=test&weight_search=1
2. Add the results to the cart
3. Click on the "Cart"
4. One by one click on the title of each row
5. Notice how the parent window changes to the detail record for that title

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9e39d2d671)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8af48bc9f7)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:00:17 +00:00
dd70590998 Bug 34789: DBRev 22.11.10.001
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b952d2eb99)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bd47ab5bcb)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 15:45:40 +00:00
Katrin Fischer
56fabf3117 Bug 34789: (QA follow-up) Improve output of database update
* Adds description
* Adds column names to success messages

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c1b344b002)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ab85941b5f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 15:45:39 +00:00
9d60d2346d Bug 34789: Update unit tests
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 4ec7c6a62e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bac14ffe08)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 15:45:39 +00:00
091fa2de3b Bug 34789: Update usage throughout Koha modules and Vue components
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 7d2ce611f7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9ea9a7156b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 15:45:38 +00:00
dc03e1a090 Bug 34789: DBIC file
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 6989d25df7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a286990983)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 15:45:38 +00:00
bc661c1901 Bug 34789: Database and API update
Currently the erm_eholdings_titles table has a field called preceeding_publication_title_id. This should be preceding_publication_title_id

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 cf94eae1ff)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5a01b6dddc)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 15:45:38 +00:00
95e078d5d4 Bug 33406: (follow-up) Mock SearchEngine to ensure using ES
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 766bdd638a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ff544893a1)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 15:45:37 +00:00
2c61db4b96 Bug 34719: Add middle_name to patron autocomplete
To test:
1. Apply patch and clear browser cache.
2. Find some patrons with middle_name populated or add new patrons with a middle_name.
3. Make sure PatronAutoComplete is on
4. Try searching for a part of one of the patron's names who has a middle_name.
5. It should appear in the autocomplete dropdown

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a6c77f664c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 92cb177169)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 15:45:37 +00:00