]> git.koha-community.org Git - koha.git/log
koha.git
17 months agoBug 11844: Use additional fields for order lines
Julian Maurice [Wed, 5 Feb 2014 10:12:21 +0000 (11:12 +0100)]
Bug 11844: Use additional fields for order lines

This patch allows to create additional fields for order lines.
Once created, these fields can be filled during order line creation or
modification.

If additional field is linked to a MARC field, there are two possible
scenario:
- MARC field mode = get: The field cannot be modified and its value is
  retrieved from the bibliographic record (current behaviour)
- MARC field mode = set: The field can be modified and its value is
  saved to the bibliographic record (new behaviour)

If additional field is linked to an authorised value category, then
authorised values are used. If not directly linked to an authorised
value category, but linked to a MARC field, a search for an AV category
is made on MARC default framework.

This patch doesn't display additional fields value anywhere (except in
order line creation/modification). Future patches will do that.

Test plan:
1/ Go to Acquisitions home
2/ In the left menu, click on "Add order line fields"
3/ Click on "New field" button
4/ Give the field a name (unique), no AV category and no MARC field.
5/ Save.
6/ Create 5 other fields:
   a/ no AV category, a MARC field not linked to AV category, MARC field
      mode = get
   b/ no AV category, a MARC field not linked to AV category, MARC field
      mode = set
   c/ no AV category, a MARC field linked to AV category, MARC field
      mode = get
   d/ no AV category, a MARC field linked to AV category, MARC field
      mode = set
   e/ an AV category, no MARC field
7/ Create everything you need to be able to create order lines
   (supplier, basket, ...)
8/ Create an order line. At bottom of the page, you should see your
   additional fields, with authorised values dropdrown list for fields
   (c), (d) and (e). Fields (a) and (c) should be disabled.
9/ Fill these fields with some data and save order line
10/ check that data was correctly saved into biblio for fields (b) and
    (d), but not for (a) and (c)
11/ modify the same order line, check that values you've filled are
    correctly retrieved and that values for (a) and (c) were correctly
    retrieved from the bibliographic record
12/ modify all values, save, and check biblio once again

Signed-off-by: Harold Dramer <harold.dramer@nyls.edu>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
17 months agoBug 33743: Make xt/find-missing-filters.t and xt/single_quotes.t check directories...
Jonathan Druart [Tue, 16 May 2023 10:52:22 +0000 (12:52 +0200)]
Bug 33743: Make xt/find-missing-filters.t and xt/single_quotes.t check directories in git index only

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
17 months agoBug 33719: Silence warnings on ContentWarningField in Search.t
Marcel de Rooy [Thu, 11 May 2023 09:19:41 +0000 (09:19 +0000)]
Bug 33719: Silence warnings on ContentWarningField in Search.t

Test plan:
Run t/db_dependent/Search.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
17 months agoBug 33733: Move to db_dependent
Marcel de Rooy [Mon, 15 May 2023 07:13:06 +0000 (07:13 +0000)]
Bug 33733: Move to db_dependent

The subtest is added to the existing db_dependent test.

Test plan:
Run t/db_dependent/XSLT.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>
17 months agoBug 33733: Fix indentation in subtest
Marcel de Rooy [Mon, 15 May 2023 07:05:28 +0000 (07:05 +0000)]
Bug 33733: Fix indentation in subtest

Test plan:
git diff -w HEAD~1.. t/XSLT.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>
17 months agoBug 33733: Remove need for Test::DBIx::Class
Marcel de Rooy [Mon, 15 May 2023 06:58:45 +0000 (06:58 +0000)]
Bug 33733: Remove need for Test::DBIx::Class

Test plan:
Run t/XSLT.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>
17 months agoBug 33707: News vs Quote of the day styling on staff interface main page
Owen Leonard [Wed, 10 May 2023 11:54:33 +0000 (11:54 +0000)]
Bug 33707: News vs Quote of the day styling on staff interface main page

This patch makes minor adjustments to the global and staff home page CSS
so that the display of news and quote-of-the-day are more consistent.

To test, apply the patch and rebuild the staff interface CSS.

- If necessary, add at least one news item (Tools -> News -> New entry)
  and at least one quote (Tools -> Quote editor -> New quote).
- View the staff interface home page to confirm that the style of the
  news area and the quotes is consistent.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
17 months agoBug 33718: Fix the mock of Koha::Config->get in mock_config
Marcel de Rooy [Thu, 11 May 2023 12:52:23 +0000 (12:52 +0000)]
Bug 33718: Fix the mock of Koha::Config->get in mock_config

It should not mock calls for other sections than 'config' in
koha-conf.xml.

Test plan:
Without this patch:
[1] Enable AutoLinkBiblios, CatalogModuleRelink and LinkerRelink.
This will trigger a SearchAuthorities call when creating a sample biblio.
Note: SearchAuthorities calls Zconn and gets back information from
a wrong part of koha-conf.xml.
[2] Run t/db_dependent/Koha/Pseudonymization.t
You should see something like:
  {UNKNOWN}: Can't use string ("authorities") as a HASH ref while "strict refs" in use at /usr/share/koha/C4/Context.pm line 587. at /usr/share/koha/C4/Biblio.pm line 302

With this patch:
[3] Run t/db_dependent/Koha/Pseudonymization.t. Should pass now.
[4] git grep -l mock_config | xargs -i{} prove {}
    Exclude Mocks.pm.

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.83@web.de>
17 months agoBug 33595: (bug 26628 follow-up) Fix authorization for tools-home.pl
Jonathan Druart [Thu, 11 May 2023 10:05:04 +0000 (12:05 +0200)]
Bug 33595: (bug 26628 follow-up) Fix authorization for tools-home.pl

If you log into the OPAC as a user with no flags, you can see a restricted view of
/cgi-bin/koha/tools/tools-home.pl instead of seeing the login screen.

Test plan:
Use a patron with catalogue permission only
Login and access the tools home page
=> redirected to the login screen

Add a club sub permission
Login and access the tools home page
=> You see the tools home page with the clubs link

Add a tool sub permission, remove club
Login and access the tools home page
=> You see the tools home page with the relevant link

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
17 months agoBug 33705: (bug 33066 follow-up) Fix 'configure' button for kohaTable
Jonathan Druart [Wed, 10 May 2023 04:32:55 +0000 (06:32 +0200)]
Bug 33705: (bug 33066 follow-up) Fix 'configure' button for kohaTable

The 'configure' button is displayed for any tables, even those that
cannot be configured.

