Generated using
`perl misc/devel/tidy.pl --perl`
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Changes the descriptions of the holds history and checkout history permissions to say "view" rather than "viewing"
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
To test:
1 - enable IntranetReadingHistoryHolds system preference
2 - make some holds for a patron, confirm you can see Holds History in the patron record when logged in as a superlibrarian
3 - log in as a non-superlibrarian with edit_borrowers permission, confirm you can see holds history in pthe patron record
4 - apply patch, updatedatabase, restat_all
5 - confirm you can see holds history as a superlibrarian
6 - confirm your non-superlibrarian from step 3 was given view_holds_history permission and can view holds history
7 - remove view_holds_history permission from your user, confirm you can no longer access holds history
Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
To remove the unnecessary entries from the DB
Signed-off-by: Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
* free => Free
* options=NULL where type=Free
* fix options and type for ArticleRequestsSupportedFormats
* fix more explanation and options
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
There are 72 occurences for the 'Integer' type, and 8 for 'integer'.
Tests fail because of `StoreLastBorrower` already, so fixing them all for good.
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This particular case already introduced discrepancies. Fixing.
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch removes the discrepancies and put in sync the
systempreferences table for new and upgraded installations.
Main changes:
* Set options to NULL when options=""
* Fix explanation when different
* Fix wrong order (some rows had options=explanation)
* Fix wrong type "Yes/No" => "YesNo"
* Remove StaffLoginBranchBasedOnIP: both StaffLoginLibraryBasedOnIP and
StaffLoginBranchBasedOnIP are in the DB for upgraded installs
* Remove the 'showsql' from the test. If we need it back then it must be
a maintenance script.
* Improve the tests:
* Compare sysprefs.sql and the DB content for options, explanation and type
* Catch type not defined
* Catch incorrect YesNo values (must be 0 or 1)
Later:
* Add a C4::Installer sub to add new syspref:
add_pref(
{
variable => $variable,
value => $value,
options => $options,
explanation => $explanation,
type => $type
}
);
* Clean 'type' and make it an ENUM
* Make it easy to run the test for devs (should be in xt but we need it
in t/db_dependent for packages - FIXME?)
* Run the tests on upgraded installs on CI
Test plan:
0. Apply the "tests" patch only
1. prove it
=> It fails loudly
2. Apply the DB change and run updatedatabase, prove the tests
=> they pass
3. Test upgraded installs:
* checkout v24.05.00 (the version we use for Jenkins'
Koha_Main_MariaDB_update job)
* reset_all
* checkout the branch with this patchset
* updatabase
* prove t/db_dependent/check_sysprefs.t
=> Should be green
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Test plan:
- without patch login to Koha
- edit a biblio and put a wrong ISSN in 022a (011a for unimarc).
- leave the input field (looses focus), no warning
- apply patch and do "reset_all" to make a full re-install.
- edit the biblio again and put an invalid ISSN in 022a (011a for unimarc).
- when you leave the input field you should have a warning saying
"invalid ISSN".
- the input field should turn yellow
- you can still save the biblio with a wrong issn, it is just a warning.
- if you apply the patch on an existing install, you must manually link
the value builder to your existing frameworks to get it working.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This contains a database update script so that existing Koha instances
also receive authorised values for the RDA vocabularies.
Sponsored-by: California College of the Arts
Signed-off-by: Miranda Nero <mnero@oslri.net>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This adds authorized value lists for use in MARC21 tags 336 - Content Type,
337 - Media Type, and 338 - Carrier Type, subfields $a and $b.
Test plan:
1. Create a fresh Koha instance
2. Navigate to admin > authorized values
3. Note there are no RDA value categories
4. Apply the patch and recreate a new Koha
5. Repeat step 2
6. There are six RDA value categories: RDACARRIER, RDACARRIER_CODE,
RDACONTENT, RDACONTENT_CODE, RDAMEDIA, and RDAMEDIA_CODE
Sponsored-by: California College of the Arts
Signed-off-by: Miranda Nero <mnero@oslri.net>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Change FutureHoldsBlockRenewals from type 'Integer' to 'YesNo'
for consistency with other boolean preferences in Koha (e.g.,
AllowHoldDateInFuture, OPACAllowHoldDateInFuture).
While the preference functionally works as Integer due to the
.pref file defining the choices, YesNo is the established
convention for binary system preferences.
Test plan:
1. Apply this patch
2. Run the database update
3. Verify the preference appears correctly in system preferences
4. Verify the preference still functions properly with tests:
prove t/db_dependent/Circulation.t :: "CanBookBeRenewed | future holds"
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Test plan:
[1] Run install or upgrade (updatedatabase.pl). Verify that pref was added to database.
* perl -MC4::Context -e'print C4::Context->preference('FutureHoldsBlockRenewals'),"\n"'
* You should see a zero printed.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Test plan:
Apply the patches and update the database
1) Create a new subscription with items, there should be a checkbox at the bottom of the form to pre-select collection table issues - make sure this is checked
2) Receive some items against the subscription
3) Navigate to the collections table
4) The checkboxes should be pre-selected as per previous behaviour in Koha
5) Edit the subscription and uncheck the checkbox
6) Return to the collections table and the checkboxes should all be unchecked
Signed-off-by: Nathalie <nathalie.savarit@univ-amu.fr>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 881f96172a8c1b35d3e74f7f0f6aa44629578021)
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch adds the ApiKeyLog system preference to control logging
of API key actions (creation, deletion, revocation, activation).
The preference follows the same pattern as BorrowersLog and other
logging preferences.
Test plan:
1. Apply patch and run database update
2. Go to Administration > System preferences > Logs
3. Verify ApiKeyLog preference appears with Yes/No options
4. Verify default value is 'Don't log' (0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This implements support for the new EDItEUR/BiC GIR:LSL (Library Sub-Location)
field to complement the existing GIR:LSQ (Library Sequence) functionality,
allowing flexible mapping of both fields to location and collection item fields.
Changes:
- Add LSL mapping to GIR field extraction in Koha::Edifact::Line
- Update gir_segments() in Koha::Edifact::Order to handle both LSL and LSQ preferences independently
- Add validation functions in Koha::EDI using Koha::AuthorisedValues for location/collection codes
- Add EdifactLSL system preference for independent LSL field mapping
- Update EdifactLSQ to include empty option for ignore functionality
- Add admin interface configuration for LSL preference
The implementation provides maximum flexibility:
- EdifactLSQ can be set to: location, ccode, or empty (ignore)
- EdifactLSL can be set to: location, ccode, or empty (ignore)
- Both fields can be mapped independently or to same target field
- Validation ensures codes exist in LOC/CCODE authorised values
- Maintains full backwards compatibility with existing LSQ-only setups
Test plan:
1. Apply both patches
2. Update database: installer/data/mysql/updatedatabase.pl
3. Verify new system preferences in Administration > System preferences > Acquisitions:
- EdifactLSQ: "Map EDI sequence code (GIR+LSQ) to Koha Item field"
- EdifactLSL: "Map EDI sub-location code (GIR+LSL) to Koha Item field"
4. Create test authorised values:
- LOC category: Add values like FICTION, REFERENCE
- CCODE category: Add values like ADULT, CHILD
5. Set preferences to test combinations:
- EdifactLSQ=location, EdifactLSL=ccode
- EdifactLSQ=ccode, EdifactLSL=location
- EdifactLSQ=location, EdifactLSL="" (empty)
6. Process EDIFACT messages containing GIR+LSL and GIR+LSQ segments
7. Verify items created with correct location/ccode values per preferences
8. Test invalid codes generate appropriate error messages
9. Confirm existing LSQ-only configurations continue working unchanged
10. Run: prove t/Edifact.t t/db_dependent/Koha/EDI.t t/db_dependent/Koha/Edifact/Order.t
Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/>
Sponsored-by: Royal Borough of Kensington and Chelsea <https://www.rbkc.gov.uk/>
Sponsored-by: OpenFifth <https://openfifth.co.uk/>
Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
syntax was wrong for dbrev
To test apply patches
dbic
updatedatatbase
koha-mysql kohadev
select * from systempreferences where variable='UpdateNotForLoanStatusOnCheckout';
confirm the updated description
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Test Plan
1. Before applying, navigate to administration->system preferences ->
UpdateNotForLoanStatusOnCheckout
2. Observe the language in the description "When an item is checked out,
if the not for loan value on the left matches the items not for loan
value it will be updated to the right-hand value"
3. Apply the patch
4. Navigate to administration->system preferences ->
UpdateNotForLoanStatusOnCheckout
5. Observe the language in the description has been updated to "When an
item is checked out, if its not for loan value matches the value on
the left, then the items not for loan value will be updated to the
value on the right"
6. Do a reset all and confirm the language is correct
Signed-off-by: Andrew Auld <andrew.auld@openfifth.co.uk>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Added SeparateHoldingsByGroup system preference
Adds new tabs to Holdings table if preference is enabled
Separates by library groups
Test Plan:
1. Apply patch, restart_all, updatedatabase
2. Koha Administration -> System preferences -> SeparateHoldingsByGroup
3. Change to "Separate holdings by library group in subsequent tabs..." and Save
4. Koha Administration -> Library Groups
5. Create multiple library groups and check the 'Use for staff search groups' box.
6. Add your logged in library to each group and other libraries to each group.
7. Do catalog searches where the location of the item is a library in a library group
8. Notice tabs in the Holdings table for each library group if it contains a library that has the item
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>