Commit graph

5350 commits

Author SHA1 Message Date
b8b8a62f11
Bug 29632: Don't sort cn-sort numerically
When defining our sort fields in we defined all as 'numeric'

For other string containing numbers this is likely correct, however,
for callnumbers it is not. e.g. E45 should sort before E7

This patch adds a new 'callnumber' type and deifnes this for cn-sort and
adds to the field maping a sort without numeric set

To test:
0 - Be using ES with Koha
1 - On records with single item, add callnumbers:
    VA65 E7 R63 1984
    VA65 E7 T35 1990
    VA65 E45 R67 1985
2 - Add public note 'shrimp' or something to make them easily searchable as a group
3 - Search for 'shrimp', sort by callnumber
4 - Note E45 comes last, it should come first
5 - Apply patch
6 - Reset ES mappings
7 - Reindex ES
8 - Repeat search
9 - Sorting should be correct when set to callnumber

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Michal Urban <michalurban177@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-07-18 11:21:47 -03:00
Katrin Fischer
9802273b1f
Bug 25449: (QA follow-up) Set items.itype to mandatory by default (UNIMARC)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-07-18 10:14:26 -03:00
ac54145e2a
Bug 25449: Set items.itype mandatory by default
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>
2022-07-18 10:14:21 -03:00
70ff3607b5
Bug 28854: Fix permissions problem
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-07-13 19:09:39 -03:00
c9aa31d166
Bug 28854: DBRev 22.06.00.016
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-07-13 16:22:21 -03:00
475486781f
Bug 28854: (follow-up) Replace unique constraint in return claims
This patch fixes the failing test for the return claims api.  We add a
new unique constraint to replace the one we removed earlier in the
patchset. One should not be able to create a duplicate return claim for
the same issue of an item.

Test plan
1) Run the database update
2) Confirm that t/db_dependent/api/v1/return_claims.t now passes
3) Confirm that t/db_dependent/api/v1/items.t continues to pass
4) Bonus points, confirm that bundle checkin still works when items are
   missing

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-07-13 14:53:28 -03:00
5476be0c90
Bug 28854: DBRev 22.06.00.015
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-07-13 12:21:05 -03:00
db48209356
Bug 28854: (QA follow-up) Fix DB revision for AV's above 10
The authorised_value field is a varchar and so 'MAX' will sort '9' above
'10' and cause issues if you have more than 9 AV values already for LOST
or NOT_LOAN.

This patch adds a 'CAST' to the field so we can use MAX correctly.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-07-13 10:36:15 -03:00
5b4e36b39a
Bug 28854: Add default AV and Syspref values
This patch adds the new AV and System Preferences to the installer.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-07-13 10:35:51 -03:00
cc23b3b918
Bug 28854: (QA follow-up) Fix QA tool complaints
* Typo in code comment
* Permissions on atomicupdate
* Missing TT filter in template
* Spelling in template

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

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-07-13 10:35:45 -03:00
d7a339d8b7
Bug 28854: Drop unique index on issue_id in return claims
With the introduction of circulating items within a bundle set, we can
now loose multiple items from the bundle from the same issue.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-07-13 10:35:29 -03:00
91518ae375
Bug 28854: Database update
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-07-13 10:35:20 -03:00
e49a23f2d5
Bug 24857: DBRev 22.06.00.014
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-07-08 16:23:05 -03:00
995f32f4a1
Bug 24857: (QA follow-up) Make update idempotent
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-07-08 16:19:35 -03:00
9ab9601ee9
Bug 24857: Database updates
This adds the new tables, syspref, and a new permission

https://bugs.koha-community.org/show_bug.cgi?id=24860
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-07-08 15:59:46 -03:00
988abb6647
Bug 24865: DBRev 22.06.00.013
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-07-05 11:41:34 -03:00
10fa2db886
Bug 24865: Customize the Accountlines Description
It would be great if we could customize what information was added to the "Description of charges" field when a fine was made so data could be stored even when the item is deleted.

Test Plan:
1) Create an overdue checkout that will get a fine
2) Run fines.pl
3) Note the description for the fine
4) Delete the fine from the database
5) Apply this patch
6) Run updatedatabase.pl
7) Restart all the things!
8) Run fines.pl
9) Note the description of the fine is unchanged
10) Delete the fine again
11) Browse to Slips & Notices
12) Edit the new notice OVERDUE_FINE_DESC
    You will have access to the objects checkout, item, and borrower