This is a regression caused by
  commit 765fd1ced3b9efc4ff6fb71e2fee1a7a227d1cae
  Bug 33066: Introduce a KohaTable Vue component

It's adding a default value for table_settings, but then later we are
testing if table_settings is true:
699     let table_settings = params.table_settings || {};
...
798     if ( table_settings && CAN_user_parameters_manage_column_config ) {

This patch is reverting the default value, so the test will be
corrected.

Test plan:
1. Go to Tools > Quote editor
2. Click "Configure"
=> Without this patch you are brought to the column settings page, but the quote editor table is not there
=> With this patch the button is not present
3. Go to the cities page (admin/cities.pl)
4. Click "Configure"
=> You are brought to the column settings page

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
17 months agoBug 33625: Pretty .js files for vue
Jonathan Druart [Tue, 2 May 2023 08:32:37 +0000 (10:32 +0200)]
Bug 33625: Pretty .js files for vue

Test plan:
= Koha =
Apply the first patch, prove xt/vue_tidy.t and notice the failure
Apply this patch, now it passes

= QA test =
Apply the change to the merge request linked with this qa-test-tools' issue:
https://gitlab.com/koha-community/qa-test-tools/-/issues/62
inside your ktd container (at /kohadevbox/qa-test-tools/)
Edit a .js within koha-tmpl/intranet-tmpl/prog/js/vue and a .ts file
(cypress test) with something not pretty
Commit and run the QA script
=> It's failing!
Pretty the change, commit again, run the QA script
=> It's happy!

= KTD - git hook =
Go to the merge request linked with this ktd's issue:
https://gitlab.com/koha-community/koha-testing-docker/-/issues/374
Copy the modified git hook to .git/hooks/ktd/pre-commit
Edit a .js within koha-tmpl/intranet-tmpl/prog/js/vue and a .ts file
(cypress test) with something not pretty
Commit
=> Notice that the commit content is pretty!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33625: Add test
Jonathan Druart [Tue, 2 May 2023 08:32:11 +0000 (10:32 +0200)]
Bug 33625: Add test

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33739: Only trigger indexing on last item modification at ModItemTransfer
Tomas Cohen Arazi [Mon, 15 May 2023 15:07:09 +0000 (12:07 -0300)]
Bug 33739: Only trigger indexing on last item modification at ModItemTransfer

This patch makes ModItemTransfer trigger record indexing only on the
last call (in $transfer->transit). And extra parameter is added to
->transit to effectively honour the ModItemTransfer parameter.

I wanted to mention that bug 31212 highlighted an existing issue, not
catched by the current tests before its inclussion, because of the DT truncation
taking place.

To test:
1. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/SearchEngine/Indexer.t
=> FAIL: Indexing is requested twice, should only be once
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass! Indexing is requested only once!
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
17 months agoBug 32648: Clear cache in Filter_MARC_ViewPolicy.t
Jonathan Druart [Mon, 15 May 2023 15:16:20 +0000 (17:16 +0200)]
Bug 32648: Clear cache in Filter_MARC_ViewPolicy.t

Search.t is failing if run after Filter_MARC_ViewPolicy.t because of a
missing flush

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
17 months agoBug 8179: Remove ref to select.dataTables.min.css
Jonathan Druart [Tue, 16 May 2023 07:59:08 +0000 (09:59 +0200)]
Bug 8179: Remove ref to select.dataTables.min.css

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
17 months agoBug 30418: Fix t/Koha/Auth/Permissions.t
Jonathan Druart [Tue, 16 May 2023 07:55:28 +0000 (09:55 +0200)]
Bug 30418: Fix t/Koha/Auth/Permissions.t

koha_1       |     #   Failed test 'Expected permissions generated for superlibrarian'
koha_1       |     #   at t/Koha/Auth/Permissions.t line 283.
koha_1       |     #     Structures begin differing at:
koha_1       |     #          $got->{CAN_user_lists_edit_public_list_contents} = '1'
koha_1       |     #     $expected->{CAN_user_lists_edit_public_list_contents} = Does not exist
koha_1       |     # Looks like you failed 1 test of 1.
koha_1       |
koha_1       | #   Failed test 'superlibrarian tests'
koha_1       | #   at t/Koha/Auth/Permissions.t line 284.
koha_1       | # Looks like you failed 1 test of 3.
koha_1       | [23:34:42] t/Koha/Auth/Permissions.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
17 months agoBug 32752: Update serial edit form to allow for new status
Katrin Fischer [Fri, 17 Mar 2023 09:53:13 +0000 (09:53 +0000)]
Bug 32752: Update serial edit form to allow for new status

With this patch the new status Circulating, Out for binding and
Bound can be set for any issue, if the current status is not "Expected".
This is to keep the list a little shorter when the issue hasn't even
arrived in the library yet.

These new status will be especially helpful if the library has
opted to not create items for all their subscriptions as a lot
of libraries will only lend bound volumes, but not the singular
issues.

* Circulating: this will be useful if the library is using
routing lists and the items are not available at the library
for a longer time.

* Out for binding: if you send out issues for binding this will
help to track these.

* Bound: this will help users to know that the issue is now
available as a bound volume.

To test:
* If you haven't yet:
  * Create a subscription
  * From the serial collection page:
    * Receive or create several issues and set different status
    * Make sure you have at least 2 late and claim one of them
    * Make sure you have several Arrived issues
  * Edit Arrived serial issues and others
  * Verify that the status pull down no also shows the new status
    if the issue has a different status than "Expected"
  * Set the new status
  * Verify they save and show correctly
  * Edit again and verify the pull downs are pre-set correctly
    to the saved status
  * Verify they show everywhere else (see previous test plans :) )

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 32752: Add new status Circulating, Out for binding, and Bound to includes
Katrin Fischer [Fri, 17 Mar 2023 09:52:04 +0000 (09:52 +0000)]
Bug 32752: Add new status Circulating, Out for binding, and Bound to includes

To test with the next patch that allows to set the new status.

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 32752: Use an include to display the serial status in the staff interface
Katrin Fischer [Fri, 17 Mar 2023 09:24:22 +0000 (09:24 +0000)]
Bug 32752: Use an include to display the serial status in the staff interface

This moves the identical code used to display the serial status
from the different templates into one common include.

To test:
* Add a subscription
* Receive several issues, make sure 2 are late
* Claim one of the late issues
* Verify the status displays nicely on these pages:
  * Subscription detail page > issues tab
  * Catalog detail page > subscription tab
  * Serial claims page
  * Serial collection page of your subscription

