Commit graph

6457 commits

Author SHA1 Message Date
982ba9e8a1
Bug 37757: DBRev 24.06.00.028
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-13 16:06:25 +02:00
79ffb8841b
Bug 37757: Update EmailFieldPrimary value
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-13 16:06:23 +02:00
7b713e5acf
Bug 27490: DBRev 24.06.00.027
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-13 13:54:26 +02:00
Nicolas Hunstein
eae7f19f07
Bug 27490: (follow-up) Fix custom installer files
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-13 13:54:26 +02:00
Doris Tam
e086eda769
Bug 27490: Update systempreference 'language' to 'StaffInterfaceLanguages'
Test plan

1. Go to the staff client
2. Go to administration
3. Search systempreferences for 'StaffInterfaceLanguages'
4. Ensure there is a systempreference variable matching 'StaffInterfaceLanguages'

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nicolas Hunstein <nicolas.hunstein@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-13 13:54:25 +02:00
Emmi Takkinen
df888200a1
Bug 37820: Upgrade fails at 23.12.00.023 [Bug 36993]
If table aqbudgets is miissing foreign key
'aqbudgetperiods_ibfk_1' database update fails on
"Can't DROP FOREIGN KEY" error.

To test:
1. Remove changes made in bug 32132, drop foreign key
aqbudgetperiods_ibfk_1 and downgrade your database:
- ALTER TABLE aqbudgets MODIFY COLUMN `budget_period_id` INT(11) NULL;
- UPDATE aqbudgets SET budget_period_id = NULL
WHERE budget_period_id IN(SELECT budget_period_id FROM aqbudgetperiods
WHERE budget_period_description = "Budget for funds without budget");
- DELETE FROM aqbudgetperiods
WHERE budget_period_description = "Budget for funds without budget";
- ALTER TABLE aqbudgets DROP FOREIGN KEY aqbudgetperiods_ibfk_1;
- UPDATE systempreferences SET value="23.1200022" WHERE variable = "Version;
2. Upgrade your database (e.g. running installer/data/mysql/updatedatabase.pl)
=> Update fails on error "Can't DROP FOREIGN KEY `aqbudgetperiods_ibfk_1`;...".
4. Apply this patch.
5. Try to update your database again.
=> Database should now be upgraded succesfully.
=> Confirm table aqbudgets now contains 'aqbudgetperiods_ibfk_1'.

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: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-13 12:02:46 +02:00
b34791b001
Bug 34440: bookings_lead_period and bookings_trail_period cant be set at categorycode level
Follow Joubu's test plan. It should no longer fail.

Error from eval Koha::CirculationRules->set_rules($params) at onboarding.pl was:
set_rule cannot set 'bookings_trail_period' for a 'categorycode'! at /kohadevbox/koha/installer/onboarding.pl line 301.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-09-03 05:22:12 +01:00
Laura_Escamilla
d9b857ecc0
Bug 34185: Capitalized OPAC in OpacItemLocation syspref
To test:
1. In K-T-D git grep for “OpacItemLocation”
    1. Notice that related XSLT / XSL scripts are not coming up. Only .pm, .pl and .sql scripts.
2. Git grep for “OPACItemLocation”. Note that XSLT/XSL files show up but not the .pm, .pl and .sql scripts.
3. Apply the patch. Updatedatabase. Restart_all
4. Git grep for “OPACItemLocation”
    1. Notice that both the XSLT/XSL files in addition to the .sql, .pm and .pl scripts are now showing up.
5. Sign off and have a spectacular day :D

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-02 12:13:43 +02:00
f053ca032b
Bug 34440: Add lead and trail time to circulation rules
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-30 16:41:26 +02:00
8abaff7784
Bug 34088: Short circuit database upgrade check
If the database version and the code version are the same, we should
short circuit and exit immediately.

This patch adds the Koha::Installer module which can very quickly
check if a db or atomic update is needed.

It also moves the logic for C4::Installer::TransformToNum to
Koha::Installer::TransformToNum for performance reasons.