13) Run fines.pl
14) Note your new description was used

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-07-05 11:37:35 -03:00
ae9c951160
Bug 24010: DBRev 22.06.00.012
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-07-05 11:11:54 -03:00
29a9d790e8
Bug 24010: (QA follow-up) Correct COMMENT syntax
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-07-05 11:08:16 -03:00
a7eee10279
Bug 24010: DB Changes
Amended-patch: adjusted to new atomic update format

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-07-05 10:57:16 -03:00
b4a9d0323e
Bug 30275: DBRev 22.06.00.011
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-07-05 09:50:05 -03:00
61e41c4c41
Bug 30275: (QA follow-up) Rename columns to match API
This patch performs the following column renames:

* id => renewal_id
* issue_id => checkout_id

The idea is that no translation is needed for the API, and also, being a
new table, we can educate the users into the 'to be' terminology we are
leaning towards, instead of having them learn one naming to create
reports and then need to translate them once we normalize things in a
future.

That said, this is simple to review.

Apply this patch and repeat the test plan.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-07-05 09:46:16 -03:00
2d64b3ce8a
Bug 30275: Rename issues.renewals to issues.renewals_count
Rename the issues.renewals field to renewals_count to prevent a method
name collision with the new relation accessor introduced by this
patchset.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-07-05 09:45:55 -03:00
7dd67c9c99
Bug 30275: Generated kohastructure.sql
This kohastructure update was generated using `koha-dump --schema-only`
in koha-testing-docker once the atomicupdate had been run against the
previous atomicupdate patch.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-07-05 09:45:43 -03:00
96aaf9a82f
Bug 30275: Add checkout_renewals table
This patch adds the new checkout_renewals table using an atomicupdate

Sponsored-by: Loughborough University
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-07-05 09:45:39 -03:00
ad313c37af
Bug 30823: DBRev 22.06.00.010
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-07-01 16:13:52 -03:00
Aleisha Amohia
7b8939b2ec
Bug 30823: Filling recalls uses 'FILL' action in action logs
This enhancement changes recall fulfillment actions to log with the
FILL action. It will also update existing recalls FULFILL actions in
the database to use the FILL action.

To test:
1) Enable the UseRecalls system preference and set up your
recalls-related circulation rules. Confirm RecallsLog is enabled.
2) Check out an item to Patron B.
3) Log into the OPAC as Patron A and search for the item.
4) Place a recall on that item.
5) Go back to the staff client and check the item in. Confirm the recall
as waiting for Patron A.
6) Check out the item for Patron A to fill the recall.
7) Go to Tools -> Log Viewer. Confirm there is a FULFILL action. Choose
the following search params to browse system logs:
- modules: recalls
- actions: fill
8) Submit the search and confirm the recall DOES NOT show.
9) Apply the patch, update database, restart services.
10) Refresh the log viewer and repeat step 7. Submit the search and
confirm the recall DOES show. Confirm there is no longer a FULFILL
action as both holds and recalls will use FILL.
11) Check in the item.
12) Repeat steps 2-6. We are ensuring that future recalls are logged
using the FILL action.
13) Repeat step 7. Confirm all test recalls are now showing in search
results.

Sponsored-by: Catalyst IT

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>
2022-07-01 16:09:13 -03:00
41ddbd7b2f
Bug 30889: DBRev 22.06.00.009
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-07-01 09:14:18 -03:00
b983e3c505
Bug 30889: Add comment for the new DB field
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-30 12:03:19 -03:00
c1fcf3510e
Bug 30889: Fix atomic update permissions
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-30 12:03:18 -03:00
72a6c8ba84
Bug 30889: (follow-up) Add context field to background_jobs
This patch adds a new 'context' field to the background_jobs table to
record the context in which the job was queued.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-30 12:03:18 -03:00
Petro Vashchuk
b25dfb50a1
Bug 30775: Make 952w to have datepicker plugin by default
This field (Price effective from) is very similar to 952d,
but it doesn't have dateaccessioned.pl plugin by default,

Apart of worse usability of this it is also allows to enter wrong
date which will be converted in 0000-00-00 in DB and even lead to
crashes by code in other places.

So, adding this plugin not only improves usability (user can have
datepicker) but also adds date field validation.