Note: there was some code for the subscription detail page
that should have displayed the claim date, but didn't work.
To keep things simpler and identical to before, I have left
that bit out for now.

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 32752: Use an include for displaying the serial status in the OPAC
Katrin Fischer [Fri, 17 Mar 2023 08:59:42 +0000 (08:59 +0000)]
Bug 32752: Use an include for displaying the serial status in the OPAC

This moves the existing status in the OPAC into an include.

To test:
* Add a subscription with issues in different status
* View the OPAC detail page of the record
* Verify that in the subscription tab the status display nicely
* Veriy that More details > Full history displays the status nicely too

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 21330: DBRev 22.12.00.043
Tomas Cohen Arazi [Mon, 15 May 2023 21:11:08 +0000 (18:11 -0300)]
Bug 21330: DBRev 22.12.00.043

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 21330: (QA follow-up) Add 'empty' option to system preference description
Katrin Fischer [Sun, 9 Apr 2023 13:09:07 +0000 (13:09 +0000)]
Bug 21330: (QA follow-up) Add 'empty' option to system preference description

This adds another list item to match the preference description
for the results page:

* Empty. No XSLT will be applied (default)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 21330: (follow-up) Fix new preference text and place
Fridolin Somers [Wed, 29 Mar 2023 07:56:51 +0000 (21:56 -1000)]
Bug 21330: (follow-up) Fix new preference text and place

Atomic updated fixed : intranet => OPAC
Changed to be more like the one adding AuthorityXSLTOpacResultsDisplay

New preference moved to opac.pref

Signed-off-by: Thibault <thibault.keromnes@univ-paris8.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 21330: (follow-up) Update system preference description
David Nind [Sun, 11 Sep 2022 18:16:25 +0000 (18:16 +0000)]
Bug 21330: (follow-up) Update system preference description

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Thibault <thibault.keromnes@univ-paris8.fr>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 21330: Allow XSLT for authority detail view in OPAC
jeremy breuillard [Mon, 7 Feb 2022 11:00:00 +0000 (12:00 +0100)]
Bug 21330: Allow XSLT for authority detail view in OPAC

This patch adds a syspref that allow to customize the authority detail
view in OPAC with XSLT.

Test plan:
1. Make sure to have at least one or more authorities
2. OPAC: Home > Authority search(Submit) > Authority search results
3. Click details on a result and notice the view
4. Apply patch
5. INTRA: Home > Administration > System preferences ->find
   "AuthorityXSLTOpacDetailsDisplay"
6. Write the path where your file is. You can try with the XSLT for
   biblio for instance:
   .../koha/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl
7. Save changes
8. Repeat 2-3 and notice the display

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Thibault <thibault.keromnes@univ-paris8.fr>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 28366: Add batch patron modification to patron search results
Owen Leonard [Wed, 12 Oct 2022 18:24:01 +0000 (18:24 +0000)]
Bug 28366: Add batch patron modification to patron search results

This patch adds the ability to send selected patrons for batch
modification. It does this by adding a hidden form which is populated
from the borrowernumbers stored in the browser's localStorage when
selections are made.

To test, apply the patch and perform a patron search in the staff client
which will return multiple pages of results.

- Select a patron on the first page of results.
- The "Add to patron list" and "Batch patron modification" buttons
  should become active, and the "Patrons selected" box should show "1"
- After checking another checkbox the "Merge selected patrons" button
  should activate and the "selected" count should increment.
- Test making selections on other pages of results. The "selected" count
  should continue to increment.
- Test the "Batch patron modification" button, confirming that all the
  patrons you selected are correctly passed to the batch patron
  modification tool.
- Test that the "Clear" control works correctly to clear all checkboxes
  and disable all other buttons.
- Test that the "Select all" and "Clear all" controls work correctly,
  enabling all buttons and correctly incrementing the "selected" count.

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 8179: (QA follow-up) Fix files permissions
Tomas Cohen Arazi [Mon, 15 May 2023 21:06:41 +0000 (18:06 -0300)]
Bug 8179: (QA follow-up) Fix files permissions

Not sure how this happened.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 30418: DBRev 22.12.00.042
Tomas Cohen Arazi [Mon, 15 May 2023 20:58:16 +0000 (17:58 -0300)]
Bug 30418: DBRev 22.12.00.042

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 30418: (follow-up) Fixes for QA test tools
Alex Buckley [Mon, 13 Feb 2023 16:09:04 +0000 (16:09 +0000)]
Bug 30418: (follow-up) Fixes for QA test tools

Sponsored-by: Catalyst IT, New Zealand
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 30418: Re-order options of who can edit list contents
Alex Buckley [Wed, 24 Aug 2022 01:01:33 +0000 (01:01 +0000)]
Bug 30418: Re-order options of who can edit list contents

The 'Allow changes to contents from' dropdown when creating/edit lists
should be most locked down to least locked down:

1. Nobody
2. Owner only
3. Permitted staff only
4. Staff only
5. Anyone seeing this list

Sponsored-by: Catalyst IT, New Zealand
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 30418: Unit tests
Alex Buckley [Sat, 20 Aug 2022 21:16:08 +0000 (21:16 +0000)]
Bug 30418: Unit tests

Test plan:
1. Run unit tests
sudo koha-shell <instance>
prove t/db_dependent/Koha/Patron.t
prove t/db_dependent/Virtualshelves.t

Sponsored-by: Catalyst IT, New Zealand
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 30418: Add ability for permitted staff to edit list contents
Alex Buckley [Fri, 19 Aug 2022 03:17:47 +0000 (03:17 +0000)]
Bug 30418: Add ability for permitted staff to edit list contents

Public lists with 'Allow changes to contents from' = 'Permitted staff only'
can have their contents managed by Koha patrons with either of the
permissions below:

- superlibrarian permission
- catalogue permission + 'edit_public_list_contents' sub-permission

Test plan:
1. Apply patches, update database, restart services
2. In the staff client go to: Lists > New List
3. Create a list, choose 'Allow changes to contents from' => 'Permitted
staff only'

4. Log into the OPAC as a patron with no permissions.
5. Confirm you CANNOT add a biblio to the list from the OPAC search result page and
OPAC biblio detail pages

6. Log into the OPAC as a patron with only the 'catalogue' permissions
enabled
7. Confirm you CANNOT add a biblio to the list from OPAC search result
or biblio detail pages

8. Log into the OPAC as a patron with the 'catalogue' and
'edit_public_list_contents' permissions enabled
9. Confirm you CAN add/remove biblios from the OPAC search result and
biblio detail pages

