When a field is not nullable we should pass empty string, zero or today
to a char, numeric or date column.
The mandatory parameter does not refer to a database constraint but a Koha
preference. Only for strings we generate a random value.
Test plan:
Enable strict_sql_modes.
Run t/db_dependent/Koha/Patrons.t again.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Add the new Patron routines to this cron job. Actions are performed only if
preferences are set.
Note: No specific command line flags for these actions are added here
(and probably not needed too). So no crontab changes too.
Test plan:
Add a new patron.
Enable GDPR_Policy and refuse consent on OPAC for this patron.
Set only the first delay to zero (0) for immediate action.
Run cleanup_database.pl --logs (or any other flag) for the first time.
Check lock and expiration.
Set the second delay to zero (0) for immediate action.
Run cleanup_database.pl --logs for the second time. Check anonymization.
Set the third delay to zero (0) for immediate action.
Run cleanup_database.pl --logs for the third time. Check removal.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended: Added the warn $@ line in cleanup_database.pl
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Add Koha::Patron->lock and anonymize.
Add Koha::Patrons methods search_unsubscribed, search_anonymize_candidates
and search_anonymized. And wrappers for lock and anonymize.
Add unit tests.
Test plan:
Run t/db_dependent/Koha/Patrons.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
As a preparation for Koha::Patron->lock, we add the concept of administrative
lockout. The account is locked just as it would have been by too much
failed login attempts.
This is handled by a negative value in borrowers.login_attempts.
Test plan:
Run t/db_dependent/Auth.t
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
If an account has been locked, there is no use to keep increasing this
number. It is not true too; after the pref number has been reached,
we can not really speak of login attempts anymore. The credentials are
just ignored.
Adding a dbrev to put existing values in line. And a simple test in
Auth.t to confirm that login_attempts stop increasing.
Note: It feels safe to keep the '>=' condition in account_locked. But it
could obviously be changed to '=='. (Added a test for that.)
Note: Adding a mock_preference in Auth.t too for GDPR_Policy. Since not all
tests will pass when the pref is enabled (though disabled by default).
Test plan:
Run dbrev with updatedatabase.pl.
Run t/db_dependent/Koha/Patrons.t
Run t/db_dependent/Auth.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch adds three new prefs:
- UnsubscribeReflectionDelay
- PatronAnonymizeDelay
- PatronRemovalDelay
Test plan:
Run upgrade.
Check patrons pref page. Look under Privacy.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This new flag should speak for itself ;)
Test plan:
Run installer or updatedatabase.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch makes a few corrections to the .pref files which provide
descriptions for system preferences. Language like "him or her" is
replaced with "they/them" pronouns.
To test, apply the patch and check the following preferences:
- OPACFineNoRenewalsBlockAutoRenew
- ExpireReservesMaxPickUpDelayCharge
- PatronSelfRegistrationVerifyByEmail
Signed-off-by: Lisette <lisettes@latahlibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch makes the self-checkin CSS created in Bug 22638 the CSS for
self-checkout as well. The interfaces have the same requirements.
This patch also replaces some old image-based icons with Font Awesome
icons.
To test, apply the patch and rebuild the OPAC CSS. Clear your browser
cache if necessary.
- Enable both self checkout (WebBasedSelfCheck) and self checkin
(SelfCheckInModule).
- Test both interfaces, confirming that the style is consistent for
each and looks correct.
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch updates the Self-checkout pages to match the new OPAC style.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch makes a number of follow-up changes, including:
- Covert remaining icons to Font Awesome
- Convert CSS to SCSS
- Move SCSS which is common to both the OPAC and SCI into separate
files to be including in each during compilation.
- Make minor correction to opac.scss to fix SCSS build warning
To test, apply the patch and rebuild the OPAC CSS. Clear your browser
cache if necessary.
- Enable the self checkin module using using the SelfCheckInModule
system preference.
- Open the self checkin interface and test the checkin process.
Everything should look correct.
- After submitting barcodes for checkin, the "Finish" button should
show a Font Awesome icon instead of an image icon.
- Enable multiple translations and set the OpacLangSelectorMode
preference to show the language menu in the footer.
- Confirm that the language menu looks correct.
- View the regular OPAC to make sure the changes to opac.scss didn't
result in unintended changes to the interface.
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch updates the Self-Checkin CSS to match tne new OPAC design.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Argument "01e" isn't numeric in numeric ne (!=) at
/home/vagrant/kohaclone/cataloguing/addbiblio.pl line 507.
A tagfield can be 01e and so raise a warning is compared with == or !=
This patch also fixes few inconsistencies:
- tagfield for items.itemnumber must be retrieved with GetMarcFromKohaField
(to support other marcflavours)
- do not use $_
- loop only once on $usedTagsLib
Test plan:
For devs only, read the code and confirm the changes make sense.
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
I am not sure the correct answer - for upgraded installs the pref was
set to date, which changed behaviour
For new installs the pref was unset, behaved as if 'exact_time' so we
shouldn't change behaviour?
If the perceived default is date then the code should be changed, or
this shouldn't be a pref at all?
To test:
1 - Have a new system missing this pref
2 - Note when searchign the pref in staff client if appears as 'date'
3 - Check the db to confirm value is 'NULL'
4 - Apply patch and run update
5 - Pref is now set to 'exact_time'
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Pod coverage for 'NAME'.
Moved sysprefs in order and moved semicolon to last line.
Replaced tab indentation with spaces.
Added "Swedish service for spellchecking" to the syspref description.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Added another syspref for the url of the Libris API
Added sysprefs to syspref.sql
Please test the 2 patches together
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch makes it possible to configure LIBRIS spellchecker as a
"did you mean" feature. When searching for a word or phrase and misspelling
the query will be sent to LIBRIS and if they have a suggestion it will
be shown in the yellow did you mean box in the results page.
The API is not very quick so this type of implementation was chosen to not
disrupt the real-time feeling of the search.
To test:
1. Apply the patch.
2. Go to http://api.libris.kb.se/bibspell/, enter the koha servers IP and click
on the "Generera nyckel" button.
3. Under "Nyckel" you can copy the value that looks like this: E47B44829E265607274B677BC17B8D78,
and enter it into the LibrisKey syspref (cgi-bin/koha/admin/preferences.pl?tab=searching).
4. In cgi-bin/koha/admin/didyoumean.pl check the box for using the LIBRIS API. It is only implemented for OPAC.
5. Perform some searches:
tset - Did you mean should suggest: test
jeg är på smester - suggestion: jag är på semester
dantes inferna - suggestion: dantes inferno
Restored opac-search.pl
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Seems to work, of course I can't tell if it is giving me accurate
suggestions :)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Test plan:
0) Have patron with some fines and credits
1) Go to opac and log in
2) Go to 'your summary' page and confirm it shows the right amount and
description for both, credit and debit
3) Go to 'your fines' page and confirm it show right information
4) Go to self checkout page and confirm the fines are right here
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
When you do an advanced search and choose the Format subtype
Braille, it looks for l-format:fk, but that is not the right
code for Braille.
fk does not exist. It should be fb for Tactile material/Braille
OR tc for Text/Braille
To test:
0) Catalog 2 records, one with 007 tc and another with fb
Use value builder to verify both are for Braille.
1) In Administration > System preferences, make sure 'Subtypes'
is checked in either OpacAdvSearchMoreOptions or OpacAdvSearchOptions
2) Go to Advanced search
3) If necessary, click on 'More options'
4) In the 'Subtype limits' section, choose 'Braille' from the 'Format'
drop-down menu
5) Click on 'Search'
6) Verify both records were found
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Forced by removal of C4::Items::GetItem from Bug 21206
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Automatic item modification by age cronjob is based on rules with conditions and substitutions.
When substitution value is equal to actual item value, the code should not call C4::Items::ModItem. It adds unnecessary action log and entry in zebraqueue.
With a rule than can impact all catalogue you can explode your database with action logs.
Test plan :
1) Run prove t/db_dependent/Items/AutomaticItemModificationByAge.t
2) Define a item modification by age with no condition
3) Run several times misc/cronjobs/automatic_item_modification_by_age.pl
4) Check it creates only one entry in action_logs and zebraqueue
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Added missing transaction rollback
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
substitutions field stores the item field with 'items.' prefix.
Looks like call of C4::Items::ModItem() works but it will not if ORM object is used in the futur.
So I prefer fix it now and it is needed for main patch.
Test plan :
Run t/db_dependent/Items/AutomaticItemModificationByAge.t
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch removes the option to select non-XSLT search results in the
staff client. The patch removes the markup from the template, updates
the system preference options, and modifies Search.pm so that OPAC and
staff client results XSLT functions are not tied together.
To test, apply the patch and set the XSLTResultsDisplay to a blank
value. Run the database update. The value of the XSLTResultsDisplay
system preference should now be "default."
Perform a catalog search in the staff client. The results should be
shown using the XSLT view.
Test that OPAC search results respect the OPACXSLTResultsDisplay
preference when enabled and disabled.
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch modifies the patron category edit form so that the enrollment
period datepicker widget cannot be used to select a date in the past.
The <input> element had a "datepicker" class, which triggers a default
datepicker configuration. This was overriding the configuration in the
page-specific JavaScript file.
To test, apply the patch and go to Administration -> Patron categories.
Click the "Enrollment period -> Until date" field and verify that dates
before today are disabled.
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Test plain:
1. Reindex both authorities and biblios with the -d flag to recreate the index, e.g. "perl misc/search_tools/rebuild_elastic_search.pl -v -d"
2. Check that authorities only contains authority-specific fields in Elasticsearch e.g. by fetching http://localhost:9200/koha_dev_authorities/_mappings
3. Reindex both without the -d flag and verify it works, e.g. "perl misc/search_tools/rebuild_elastic_search.pl -v"
Signed-off-by: Björn Nylén <bjorn.nylen@ub.lu.se>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Some information was missing from the CSV export file
of the Cash register report: manager surname, patron surname
and payment notes.
Also pretties up the column headers a bit and makes the
sequence between GUI and CSV export match.
To test:
- Make sure you have some fines and fees and payments in
your system
- Make a search with the Cash register report
- Export results as CSV
- Proof read hader line and make sure contents match headings
- Verify first name and surname are shown for manager and patron
- Verify notes show up
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Without this patch renewals for checkouts wouldn't
show in the log viewer. The log viewre was using
RENEW, which we use for patrons, but for issue
RENEWAL is used.
The patch adds RENEWAL to the search params, when
Renew was selected in the form, so both terms are
included in the query.
To test:
- Make sure you have RenewalLog turned on
- Make a patron renewal
- Check something out and renew it
- Go to Tools > Log viewer and test different
searches
- Modules All - Actions All
- Modules All - Actions Renew
- Modules Circulation - Actions Renew
...
- Make sure results show as expected
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
It looks like selected would be passed all the way down to
Koha::Libraries->search and this would fail all the time.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Test Plan:
1) Apply this patch
2) prove t/db_dependent/Koha/Libraries.t
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Test plan:
Use installer and onboaarding tool, make sure the js and css files are
loaded
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Test plan:
prove t/db_dependent/Koha/Template/Plugin/Asset.t
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Test plan:
Apply the patch a try to use Koha, css and js files should be used
normally
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
To test:
1. Create a course reserve or go on an existing one
2. Add items and add a change for the holdingbranch
3. On the list of items in this course reserve
(course_reserves/course-details.pl?course_id=xx), click on "edit" at the
end of a row :
Without the patch, you can't see the holdingbranch you have choose for
this item, but you see "LEAVE UNCHANGED"
With the patch, you can see the holdingbranch you have choose when
adding this item in the course
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>