This field is never NULL and must always be equal to an integer.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
I am trying to make koha-testing-docker UNIMARC compabible.
In order to have koha-misc4dev insert all the data correctly (users, etc.) we need at least 1 library.
I am suggesting to reuse the usual library list for UNIMARC.
misc4dev will use fr-FR sample data for "UNIMARC"
This is related to https://gitlab.com/koha-community/koha-misc4dev/issues/29
Test plan:
outside your box, in koha-testing-docker (up-to-date), edit .env and set
KOHA_MARC_FLAVOUR=unimarc
DEBUG_GIT_REPO_MISC4DEV_URL=https://gitlab.com/joubu/koha-misc4dev.git
DEBUG_GIT_REPO_MISC4DEV_BRANCH=unimarc
Then start the koha container
When the misc4dev will start its job, the scripts will have the expected
data to continue.
Without this patch you will get
koha_1 | Not enough data in the database, library and/or patron category does not exist at /kohadevbox/misc4dev/create_superlibrarian.pl line 31.
And plenty of errors will follow.
Also, the sample data used in misc4dev will use CPL
(/kohadevbox/misc4dev/data/sql/unimarc/1812/after_22155/items.sql)
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch preserves the current dropdown choices for patron search and adds fields from
the DefaultPatronSearchFields system preference
To test:
1 - View the regular patron search and note fields in dropdown
2 - Apply patch, ensure dropdown has not changed
3 - Add fields to DefaultPatronSearchFields, note they are available in
dropdown
4 - Ensure existing and new fields search properly
Signed-off-by: Kelly <kelly@bywatersolutions.com>
Signed-off-by: Maxime Dufresne <maxime.dufresne@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
There is some quite old and unused code in Koha related
to printer configuration and network printing. These code
hasn't been functional in a long time and should be removed.
This patch:
- Removes printcirculationslips system preference
- Removes table printers
- Removes branchprinter column from branches
Check that:
- Go to administration
- Open any age there, but change the last bit to: printers.pl
- Apply patch, run the database update
- Verify the hidden page no longer exists
- Verify that logging in and out still works correctly
- Verify that checkout and returns work correctly
- Switch to another branch using the "Set library" option
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Looks like the atomicupdate and sysprefs.sql changes were lost at some point.
Don't forget to run QA tools on your patches before submitting
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
YAML version of marc21 mandatory marc21_framework_DEFAULT.
To test:
1) Do a clean install with mandatory data,
dump table marc_tag_structure and
marc_subfield_structure, reserve.
2) Apply this patch and it's dependencies
3) Do a clean install, dump again and compare
No major differences expected
4) Try translation
a) Go to misc/translator
b) create files for a new language
./translate create xx-YY
c) Check new file po/xx-YY-instaler-MARC21.po
Verify strings from this file.
d) Install new language
./translate install xx-YY
e) Try clean install with new files
NOTE: This patch fails with qa tools!
Reason is that qa tools use YAML.pm module to
check files, but Installer.pm or LangInstaller.pm
are using YAML::Syck, using that module gives
no error, check for example:
perl -e 'use YAML::Syck qw( LoadFile ); $y = LoadFile("marc21_framework_DEFAULT.yml");'
No error!
perl -e 'use YAML qw( LoadFile ); $y = LoadFile("marc21_framework_DEFAULT.yml");'
Error!
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
YAML version of marc21 mandatory authorities_normal_marc21.
To test:
1) Do a clean install with mandatory data,
dump table auth_types, auth_tag_structure and
auth_subfield_structure, reserve.
2) Apply this patch and it's dependencies
3) Do a clean install, dump again and compare
No major differences expected
4) Try translation
a) Go to misc/translator
b) create files for a new language
./translate create xx-YY
c) Check new file po/xx-YY-instaler-MARC21.po
Verify strings from this file.
d) Install new language
./translate install xx-YY
e) Try clean install with new files
NOTE: This patch fails with qa tools!
Reason is that qa tools use YAML.pm module to
check files, but Installer.pm or LangInstaller.pm
are using YAML::Syck, using that module gives
no error, check for example:
perl -e 'use YAML::Syck qw( LoadFile ); $y = LoadFile("authorities_normal_marc21.yml");'
No error!
perl -e 'use YAML qw( LoadFile ); $y = LoadFile("authorities_normal_marc21.yml");'
Error!
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Original inserted values depends on the order of insertion.
This patch rewrites the sql statements to make them order
independent
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
YAML version of marc21_simple_bib_frameworks
To test:
1) Same test plan of first patch
NOTE: Same problem as first patch with qa tools
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
YAML version of marc21_sample_fastadd_framework
To test:
1) Same test plan of first patch
NOTE: Same problem as first patch with qa tools
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
YAML version of marc21 optional marc21_default_matching_rules.
To test:
1) Do a clean install with optional data,
dump table marc_matchers, reserve.
2) Apply this patch and it's dependencies
3) Do a clean install, dump again and compare
No major differences expected
4) Try translation
a) Go to misc/translator
b) create files for a new language
./translate create xx-YY
c) Check new file po/xx-YY-instaler-MARC21.po
Verify strings from this file.
d) Install new language
./translate install xx-YY
e) Try clean install with new files
NOTE: This patch fails with qa tools!
Reason is that qa tools use YAML.pm module to
check files, but Installer.pm or LangInstaller.pm
are using YAML::Syck, using that module gives
no error, check for example:
perl -e 'use YAML::Syck qw( LoadFile ); $y = LoadFile("marc21_default_matching_rules.yml");'
No error!
perl -e 'use YAML qw( LoadFile ); $y = LoadFile("marc21_default_matching_rules.yml");'
Error!
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
YAML version of optional sample_z3950_servers
To test:
1) Same test plan of first patch, only check table
z3950servers
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
YAML version of optional sample_quotes
To test:
1) Same test plan of first patch, only check table
quotes
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
YAML version of optional sample_patrons
To test:
1) Same test plan of first patch, only check table
borrowers
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
YAML version of optional sample_news
To test:
1) Same test plan of first patch, only check table
opac_news
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
YAML version of optional sample_libraries_holidays
To test:
1) Same test plan of first patch, only check table
repeatable_holidays
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
YAML version of optional sample_libraries
To test:
1) Same test plan of first patch, only check table
branches
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
YAML version of optional sample_itemtypes
To test:
1) Same test plan of first patch, only check table
itemtypes
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
YAML version of optional sample_creator_data
To test:
1) Same test plan of first patch, only check tables
creator_layouts, creator_templates and printers_profile
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
YAML version of optional patron_categories
To test:
1) Same test plan of first patch, only check table
categories
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
YAML version of optional patron_atributes
To test:
1) Same test plan of first patch, only check table
borrower_attribute_types
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
YAML version of optional parameters
To test:
1) Same test plan of first patch, only check table
currency
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
YAML version of optional marc21_relatorterms
To test:
1) Same test plan of first patch, only check table
authorised_values
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
YAML version of optional marc21_holdings_coded_values
To test:
1) Same test plan of first patch, only check table
authorised_values
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
YAML version of optional csv_profiles.
To test:
1) Do a clean install with optional data,
dump table export_format, reserve.
2) Apply this patch and it's dependencies
3) Do a clean install, dump again and compare
No major differences expected
4) Try translation
a) Go to misc/translator
b) create files for a new language
./translate create xx-YY
c) Check new file po/xx-YY-instaler.po
Verify strings from this file.
d) Install new language
./translate install xx-YY
e) Try clean install with new files
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds null values to selected label2/3 in
sample numberpatterns
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
YAML version of mandatory sample_numberpatterns
To test:
1) Same test plan of first patch, only check table
subscription_numberpatterns
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
YAML version of mandatory sample_notices
To test:
1) Same test plan of first patch, only check table
letter
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
YAML version of mandatory sample_frequencies
To test:
1) Same test plan of first patch, only check table
subscription_frequencies
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
YAML version of mandatory class_sources
To test:
1) Same test plan of first patch, only check tables
class_sort_rules, class_split_rules and class_sources
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
YAML version of mandatory auth_values.
To test:
1) Do a clean install, dump auth_values, reserve.
2) Apply this patch and it's dependencies
3) Do a clean install, dump again and compare
No differences expected
4) Try translation
a) Go to misc/translator
b) create files for a new language
./translate create xx-YY
c) Check new file po/xx-YY-instaler.po
Verify strings from this file.
d) Install new language
./translate install xx-YY
e) Try clean install with new files
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds 3 features:
1) Display description of YAML files at install time
for frameworks, and fixes it's encoding.
2) Enable use of multiline values, field required
3) Process SQL statements declared in YAML files
With this features we can process files with the
following generic YAML strucure:
---
description:
- "File description"
tables:
- table_name:
translatable: [ title, content ]
multiline: [ content ]
rows:
- title: "Example title"
content:
- "Content:"
- ""
- "This is the content."
id: 1
value: ~
sql_statements:
- "UPDATE table_name SET value ='empty' WHERE value IS NULL"
...
* file description is now inside the YAML, can have multiple
lines.
This attribute is expected in all YAML files.
* translatable attribute in table declare fields that can be
translated
* multiline attribute in table declare fields that can have
multiple lines of content, they are joined using '\r\n'
before insert into database.
This is useful to express fields like 'news' content, and
to simplify it's translation.
'\r\n' is used for correct display in Windows clients.
* sql_statements allows to add multiple SQL sentences, not
insertions normally, that are executed in order.
This features are not needed for the example file of this patch,
but will be used in new bugs.
To test:
1) Use the same test plan of first patch.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch modifies C4/Installer.pm to add support
for loading YAML files into database.
As an example of the functionality, optional
auth_val.sql file is replaced by auth_val.yml
The rationale behind this feature is to enable the
translation of the data that is loaded into the
database. That will be addressed in another bug.
But taking into account that goal, translatable
values are declared in the YAML files, to ease
identification by translate script.
Also file description is moved into the yaml
file.
To test:
0) Do a clean install with all optional data,
then dump authorised_values table, reserve.
1) Apply the patch
2) Do a clean install in English (marc21/unimarc)
3) On optional data check for description of auth_val
"Some basic default authorised values for ..."
4) Select all optional data
5) Finish installation
6) Dump again authorised_values table and compare with that
of point '0'.
No differences should be found.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Rebasing was a nightmare, so I'm squashing the sign off follow-ups to
ease the pain with any future rebases
Includes:
Bug 23051: (follow-up) Refactor renewal code
As per Nick's first point in comment #20, the code that tests for
renewability and renews items has been refactored into it's own
function.
Bug 23051: (follow-up) Provide feedback
For renewals that fail when a fine is being paid off, this patch causes
any errors to be passed back to the template for display.
Addresses the second point in Nick's comment #20
Bug 23051: (follow-up) Fix unit tests
As raised by Nick in comment #35
Bug 23051: (follow-up) Fix/improve feedback
This follow up patch addresses the following parts of Nick's feedback in
comment #35:
- it would be nice to get feedback on what was successfully renewed as well
- In general I think I would prefer to see 'ok' and 'not_ok' returned as
a single 'renewal_results' array
- There is no listing of errors if I use the 'pay' button on an
individual fine
Bug 23051: (follow-up) Refactor methods
This follow up patch addresses the following parts of Nick's feedback in
comment #35:
- I don't really like that the functions are internal functions and then
exported
- I think the pref description should highlight that if 'RenewalPeriodBase'
is set to due date, there may be doubled charges
Bug 23051: (follow-up) Add SIP summary
This follow up patch addresses the following parts of Nick's feedback in
comment #35:
- Ideally SIP would get feedback in a screen message
Bug 23051: (follow-up) Renewing in OPAC
This follow up patch addresses the following parts of Nick's feedback in
comment #35:
- I am also not sure about the code path if a patron paid fines on the
opac (via paypal etc.) but renewals are not allowed on the opac.
We've introduced the syspref RenewAccruingItemInOpac (default is off)
which, when enabled, will cause items attached to fines that are paid
off in the OPAC (via payment plugins), to be automatically renewed.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds the new syspref "RenewAccruingItemWhenPaid"
Sponsored-by: Loughborough University
Signed-off-by: Lucy Harrison <L.M.Harrison@lboro.ac.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds the new `anonymous_refund` permission to the
`cash_management` flag and binds it to the visability of the register
details page.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>