10. Log into the OPAC as a patron with superlibrarian permissions
11. Confirm you CAN add a biblio to the list from the OPAC search result
page and OPAC biblio detail pages

12. Log into the staff client as a patron with only the
'catalogue' permission and confirm you CANNOT add/remove records from the
list

13. Log into the staff client as a patron with the 'catalogue' and
'edit_public_list_contents' sub-permission (found under 'Lists' parent
permission)
14. Confirm you CAN add/remove records from the list

15. Login into thestaff client as a patron with 'superlibrarian'
permissions and confirm you CAN add/remove records from the list

Sponsored-by: Catalyst IT, New Zealand
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 30418: Template and JavaScript changes
Alex Buckley [Wed, 17 Aug 2022 20:20:12 +0000 (20:20 +0000)]
Bug 30418: Template and JavaScript changes

Sponsored-by: Catalyst IT, New Zealand
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 30418: Updated schema file
Alex Buckley [Wed, 17 Aug 2022 20:06:57 +0000 (20:06 +0000)]
Bug 30418: Updated schema file

Sponsored-by: Catalyst IT, New Zealand
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 30418: Database changes
Alex Buckley [Wed, 17 Aug 2022 08:41:52 +0000 (20:41 +1200)]
Bug 30418: Database changes

Sponsored-by: Catalyst IT, New Zealand
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 32775: (QA follow-up) remove useless empty line
Fridolin Somers [Sat, 18 Mar 2023 02:58:49 +0000 (16:58 -1000)]
Bug 32775: (QA follow-up) remove useless empty line

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 32775: (QA follow-up) Fix tab and indenting issues
Martin Renvoize [Thu, 2 Feb 2023 12:44:44 +0000 (12:44 +0000)]
Bug 32775: (QA follow-up) Fix tab and indenting issues

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: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 32775: Correctly display language order in sysprefs when you have multiple langua...
Alex Buckley [Wed, 1 Feb 2023 01:51:34 +0000 (14:51 +1300)]
Bug 32775: Correctly display language order in sysprefs when you have multiple languages in a group

Test plan:
1. Apply first patch
2. Install en-NZ and another language - e.g. mi-NZ - so you have three
languages showing in your sysprefs en-NZ (selected), en (unselected) and
mi-NZ (selected)
3. Tick en-NZ and mi-NZ in language and OPACLanguages sysprefs. Order
en-NZ above mi-NZ and save
4. Refresh the syspref page and confirm mi-NZ is displaying above en-NZ,
even though you ordered en-NZ first
5. Refresh the syspref page multiple times and observe the order of the
languages changes
6. Apply this (second) patch
7. Restart plack
8. Refresh syspref page several times confirming that en-NZ is always
ordered first - as expected.

Sponsored-by: Kinder library, New Zealand
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: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 32775: Do not order language directories based on when they were created
Alex Buckley [Wed, 1 Feb 2023 01:41:22 +0000 (14:41 +1300)]
Bug 32775: Do not order language directories based on when they were created

Sponsored-by: Kinder library, New Zealand
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: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 32775: (follow-up) Unit tests
Alex Buckley [Mon, 13 Feb 2023 01:39:51 +0000 (01:39 +0000)]
Bug 32775: (follow-up) Unit tests

Test plan:
1. Apply this patch and restart services
2. Run t/db_dependent/Languages.t
3. Notice tests 16 and 17 sometimes fail
4. Apply all the other patches and restart services
5. Run t/db_dependent/Languages.t
6. Notice all tests consistently pass

Sponsored-by: Kinder library, New Zealand
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 30649: DBRev 22.12.00.041
Tomas Cohen Arazi [Mon, 15 May 2023 18:43:31 +0000 (15:43 -0300)]
Bug 30649: DBRev 22.12.00.041

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 30649: DBIC schema
Tomas Cohen Arazi [Mon, 15 May 2023 18:36:24 +0000 (15:36 -0300)]
Bug 30649: DBIC schema

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 30649: Vendor EDI account passwords should be encrypted in the database
Kyle Hall [Tue, 18 Oct 2022 13:26:45 +0000 (09:26 -0400)]
Bug 30649: Vendor EDI account passwords should be encrypted in the database

We are storing edi vendor acccount passwords in clear text in the
database. Now that Koha has the Koha::Encryption module, we should
use that to encrypt passwords for all existing and new EDI accounts.

Test Plan:
1) Apply this patch
2) Create one or more EDI vendor accounts
3) Run a report to view the account passwords, note they are in clear
   text
4) Run updatedatabase.pl
5) Re-run the report, account passwords should be encrypted now
6) Edit a vendor EDI account, note you can still view and update the
   password for an account

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>
17 months agoBug 32680: (QA follow-up) Fix opac call and remove second fetch
Nick Clemens [Wed, 19 Apr 2023 13:07:25 +0000 (13:07 +0000)]
Bug 32680: (QA follow-up) Fix opac call and remove second fetch

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 32680: Add classes to template files
Matt Blenkinsop [Wed, 19 Apr 2023 11:23:23 +0000 (11:23 +0000)]
Bug 32680: Add classes to template files

This patch adds the classes to the template files so that the plugin hook can identify that cover images are required and where to inject them

Test plan as per first commit

Sponsored-by: PTFS Europe
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 32680: Add cover images plugin hook
Matt Blenkinsop [Wed, 19 Apr 2023 11:21:02 +0000 (11:21 +0000)]
Bug 32680: Add cover images plugin hook

This patch adds a plugin hook to inject cover images into the templates

Test plan:
1) Apply all patches
2) Go to https://github.com/PTFS-Europe/koha-plugin-addBDSCovers
3) In the releases section, download the .kpz file
4) Upload this in the plugins section and enable the plugin
5) In either the OPAC or staff client, search the catalog
6) The results should have cover art from BDS covers
7) Click on a result and the detail page should also have the cover art

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33463: Remove sort for 'Actions' on the plugins table
Jonathan Druart [Thu, 11 May 2023 10:27:31 +0000 (12:27 +0200)]
Bug 33463: Remove sort for 'Actions' on the plugins table

