Commit graph

50283 commits

Author SHA1 Message Date
b548d4ec6e Bug 34443: Spelling: Patron search pop-up Sort1: should be Sort 1
This patch instances of "Sort1" and "Sort2" being used
as labels in the interface, replacing the strings with "Sort 1" and
"Sort 2"

To test, apply the patch and test this page:

With the borrowerRelationship system preference populated, edit a
child record and click the "Add guarantor" button. There are two
fields in the form with the updated labels.

Signed-off-by: Laura Escamilla <laura.escamilla@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 93d4defeda)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-10-05 08:06:27 -10:00
8a4227c903 Update release notes for 23.05.04 release
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-28 08:42:50 -10:00
820deaecea Increment version for 23.05.04 release
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-28 08:07:03 -10:00
a533594219 Translation fixes for Koha 23.05.04
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-28 08:03:37 -10:00
f158fe3771 Merge remote-tracking branch 'translate/23.05.04-translate-20230928' into 23.05.x-security 2023-09-28 08:02:07 -10:00
Koha translators
6fe72ac37c Translation updates for Koha 23.05.04 2023-09-28 14:59:05 -03:00
cb4f33f63f Bug 34369: Fix 'Did you mean'
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 ea91896f15)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-26 21:30:37 -10:00
6bc5b9fbce Bug 34369: Pass csrf token from syspref API client (for Vue app)
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 3c6dd02acb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-26 21:29:43 -10:00
649c9785f5 Bug 34369: Require CSRF token for updating system preferences
This patch adds the requirements that updating a system preference
requires a CSRF token. (Also, adding and deleting local system preferences.)

0. Apply patch
1. koha-plack --reload kohadev
2. Add local system preference
3. Update local system preference
4. Delete local system preference
5. Update normal system preference
6. Note no errors

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 c6ef2aba6b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-26 21:29:27 -10:00
acf91323c5 Bug 34761: Prevent XSS for searches and saved search filters
</script> tags are interpreted in JSON strings as HTML, which can
lead to XSS attacks.

This patch puts HTML escaped JSON in the value of a hidden HTML element.
The Javascript then takes the value as a string, parses it as JSON,
and is able to use it to save search filters without triggering a
XSS attack.

This patch also adds DataTable's built-in HTML escaping for the query
and limits on the admin UI for the search filters.

Test plan:
0. Apply patch
1. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=SavedSearchFilters
2. Enable the system preference
3. Go to http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=e
4. Click "Save search as filter"
5. Checkbox "Show in staff interface?"
6. Type "E-TEST" into box and click 'Save'
7. Go to
http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=e
8. Click "E-TEST" under "Custom search filters"
9. Note that you see search results
10. Go to
http://localhost:8081/cgi-bin/koha/admin/search_filters.pl
11. Note that for "E-TEST" you see a "Query" like
{"operators":[],"operands":["e"],"indexes":[]}
12. Note that for "E-TEST" you see a "Limits" like
{"limits":[]}

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 4e32b76198)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-26 21:25:13 -10:00
ff7b6a09de Bug 34349: Validate/escape inputs for task scheduler
This change validates and escapes inputs for task scheduler.

Test plan:
0. Apply patch
1. koha-plack --reload kohadev
2. Go to http://localhost:8081/cgi-bin/koha/tools/scheduler.pl
3. Input a time a minute in the future and leave the date blank
4. Choose an existing report and output format
5. Type a malicious string which is also a valid email address
into the Email field
6. Click "Save"
7. Note that the job is added but the Email is wrapped in single
quotes
8. Try using a non-malicious email address with a single quote.
9. Note that the single quote is escaped, so that it will still
be used by runreport.pl

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>
[EDIT] Removed pars for $email =~ regex, removed old commented lines.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit dcd698a4b4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-26 21:25:13 -10:00
e193989419 Bug 34513: (QA follow-up) Tidy
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 332b95b250)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-26 21:25:13 -10:00
6c1b969a1f Bug 34513: Add checkauth unit test for resetting auth state when changing users
Signed-off-by: Nick Clemens <nick@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 abbbc5924d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-26 21:25:13 -10:00
644416222e Bug 34513: Add end-to-end test for authorization check after first failed authorization
Signed-off-by: Nick Clemens <nick@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 bb581fe78b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-26 21:25:13 -10:00
6fc8ea422a Bug 34513: Set auth state correctly when changing auth sessions
This patch sets the $auth_state to failed when changing auth sessions,
so that the new login attempt gets processed correctly (instead
of skipping the authorization step).