Test plan:
1. Head over to MARC frameworks from your administration page,
check 952 subfield structure of your default framework structure.
2. dateaccessioned.pl is set as a plugin for 952d by default
but is missing from 952w.
3. Apply the patch and reset your koha, drop db and use reset_all alias.
4. Check frameworks structure again and ensure that datepicker plugin
is set by default for 952w.
5. Edit some item to ensure that datepicker works for that 952w.

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>
2022-06-27 12:33:31 -03:00
cccfccca76
Bug 30327: DBRev 22.06.00.008
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 15:30:47 -03:00
8757023b21
Bug 30327: (follow-up) Fix inconsistencies in syspref names and supply defaults
This patch fetches the new sysprefs into variables, providing default title ascending if
they are not set to avoid an undefined concatenation warning

I also make the update idempotent and fix confusion of plural/singular names

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 15:25:18 -03:00
daab31ab38
Bug 30327: Fix tests
Corrected variable name on update to match everywhere else

Added a default value for limit in buildQuery and only append limit if it has content

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 15:25:18 -03:00
de63c2abb1
Bug 30327: Add options for sorting components
This patch adds two new sysprefs:
 ComponentSortField
 ComponentSortOrder

These allow the user to choose how components should be sorted when displaying on the details page
of a record, and the corresponding search for all components

This also updates our search from simple_search_compat to search_compat to allow for sorting options

Note:
Some sorting under ES is unclear - this is a separate issue to be invesitgated
Our Zebra index does not offer 'record number' sorting, I will file a bug for that

To test:
 1 - Enable UseControlNumber (or not)
 2 - Add some components to a record by control number or title depending on above
 3 - Enable  ShowComponentRecords  syspref
 4 - View the record that has components
 5 - Note they are not sorted
 6 - Apply patch, updatedatabase
 7 - reload record
 8 - Note components are sorted by title ascending
 9 - Try different values for ComponentSortField and ComponentSortOrder
10 - Confirm sorting changes with system preferences
11 - Repeat test on staff and opac, with ES and Zebra search engines

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 15:25:18 -03:00
b6dcd3cbd3
Bug 29129: DBRev 22.06.00.007
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 11:16:23 -03:00
6dbb9c3690
Bug 29129: (QA follow-up) Tidy atomicupdate
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 11:15:12 -03:00
Katrin Fischer
f85a7a0d82
Bug 29129: (QA follow-up) Add +x to atomicupdate permissions
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 10:56:50 -03:00
4a3b988d5c
Bug 29129: Update DisplayClearScreenButton to allow for a choice between issueslip and issueqslip
To Test:
1. Apply patch, updatedatabase, and restart_all
2. A small change the global scss file means you should regenerate the CSS as well. ( https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface )
3. Set DisplayClearScreenButton to "don't show"
4. Go to the patron checkout screen and see that no button should show to clear the screen and print
5. Set DisplayClearScreenButton to 'ISSUESLIP' and make sure the button now appears and the ISSUESLIP prints
6. Set DisplayClearScreenButton to 'ISSUEQSLIP' and make sure the button now appears and the ISSUEQSLIP prints

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 10:56:50 -03:00
5e5481ea44
Bug 21978: DBRev 22.06.00.006
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-24 12:31:39 -03:00
1e3ec982e4
Bug 21978: Add middle_name to sysprefs.sql
And add middle_name at the exact same places for installations with the
default value.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-24 12:29:23 -03:00
b409b5eb8d
Bug 21978: (follow-up) Stop using C4 methods in atomicupdate
We should really only use C4::Context methods where absolutely
necessary.. in this case is was simple to replace the get_preference and
set_preference calls with SQL

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-24 12:29:19 -03:00
f4951cc05e
Bug 21978: Add middle_name field to the database
This patch adds a new field, middle_name, to the borrowers,
deletedborrowers and borrower_modifications tables.

It also updates the DefaultPatronSearchFields preference to include the
new field if the preference is still set to it's default settings from
install.

Sponsored-by: Cheshire Libraries

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-24 12:23:59 -03:00
0810d7d343
Bug 24239: DBRev 22.06.00.005
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-23 15:55:54 -03:00
33e6256619
Bug 24239: (QA follow-up) Make dbrev idempotent
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-23 15:52:49 -03:00
ed1a8812c1
Bug 24239: (QA follow-up) Rename date_due => due_date
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-23 15:43:18 -03:00
Lari Taskula
60f3c899b8
Bug 24239: Add column illrequests.date_due
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-23 15:28:40 -03:00
76d22780ed
Bug 12446: (follow-up) Fix patron categories sample data
The can_be_guarantee column was added to the sample data, but not to all
rows so it was being silently skipped by the install process.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-23 13:49:06 -03:00
251a3bb584 Bug 12446: (QA follow-up) Rename canbeguarantee => can_be_guarantee
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-23 13:34:05 -03:00