Test plan:
Go go the plugin admin page
upload a plugin
Notice that the "Actions" column is not longuer sortable

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33658: Fix capitalization 'To Reproduce'
Jonathan Druart [Wed, 10 May 2023 08:45:48 +0000 (10:45 +0200)]
Bug 33658: Fix capitalization 'To Reproduce'

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>
17 months agoBug 8179: (follow-up) Fix currency change and remove datatables select
Agustin Moyano [Sat, 13 May 2023 00:09:57 +0000 (21:09 -0300)]
Bug 8179: (follow-up) Fix currency change and remove datatables select

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 8179: (QA follow-up) Date received should default to today
Kyle M Hall [Fri, 12 May 2023 15:11:46 +0000 (15:11 +0000)]
Bug 8179: (QA follow-up) Date received should default to today

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 8179: Fund required
Tomas Cohen Arazi [Thu, 11 May 2023 18:04:06 +0000 (15:04 -0300)]
Bug 8179: Fund required

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 8179: Cosmetic changes
Tomas Cohen Arazi [Thu, 11 May 2023 17:53:54 +0000 (14:53 -0300)]
Bug 8179: Cosmetic changes

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 8179: Fix JS indentation in parcel.tt
Tomas Cohen Arazi [Thu, 11 May 2023 15:11:40 +0000 (12:11 -0300)]
Bug 8179: Fix JS indentation in parcel.tt

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 8179: Remove leftover/not used embed definitions
Tomas Cohen Arazi [Thu, 11 May 2023 15:10:02 +0000 (12:10 -0300)]
Bug 8179: Remove leftover/not used embed definitions

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 8179: Remove commented code
Tomas Cohen Arazi [Thu, 11 May 2023 15:07:54 +0000 (12:07 -0300)]
Bug 8179: Remove commented code

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 8179: Make partial receive work correctly
Tomas Cohen Arazi [Thu, 11 May 2023 15:03:55 +0000 (12:03 -0300)]
Bug 8179: Make partial receive work correctly

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 8179: Receive multiple orders
Agustin Moyano [Fri, 9 Oct 2020 20:15:31 +0000 (17:15 -0300)]
Bug 8179: Receive multiple orders

This patch implements the code to allow a patron to receive multiple
orders at the same time in /cgi-bin/koha/acqui/orderreceive.pl page

To test:
1. apply all patches
2. updatedatabase
3. Go to system preferences and allow AcqReceiveMultipleOrderLines
4. In acquisitions module, create a vendor if you don't have one and add
   3 baskets.. one with create items on ordering, one with create items
   on receiving and finally one with create items when cataloguing
5. Fill baskets with orders (There should be at least 15 orders in total). There should be a mix of orders created by suggestions, others by subscriptions and others by neither of those methods.
6. Close all baskets and receive shipment.
CHECK => in /cgi-bin/koha/acqui/parcel.pl page, in top table there is a column with checkboxes, and a button that says "Receive selected"
7. If all orders from all baskets are shown in the table, set the rows per page to 10, so table has more than one page
8. Check some of the checkboxes
CHECK => "Receive selected" button shows how many rows are selected
9. Go to the next page and select some more rows
CHECK => Changing page does not modify how many rows where selected
10. Go back to previous page
CHECK => Previously selected rows are still selected
11. Reload the page to deselect all rows
12. Select only one row and click on "Receive selected" button
CHECK => the page /cgi-bin/koha/acqui/orderreceive.pl behaves just the same as if the "receive" link in the selected row would have been clicked.
13. Click on cancel to go back to parcel.pl page
14. Select all rows (even the ones from the next page of the table) and
    click on "Receive selected"
CHECH => In orderreceive.pl page there is a table with all selected rows
15. Ensure table has more than one page, as in step 7
16. Click on the "edit" link in the last row of the current page
CHECK => A modal window is displayed with 4 tabs within: Info,
Accounting, Receipt history and Items
CHECK => Modal has 4 buttons at the bottom, 'Previous' to go to previos
order, 'Cancel' to close the modal without keeping modifications, 'Save'
to close modal keeping modifications and 'Next' to go to the next order
CHECK => Even that we are at the end of the current page, 'Next' button
is still available
17. Click on 'Next' button
CHECK => The table behind the modal now displays the next page, and the modal was not closed
18. Click on 'Previous'
CHECK => The table behind the modal went back to the first page, and the modal was not closed
19. Click on 'Previous' button till you reach the first row of the first
    page
CHECK => Only when you reach the first row of the first page 'Previous'
button gets disabled
20. Click on 'Next' button till you reach the last row of the last page
CHECK => Only when you reach the last button of the last page 'Next'
button gets disabled
21. Check that behaviour for the different types of order are still the
    same
    a. For orders that where created through suggestion, check that the
suggestion info is present in Info tab. If when suggestion was accepted
you set a reason, a dropdown to change the reason shoul display also.
    b. For orders that where created through subscriptions, check that
the Items tab is disabled, and the Receipt history is enabled. On
accounting tab you should be able to change quantity ordered. If there
were less items received than ordered, the next time you receive this
order the child order generated from this one shoul appear in receipt
history.
    c. For orders that don't come from subscription and creates there items on ordering, Receipt history
should be disabled, and a table with prefilled items shold appear in the
Items tab. You can edit them and the changes should appear in the item's
row.
    d. For orders that don't come from subscription and creates there
items on receiving, Receipt history should be disabled, and a form to
create the items should appear in Items tab. When you add an item a
table should appear.
    e. For orders that don't come from subscription and creates there
ites on cataloguing, Receipt history and Items tabs should be disabled.
    f. Any changes made in quantity (received or ordered) or funds in the modal should be
reflected in the table if you click save from the modal.
22. Once you've done all you checking and verifications click save
23. While saving a progress bar should appear
24. If no error was detected, you should be redirected back to parcel.pl
    page
25. If an error or warning was detected (like there is an order with 0
    items to receive) the save button should be disabled and warnings
are dispayed.
26. prove t/db_dependent/Koha/Acquisition/Fund.t t/db_dependent/Koha/Acquisitoin/Order.t t/db_dependent/Koha/Item.t

Sponsored-by: Virginia Polytechnic Institute and State University
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33717: Typo in search_for_data_inconsistencies.pl
Caroline Cyr La Rose [Wed, 10 May 2023 18:52:58 +0000 (14:52 -0400)]
Bug 33717: Typo in search_for_data_inconsistencies.pl

This patch corrects a typo in the output of
search_for_data_inconsistencies.pl when a bibliographic record has no
title.

The patch also replaces biblio to bibliographic record in the same
sentence for terminology consistency.

To test:
- Have a bibliographic record without a title
- Run misc/maintenance/search_for_data_inconsistencies.pl
- Read output, make sure the sentence is correct

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 31212: Adjust item spec for last_seen_date
Jonathan Druart [Mon, 15 May 2023 08:57:02 +0000 (10:57 +0200)]
Bug 31212: Adjust item spec for last_seen_date