It also moves the logic for C4::Installer::get_atomic_updates to
Koha::Installer::get_atomic_updates for performance reasons.

Test plan:
1. Apply patch
2. Run `time koha-upgrade-schema kohadev`
3. Note that it completes in less than .1 seconds

4. To test db updates, change the database Version to a number
slightly behind the code version, and run
`time koha-upgrade-schema kohadev`
5. Note that the correct version update is processed

6. To test atomic updates:
cp installer/data/mysql/atomicupdate/skeleton.pl \
       installer/data/mysql/atomicupdate/bug_34088.pl
7. Run `time koha-upgrade-schema kohadev`
8. Note that it takes over 1 second to run and the atomic update
is attempted

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-29 18:16:19 +02:00
a3a1d7e253
Bug 36915: (QA follow-up) Passing less to encourage traversal
I generally push for contextual use of accessors in TT notices and try
to reduce extra lookups.

In this case we can access the pickup library branchname directly using
the pickup_library relation available to us in the booking object we
pass.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-27 12:14:20 +02:00
714ebfb66c
Bug 36915: (follow-up) Include branchname in sample notice
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-27 12:14:19 +02:00
08f5164064
Bug 36915: (follow-up) Make basic sample notice html and add breaks
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-27 12:14:18 +02:00
1f444a679f
Bug 36915: (follow-up) Basic sample notice
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-27 12:14:18 +02:00
1a1aa90cdc
Bug 20411: DBRev 24.06.00.026
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-26 17:39:47 +02:00
7f94ad14f0
Bug 20411: Output only if pref has been deleted
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-26 17:39:46 +02:00
Sam Lau
5b9bcb5a67
Bug 20411: Remove StaffDetailItemSelection system preference
This patch removes the 'StaffDetailItemSelection' along with any usages of it. Now, the checkboxes on an item details page are always there.

To test:
1) Apply patch, restart_all, updatedatabase
2) In sys prefs, search for 'StaffDetailItemSelection', nothing should show up.
3) Visit an items details page, make sure there are checkboxes next each item that allow you to perform modification/deletion.

Signed-off-by: Eric Garcia <cubingguy714@gmail.com>
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-26 17:39:46 +02:00
337301883b
Bug 26777: DBRev 24.06.00.025
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-26 17:39:37 +02:00
Sam Lau
f95a6adf7a
Bug 26777: Add new system preference 'OPACVirtualCardBarcode'
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-26 17:39:36 +02:00
00a641d356
Bug 26777: (follow-up) Fix file permssions and tidy
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-26 17:39:34 +02:00
Sam Lau
164ef5ecd2
Bug 26777: Added new sys pref 'OPACVirtualCard'
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-26 17:39:32 +02:00
2b745e32a4
Bug 35044: DBRev 24.06.00.024
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-23 18:21:32 +02:00
4f3d78c8e3
Bug 35044: (QA follow-up): Add color to atomic update
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-23 18:21:32 +02:00
Julian Maurice
2d5a7d19a3
Bug 35044: (QA follow-up) Delete empty values with a single query
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-23 18:21:30 +02:00
e2be648ab4
Bug 35044: (QA follow-up): Remove empty additional_field_values entries
To test:
1) Follow any of the above test plans to add some
   additional_field_values entries
2) Run the following SQL:
  update additional_field_values set value = '';
3) Run updatedatabase twice. Notice the first time it tells you how many
   entries were removed. The 2nd time it does nothing.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-23 18:21:30 +02:00
53a50118ae
Bug 35044: DB changes + atomicupdate file
Add the 'repeatable' column to additional_fields
Remove the unique key from additional_field_values
as we will now be allowing for repeated instances of the same
field_id + record_id

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-23 18:21:19 +02:00
PerplexedTheta
2cc520cdeb
Bug 37593: Removed all instances of 'this this' in the codebase
To test:
a)  do a grep for 'this this'
    1)  notice that there are five matching files
    2)  notice that all of these instances are in comments, or podfiles
b)  apply this patch
c)  do a grep for 'this this'
    1)  notice now that these instances are gone