Test plan:
0. Apply the patch
1. koha-plack --reload kohadev
2. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=baseurl
3. Log in as an OPAC user with 0 permissions
4. Note the auth screen "Error: You do not have permission to access this page"
5. Click "Log in"
6. Note that you're still shown a login screen (and that you've been logged out of
your previous authenticated session)

Signed-off-by: Nick Clemens <nick@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 16da12cbbc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-26 21:25:13 -10:00
Evan Giles
392edc1a2f Bug 34653: Make koha-foreach return the correct status code
I think the correct behavior for this script should be that koha-foreach
will return 0 (success) if all the commands it tried to run succeeded, but
1 (failure) if any of the commands failed.

To test:
1. $ koha-create --create-db test
2. $ vi test.sh
if [ $USER = 'kohadev-koha' ]; then
    echo "FAILED";
    exit 1;
else
    echo "SUCCESS";
    exit 0;
fi

3. $ debian/scripts/koha-foreach sh test.sh
FAILED
kohadev: 1 status returned by "sh test.sh"
SUCCESS
4. $ echo $?
5. Note that the exit status is 0 (success)

6. Apply patch

7. $ debian/scripts/koha-foreach sh test.sh
FAILED
kohadev: 1 status returned by "sh test.sh"
SUCCESS
8. $ echo $?
9. Note that the exit status is 1 (failure)

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 d9849aaa3a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-25 09:28:42 -10:00
6dbd5e5fdb Bug 34748: DBRev 23.05.03.005
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a06396c282)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-25 09:16:51 -10:00
Katrin Fischer
afcbbb3469 Bug 34748: Fix column name in columns configuration for basket table
The first column was named basket_number, but it's actually the
order_line.

To test:
* Edit column configuration for acquisition > basket
* Make sure to set at least one checkbox for 'basket_number'
* Apply patch, run database update
* Verify that the first column is now 'order_line', but your
  settings have been preserved

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 f9f9c3a7fa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-25 09:15:39 -10:00
Andreas Roussos
9f4cd427db Bug 21828: build $bib_heading_fields only once per invocation
In UNIMARC instances, the run time of link_bibs_to_authorities.pl
can be reduced by up to 80% and the number of DBI calls
can be reduced by up to 90% with a very simple fix that
optimises the constructor of the C4::Heading::UNIMARC object.

Currently, the constructor resets the $bib_heading_fields hash
*in each invocation* (i.e. for every field the bibliographic
record contains), then populating it again with the results
fetched from the database! This is inefficient.

The patch/fix is trivial: we take advantage of the fact that
$bib_heading_fields is declared at the top of the
C4::Heading::UNIMARC module and is thus a package variable
that is in scope for the entire execution of the program
(more info here: https://stackoverflow.com/q/75317862).

Placing the section that generates the $bib_heading_fields
hash inside a "unless ( defined $bib_heading_fields )" code
block is enough to cause a significant reduction in the
number of "expensive" SQL SELECT queries that must be run.

Test plan:

0) Have a UNIMARC instance with some sample data (the KTD one
   will do just fine for this experiment).

1) Run the following commands:

    $ ktd --shell
   k$ DBI_PROFILE=1 ./misc/link_bibs_to_authorities.pl -t

   Observe the output from the script and the DBI profiling info.
   [You may want to play with different DBI_PROFILE levels (such as
   2, 4, 6, 8, etc.) to see what's going on under the hood DBI-wise,
   for reference see: https://metacpan.org/pod/DBI::Profile]

2) Apply this patch.

3) Rerun the script from step 1), it should run a lot faster!

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 fe18b05692)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-22 10:36:33 -10:00
e27ae1d138 Bug 34302: (bug 28653 follow-up) Do not refresh the table if an error happened
If checkin or renew failed, we should not refresh the table or it will
hide the error message.