This bug changed the column to a date-time and the spec gets adjusted as
well.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33491: Do not apply style to agreement list view
Jonathan Druart [Tue, 2 May 2023 08:18:59 +0000 (10:18 +0200)]
Bug 33491: Do not apply style to agreement list view

We removed the 'scoped' attribute and so the style rules added in the
previous patch were applied to the agreement list view.
Why is 'scoped' not working is the main question here (?) but adding a
more specific selector to aim only the component (AgreementsList) from
the modal is a quick solution.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Bug 33491: Add a more specific class for the modal

We don't want to apply these CSS rules to other modals

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33580: Fix tests
Jonathan Druart [Mon, 15 May 2023 08:50:12 +0000 (10:50 +0200)]
Bug 33580: Fix tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33488: DBRev 22.12.00.040
Tomas Cohen Arazi [Fri, 12 May 2023 20:48:32 +0000 (17:48 -0300)]
Bug 33488: DBRev 22.12.00.040

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33488: (QA follow-up) Fix index name
Tomas Cohen Arazi [Fri, 12 May 2023 20:45:16 +0000 (17:45 -0300)]
Bug 33488: (QA follow-up) Fix index name

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33488: Add fromBranch index to branch_transfer_limits
Nick Clemens [Tue, 11 Apr 2023 17:46:09 +0000 (17:46 +0000)]
Bug 33488: Add fromBranch index to branch_transfer_limits

To test:
1 - Enable UseBranchTransferLimits by item type
2 - Set some limits for book
3 - Place a hold, verify that pikcup dropdown reflects the limits before and after patch

Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33335: (QA follow-up) Polishing and comments
Marcel de Rooy [Fri, 12 May 2023 08:33:32 +0000 (08:33 +0000)]
Bug 33335: (QA follow-up) Polishing and comments

Just send the codes and descriptions only to client.
Adding a few comments to the reduce construction.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33335: Use To.json to serialize
Jonathan Druart [Tue, 2 May 2023 14:26:45 +0000 (16:26 +0200)]
Bug 33335: Use To.json to serialize

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33335: Fix JavaScript error on the MARC overlay rules page
Marius Mandrescu [Tue, 28 Mar 2023 16:04:49 +0000 (12:04 -0400)]
Bug 33335: Fix JavaScript error on the MARC overlay rules page

The "MARC overlay rules" page doesn't display or work correctly
if a patron category code contains a "-".

This happens because of the JavaScript function in
"marc-overlay-rules.tt" line 469. This causes an error
"Uncaught SyntaxError: missing : after property id".

Test plan:
1. Go to Administration > Patron categories.
2. Make sure you don't have a patron category code that contains
   a "-".
3. Go to Administration > Record overlay rules.
4. The table should display correctly, and you can add, edit
   and delete rules.
5. Return to Patron categories.
6. Add a new patron category with a "-" in the patron category code.
7. Return to Record overlay rules page:
   => The page doesn't display and load correctly (see the attached
      image) - the normal DataTables header and footer aren't
      displayed, and you can't add, edit or delete overlay rules.
  => If you turn on web developer tools, an error is displayed in the
     console: "Uncaught SyntaxError: missing : after property id".
8. Apply the patch.
9. Repeat the step 7, the Record overlay rules page should now
   display correctly and you should be able to add, edit and
   delete rules.
10. Sign off.

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>
17 months agoBug 32357: DBRev 22.12.00.039
Tomas Cohen Arazi [Fri, 12 May 2023 20:35:50 +0000 (17:35 -0300)]
Bug 32357: DBRev 22.12.00.039

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 32357: DBIC schema
Tomas Cohen Arazi [Fri, 12 May 2023 20:35:14 +0000 (17:35 -0300)]
Bug 32357: DBIC schema

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 32357: Set borrower_message_preferences.days_in_advance default to NULL
Lari Taskula [Mon, 28 Nov 2022 22:01:37 +0000 (22:01 +0000)]
Bug 32357: Set borrower_message_preferences.days_in_advance default to NULL

To test:
1. prove t/db_dependent/cronjobs/advance_notices_digest.t
2. prove t/db_dependent/Letters/TemplateToolkit.t
3. prove t/db_dependent/Koha/CurbsidePickups.t
4. prove t/db_dependent/Koha/Patrons.t
5. prove t/db_dependent/Patron/Messaging.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33489: DBRev 22.12.00.038
Tomas Cohen Arazi [Fri, 12 May 2023 20:19:55 +0000 (17:19 -0300)]
Bug 33489: DBRev 22.12.00.038

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33489: Add indices to default patron search fields
Nick Clemens [Tue, 11 Apr 2023 17:33:55 +0000 (17:33 +0000)]
Bug 33489: Add indices to default patron search fields

This patch adds indices to the borrowers table to match the default
search fields for patrons.

To test:
1 - Apply patch
2 - Update database
3 - Ensure patron searching works as before

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>
17 months agoBug 32129: (QA follow-up) Avoid duplicate calculation
Tomas Cohen Arazi [Fri, 12 May 2023 18:47:02 +0000 (15:47 -0300)]
Bug 32129: (QA follow-up) Avoid duplicate calculation

This patch stores the output from ->check_recall() (a Koha::Recall
object or undef) and reuses afterwards, on a ternaty operator.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 32129: Use patron category when checking if item can fill recall
Aleisha Amohia [Tue, 8 Nov 2022 19:58:22 +0000 (19:58 +0000)]
Bug 32129: Use patron category when checking if item can fill recall

This patch uses the patron category of the patron who requested the most
relevant recall to check for more specific circulation rules relating to
recalls. This ensures that patrons who are allowed to place recalls are
able to fill their recalls, especially when recalls are not generally
available for all patron categories.

To test:
1) Go to Administration -> System preferences and enable UseRecalls
2) Go to Administration -> Circulation and fines rules and set a general
All/All rule and a Category A/Itemtype A rule. All values can be set
however you like except for these recalls rules:

All/All rule:
Recalls allowed: 0
Recalls per record: 0
On shelf recalls allowed: if any unavailable

Category A/Itemtype A rule:
Recalls allowed: 5
Recalls per record: 5
On shelf recalls allowed: if any unavailable

3) Find an item of Itemtype A. Check it out to Patron A (any category).
4) Log into the OPAC as Patron B (of Category A). Find the item and
place a recall on the item.
5) Back in the staff interface, check in the item. This should trigger
the recalls process so you can allocate the item to Patron B's recall,
however the pop-up box to confirm the recall does not show. This is the
bug.

6) Apply the patch and restart services

7) Check in the item again. Confirm the pop-up box to confirm the recall
shows and you are able to allocate the item to Patron B's recall.
8) Confirm tests pass t/db_dependent/Koha/Item.t