d)  apply these changes to schema.koha-community.org
e)  result!

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-16 16:22:17 +02:00
4e99c1bc85
Bug 36758: (QA follow-up) Fix some typos
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-09 18:44:52 +02:00
51f16885b7
Bug 36758: DBRev 24.06.00.023
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-09 18:44:52 +02:00
f625baeef0
Bug 36758: Add TICKET_ASSIGNED notice
This patch adds a new default TICKET_ASSIGNED notice to be used with
catalog concerns to notice the assigned staff user when a ticket has
been assigned to them.

Test plan
1) Run the database update and confirm that the new notice has been
   added to the database (If on the sandboxes, skip to the next patch)

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-09 18:44:49 +02:00
14a824ed50
Bug 37419: DBRev 24.06.00.022
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-01 18:22:30 +02:00
8754458775
Bug 37419: Update FK constraint on record sources to avoid data loss
Without this patch, deleting a record source will delete the associated
biblio_metadata rows, which is a severe data loss.

This patch makes the constraint restrict this action.

To test:
1. Add a record source
2. Set the record source to some records
   $ koha-mysql kohadev
   > UPDATE biblio_metadata SET record_source_id='your source id' WHERE
biblionumber=1;
3. Delete the record source
=> FAIL: Record metadata deleted
4. Apply this patch
5, Run:
   $ ktd --shell
  k$ updatedatabase
=> SUCCESS: DB update goes well
6. Repeat 1~3 with another record
=> SUCCESS: Source cannot be deleted if there are linked records

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-01 18:22:29 +02:00
628f84bdec
Bug 35539: DBRev 24.06.00.021
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-07-25 11:13:12 +01:00
1dde4f4f58
Bug 35539: (QA follow-up) Fix atomic update to look for first non-null values
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-07-25 11:11:24 +01:00
fcc4de2018
Bug 35539: Atomicupdate
Removal of 'bulk' column
Removal of 'finetype' column
Removal of 'issuelimit' column

Test plan, k-t-d:
1) Add data to the relevant columns, run the following mysql:
update categories set bulk = 1;
update categories set finetype = 1;
update categories set issuelimit = 1;
2) Run updatedatabase, notice it shows a warning and does not update the database
3) Clean up the data, run the folllowing mysql:
update categories set bulk = null;
update categories set finetype = null;
update categories set issuelimit = null;
4) Run updatedatabase again, notice it updates the database as intended

Run:
t/db_dependent/Circulation/GetHardDueDate.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-07-25 11:11:18 +01:00
4a4469fd6a
Bug 35539: Remove 'issuelimit' column/field from categories table
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-07-25 11:11:16 +01:00
581903289d
Bug 35539: Remove 'finetype' column/field from categories table
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-07-25 11:11:14 +01:00
6d4b201823
Bug 35539: Remove 'bulk' column/field from categories table
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-07-25 11:11:08 +01:00
49090d9860
Bug 36996: DBRev 24.06.00.020
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-07-23 17:00:48 +01:00
728e83bb47
Bug 36996: Add z3950Status system preference
This bug adds a new system preference 'z3950Status' which takes a yaml block and marks any items matching
the conditions as unavailable via z3950 results

It obeys the existing z3950 extra fields, adding item ststus to field $k

To test:
0 - Apply patch, update database
1 - Setup your koha to use itself as a z39 source in Administration/Z3950/SRU servers:
    host: localhost
    port 2100
    database: biblios
    syntax: MARC21 (or UNIMARC if applicable)
2 - Uncomment the config line in /etc/koha/sites/kohadev/z3950/config.xml
    Also make sure to remove the backslashes escaping the hyphens
3 - Restart all
4 - Cataloging - New from Z3950
5 - Search your records, view the marc to confirm status subfield $k is included
6 - Add items to a record with various statuses (lost,damaged,withdrawn) and itemtypes
7 - Edit syspref AdditionalFieldsInZ3950ResultSearch o add 952$k
8 - Search for record above - confirm statuses show as expected
9 - Edit new syspref z3950Status - confirm the language of the pref makes sense
    itype: [BK]
    ccode: [REF]
