Commit graph

5478 commits

Author SHA1 Message Date
Olli-Antti Kivilahti
b9158641d4
Bug 7021: Patron category in the statistics table
This patch populates the koha.statistics.usercode with borrowers.categorycode where it is easily available.
Currently for statistics.type 'issue' OR 'localuse' OR 'renew'.

Supplied a script to UPDATE the old statistics records.

Have fun!

To test:
1. Add loan for patron.
2. Check statistics table
=> 'usercode' column for this issue should now contain patrons categorycode

To test add_statistics_borrowers_categorycode.pl:
1. Run add_statistics_borrowers_categorycode.pl
2. Check statistics table
=> all statistics which are type 'issue' OR 'localuse' OR 'renew'
should now contain patrons categorycode in 'usercode' column

Also prove that tests in t/db_dependent/Circulation.t still pass.

Rebased-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-22 09:31:27 -03:00
Emmi Takkinen
cbed9618c9
Bug 7021: Reintroduce usercode column
This patch reintroduces usercode column to
statistics table.

To test:
1. Apply patch and update database
2. Confirm there's column usercode in statistics
table

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-22 09:31:27 -03:00
734c8fe70e
Bug 30497: DBRev 22.06.00.050
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-22 08:38:10 -03:00
14b9274135
Bug 30497: Recreate old_reserves_ibfk_4 when it cascades
Test plan:
Drop old_reserves_ibfk_4.
Add back with:
    alter table old_reserves ADD CONSTRAINT `old_reserves_ibfk_4` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`) ON DELETE CASCADE ON UPDATE CASCADE;
Run dbrev. Check that constraint has been replaced by SET NULL.
Run dbrev again. No changes.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT 23-08-22 Replaced DROP CONSTRAINT]

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-22 08:33:58 -03:00
4a27800c62
Bug 30490: DBRev 22.06.00.049
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-22 08:33:09 -03:00
9b018fc6de
Bug 30490: Adjust constraint itemtypes.itemtypes_ibfk_1
Change from CASCADE to restrict.
In harmony with dbrev 20.06.00.022.

Test plan:
Run the dbrev.
Bonus:
update itemtypes set parent_type='VM' where itemtype='CF';
delete from itemtypes where itemtype='VM';
=> ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails (`koha_myclone`.`itemtypes`, CONSTRAINT `itemtypes_ibfk_1` FOREIGN KEY (`parent_type`) REFERENCES `itemtypes` (`itemtype`))

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-22 08:30:36 -03:00
9be197d567
Bug 30472: DBRev 22.06.00.048
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-16 16:56:44 -03:00
5252dd2065
Bug 30472: Make borrower_relationships.guarantor_id not null
In harmony with dbrev 19.06.00.022.

Test plan:
Run dbrev.
Run t/db_dependent/Patron/Relationships.t
Run t/db_dependent/Koha/Patrons.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-16 16:54:35 -03:00
244f68b1e0
Bug 30025: DBRev 22.06.00.047
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-16 16:52:16 -03:00
7eced5a054
Bug 30025: Replace AllowManualAuthorityEditing with RequireChoosingExistingAuthority
This flips the pref from an allowance to a requirement, hopefully this makes the logic here clearer

Test as before, but the values for the renamed pref flipped

Signed-off-by: AFHDubCoLib <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-16 16:48:34 -03:00
d8b15c685c
Bug 30025: Split BiblioAddsAuthorities into two sysprefs
This patch adds two new sysprefs:
AutoLinkBiblios
AllowManualAuthorityEditing

Both inherit the setting from BiblioAddsAuhtorities which is removed

To test:
1 -Apply patches
2 - Update database
3 - Confirm old setting is transferred to new option
4 - Confirm you can edit authoriteis manually if AllowManualAuthorityEditing set to allow
5 - Confirm you cannot edit authorities manually if AllowManualAuthorityEditing set to don't allow
6 - Confirm a new bib is linked when AutoLinkBiblios is enabled (set AllowManualAuthorityEditing to add unlinked heading)
7 - Confirm new bib notlinked when AutoLinkBiblios is disabled
8 - Confim new bib not linked when AutoLinkBiblios is enabled, but heading doesn't match an authority and  AutoCreateAuthorities is disabled
9 - Confim new bib linked to new authority when AutoLinkBiblios is enabled, but heading doesn't match an authority and  AutoCreateAuthorities is enabled

Signed-off-by: AFHDubCoLib <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-16 16:48:30 -03:00
5db2d54a0f
Bug 30025: DB update
Signed-off-by: AFHDubCoLib <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-16 16:48:25 -03:00
4b4b8b9d54
Bug 15348: DBRev 22.06.00.046
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-16 10:59:04 -03:00
04319ef5a0
Bug 15348: (QA follow-up) DB update fixes
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-16 10:54:54 -03:00
2a1d85fc32
Bug 15348: Add estimated delivery date field to individual orders
This patch allows you to specify an estimated delivery date per order.
The specified estimated delivery date is also considered when searching
for late orders and exporting late orders. You can also edit the
estimated delivery date from the late orders page.

Test plan:
1. Update database, rebuild schema, restart services
2. Go to Acquisitions, search for a vendor, and create a new basket
3. Add an order to the basket. When filling in the accounting details,
notice the new 'estimated delivery date' field, but don't add a date.
Save the order.
4. Confirm no date shows in the estimated delivery date column in the
orders table.
5. Modify the order. Add a date in the estimated delivery date field and
save the order.
6. Confirm the date now shows in the orders table.
7. Close the basket.
8. Go to the Late Orders page.
9. Put estimated delivery date from and to parameters in the search
filters on the left. Ensure the from and to dates encapsulate the date
you entered in the estimated delivery date field for the order.
10. Click Filter and ensure the order shows.
11. Select the checkbox next to the order. Click the Export as CSV button.
12. Open the CSV and confirm the estimated delivery date that you
entered shows as expected in the file.
13. Click Edit under the estimated delivery date. Confirm the estimated
delivery date modal pops up with the correct order line number in the
modal header.
14. Remove the estimated delivery date and click Save.
15. Confirm that the estimated delivery date calculated by Koha now
shows in the late orders table.
16. Select the checkbox next to the order. Click the Export as CSV button.
17. Open the CSV and confirm the calculated estimated delivery date
shows in the CSV.
18. Confirm tests pass: t/db_dependent/Koha/Acquisition/Order.t

Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ)
Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-16 10:36:53 -03:00
b56a874a16
Bug 29144: DBRev 22.06.00.045
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-16 10:25:07 -03:00
fe9a0e3108
Bug 29144: (QA follow-up) Make update idempotent
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-16 10:21:10 -03:00
c3b9e5e841
Bug 29144: Copy and remove branches.opac_info (dbrev)
Test plan:
Run dbrev.
Check api URL: /api/v1/public/libraries (with/without suffix /[branch_code].

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-16 09:55:20 -03:00
c4b37e9113
Bug 26247: (follow-up) Fix permissions
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-13 21:03:20 -03:00
1183ae6961
Bug 26247: DBRev 22.06.00.044
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-13 13:33:17 -03:00
4ccb34513a
Bug 20058: DBRev 22.06.00.043
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-12 17:45:52 -03:00
845978d45c
Bug 20058: (QA follow-up) Add exec flag to install file
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-12 17:39:38 -03:00
Stefan Berndtsson
e95e18b21b
Bug 20058: Add option to send permanent_location as AQ in SIP response
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-12 17:39:33 -03:00
118a7e6891
Bug 26247: (QA follow-up) Merge DB Updates
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-12 16:45:08 -03:00
Florian Bontemps
8fae3c2069
Bug 26247: Adding 2 Sysprefs for Search Terms
This patch adds two system preferences options : 'RetainCatalogSearchTerms' and 'RetainPatronsSearchTerms'. If enabled, search terms will be retained between searches made from, respectively, the Search Catalog header and the Checkout or Search Patrons headers. If disabled, the searchbars will clear out between page loads.

Attention, this is an alternate solution from the previous patches, ONLY apply this patch when testing and not the previous ones.Changed the syspref wording as well.

To test:
1 - From the staff client, search some terms using the Check out header search bar.
2 - Confirm search terms are retained.
3 - Do Step 1-2 twice again, this time using the Search patrons and Search the catalog.
4 - Apply patch (again, only this one), update database.
5 - In the system preferences, look for RetainCatalogSearchTerms and set it to 'don't retain'.
6 - Use the checkout head search bar again, confirm that search terms aren't retained after page load.
7 - Do Step 5-6 once again, this time with the RetainPatronsSearchTerms and the Search Patrons and Search the catalog headers.
8 - Search boxes should be cleared.

Thanks-to: Fridolin Somers and Nick Clemens for the bases I built on.
Signed-off-by: Florian Bontemps <florian.bontemps@biblibre.com>
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-09-12 16:45:08 -03:00
e4455a5893
Bug 29409: Check for data that violates a constraint to avoid update problems
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-12 16:38:54 -03:00
012e5bff1c
Bug 29409: Check for existence of constraint before deletion
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-12 16:38:46 -03:00
b2cce0d9f5
Bug 27981: DBRev 22.06.00.042
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-12 15:21:38 -03:00
Nuño López Ansótegui
62b2fc31bd
Bug 27981: Add option to automatically set 001 to the biblionumber
This patch adds a new system preference:
autoControlNumber

The option "biblionumber" will set field 001 to the biblionumber when you create a new record
or edit an existing record and clear the 001 field.

If a value is present in 001 when saving the record it will be preserved.

If set to 'OFF' the 001 field wil not be touched

When duplicating a record the 001 will be removed if autoControlNumber is set

To test:
 1 - Apply patches and updatedatabase
 2 - Create a new record with no 001 field
 3 - Save and view the MAC, confirm there is no 001
 4 - Set the system preference to 'biblionumber'
 5 - Edit the record you created previously
 6 - Note the 001 is prepopulated with the biblionumber
 7 - Delete the field
 8 - Save the record
 9 - View the MARC, the 001 is filled with biblionumber
10 - Edit the record
11 - Set the 001 to a different value "Not the biblionumber"
12 - Save
13 - View the marc and confirm the value you entered is retained
14 - Edit a record with an existing 001 that is not the biblionumber
15 - Save and confirm 001 is not updated

To test duplication:
1 - Edit a record as duplicate when using the advanced editor
2 - Confirm the 001 does not load, but record saves correctly
3 - Edit the record
4 - Switch to 'basic editor'
5 - Save, then view record
6 - Edit as duplicate in basic editor
7 - Confirm the 001 is removed
8 - Confirm the 001 is added on save

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Thomas Klausner <domm@plix.at>

Signed-off-by: Andrew Nugged <nugged@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-12 15:17:36 -03:00
df597c1aca
Bug 27981: DB update
Signed-off-by: Thomas Klausner <domm@plix.at>

Signed-off-by: Andrew Nugged <nugged@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-12 15:17:30 -03:00
ea3795aa73
Bug 30483: DBRev 22.06.00.041
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-12 08:39:03 -03:00
1f44891fd8
Bug 30483: Make issues.borrowernumber and itemnumber NOT NULL
Note: This change does NOT apply to old_issues, where constraints
may result in nullifying these columns.

Test plan:
Run dbrev.
Try checkout, checkin.

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

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-12 08:26:30 -03:00
Isobel Graham
7ffd3fd86d
Bug 31403: Enable CircSidebar by default on new installs
This patch updates sysprefs.sql to enable the CircSidebar preference by
default on new installs.

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>
2022-09-08 10:52:31 -07:00
b89b1d6c3d
Bug 30619: DBRev 22.06.00.040
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-07 17:50:18 -07:00
12524600d5
Bug 30619: (QA follow-up) Add exec flag to bug_30619.pl
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-07 15:59:43 -07:00
e09654da55
Bug 30619: Add sample email notice
This patch adds a default same email type notice for the point of sale
receipt.

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-09-07 15:59:39 -07:00
c47194153b
Bug 31374: DBRev 22.06.00.039
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-07 13:36:52 -07:00
Katrin Fischer
7823ca473f
Bug 31374: (QA follow-up) Fix typo collumn in database update
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-07 13:32:55 -07:00
264a6e5979
Bug 31374: (follow-up) change private note to staff_note and reorder columns
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-07 13:32:51 -07:00
901fdd8891
Bug 31374: Database/Schema update
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-09-07 13:32:30 -07:00
Caroline Cyr La Rose
cd13475cf9
Bug 28708: fr-CA localization file
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-07 13:22:42 -07:00
Katrin Fischer
e110534e1c
Bug 31170: (QA follow-up) Fix capitalization in database update
As this has not been released yet, we can also fix the database
update to not introduce the wrong capitalization in the first
place.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-07 12:04:55 -07:00
Isobel Graham
eb96d21dad
Bug 31170: Decapatalized "Overdue Item Fine Description"
I changed "Overdue Item Fine Description" to "Overdue item fine
description" for both the name and title.

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>
2022-09-07 12:04:23 -07:00
6e127ad894
Bug 30335: Fix DBRev permissions
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-31 10:18:23 -03:00
e574aea6bb
Bug 30335: DBRev 22.06.00.038
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-31 08:44:14 -03:00
1bbc53f65f
Bug 30335: (follow-up) Ensure existing users remain permitted
This patch updates the database update to ensure users with the
'remaining_permissions' subpermission of 'updatecharges' continue to be
able to manually invoice and manually credit borrower accounts after the
patch is applied.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-31 08:41:01 -03:00
aea63af24a
Bug 30335: (follow-up) Add permissions for manual accounts options
This patch adds two new sub-permissions, `manual_credit` and
`manual_invoice` to allow/prevent staff the ability to add manual
invoices and credits to a patrons account.

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-08-31 08:41:01 -03:00
ad080e7e95
Bug 23681: DBRev 22.06.00.037
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-25 08:50:41 -03:00
a027202717
Bug 23681: (QA follow-up) debarment_types => restriction_types
The code moved from *debarments* to *restrictions* but the table didn't.
This patch just renames things accordingly.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-25 08:41:07 -03:00
3b1c271f78
Bug 23681: (QA follow-up) Proper handling of default option
This patch removes the 'can_be_added_manually' flag. Only non-system
restriction types can be added manually, so we exclude is_system instead
of having two flags. (And we set the 'Manual' that's added at install
time to default but not system).

We then add proper handling for setting the default manual restriction
type in the management page and set the dropdown list to use that value
by default.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-25 08:41:06 -03:00