Sponsored-by: Auckland University of Technology
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>
17 months agoBug 33710: Ignore how-to related files
Jonathan Druart [Wed, 10 May 2023 10:03:09 +0000 (12:03 +0200)]
Bug 33710: Ignore how-to related files

Related to https://gitlab.com/koha-community/koha-testing-docker/-/issues/378

If we merge it we will want to hide how-to.pl and how-to.ptt

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 31212: DBRev 22.12.00.037
Tomas Cohen Arazi [Fri, 12 May 2023 18:24:44 +0000 (15:24 -0300)]
Bug 31212: DBRev 22.12.00.037

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 31212: DBIC schema
Tomas Cohen Arazi [Fri, 12 May 2023 18:23:08 +0000 (15:23 -0300)]
Bug 31212: DBIC schema

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 31212: (QA follow-up) Fix unit test, remove unused imports
Kyle M Hall [Fri, 28 Apr 2023 13:33:29 +0000 (09:33 -0400)]
Bug 31212: (QA follow-up) Fix unit test, remove unused imports

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 31212: (follow-up) Remove unnessesary changes from Items.pm
Lucas Gass [Wed, 29 Mar 2023 17:52:37 +0000 (17:52 +0000)]
Bug 31212: (follow-up) Remove unnessesary changes from Items.pm

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 31212: (follow-up) Fix datelastseen when returning item
Lucas Gass [Wed, 9 Nov 2022 21:40:55 +0000 (21:40 +0000)]
Bug 31212: (follow-up) Fix datelastseen when returning item

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 31212: Fix date_from_string and explicitly called output_pref subroutine
Lucas Gass [Thu, 20 Oct 2022 16:29:36 +0000 (16:29 +0000)]
Bug 31212: Fix date_from_string and explicitly called output_pref subroutine

Signed-off-by: Ann Flournoy <aflournoy@cityofkeller.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 31212: Add Database update
Lucas Gass [Fri, 19 Aug 2022 17:55:32 +0000 (17:55 +0000)]
Bug 31212: Add Database update

Signed-off-by: Ann Flournoy <aflournoy@cityofkeller.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 31212: Change datelastseen from date to datetime field
Lucas Gass [Tue, 7 Feb 2023 23:14:43 +0000 (23:14 +0000)]
Bug 31212: Change datelastseen from date to datetime field

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 31735: Optimize OPAC checkouts view
David Gustafsson [Mon, 10 Oct 2022 15:18:03 +0000 (17:18 +0200)]
Bug 31735: Optimize OPAC checkouts view

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 31735: Avoid re-fetcing objects from database by passing them directly instead...
David Gustafsson [Tue, 27 Sep 2022 16:23:27 +0000 (18:23 +0200)]
Bug 31735: Avoid re-fetcing objects from database by passing them directly instead of ids to various subroutines

To test:

1) Run the following test and make sure all pass:
  t/db_dependent/api/v1/biblios.t
  t/db_dependent/api/v1/checkouts.t
  t/db_dependent/api/v1/return_claims.t
  t/db_dependent/Circulation/CalcDateDue.t
  t/db_dependent/Circulation/CheckIfIssuedToPatron.t
  t/db_dependent/Circulation/dateexpiry.t
  t/db_dependent/Circulation/GetPendingOnSiteCheckouts.t
  t/db_dependent/Circulation/GetTopIssues.t
  t/db_dependent/Circulation_holdsqueue.t
  t/db_dependent/Circulation/IsItemIssued.t
  t/db_dependent/Circulation/issue.t
  t/db_dependent/Circulation/MarkIssueReturned.t
  t/db_dependent/Circulation/maxsuspensiondays.t
  t/db_dependent/Circulation/ReturnClaims.t
  t/db_dependent/Circulation/Returns.t
  t/db_dependent/Circulation/SwitchOnSiteCheckouts.t
  t/db_dependent/Circulation.t
  t/db_dependent/Circulation/TooMany.t
  t/db_dependent/Circulation/transferbook.t
  t/db_dependent/DecreaseLoanHighHolds.t
  t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t
  t/db_dependent/HoldsQueue.t
  t/db_dependent/Holds/RevertWaitingStatus.t
  t/db_dependent/Illrequests.t
  t/db_dependent/ILSDI_Services.t
  t/db_dependent/Items.t
  t/db_dependent/Koha/Account/Line.t
  t/db_dependent/Koha/Acquisition/Order.t
  t/db_dependent/Koha/Biblio.t
  t/db_dependent/Koha/Holds.t
  t/db_dependent/Koha/Items.t
  t/db_dependent/Koha/Item.t
  t/db_dependent/Koha/Object.t
  t/db_dependent/Koha/Patrons.t
  t/db_dependent/Koha/Plugins/Circulation_hooks.t
  t/db_dependent/Koha/Pseudonymization.t
  t/db_dependent/Koha/Recalls.t
  t/db_dependent/Koha/Recall.t
  t/db_dependent/Koha/Template/Plugin/CirculationRules.t
  t/db_dependent/Letters/TemplateToolkit.t
  t/db_dependent/Members/GetAllIssues.t
  t/db_dependent/Members/IssueSlip.t
  t/db_dependent/Patron/Borrower_Discharge.t
  t/db_dependent/Patron/Borrower_PrevCheckout.t
  t/db_dependent/Reserves/GetReserveFee.t
  t/db_dependent/Reserves.t
  t/db_dependent/rollingloans.t
  t/db_dependent/selenium/regressions.t
  t/db_dependent/SIP/ILS.t
  t/db_dependent/Holds.t
  t/db_dependent/Holds/LocalHoldsPriority.t
  t/db_dependent/Holds/HoldFulfillmentPolicy.t
  t/db_dependent/Holds/HoldItemtypeLimit.t
  t/db_dependent/Circulation/transferbook.t
2) Performe one or more checkouts for a patron, making sure
  that the circulation rules allows for renewals (for example by
  setting an earlier due-date).
3) Log in as this patron in OPAC and make sure the list of
  checkouts is displayed correctly, and that renewing an issue
  still works.

Sponsored-by: Gothenburg University Library
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 30687: Allow pickup location to be forced when override is allowed
Nick Clemens [Fri, 23 Dec 2022 15:04:26 +0000 (15:04 +0000)]
Bug 30687: Allow pickup location to be forced when override is allowed

This is Julian's patch with some extra cleanup to reduce repeated code

