Commit graph

6213 commits

Author SHA1 Message Date
26de0bfaa0
Bug 34088: Move the 'needs update' test to a separate script
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-17 10:48:39 +02:00
9bcb924afc
Bug 37592: (follow-up) Fix database update statements
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 14:54:21 +02:00
00f8acb24b
Bug 37601: DBRev 24.06.00.030
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 13:47:16 +02:00
810abb2a62
Bug 37601: (QA follow-up) Add status 'completed'
This will probably be useful when transforming a booking into a checkout.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 13:47:15 +02:00
853c8e74b5
Bug 37601: (QA follow-up) Rename status 'created' as 'new' to be more consistent with other modules
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 13:47:15 +02:00
20cf1fd7b6
Bug 37601: (QA follow-up) Change updated_on to modification_date in accordance with Bug 37592
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 13:47:14 +02:00
262646bd60
Bug 37601: (follow-up) Change updated_at to updated_on in accordance with Bug 37592
Signed-off-by: LEBSimonsen <simonsen@bz-sh.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 13:47:13 +02:00
0846e45a1e
Bug 37601: Add status field to bookings table
Signed-off-by: LEBSimonsen <simonsen@bz-sh.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 13:47:13 +02:00
750f40eaae
Bug 37592: (follow-up) Fix database column names in kohastructure.sql
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 13:47:12 +02:00
d17c640510
Bug 37592: DBRev 24.06.00.029
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 13:47:11 +02:00
e75c1ac012
Bug 37592: (QA follow-up) Change created_on, updated_on to creation_date, modification_date
It makes sense not to introduce mapping code if there's no reason for it.
Accordingly the the columns are now of type DATETIME instead.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 13:47:11 +02:00
ab7d511822
Bug 37592: (follow-up) Change created_at, updated_at to created_on, updated_on
As per a discussion in the community chat, this change is more in line with the existing schema.

Signed-off-by: LEBSimonsen <simonsen@bz-sh.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-16 13:47:10 +02:00
2dec6cb6d1
Bug 37592: Add created_at, updated_at fields to bookings table
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-09-16 13:47:09 +02:00
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
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
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