10 - Search z39 again and confirm items and collection codes are marked 'SYSPREF' in $k
11 - Edit Authorized values - add category Z3950_STATUS
12 - Add authorized vlaue: SYSPREF with Description: System preferenced
13 - Restart all
14 - Search z39 again and confirm statuses show new description

Sponsored by: Northeast Kansas Library System <https://www.nekls.org>
Sponsored by: South East Kansas Library System <https://www.sekls.org>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-07-23 16:53:03 +01:00
895a3788d8
Bug 23781: DBRev 24.06.00.019
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-07-23 16:47:18 +01:00
Aleisha Amohia
c85f46beb3
Bug 23781: (follow-up) Reorder atomic updates
so they apply when run the first time.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-07-23 16:38:12 +01:00
Aleisha Amohia
96479a2af6
Bug 23781: Database updates
This patch adds RETURN_RECALLED_ITEM and PICKUP_RECALLED_ITEM SMS notices and makes recalls notices available to be configured in patron messaging preferences.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-07-23 16:37:51 +01:00
198252a292
Bug 29509: DBRev 24.06.00.018
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-07-22 10:41:56 +01:00
0505531cde
Bug 29509: (QA follow-up) Tidy atomic update
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-07-22 10:28:03 +01:00
56c7c3782b
Bug 29509: (QA follow-up) Check top level permissions too
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-07-22 10:28:03 +01:00
85ea79c45b
Bug 29509: Update swagger specification and add permissions to users
This patch removes the 'edit_borrowers', 'manage_bookings',
'lable_creator', 'routing' and 'order_manage' permissions from the list
of options in the patrons list endpoint.

We then assign the new 'list_borrowers' permission to any users who have
those removed permissions

Test plan
1) Apply patch and run the database update
2) Users with any of the permissions listed above should now also have
   the 'list_borrowers' permission too.
3) Check that patron searching continues to work from the various
   locations in the UI for the above affected users

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Incorporated second patch and removed 1<<4. 16 reads much better :)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-07-22 10:28:03 +01:00
876332b676
Bug 13888: DBRev 24.06.00.017
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-07-22 10:28:02 +01:00
ed8aed912c
Bug 13888: 'Lists' permission should allow/disallow using the lists module in staff
This patch adds two new system preferences, use public lists, and create public
lists. Use public lists determines if a librarian is permitted to see public
lists, whilst create public lists determines if a librarian can create new public
lists.

It also fixes erroneously allowing staff to add items to existing lists, by
honouring the existing edit_public_list_contents

To test:
a)  notice the new my lists link on the account pulldown
    1)  ensure it goes to the lists module
b)  create new public list, add at least one item, make it editable by everyone
    1) note the name of the list
c)  create a new patron with full access to the staff client minus lists permissions
d)  log in as the newly created patron
e)  notice the lists button is missing from the staff client mainpage
f)  set any of the lists permissions except create public lists, use public lists, edit public list contents
g)  notice how the lists button is no longer missing from the staff client mainpage
h)  go to the lists module
    1) notice that public lists are now missing from the datatable
i)  click add list
    1)  notice that the public drop-down is now a fixed label set to private
j)  create list and confirm it is not public
k)  turn use public lists permission on
l)  return to the lists module
    1)  notice that the datatable now shows private and public lists tabs
m)  turn create public lists permission on
n)  repeat steps h-i
    1)  notice that the public drop-down is now visible again
o)  create list and confirm it is public
p)  go to the list you created in step b
q)  notice that add items button, and remove selected button, is missing
r)  turn edit public list contents permission on
s)  repeat steps p-q
    1) notice that add items button is now visible
t)  click add items
u)  enter an item barcode or biblio number, click save
    1) notice that the items are now added to the list

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-07-22 09:57:04 +01:00
e81f7e2ef2
Bug 28924: DBRev 24.06.00.016
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-07-18 18:25:58 +02:00