If AllowHoldPolicyOverride is enabled and only some pickup locations are
available, you still have the possibility to force one of the others
pickup locations.
But when there are zero pickup locations available, that is not
possible.

This patch change that by always displaying the list of pickup locations
when AllowHoldPolicyOverride is enabled.

Test plan:
1. Apply patch
2. Disable AllowHoldPolicyOverride
3. Create a biblio B with an item I at library A.
4. Configure this library A to not be a pickup location
5. Add a "Default holds policy by item type" for item I type where "Hold
   pickup library match" is "item's home library"
6. Try to place a hold on biblio B
   You should not be able to place a hold because there is no valid
   pickup locations
7. Enable AllowHoldPolicyOverride
8. Try to place a hold on biblio B
   You should now see all valid pickup locations in a dropdown list
   (with an exclamation mark in front of each option) with none selected
   by default
9. Verify you can place a title-level hold and an item-level hold

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 31557: DBRev 22.12.00.036
Tomas Cohen Arazi [Fri, 12 May 2023 14:18:27 +0000 (11:18 -0300)]
Bug 31557: DBRev 22.12.00.036

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 31557: (QA follow-up) Make tests more robust
Tomas Cohen Arazi [Fri, 12 May 2023 14:11:44 +0000 (11:11 -0300)]
Bug 31557: (QA follow-up) Make tests more robust

Tests had a few problems:

- They weren't wrapped in a transaction explicitly
- They called Koha::Biblios->delete!
- They failed if run a couple times

This patch:

- Wraps things in a transaction
- Removes not-required things ($target_rs variable not used)
- Preserves the tests logic, but filters the resultset on the
  biblionumber instead of deleting all the database which can fail
  depending on FK constraints.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 31557: (QA follow-up) Fix number of tests
Marcel de Rooy [Fri, 24 Feb 2023 09:22:25 +0000 (09:22 +0000)]
Bug 31557: (QA follow-up) Fix number of tests

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 31557: Add ability for holds queue builder to prioritize either matching a patron...
Kyle Hall [Tue, 18 Oct 2022 16:25:35 +0000 (12:25 -0400)]
Bug 31557: Add ability for holds queue builder to prioritize either matching a patron's home library to the item's home or holding library

Right now the holds queue builder starts filling bib-level holds with
items whose patron's home library matches the item's home library.

It would be good and reasonable to have the option to prioritize
item's whose patron's home library matches the item's holding library
to minimize transfers.

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33580: Bring back ability to mark item as seen via SIP2 item information request
Kyle M Hall [Fri, 21 Apr 2023 11:09:34 +0000 (07:09 -0400)]
Bug 33580: Bring back ability to mark item as seen via SIP2 item information request

Prior to Koha 22.05, the SIP2 item information message had a side affect of updating the datelastseen field for items. This bug has been fixed, but was being utilized by inventory tools that used SIP2. We should bring back this affect and formalize it as an optional SIP2 config account setting.

Test Plan:
1) Apply this patch set
2) prove t/db_dependent/SIP/Message.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>
17 months agoBug 32993: Holds priority changed incorrectly with dropdown selector
Kyle M Hall [Fri, 28 Apr 2023 18:30:19 +0000 (14:30 -0400)]
Bug 32993: Holds priority changed incorrectly with dropdown selector

Test Plan:
1) Find record with at least 3 holds.
2) Change first holds priority as 2, Priority is changed to 3.
3) Try to change priority back to 1, Priority is changed to 2.
4) Apply this patch
5) Reload the page
2) Change first holds priority as 2, Priority is changed to 2.
3) Try to change priority back to 1, Priority is changed to 1.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Hinemoea Viault <hinemoea.viault@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33320: Add spacing in Patron modification requests
Jonathan Druart [Thu, 11 May 2023 10:51:46 +0000 (12:51 +0200)]
Bug 33320: Add spacing in Patron modification requests

* Go to the OPAC, log into your account
* Make changes to your personal details and save
* Go to the staff interface and use the link on the start page to
  moderate the change request
* At the top of the list you'll see something like:

Without this patch:
  Ignore|Patron details
With this patch:
  Ignore | Patron details

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>
17 months agoBug 33167: Fix TT comment for better translatability
Katrin Fischer [Sat, 22 Apr 2023 10:16:59 +0000 (10:16 +0000)]
Bug 33167: Fix TT comment for better translatability

We just figured out that multi-line TT comments show up
weirdly in translations and fixed it on bug 33332. So
this just follows the newly established pattern.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33167: Cleanup staff detail page
Nick Clemens [Thu, 9 Mar 2023 20:37:28 +0000 (20:37 +0000)]
Bug 33167: Cleanup staff detail page

This patch begins reduing some of the extra things we are doing in
detail.pl that could easily be handled in the templates - fetching
authorised values and branches etc

It also removes a loop to find items that should be hidden, and instead
uses a searh parameter

The template changes either use item object rather than passed
variables, or utilize plugins to fetch authorised valued

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>
17 months agoBug 32766: (QA follow-up) Remove stray p from USE statements
Katrin Fischer [Mon, 8 May 2023 21:36:28 +0000 (21:36 +0000)]
Bug 32766: (QA follow-up) Remove stray p from USE statements

+q[% SET footerjs = 1 %]

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 32766: (follow-up) Fix translation function
Thibaud Guillot [Tue, 31 Jan 2023 14:27:09 +0000 (15:27 +0100)]
Bug 32766: (follow-up) Fix translation function

The previous syntax causes a warning during the execution of the translation script

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>
17 months agoBug 32766: Update some labels for better understanding and translation
Thibaud Guillot [Tue, 31 Jan 2023 10:44:09 +0000 (11:44 +0100)]
Bug 32766: Update some labels for better understanding and translation

examples: 'crayon'->'carchoal' or 'camaiu'->'cameo'
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>
17 months agoBug 33567: DBRev 22.12.00.035
Tomas Cohen Arazi [Fri, 12 May 2023 13:31:08 +0000 (10:31 -0300)]
Bug 33567: DBRev 22.12.00.035

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33567: Add a dbrev for installation with empty pref
Marcel de Rooy [Thu, 20 Apr 2023 06:52:50 +0000 (06:52 +0000)]
Bug 33567: Add a dbrev for installation with empty pref

To keep current behavior, we can copy the removed fallback
into the syspref value in case someone might have cleared the pref.

Note: We are not restoring deleted prefs here; that is a data problem
outside the scope of this report. A regular installation should always
have this pref.

Test plan:
Run updatedatabase.pl
Bonus: Clear the pref Reference_NFL_Statuses and run again, verify that
the pref has changed.

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>