Test plan:
Apply the DO NOT PUSH patch
Do a renew
=> No error in the table
Apply this patch
Do a renew
=> You see the error
Revert the DO NOT PUSH patch
Do a renew
=> The table is refreshed

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 7d80a1df25)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-22 10:34:44 -10:00
3b8187d620 Bug 34835: Highlight logged-in library in patron searches fix for new staff interface
Since Bug 30952 the feature from Bug 10902 does not work anymore.
The class "currentlibrary" is there but no background color in CSS.
Bug 30952 removed it :
-    background-color: #E6FCB7;

This patch restores this rule plus '!important' that is used by
class 'ac-currentlibrary'

Test plan:
1) Perform a patrons search
2) Check you see green background color for patrons with same branch as
   currently logged in.

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 9f59ea2f61)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-22 10:31:19 -10:00
d552c567a1 Bug 34720: DBRev 23.05.03.004
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2ff3b14e93)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-22 10:01:17 -10:00
86583725eb Bug 34720: Say if syspref has been inserted
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 cd79c78dbd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-22 10:00:34 -10:00
Emmi Takkinen
44c3d82309 Bug 34720: Fix bug 30403 atomic update
Bug 30403 had wrong syspref name in its
atomic update file. This patch fixes this in
db_rev 221200018.pl and adds new atomic
update file.

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 d91ea53e90)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-22 10:00:34 -10:00
fa117f566b 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>
2023-09-22 09:58:32 -10:00
3041af984a 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>
2023-09-22 09:58:32 -10:00
9452ff0095 Bug 34843: DBRev 23.05.03.003
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aea9fce4b0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-22 09:54:52 -10:00
f5b5b1d90d 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>
2023-09-22 09:53:59 -10:00
cf017af80c 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>
2023-09-22 09:42:52 -10:00
66a790e6cd 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>
2023-09-22 09:42:52 -10:00
bb19ca1618 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>
2023-09-22 09:35:24 -10:00
bf1eb47651 Bug 34844: DBRev 23.05.03.002
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aacbadb22f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-22 09:27:03 -10:00
f4e867fe32 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>
2023-09-22 09:25:52 -10:00
c580aa2037 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>
2023-09-22 09:25:52 -10:00
fae321c6a7 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>
2023-09-22 09:19:43 -10:00
8b9e57fe55 Bug 34880: (follow-up) Make condition more specific
To test (applies to both patches):

* Add a new basket as 'standing order' and with 'items created in cataloguing'
* Create an order line
* Receive shipment and create an invoice
* Receive your order
* Verify:
  * Quantity ordered: 1
  * Quantity received: 1 (pre-filled)
  * No item form on the right
* Confirm
* Receive error:
  Order X: No quantity to receive set. No items will be created.
* Verify no receive was processed (received orders remains empty)
* Apply patch
* Verify receive works as expected

Other possible combinations to test:

* Standing order, items on receive
* Standing order, items on order (no items are created)
* Standing order + order from subscription + any item setting (no items are created)
* No standing order + items in cataloguing
* No standing order + items on receive
* No standing order + items on order
* No standing oder + order from subscription + all item settings (no items are created)

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e28ea9c4af)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-22 09:18:09 -10:00
fb70c224b3 Bug 34880: Fix order receive for standing orders
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9dd6fa2d8d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-22 09:18:09 -10:00
ff1b7f74d6 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>
2023-09-20 20:34:03 -10:00
Aleisha Amohia
f11452e2dc 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>
2023-09-20 20:21:12 -10:00
4a3175b7cf 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>
2023-09-20 20:14:31 -10:00
84ce5d3e2c 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>
2023-09-20 20:12:28 -10:00
66e179f905 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>
2023-09-20 20:12:28 -10:00
eb995d498f Bug 34622: Fix store default query
Exclude self smtp server from all the servers being updated to not default if self is_default

Signed-off-by: Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6d54d2419f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-09-20 20:06:10 -10:00
555575745b 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>
2023-09-20 20:01:18 -10:00
6fb3ec5f74 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>
2023-09-20 20:01:18 -10:00
8558dafce5 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>
2023-09-20 20:01:18 -10:00
6444a30adc 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>
2023-09-20 20:01:18 -10:00
8ea062497a 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>
2023-09-20 20:01:17 -10:00
84863736a4 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>
2023-09-20 20:01:17 -10:00
05b4ebf00d 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>
2023-09-20 20:01:17 -10:00