This patch adds a new page in the administration area to manage curbside
pickups.
Test plan:
1. Enable the new CurbsidePickup syspref
2. Go to Administration > Curbside pickups
=> If the logged-in user has the manage_curbside_pickups permission you
should see the administration view
3. Enable the feature for some libraries and configure it.
a. You must define a "pickup interval" and a "maximum patrons per interval"
values.
b. If "Patron-scheduled pickup" is enabled, patrons will be able to
schedule curbside pickups from the OPAC
c. If "Enable for waiting holds only" is enabled, only patron with waiting
holds will be allowed to schedule curbside pickups
d. In the bottom part of the form you can define the slots available for
curbside pickups.
e. Save
Sponsored-by: Association KohaLa - https://koha-fr.org/
Signed-off-by: Koha Team University Lyon 3 <koha@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
There is a flaw when subfields are ordered, the inputs are not retrieved
correctly.
We should not rely on the order but use an id instead.
Test plan:
Create, edit subfields
Modify values from the different subfields
Confirm that values are correctly saved
Signed-off-by: Thibault Kero <thibault.keromnes@univ-paris8.fr>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Elasticsearch number of results is by default limited by setting "index.max-result-window", default value is 10000.
https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-max-result-window
We use this setting:
44d6528b56/Koha/SearchEngine/Elasticsearch/Search.pm (L411)
I propose we add this setting in index config.
Test plan:
1) Use Elasticsearch
2) Apply patch and flush memcached
3) Rebuild indexes: misc/search_tools/rebuild_elasticsearch.pl -v -b -d
4) Check the settings of index (when using koha-testing-docker*):
curl 'es:9200/koha_kohadev_biblios/_settings?pretty&filter_path=**.max_result_window'
5) You should see:
"max_result_window" : "1000000"
* You also need to add this setting to the es section in koha-testing-docker's
docker-compose.yml (after the networks configuration):
ports:
- "9200:9300"
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
When defining our sort fields in we defined all as 'numeric'
For other string containing numbers this is likely correct, however,
for callnumbers it is not. e.g. E45 should sort before E7
This patch adds a new 'callnumber' type and deifnes this for cn-sort and
adds to the field maping a sort without numeric set
To test:
0 - Be using ES with Koha
1 - On records with single item, add callnumbers:
VA65 E7 R63 1984
VA65 E7 T35 1990
VA65 E45 R67 1985
2 - Add public note 'shrimp' or something to make them easily searchable as a group
3 - Search for 'shrimp', sort by callnumber
4 - Note E45 comes last, it should come first
5 - Apply patch
6 - Reset ES mappings
7 - Reindex ES
8 - Repeat search
9 - Sorting should be correct when set to callnumber
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Michal Urban <michalurban177@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch removes the itemtype and collection code fields from the
bundle items table.
We will add the itemtype back in at a later date with a new bug as the
display code needs some careful consideration and we felt that doing
that work inline here would be an unrequired blocker.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch updates the column configuration from 'external_id' to
'barcode'
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch adds methods the the Koha::Item object for managing item
bundling operations and then exposes those methods via the REST API.
We include the new `BundleNotLoanValue` preference for setting not
for loan values when an item is added to a bundle.
Finally, we expose bundle management via the catalogue details page.
Test plan:
0) Apply patches up to this point and run the database update
1) Configuration: `BundleNotLoanValue` should have been set by the
database update and point to a newly added AV value.
2) Creating a new bundle
* Add a new bib record
* Mark the bib record as a 'collection' type by setting leader
position 7 to 'c'
* Add a new item to this bib record
* You should see a new 'Manage bundle' button available in the
'Actions' column of the Holdings table.
* Clicking 'Manage bundle' should expand the table to include a new
row directly beneath this one.
* Use the new 'Add to bundle' button that appears in this row to
trigger a modal that allows entering the barcode of items you wish
to add to the bundle
* Upon closing the modal, the bundle content table should reload and
contain your newly associated items.
* You can subsequently remove an item from a bundle using the new
'Remove' button.
3) Not for loan
* Items that have been added into a bundle should now appear as 'Not
for loan' from their original biblio record and note which bundle
they belong to.
4) Error cases
* Try adding an item that already belongs to a bundle to another
bundle: Note an error is displayed in the modal form.
5) The bundles feature can be disabled by unsetting the
`BundleNotLoanValue` system preference.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Test Plan:
1) Apply the patches for this bug
2) Run updatedatabase.pl
3) Restart all the things!
4) Enable the new syspref EnableItemGroups
5) Browse to detail.pl for a record with items
6) Note the new Item Groups tab
7) Test creating, editing and deleting groups
8) On the Holdings tab, select one or more items using the checkboxes
8) Note new selection options for setting an item group for items,
and for clearing an item group for items.
9) Test adding and clearing the item group for items
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch introduces a RecordProcessor filter for MARC::Record objects
that replaces Koha codes with descriptions in the MARC::Record passed to the processor.
Target usage:
my $biblio = Koha::Biblios->find(
$biblio_id,
{ prefetch => [ metadata ] }
);
my $record = $biblio->metadata->record;
my $processor = Koha::RecordProcessor->new(
{
filters => ('ExpandCodedFields'),
options => {
interface => 'opac',
frameworkcode => $biblio->frameworkcode
}
}
);
$processor->process( $record );
Test plan
* Read the included unit test and confirm it makes sense and passes
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch adds a view page for libraries, so that the user isn't
required to edit the library to see information about it.
To test, apply the patch and log into Koha as a user with permission to
manage libraries.
- In the list of libraries you should see that the library name in the
first column is now a link.
- When you click the link you should be taken to a view of all the
information about the library.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch accounts for the otherholdins table. To test:
1. Turn on SeparateHoldings
2. Find a record where the items are split by SeparateHoldings.
3. Make sure you can hide columns from the table in the Other holdings tab.
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
To test:
1 - Apply patch, restart all
2 - View a record with items in the staff client
3 - Note issues and renewals columns not shown
4 - Click the gear to edit visible columns
5 - Issues and renewals are present and hidden
6 - Click to view columns
7 - Confirm counts show, or 0 if item has not circulated/been renewed
8 - Circulate/renew an item
9 - Verify counts increase
10 - Make columns visible by default in Admin->Table settings
11 - Confirm columns show by default on details page
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This adds a new field "Can be guarantee" to patron categories so it
becomes possible for any category type to have a guarantor.
To test:
1) Have a patron category of type 'Adult' and one of type 'Child'
2) Confirm, by searching for the "Patron guarantor" fieldset in the
edit/create form, that:
=> a patron of the first category can't have a guarantor
=> a patron from the second category can
3) Apply patch and run updatedatabase.pl
4) Edit the categories and note the new "Can be guarantee" field
5) It should have been set to "yes" for the "Child" and to "no" for
the "Adult"
5) Repeat step 2. It should behave in the same way.
6) Edit the "Can be guarantee" for any of the category and check
that the fieldset only appears when "Can be guarantee" is set to "yes"
7) prove t/db_dependent/Patrons.t
=> tests should still pass
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Columns Home library and Checked out from are in wrong order
on table settings. Because of this hiding Home library actually
hides Checkout out from column and vice versa. This patch changes
order of these columns on columns_settings.yml
To test:
1) Navigate to columns settings page and modify
account-fines tables column.
=> Note that if you hide column checked_out_from, column
home_library is hidden on patrons account page.
2) Apply patch and restart plack etc.
=> Column checked_out_from should now be hidden.
Sponsored-by: Koha-Suomi Oy
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
The table on course-details.pl has columns for both home library and jolding library,
but course_reserves_table in the Table configuration admin area only has a
single toggle for 'library'.
Hiding 'library' hides the home library column. Anything after that is off by one.
Hiding 'staff_note' actually hides the holding library column, 'link' hides
Public note, etc.
To test:
- Add a course and some course reserves
- Go to table configuration and hide 'staff note'
- Look at the list of course reserves for your course
- Verify the wrong column was hidden
- Apply patch
- The configuration area now shows holding_library and home_library
as separate options.
- Change the settings and verify everything now hides/displays correctly.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
To test:
1. Make some patron reasons for suggestion via Home > Administration > Authorized values > OPAC_SUG
2. Give those reasons a description.
3. Make several suggestions via staff client and/or OPAC and apply some of the reasons you just made
4. Apply patch
5. Go to Home > Acquistions > Suggestions management
6. Give some of the suggestions some different status (PENDING/REJECTED/ACCEPTED/ect)
7. Make sure on each of the tables you can see the column 'Patron reason'
8. Go to Administration > Table settings and attempt to hide the column.
9. Confirm that the column is properly hidden on the Suggestions management page
Signed-off-by: Rhonda Kuiper <rkuiper@roundrocktexas.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds the ability to define password_expiry_days for a patron
category.
When defined a patron's password will expire after X days and they will
be required to reset their password. If OPAC resets are enabled for the
catgeory they may do so on their own, otherwise they will need to
contact the library
To test:
1 - Apply patch, updatedatabase
2 - Set 'Password expiration' for a patron category
Home-> Administration-> Patron categories-> Edit
3 - Create a new patron in this category with a userid/password set,
and an email
4 - Confirm their password_expiration_date field is set
SELECT password_expiration_date FROM borrowers WHERE borrowernumber=51;
5 - Create a new patron, do not set a password
6 - Confirm their password_expiration_date field is NULL
7 - Update the patron with an expiration to be expired
UPDATE borrowers SET password_expiration_date='2022-01-01' WHERE borrowernumber=51;
8 - Give the borrower catalogue permission
9 - Attempt to log in to Straff interface
10 - Confirm you are signed out and notified that password must be
reset
11 - Attempt to sign in to OPAC
12 - Confirm you are signed out and notified password must be reset
13 - Enable password reset for the patron's category and perform a
password reset
Note: you will have to find the link in the message_queue unless
you have emails setup on your test environment
SELECT * FROM message_queue WHERE borrowernumber=51;
14 - Confirm that you can now sign in and password_expiration_date field
is set 10 days in the future
15 - Expire the patron's password again
16 - Change the patron's password via the staff interface
17 - Confirm they can sign in and the expiration is updated
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This page updates the table settings page so that it uses Bootstrap's
"Collapse" feature instead of jQueryUI's Accordion.
To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
- Go to Administration -> Table settings.
- You should see a list of table settings which looks much the same as
it did before, with arrow icons prefixing each section header. All
panels should be collapsed.
- Test expanding and collapsing panels to confirm it's working
correctly.
- When you expand a section the heading arrow should change from
right-pointing to down.
- Make a change to one of the table configurations. After clicking
"Save" the page should reload with the same panel expanded.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch updates the MARC and authority subfield edit interface to
replace jQueryUI tabs with Bootstrap. The code for handling
drag-to-reorder tabs is updated to accommodate the new markup.
To test, apply the patch and restart_all.
- Go to Administration -> MARC bibliographic framework -> Default
framework and choose "MARC structure" from the Actions menu.
- In the row for 000 LEADER, click Actions -> View subfields.
- Click "Edit." On the edit page the tabs should look correct and work
correctly.
- Return to the list of tags and click "View subfields" for the 245 tag.
- Click one of the "Edit" buttons for any but the first subfield, e.g.
"a".
- On the "Tag 245 Subfield constraints" page the "a" tab should be
pre-selected.
- Click any of the subfield tabs and drag it to re-order it in the
sequence of tags.
- It should stay in the correct slot when you release it.
- Save and confirm that the new sequence of subfields has been saved.
Perform all the same tests under Administration -> Authority types.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Table settings for the account_fines table (in the Patrons section, the
"Transactions" table in a patron account) are missing a checkbox for the
"Updated On" column. Because of this, one cannot hide the Updated On
column and any other values one sets here get applied to the wrong
columns.
This patch adds timestamp to account-fines column settings.
To test:
1) Navigate to columns settings page and modify account-fines tables
column.
=> Note that if you hide e.g. account_type column, column
credit_number is hidden on patrons account page
2) Apply patch and update database.
=> Account-fines column settings has now a option to hide timestamp.
=> Correct columns should now be hidden.
Sponsored-by: Koha-Suomi Oy
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
On the detail view the number of columns changed, we cannot use the
default sort order here.
It certainly can be done on a different way but I prefer to postpone it
for now and see later.
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.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
because of desc
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.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
because of desc
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.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
'stateSave' so need to test on the first try or delete the relevant local storage
entry
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.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Pagination is done server-side
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.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
On the acquisition table the sort option is not available as we don't
offer the ability to selection asc/desc and default to asc.
We cannot offer default_display_length for those tables.
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.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Set noItemTypeImages and OpacNoItemTypeImages to "No" and confirm
that the first column (the image) is not displayed. Otherwise test as
"normal"
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.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Here we need to deal with the other DT config (in datatables.js, not
columns_settings.inc).
Test plan:
Same as "normal"
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.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
"normal" means that we are expecting the table to have the 2 options
implemented and working.
You can select "Default display length" and "Default sort order"
in the "table settings" administration view, then go the the view
and confirm that the table has the configured values pre-selected.
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.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The syspref NumSavedReports can be moved to the table settings config
Test plan:
1. Set the syspref to a given value
2. updatedatabase # execute the atomic update
3. Go to the table settings page and confirm that the syspref's value
has been retrieved
4. Select a specific colonne for the default sort
5. Go to the report list view and confirm that the "Show X entries" has
the correct selected value and that the table is sorted as you expect.
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.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
A first step to "validate" the MARC mappings: Remove all whitespace, so
if a user enters "245a " (with a trailing whitespace, which can easily
happen when copy/pasting) we only store "245a" in the DB. This is
neccessary, because the ES indexer will throw an exception in an invalid
MARC mapping.
Test Plan:
* Go to /cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl
* Go to the Bibliographic Records Tab
* Enter "100 a b c " (notice the whitespaces!) in the first "mapping"
field
* Scroll down and save
* Go back to the Bibliographic Records Tab
* The spaces are still there
Now apply the patch
* Repeat the above steps
* After saving you should see "100abc" without any spaces in the
"mapping" field
Sponsored-by: Steiermärkische Landesbibliothek
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch uses the new 'standard' field to in the edifact account
configuration area to allow setting the message standard as either
'EDItEUR' or 'BiC'.
This just replaces the currently hard coded hash of SAN's in
Koha::Edifact::Order to distinguish between the two standards instead of
requireing a bug submission per vender san we identify to be a BiC type
vendor.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
We are using json files to retrieve the list of the DB columns. We can
reuse what we have done in the previous patch and display translated
strings.
Test plan:
Search for "unwanted" in the sysprefs
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test, apply the patch and clear your browser cache
1. Go to acqui-home.pl
2. Test that the "Columns" button works to show and hide columns.
3. Go to Administration -> Table settings and look under the Acquisitions tab for the page 'acq_acqui-home' and the table 'accounts'.
4. Hide each column and make sure it hides correctly on acqui-home.pl
5. Test the export options (Excel, CSV, etc) and make sure hidden columns do not show up.
6. Make sure the totals at the bottom of the screen can still be calculated
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Also addresses QA test tools, perldoc in ImportExportFramework.pm
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch fixes the comments from Comment 29 and the import
functionality. You should now be able to import an exported file without
editing the file at all and the authority type code will be overwritten
in the file (same behaviour as biblio frameworks).
Sponsored-by: Catalyst IT
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Mazen Khallaf <mazen.i.khallaf@gamil.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch amends C4::ImportExportFramework to work for authority types as well as MARC frameworks.
New file: admin/import_export_authtype.pl
Update: Ensuring we are passing the right column to the right tables.
Update2: Making the error messages the same to be consistent with patch on Bug 15665
Update3: Fixing merge conflicts
Update4: Fixing merge conflicts and removing tabs
Update5: Getting rid of warns, making sure Import and Export of default
authority will work
Update6: Merge conflicts and making sure export of default auth type
works
Update7: Fixing merge conflicts and updating buttons to bootstrap3
To test:
1) Go to Admin -> Authority types
2) Confirm there are two new columns 'Export' and 'Import' in the table
3) Click 'Export' on an existing authority type and choose a file type, click 'Export'
4) Confirm that the authority type is exported as your chosen file type. Save the file
5) Create a new authority type
6) Import into your new authority type using the file you just exported
7) Confirm you are taken to auth_tag_structure.pl
8) Go back to Authority types
9) Export your new authority type. View the exported file and confirm
the authtypecode has been updated to match the code you set for the new
auth type
10) Click 'Import' next to any existing authority type and attempt to import a file that is not XML, CSV or ODS. Confirm that this fails and you are asked to import a file of the correct file type
11) Confirm Export and Import work for the Default authority type
12) Go to Admin -> MARC bibliographic framework
13) Confirm that the 'Export' and 'Import' functions still work here as well
Sponsored-by: Catalyst IT
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Mazen Khallaf <mazen.i.khallaf@gamil.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Two new routes that do the same thing
/api/v1/acquisitions/funds/owners
/api/v1/acquisitions/funds/users
To list the possible owners and users for a fund
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Séverine Queune <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1. Have some holds and build the holds queue.
2. Go to view_holdsqueue.tt, there is no patron category column
3. Apply patch
4. Look again, there should now be a column for 'Patron category'
showing both the caterory name and the category code.
5. Make sure you can sort and filter by this new column
6. Go to table settings and make sure you can properly hide this column
and all other columns in the Holds queue.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds the option of using a remote image for an authorized
value, just as you can with item types.
To test, apply the patch and go to Administration -> Authorized values.
- Click "CCODE" to view the collection authorized values.
- Edit a collection code.
- In the form, under "Choose an icon," there should now be a "Remote
image" tab.
- Enter a remote image url, e.g. https://via.placeholder.com/50/FF0000/FFFFFF.png
- Click "Save."
- After the page redirects to the list of collection codes you should
see your image in the table next to the code you edited.
- Test that you can still edit a collection to set "No image" or to
use one of the local image sets.
- Test that remote images can also be added when adding a new
collection.
- Make sure "ccode" is in the "AdvancedSearchTypes" sytem preference.
- Go to the catalog's advanced search page and click the "Collection"
tab.
- You should see your collection image in the list of collections.
- Perform the same check in the OPAC.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
JD amended patch: fix indentation
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
On bug 29844 we decided to remove wantarray from Koha::Objects->search.
Reviewing the difference occurrences I found some unnecessary uses of ->as_list,
where iterators should be used instead.
This patch only removes the obvious places, not the tricky ones.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
and some more...
There are lot of inconsistencies in our ->search calls. We could
simplify some of them, but not in this patch. Here we want to prevent
regressions as much as possible and so don't add unecessary changes.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1. Have some holds awaiting pickup, also have some holds that have been waiting longer than the ReservesMaxPickUpDelay is set to.
2. Go to /cgi-bin/koha/circ/waitingreserves.pl
3. There is no expiration date
4. Apply patch and restart_all
5. Now there should be a Expiration date column, make sure you can see it in both Holds waiting and Holds waiting over X days
6. Make sure all the columns Waiting Since, Date hold placed, and expiration date still sort correctly
6. Go to Table settings, and make sure all the columns hide correctly for both of the holds_awaiting_pickup tables ( holdst & holdso )
Note: This patch also corrects 2 other small problems
1. Corrects a problem where the table settings did not account for the checkbox column at the beginnning of each table
2. Removes the title-string class and uses data-order to sort Waiting Since, Date hold placed, and expiration date ( see Bug 27934 )
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds a new circulation rule: article requests fee.
It can be set per library and category.
To test:
1. Try setting sdifferent numeric values, change, and delete them
=> SUCCESS: Things work as expected
2. Make sure rules are loaded correctly when re-entering the circ rules
page
=> SUCCESS: All good
3. Verify the data on the DB is stored as it should on each of your
tests:
$ koha-mysql kohadev
> SELECT * FROM circulation_rules \
WHERE rule_name='article_request_fee';
=> SUCCESS: All good (remember NULL => 'All' in the UI)
4. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch makes the cataloging reservoir search results a configurable
DataTable. The empty edition and date columns are removed, and an import
data column is added.
To test, apply the patch and go to Cataloging.
- Perform a cataloging search which will return results from the
reservoir.
- The table of reservoir search results should be a DataTable with
paging, navigation, filtering, column configuration, etc.
- Confirm that all DataTable controls work correctly.
- Go to Administration -> Table settings -> Cataloging -> addbooks.
- Try modifying the default configuration and confirm that the
settings take effect.
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds a flag to the OPAC preferences file marking suggestion
title as mandatory OPACSuggestionMandatoryFields and excluded from
OPACSuggestionUnwantedFields.
The patch also modifies the markup around required fields in the OPAC
suggestion form to comply with changes made in Bug 27668 to mandatory
field styling.
To test, apply the patch and restart services.
- Test the OPACSuggestionMandatoryFields preference. In the modal,
"title" should be checked and the label in red. It should not be
possible to uncheck the checkbox.
- Test that the "Select all" and "Clear all" links don't affect the
"title" checkbox.
- Confirm that your selections are still saved correctly.
- Test the OPACSuggestionUnwantedFields preference. In the modal,
"title" should be unchecked and disabled.
- Test that the "Select all" and "Clear all" links don't affect the
"title" checkbox.
- Confirm that your selections are saved correctly.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The mappings must be editable even if ES is not turned on yet.
Using a separate array to store the errors as we are testing for $@ ||
@messages.
There is still something wrong that should be improve, but this patch
should be safe for backport.
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Use of uninitialized value $interface in concatenation (.) or string at /kohadevbox/koha/C4/Languages.pm line 121.
We are expecting "intranet" or "opac, here we sent undef which raises a
warning.
For no change in behaviour we can send "both" (or whatever different
than "intranet" and "opac").
Test plan:
Hit /cgi-bin/koha/admin/itemtypes.pl?op=add_form&itemtype=BK
Notice that the warning does no longer appear in the logs with the patch
applied.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Adds GetBudgetHierarchy to the functions called by C4::Budgets
Plan :
1. Create a budget with a random amount, save it.
2. Try to close the budget.
3. You should get an Error Trace.
4. Apply the patch
5. Close the budget again
6. It should work.
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds table settings for the three tables which appear on the
patron's "Print summary" view. This will allow the administrator to
set a default configuration for columns on the print summary page.
To test, apply the patch and restart-all to load the revised columns
settings YAML. Rebuild the staff interface SCSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
- Go to Administration -> Table settings -> Circulation.
- Under the "Circulation tables" heading you should see a "Jump to" link
to "print_summary."
- In the settings for the print_summary page you should see three
tables: print-summary-checkouts, print-summary-fines, and
print-summary-holds.
- Locate a patron account which has checkouts, fines, and holds.
- From the patron detail view click "Print -> Print summary."
- A new window should open with the print summary view. All tables
should display correctly.
- Test that the "Columns" buttons work correctly to show and hide
columns.
- Make changes to the default settings for these tables to confirm that
they work on the print summary page.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds the ability to set a library as 'public' or not; this
allows librarians to hide back office library branches from the opac.
Test plan
1/ Set a library as public from `admin > libraries`.
2/ Navigate to the `Libraries` page in the OPAC
3/ Note that only `public` libraries are displayed.
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Replace 'holdinglibrary' with 'transferlibrary' in checkedin
columns_settings description.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit adds the missing checked_out_by column to
columns_settings.yaml
Test plan:
- Follow the test plans in the bug description and note that the
symptoms are no longer seen
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>
Subroutine "new" called using indirect syntax at line 30, column 13. See page 349 of PBP. (Severity: 4)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Too many imports and unecessary complicated init of $rules
There are certainly other things to improve, like the "op" handling,
standardize names of "op", etc.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch acknowledges the fact that 'merging' has a different meaning
in Koha than the behavior this great patchset introduces. The more
idiomatic way of describing the behavior is to talk about 'overlay rules'.
This patch also:
- Fixes kohastructure.sql missing table encoding a collation
- Fixes the atomic update completely missing a table
- Moves the syspref entry to 'Importing', probably a rebase issue
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 14957: (QA follow-up) Fix syntax error in atomicupdate
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 14957: Fix imports in tests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 14957: Fix imports in marc-overlay-rules.pl
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 14957: Fix syspref's values
It didn't switch off when set to "don't use"
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
JD amended patch: Fix license statement
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Add a rule based system for merging MARC records to for example
prevent field data from being overwritten.
To test:
1. Apply this patch.
2. Log in to staff client.
3. Enable new syspref MARCMergeRules.
4. Click the new link "MARC merge rules" in the "Catalog"
section of the Koha administration page.
5. Create a new rule:
Module: source, Filter: *, Tag: 245, Preset: Protect.
6. Clicking "Edit" should allow you to edit corresponding rule.
7. Clicking "Delete" should remove corresponding rule after confirmation.
8. Selecting one or more rules followed by clicking "Delete
selected" should remove all selected rules after confirmation.
9. Try creating a rule with tag set to "**", the other options does
not matter. Verify that saving this rule produces an error
message complaining about invalid tag regular expression.
10. Try creating a rule with tag set to "008" (or other control
field) and set Appended: Append and Removed: Skip, the other
options does not matter. Verify that saving this rule produces
an error message complaining about invalid combination of actions
for control field.
11. With the 245 rule in step 5 in place, edit a bibliographic record,
change 245a for example (which should be Title for MARC21) and save.
12. Verify that the changes has not been saved.
13. Create a new rule:
Module: source, Filter: intranet, Tag: 245, Preset: Overwrite.
14. Repeat step 12, and verify that the changes has now been saved.
15. Run tests in t/db_dependent/Biblio/MarcMergeRules.t and very
that all tests pass.
Sponsored-by: Halland County Library
Sponsored-by: Catalyst IT
Sponsored-by: Gothenburg University Library
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Pasi Kallinen <pasi.kallinen@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Andrew Nugged <nugged@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 14669 added the column to the table but forgot to add it to the
table settings yml file
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The previous patch makes check_cookie_auth return the session instead of
$sessionID, so we are adjusting the different calls to prevent
confusion.
However they are mainly used to check the authentication status and
don't care about this second variable.
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>
The DB rev added a row with NULL (unlimited), and the UI a row with ''
(unlimited as well) when saved without value.
Better is to not have a row (still unlimited)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(Patch extracted from bug 28445 to make it reusable for bug 23678)
We already had the need for that, when bibliographic records are
modified in batch we wanted to add a "Add to list" feature, and so pass
a list of lists/virtual shelves to the template.
Here (in 28445) we will want to pass the infos of the items that have been modified
to display a table.
Test plan:
0. Create at least one list (virtual shelf)
1. batch update biblios
2. Go to the job detail
3. Notice that dropdown list to add the record to a list
=> No regression found!
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
We no longer need to act as if closed branches were marked as
disable_transfer. This allows us to clean up a nice bit of code.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 28510: Remove unused variable
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
As requested in comment #49, renamed uses of AcqLog to AcquisitionLog
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
JD amended patch: replace one missing occurrence in Budgets.t
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit makes changes in response to Jonathan's feedback in comment
- Moved from using zero padded strings to store log data to a JSON
object
- Stopped storing formatted dates in logged data
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Maura Stephens <maura.stephens@gmit.ie>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
If Pseudonymization is set but the bcrypt_settings config used by the
feature is not set, then there is an ugly 500 on checking out.
bad bcrypt settings at /kohadevbox/koha/Koha/PseudonymizedTransaction.pm line 116.
However it's pretty hard to handle correctly this exception (and that's
why it hasn't be done initially). However we could prevent the pref to
be turned on if the config entry is not present.
Test plan:
Remove the bcrypt_settings from the config
Try to turn the syspref on
Add the config
Try to turn the syspref on/off
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
JD amended patch: fix qa failures
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds the cni/Control-number-identifier index to enable
searches to use the 003 field.
Test plan
1/ Apply patch
2/ Re-index using updated configurations
3/ Confirm cni:number searches yield the expected results
4/ Signoff
Split-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Pasi Kallinen <pasi.kallinen@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
To test:
1. have some overdues
2. go to the overdue report on the circulation page (overdue.tt)
3. no shelving location
4. apply patch and restart the things
5. look at the overdue report again and there should be a Shelving location column
6. make sure it is accurate
7. go to table settings and make sure you can properly hide the column. test other columns in the table and make sure they are still hiding correctly as well
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds 050 $a to the mapping for the lc-call-number index.
To test:
1) Apply patch
2) Reindex using rebuild_elasticsearch.pl -r
If you don't have access to a terminal (in a sandbox for example)
2a) Go to Administration > Search engine configuration, click "Reset mappings"
and confirm
2b) Then reindex
I'm not sure how to search specifically for an LC call number.
You can confirm that 050 $a is displayed in the Search engine configuration page.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds fields 710$a and 711$a to the default author mappings for elasticsearch indexing.
To test:
1) Apply patch
2) Reindex using rebuild_elasticsearch.pl -r
If you don't have access to a terminal (in a sandbox for example)
2a) Go to Administration > Search engine configuration, click "Reset mappings"
and confirm
2b) Then reindex
3) Search for an author name found only in 710 using the Author index
in advanced search
4) Repeat search for an author name in 711
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch corrects a typo in the mappings.yaml file
To test:
1) Apply patch
2) Reindex using rebuild_elasticsearch.pl -r
If you don't have access to a terminal (in a sandbox for example)
2a) Go to Administration > Search engine configuration, click "Reset mappings"
and confirm
2b) Then reindex
3) Search for a standard number found in 024$a using the Standard number index
in the advanced search
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds 710 to the default author-name-corporate index mappings for
elasticsearch.
To test:
1) Apply patch
2) Reindex using rebuild_elasticsearch.pl -r
If you don't have access to a terminal (in a sandbox for example)
2a) Go to Administration > Search engine configuration, click "Reset mappings"
and confirm
2b) Then reindex
3) Search for an author name found only in 710 using the Author (Corporate name) index
in advanced search
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds series added entries titles (800 $t, 810 $t, 811 $t, and 830 $a) in the
default title-series index mappings.
To test:
1) Apply patch
2) Reindex using rebuildelasticsearch.pl -r
If you don't have access to a terminal (in a sandbox for example)
2a) Go to Administration > Search engine configuration and click "Reset mappings" and confirm
2b) Then reindex
3) Search for a series title found only in and added entry field
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
There are two things here:
* Branches.pickup_location has a default = 1 in DB, we should not set to undef if 0
or it will be set to 1 when stored.
* The other fields are all text (varchar, mediumtext or longtext) and
can be NULL. They are correct set to NULL when a new library is created
but set to an empty string when the library is modified. That's not
consistent
Test plan:
0. Don't apply the patch
1. Create a new library, set pickup location to "No"
2. Save
=> Pickup location is set to YES
=> In DB notice that the different values you didn't fill in are set to
NULL
3. Edit the library
4. Save
=> In DB notice that the different values you didn't fill in are now set
to an empty string
5. Apply the patch, restart_all
6. Run the updatedatabase script
=> In DB all the empty string values are set to NULL
7. Repeat 1 to 4 and confirm that everything is now working as expected
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
It's not used in those files (there is no occurrence of ###), and it's
not installed anyway (it is by koha-testing-docker however).
We should remove those lines.
Test plan:
Confirm the above
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
On bug 17591 we discovered that there was something weird going on with
the way we export and use subroutines/modules.
This patch tries to standardize our EXPORT to use EXPORT_OK only.
That way we will need to explicitely define the subroutine we want to
use from a module.
This patch is a squashed version of:
Bug 17600: After export.pl
Bug 17600: After perlimport
Bug 17600: Manual changes
Bug 17600: Other manual changes after second perlimports run
Bug 17600: Fix tests
And a lot of other manual changes.
export.pl is a dirty script that can be found on bug 17600.
"perlimport" is:
git clone https://github.com/oalders/App-perlimports.git
cd App-perlimports/
cpanm --installdeps .
export PERL5LIB="$PERL5LIB:/kohadevbox/koha/App-perlimports/lib"
find . \( -name "*.pl" -o -name "*.pm" \) -exec perl App-perlimports/script/perlimports --inplace-edit --no-preserve-unused --filename {} \;
The ideas of this patch are to:
* use EXPORT_OK instead of EXPORT
* perltidy the EXPORT_OK list
* remove '&' before the subroutine names
* remove some uneeded use statements
* explicitely import the subroutines we need within the controllers or
modules
Note that the private subroutines (starting with _) should not be
exported (and not used from outside of the module except from tests).
EXPORT vs EXPORT_OK (from
https://www.thegeekstuff.com/2010/06/perl-exporter-examples/)
"""
Export allows to export the functions and variables of modules to user’s namespace using the standard import method. This way, we don’t need to create the objects for the modules to access it’s members.
@EXPORT and @EXPORT_OK are the two main variables used during export operation.
@EXPORT contains list of symbols (subroutines and variables) of the module to be exported into the caller namespace.
@EXPORT_OK does export of symbols on demand basis.
"""
If this patch caused a conflict with a patch you wrote prior to its
push:
* Make sure you are not reintroducing a "use" statement that has been
removed
* "$subroutine" is not exported by the C4::$MODULE module
means that you need to add the subroutine to the @EXPORT_OK list
* Bareword "$subroutine" not allowed while "strict subs"
means that you didn't imported the subroutine from the module:
- use $MODULE qw( $subroutine list );
You can also use the fully qualified namespace: C4::$MODULE::$subroutine
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds a "Date added" column to the table showing uploaded
files. Column configuration is added to the table, and the date column
is hidden by default.
To test, apply the patch and restart all.
- Go to Tools -> Upload.
- If necessary, upload multiple files with the same category.
- Use the "Search uploads by category" form to find those uploads.
- In the table of uploads, confirm that table settings and other
DataTable controls work correctly, including the option to show the
"Date added" column.
- Go to Administration -> Table settings -> Tools -> upload.
- Change the settings for the uploads table.
- Return to Uploads and confirm that your changes are reflected in the
display of the uploads table.
Signed-off-by: Salman Ali <salman.ali@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
We are using Koha::Logger when it makes sense to keep the info,
otherwise we simply remove it
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 28572: Replace missing occurrence in misc/admin/koha-preferences
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
There is a "debug" parameter we are passing from the controller scripts
to C4::Auth::get_template_and_user, but it's not actually used!
Test plan:
Confirm the assumption
Review the changes from this patch
Generated with:
perl -p -i -e 's#\s*debug\s*=\>\s*(0|1),?\s*##gms' **/*.pl
git checkout misc/devel/update_dbix_class_files.pl # Wrong catch
+ Manual fix in acqui/neworderempty.pl
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds an "id" column to the table of MARC modification
templates. The table is now a DataTable with table settings, with the
new column hidden by default to preserve the existing configuration.
To test, apply the patch and restart services.
- Go to Administration -> MARC modification templates.
- If necessary, add two or more templates.
- Confirm that table of templates displays as a DataTable, with all
associated sorting, filtering, export, etc.
- The "id" column should be hidden by default.
- Confirm that column visibility controls work correctly.
- Confirm that the table settings found under Administration -> Table
settings work correctly to set the default visibility of the table
columns.
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
memcached address and namespace are in $KOHA_CONF, so it is required to
read it before being able to access the cache. And after that,
configuration is kept in memory forever. Storing this in memcached is
useless and even counter-productive, since Koha reads both the file and
the cache
This patch addresses this issue by removing the cache-related code from
C4::Context->new.
It means that C4::Context->new will always read the configuration file,
so this patch also replaces inappropriate calls to
C4::Context->new->config by appropriate calls to C4::Context->config
It also fixes a bug where C4::Context->new would ignore the filepath
given in parameters if there was something in cache.
It also removes a problematic call to Koha::Caches->get_instance.
Because this call was outside of any subroutine, it would have happened
before the initialization of $C4::Context::context (which happen in
C4::Context::import)
Test plan:
1. Do not apply the patch yet
2. Add the following line at the beginning of Koha::Config::read_from_file
warn "read_from_file($file)";
This will allow you to check how many times the file is read.
3. Flush memcached and restart starman
4. Check the logs, you should see "read_from_file" a bunch of times
5. Apply the patch
6. Re-add the line from step 2
7. Flush memcached and restart starman
8. Check the logs, you should see "read_from_file" only once
9. Make sure the memcached config from $KOHA_CONF (memcached_servers,
memcached_namespace) is taken into account by checking the About page
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
When a new framework is created and "Marc structure" is opened, a SQL
error happened if sql_strict_mode is on.
Test plan:
Create a 2 new biblio frameworks
Click "Marc structure" for one of them
=> You see the list of all frameworks with an existing structure
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds the posibility to set an itemtype with automatic
checkin. It means that when the checkout is due, it will
automatically check in.
To test:
1. apply patches
2. updatedatabase
3. go to koha administration -> item types and edin an item type (from
now on called itemtype1)
CHECK => there is a checkbox almost at the end called automatic checkin
4. check that checkbox and save
5. checkout 2 items from itemtype1 and one item from another itemtype
(from now on called itemtype2)
6. go to mysql database console (koha-mysql) and manually set date_due = current_timestamp
in issues table for the item of itemtype2 and only one of the items of
itemtype1
7. run cronjob at misc/cronjobs/automatic_checkin.pl
8. go to mysql database console again and select * from issues
SUCCESS => All issues are present except for the issue of itemtype1
which had it's date_due set to current_timestamp. That one was
automatically checked in.
9. prove t/db_dependent/Koha/Checkouts.t
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Hasina Akhter <HasinaA@pascolibraries.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The parent_code column is missing on the columns_settings.yml file, so
columns are shifted and thus 'Library limitations' is not toggable.
To test:
1. Verify you are not offered the chance to hide the column
2. Apply this patch, restart all the things
=> SUCCESS: You can toggle the column
3. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
We want admin/cities.pl to be using as much DT features as possible to be used as an example.
Test plan:
Add some cities, go to admin/cities.pl confirm that you can show/hide
column.
Go to the tables settings admin page and confirm that you can set some
default settings from there.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds table settings to the tables shown before and after
a batch of patrons has been submitted for batch patron modification.
To test you must have ExtendedPatronAttributes enabled and at least one
configured.
- Go to Tools -> Batch patron modification
- Submit a set of patrons for modification
- In the table showing patron records which will be modified, confirm
that all DataTables controls work correctly.
- Confirm that the column visibility settings work correctly,
including the controls for extended patron attribute columns.
- Submit a change to your patron batch.
- On the page showing the results, confirm that the DataTables controls
continue to work as expected.
- Go to Administraion -> Table settings and confirm that making changes
to the default configuration for this table (Tools ->
batch_patron_modification -> borrowerst) results in the correct
default columns being shown on the batch patron modification pages.
Signed-off-by: Amit Gupta <amitddng135@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
To test:
-PLace a hold and add a reserve note to that hold
-Go to Circulation > Holds to pull
-Notice there is no reserve notes column
-Apply patch and restart all the things
-Reload the Holds to pull report and you should see a reserve notes column
-Go to table settings (/cgi-bin/koha/admin/columns_settings.pl) and make sure you can properly hide the column.
-Test other columns in the table and make sure you can properly hide them
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch changes the way input fields are output in the system
preferences template for preferences which have an "email" class. The
input type will now be "email" instead of "text."
Email type inputs are "loosely" validated. Mozilla's documentation says
valid patterns are "username@domain or username@domain.tld," so Koha's
default "root@localhost" will still work.
The other advantage of an "email" type input is that it typically
triggers different keyboard options in mobile devices.
To test, apply the patch and go to Administration -> Global system
preferences.
- Search system preferences for "email."
- Test the email type preferences you find (e.g. KohaAdminEmailAddress,
ReplytoDefault, SendAllEmailsTo), confirming that email
addresses like username@domain or username@domain.tld work correctly.
- Confirm that any other value triggers a validation error.
Signed-off-by: Amit Gupta <amitddng135@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The current transfer limits editor works great for Koha instances with
small numbers of branches. However, for consortiums with dozens or even
hundreds of libraries, the editor does not work well or effectively.
We should provide an "advanced" editor displays all to/from library
combinations in a grid and allows them to be edited in a manner somewhat
similar to the transport cost matrix editor.
Test Plan:
1) Apply this patch
2) Browse to the transfer limits editor
3) Click the new "Switch to advanced editor" link
4) Select a collection code/item type to edit limits for
5) Test the "Check all" function
6) Test the "Uncheck all" function
7) Test the "Check" column function
8) Test the "Uncheck" column function
9) Test the "Check" row function
10) Test the "Uncheck" row function
11) Test individual checkboxes/table cells
Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org>
Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org>
Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org>
Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds a new type of system preference entry option: patron
category. A preference with this type will show either a <select> with
patron categories to choose from or a multiple-select menu for choosing
one or more.
This prevents possible errors from incorrect category codes being
entered manually.
To test, apply the patch and run the database update.
- Go to Administration -> System preferences.
- Test each of the updated preferences to confirm that the available
options are correct and that your selections are correctly saved.
- Single category selections, PatronSelfRegistrationDefaultCategory
and GoogleOpenIDConnectDefaultCategory. With each of these you
should see a dropdown where you can select of all the existing
patron categories.
- Multiple selections, OPACHoldsIfAvailableAtPickup and
BatchCheckouts: These preferences should have an option for
selecting one or more system preferences at once.
- Test the pages affected by the updated system preferences:
- With BatchCheckouts enabled, confirm that the batch checkout page is
correctly limited by patron category.
- Set the OPACHoldsIfAvailableAtPickup preference to "Don't allow" and
select at least one patron category in the
OPACHoldsIfAvailableAtPickupExceptions preference.
- Log in to the OPAC as a patron whose category was not selected in
the OPACHoldsIfAvailableAtPickupExceptions preference.
- Try to place a hold on an item which is available at a library.
- When confirming the hold, the libraries where the item is available
should be disabled in the "Pick up location" dropdown.
- Repeat the process as a patron whose category was selected in
OPACHoldsIfAvailableAtPickupExceptions. There should be no disabled
pickup locations.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
It seems that we don't really need all this overhead.
YesNo must be a boolean and contain 1 or 0.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
It was tricky to write the previous patch so I decided to clean the
ground (a bit) for later, taking advantage of having people who are
going to test the whole area.
We can move it to its own bug report if QA wants to.
Sponsored-by: Orex Digital
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Same patch for the authority frameworks/records
Sponsored-by: Orex Digital
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This new enhancement adds the ability to change the default order the subfields.
Both bibliographic and authority MARC subfield structure are taken into
account. And so the item edition as well (in the different screens when
item can be added/edited).
This will answer the following needs that have been listed in the
comments of the bug report:
- $i in 7xx fields should be the first subfield in the sequence
- 300 fields are sorted number first when cataloguers enter the letter fields first
- 100 field, it's commonly $a, $q, $d.
Test plan:
1. Edit a MARC frameworks, field 300
2. Resort the subfield (drag and drop the tab of the subfield) as you
like
3. Save
=> Notice that the list of fields are displayed following the order you
chose
4. Edit it again
=> The order is correctly kept!
5. Create a new bibliographic record
6. Notice that the subfields are order in the same sequence
7. Fill different subfields, not all
8. Save, edit again
9. Note that the subfields that have been filled are listed first, then
the empty ones. But the sequence defined at the framework level is kept.
10. Do the same for an authority framework and create/edit an authority
record
11. Modify item (952) subfields order
12. Create an item and confirm that the order is correct
13. Modify the ACQ framework, 952, modify the order of the subfield
14. Create a new order and confirm that the item form has the subfield
ordered following the sequence defined at the framework level
QA: Note that this patch is about bibliographic records only, next
patches deal with authotiries and items.
Sponsored-by: Orex Digital
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
From tht YAML pod:
"""
This module has been released to CPAN as YAML::Old, and soon YAML.pm will be changed to just be a frontend interface module for all the various Perl YAML implementation modules, including YAML::Old.
If you want robust and fast YAML processing using the normal Dump/Load API, please consider switching to YAML::XS. It is by far the best Perl module for YAML at this time. It requires that you have a C compiler, since it is written in C.
"""
See also
https://gitlab.com/koha-community/qa-test-tools/-/merge_requests/35
Test plan:
Try some place where YAML::XS is not used and confirm that it works
correctly
QA note: This patch removes some uses of YAML that were not useful
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch add the ability to modify the attribute "repeatable" and
"unique_id" for a patron's attribute type.
Prior to this patch it was not possible, to keep data integrity.
When editing an attr type, the controller will check is the value can be
modified, depending on the existing patron's attributes.
Test plan:
0/ Setup
Create 1 patron attribute PA1 that can be repeatable
Create 1 patron attribute PA2 that does not have the unique restriction
Create 1 patron attribute PA3 that cannot be repeatable and does not
have the unique restriction
1/
Edit them and confirm that you can modify the repeatable and unique
restrictions
2/ Restore values from 0.
Create a patron P1 with several PA1, PA2=42 and whatever in PA3
3/ Edit PA1 => you cannot remove the repeatable flag but can still
remove the unique
4/ Create a patron P2 with PA2=42
5/ Edit PA2 => you cannot add the unique flag
Play a bit more with the different combinaisons and confirm that it
works as advertised.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Preferences of the "Holds to pull" table missing the "Barcode" column.
This patch appends that column name to the "column_settings.yml"
in correct order. This also led to checked out columns in this settings
page that were not those which were hidden when the table displayed
(i.e. columns were shifted).
To reproduce:
1) Head over to /cgi-bin/koha/admin/columns_settings.pl
2) Open the collapsed "Circulation" list, go to the "Holds" page
and find preferences of the "Holds to pull" table there.
3) Check that the "Barcodes" column is missing from it.
4) Mark the last few columns for not to be
displayed (for example, three) and save the preferences.
Remember the column names you checked out.
5) Open the circulations section, then open "Holds to pull" report
when you have there some elements displayed, you should notice that
hidden columns shifted by one, as well if you press "gear" icon to
quickly enable/disable the columns, you will see those unchecked in
list last three will be not those you marked out.
6) Apply the patch.
7) Reload the "table settings" page, check that the "Barcodes"
column is present.
8) Check that on the "Circulation -> Holds to Pull" page all
columns hidden accordingly and properly (as explained in step 5.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 22844 Added the option to provide a modal for selecting database columns for system preferences
Some system preferences are limited to a subset of the columns allowed. For instance, setting branchcode
in BorrowerUnwantedFields prevents adding new patrons
This patch allows for defining exclusions in the .pref file
To test:
1 - Alter BorroweUnwantedFields and select branchcode
2 - Attempt to add a new patron
3 - Get a message like "Something went wrong. Check the logs"
4 - Apply patches
5 - Alter the preference again
6 - Note that branchcode is unchecked and disabled
7 - Save the pref
8 - Add a patron
9 - It succeeds
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Bug 17364: (follow-up) Add missing filter
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
There was another mention of the old system preference name in the
budget planning code. This patch replaces it with the new name.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
It'd be great if the Search Engine Configuration page would display
the various aliases (shortcuts) available : ti for title, sn for local-number, etc.
Patch changes Koha/SearchEngine/Elasticsearch/QueryBuilder.pm to move
hard-coded vars at the beging and adds a method to provide to %index_field_convert via a method.
Test plan :
1) Use Elasticsearch
2) Go to Administration > Search engine configuration (Elasticsearch)
3) Check you see new column 'Aliases' with for example ti for title.
4) Perform a search 'ti:<title>' and check you get results
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Those two strings are not translatable as they are passed from the
controller.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Search engine administration is very important,
we should log who/when it is changed.
I don't add a preference system to disable it,
like there is no for preference system logs.
Test plan :
1) Use searchengine Elasticsearch
2) Go to Administation > Search engine configuration (Elasticsearch)
3) Click on 'Reset Mappings' and accept
4) Edit some lines and save
5) Go to 'Tools' > 'Log viewer'
6) Select only 'Search engine' in Modules and submit
7) Select only 'Edit mappings' in Actions
8) Check you see a log
9) Select only 'Reset mappings' in Actions
10) Check you see a log
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
With Elasticsearch 6 (>6.4), we have a warning on index creation :
the default number of shards will change from [5] to [1] in 7.0.0
See https://github.com/elastic/elasticsearch/pull/30587
I propose to add number_of_shards in index config.
Also add number_of_replicas that is better explicit.
In case on only one node, it must be 0.
Test plan :
1) Use Elasticsearch
2) Apply patch and flush memcached
3) Rebuild indexes : misc/search_tools/rebuild_elasticsearch.pl -v -b -d
4) Check you dont have a warning about number of shards
5) Check the settings of index :
curl '<cluster>:9200/<myindex>_biblios/_settings?pretty&filter_path=**.number_of_*'
6) You should see :
"number_of_shards" : "5",
"number_of_replicas" : "1"
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds the ability to set the "Unseen renewals allowed" value
in the circulation rules
Signed-off-by: Sally Healey <sally.Healey@cheshirewestandchester.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds two new sysprefs. 'ILLDefaultEmail', 'ILLSendStaffNotices' and a new column to the
branches table called 'branchillemail'. It also adds five ILL related
notices.
Here we are providing the ability for a branch to have a dedicated email
address for it's ILL staff, the idea being that any notices sent by ILL
to staff need to go to specific staff, rather than the general branch
email address. If no branch specific address is defined, the address
specified in the ILLDefaultEmail syspref is used.
We're also providing a syspref 'ILLSendStaffNotices' to allow the user to specify which
notices should be sent to staff upon certain events.
We are also providing patron messaging preferences for the two patron
bound notices
We are also providing five notices for various ILL related events.
Sponsored-by: PTFS Europe
Signed-off-by: Niamh Walker-Headon <Niamh.Walker-Headon@it-tallaght.ie>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
To test:
1) Apply patch, update database, restart services
2) Enable decreaseLoanHighHolds sysprefs if not already active
3) Go to circulation rules and set a value under 'Decrease loan holds
(day)' that is DIFFERENT from decreaseLoanHighHoldsDuration
4) Check out an item with holds and confirm that the value from the rule
is used instead of the system preference
5) Confirm tests pass before and after the patch
t/db_dependent/DecreaseLoanHighHolds.t
Sponsored-by: Catalyst IT
Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Henry Bolshaw <bolshawh@parliament.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds handing for the new values available for the lostreturn
policy settings.
* undef - Do nothing, leave fees and fines as they were at the point of
lose.
* refund - Refund the lost item fee only
* charge - Refund the lost item fee and charge a fresh overdue fine
dated for a return on the date the item is 'found'
* restore - Refund the lost item fee and restore the original overdue
fine (dated for a 'return' on the date the item was 'lost'
Test plan
1/ apply patch
2/ updatedatabase, restart_all
3/ verify finesmode and CalculateFinesOnReturn and WhenLostChargeReplacementFee are on
4/ verify WhenLostForgiveFine is set to "Forgive"
5/ verify circ rules include fines
6/ set Default lost item fee refund on return policy to "Refund lost item charge"
7/ create 4 overdue checkouts that will incur fines
8/ run fines.pl
9/ confirm 4 items checked out with accruing fines
10/ confirm all 4 items have a replacement price
Item 1
11/ mark the first item lost
12/ verify that fine is gone and lost fee has been charged
13/ check item in
14/ verify that lost fee is gone and overdue charge has not returned
Item 2
15/ set Default lost item fee refund on return policy to "Refund lost item charge and charge new overdue fine"
16/ mark second item lost
17/ verify that fine is gone and lost fee has been charged
18/ check item in
19/ verify that lost fee is gone and a new overdue charge has been made
Item 3
20/ set Default lost item fee refund on return policy to "Refund lost item charge and restore overdue fine"
21/ mark third item lost
22/ verify that fine is gone and lost fee has been charged
23/ check item in
24/ verify that lost fee is gone and the old overdue charge has been restored
Item 4
25/ set Default lost item fee refund on return policy to "Leave lost item charge"
26/ mark fourth item lost
27/ verify that fine is gone and lost fee has been charged
28/ check item in
29/ verify that lost fee remains and the overdue charge is still gone
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This alters the template check to use the presence of the plugins
arrayref rather than requiring a second call to check for
plugins_enabled.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Test Plan:
1) Install an EDI plugin
2) Browse to edi_accounts.pl, create or edit an account
3) Note the plugins pulldown is missing
4) Apply this patch
5) Restart all the things!
6) Reload the page
7) Note the pulldown is back!
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This adds the items.copynumber to the checkouts table in the
patron account in the staff interface.
To test:
- Apply patch
- Check out some items with and without copy number in the item
to any patron
- In the checkouts table on the Checkouts and Details tabs:
- Verify that a new column shows 'copy no' shows after 'call no'
- Verify the information displays correctly
- Verify that the column configuration settings for the new column works
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This adds a new 'Price' column to the acqusition details tab.
To test:
- Apply patch
- Add one or more orders for a record.
- Before closing the basket: go to the detail page in the catalog
- Verify that the price estimated/budgetet price now shows in a new column
- Add actual cost to the basket or close the basket and receive the item
- Verify the column now shows the updated actual cost
- Verfy the tooltip on the table heading works
- Verify the column configuration for the new column works as well
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The table currently displays the fund, but as late orders can be
from a past budget with the same fund names, this can be confusing.
So adding the budget in addition to the fund will be helpful.
To test:
- Add a basket and an order, close the basket
- Go to the late oder page
- Make sure your order shows up there
- Apply the patch
- Reload the late orders page
- Verify a new column budget shows in the table
- Verify the table configuration settings work for the new column
- Run t/db_dependent/Koha/Acquisition/Fund.t
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
To test:
1 - Apply patch
2 - ./installer/data/mysql/updatedatabase.pl
3 - Reset ES mapping: Administration->Search engine configuration , button at bottom of page
4 - 'issues' and 'title' mapping under 'search fields' should be mandatory and not editable
5 - On 'Bibliographic records' tab you should not be able to delete the single entry for issues
6 - You should be able to delete 'title' mappings, however, at the final one you should be stopped by javascript
7 - Bonus: force remove the last mapping from the page using developer tools - attempt to save and should be warned of missing mandatory mapping
Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
At the moment the pages falsely check for parameters_remaining_permissions,
but they should check the specific manage_accounts permission.
To test:
- Create a new staff user with only catalog and manage_acccounts
permissions
- Log in with this staff user and go to the admin page
- You will see the debit and credit type sections, but won't be
able to access them
- Apply the patch
- Veriy the links still show, but pages are now accessible
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
In admin/searchengine/elasticsearch/mappings.yaml the search field not-onloan-count is defined for MARC21 on 999x.
This should be for all the MARC flavours, like in Zebra config.
Test plan:
1) On a UNIMARC database
2) Reset Elasticsearch mappings
3) Check search engine config to see field 'not-onloan-count' on 999$x
4) Same on a NORMARC database
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The new column can now be hidden by the table settings
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Currently, the 'Default checkout, hold, and return policy' have a conditional to blank
'holdallowed' when not set, but other rules don't get the same treatment
This patch uses the existing hash that controls the scope of rules and adds a
new parameter 'can_be_blank' Default is assumed to be true, can_be_blank, but if set to '0' then
blank rule values will not be save to the database
To test:
0 - Set CircControl to 'the library the item is from'
1 - Goto to Admin -> Circulation and fines rules and select a library
2 - Under "Default checkout, hold, and return policy" set:
Total current checkouts allowed: 1
Hold policy: Not set
Hold pickup library match: Not set
Return policy: Not set
3 - Save the rule
4 - Check the DB
SELECT * FROM circulation_rules WHERE branchcode = 'BRANCHCODE'
using the branchcode for the library you chode
5 - Note returnbranch, and hold_fulfillment_policy rules exist with blank value
6 - Set 'All libraries'->'Default checkout, hold and return policy'->'Item floats'
7 - Checkin an item from the library with blank rules at another library
8 - It returns home rather than floating
9 - Apply patch and restart all the things
10 - Reload the page and save the rules as before
11 - Check the DB and note the rules no longer exist
12 - Check in the item, it floats!
13 - prove -v t/db_dependent/Koha/CirculationRules.t
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This was not accurate as it was only retrieving jobs for batch_biblio_record_modification
We will need to improve that later if needed
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Also remove "authnotrequired => 0,"
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
A owner of a job should be able to see the progress of this job.
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
QA: Please answer the question in admin/background_jobs.pl
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This feature has been added recently by bug 18127.
It highlights the need of a post processing hook.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
ie. no subscription yet
This needs to be fixed (if possible), or removed from the patchset
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The "Default configuration" section at the top of the SMTP servers admin page
contains the hardcoded values in Koha::SMTP::Servers->default_setting.
It should be the values from the config (and default to hardcoded values unless defined)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The missing piece on this patchset is choosing the desired SMTP server
for each library. This patch adds the option on editing the library.
The default one is picked for existing libraries, and you can pick the
one you want.
To test:
1. Apply the patchset
2. Run:
$ updatedatabase
=> SUCCESS: Things go smooth
3. Notice the new permission for managing SMTP servers
4. Notice the entry in the admin page
5. Add/have a few SMTP servers defined.
6. Edit a library
=> SUCCESS: The 'Default' SMTP server is picked
7. Choose any server and save
=> SUCCESS: Saving doesn't explode
8. Edit the server
=> SUCCESS: Your selection is kept (this can also be checked on the DB,
the library_smtp_server table)
9. Try (7) with many different options
=> SUCCESS: It works
10. Sign off :-D
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.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: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch introduces a way to define SMTP servers either globally or
per-library.
To test:
1. Apply this patch
2. Find the SMTP servers entry in the admin page
3. Play with adding/removing SMTP servers
=> SUCCESS: All works as expected
4. Sign off :-D
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This add an 'udated_on' column to the letter table and displays
the information in 'slips and notices'.
To test:
- Apply patch
- Run updatedatabase
Note: the existing letters will all be set to the
currnet date).
- Go to Tools > Notices and slips
- Verify there is a new column "Last updated" in the table
Note: The table will always display the newest change date
of the different message transport types.
- Edit any notice
- Verify the "Last updated" is shown for any transport type
with an existing notice definition
- Edit and add a notice
- Verify the dates are correctly stored
- Test the column configuration for the new column works
correctly
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Hiding the last columns on the fines transactions in the
patron account in staff didn't work correctly as we had missed
adding Home library to the configuration options when it was
added.
This adds the missing definition and now all columns can be
toggled correctly.
To test:
- Go to any patron account in staff
- Go to Accounting > tab transactions (maybe add some fines)
- Toggle the columns on the table using the menu, especially
- notes, home library and checkout date
- Go to Administration > Table configuration
- Verify the settings for the table work well from there too -
with the patch, home_library will show as new option
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
If HoldsQueueSkipClosed is enabled, and a library happens to be closed
on the day you edit the transport cost matrix, all the values for that
library will not show. Instead they will appear disabled, and if you
were to edit the cell and save a new value in it, it will also
'disappear' when the page is reloaded.
Test Plan:
1) Set today as a holiday for a library
2) Set HoldsQueueSkipClosed to 'open'
3) Go to the transport cost matrix editor
4) Edit a cell where the 'from' is for the closed library
5) Note the value doesn't 'save', it is still in the database though
6) Apply this patch
7) Restart all the things!
8) Reload the transport cost matrix editor
9) The value now appears correctly!
Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Add a "year" search field type. Fields with this type will only
retain values that looks like years, so invalid values such as
whitespace or word characters will not be indexed.
This for instance improves the behaviour when sorting by
"date-of-publication". If all values are indexed, records with
junk data instead of valid years will appear first among the search
results, drowning out more relevant hits. If assigning this field
the "year" type these records will instead always appear last,
regarless of sort order.
To test:
1) Have at least two biblios, one with a valid year in 008 (pos 7-10)
and another with an invalid one ("uuuu" for example)
2) Perform a wildcard search (*) and sort results by publication date.
3) The record with invalid year of pulication in 008 should appear first
4) Apply patch and run database updates
5) Reindex ElasticSearch
6) Perform the same search as in 2)
7) The record with the invalid year should now appear last
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds the capability to override minPasswordLenth and RequireStrongPassword settings by category
To test:
1. koha-shell kohadev
2. koha-mysql kohadev
3. drop database koha_kohadev;
4. create database koha_kohadev;
5. go to admin page and start webinstaller. There continue the steps until onboarding.
6. reach step 3 of onboarding and create a new administrator patron
CHECH => Password control woks as normal (Minimum length 3 and strong required)
7. finish Koha installation and enter admin with your new administrator
8. set minPasswordLength to 3 and RequireStrongPassword to “Don’t require”
9. Create a new category (CAT2 from now on.. CAT1 is the category you made in onboarding process) and set minimum password length to 8 and require strong password
10. Create two new patrons, one with CAT1(patron1) and one with CAT2 (patron2)
CHECK => In both cases, try different combinations of length and strength. For patron1 the only requirement is to have 3 letters, but for patron2 the minimum length will be 8 and will require strong password.
CHECK => Try changing patron category before saving. Password requirements will change with category change.
11. Edit CAT1 and set minimum password length to 5
12. Go to patron1 details page, and change password.
CHECH => Now password minimum length is 5, but still it doesn’t require strong password
13. Edit CAT1, leave blank minimum password length and set require strong password to yes.
14. Go to patron1 details page, and change password.
CHECH => Password minimum length is back to 3, but now strong password is required
15. Set minimum password length in CAT2 to 12.
16. Go to patron2 details page, and click to fill a random generated password
CHECK => generated password should be 12 characters length
17. Set PatronSelfRegistration to Allow in admin settings
18. Go to OPAC and fill self registration from.
CHECK => Play with patron category. For each change in category, password requirements are modified.
CHECK => Set CAT1 as patron category, set ‘aA1’ as password (or another valid password for CAT1) and before hitting submit button, change to CAT2. Form should enter invalid state, and CAT2 password requirements should be displayed as error in password input.
19. Create a patron for CAT1 and another for CAT2, leaving password blank
CHECK => For CAT1’s patron, generated password length is 8 (minimum length for generated passwords), but for CAT2’s patron should be 12
20. In admin set PatronSelfRegistrationVerifyByEmail to require
21. Fill self registration form again with CAT2 as category
CHECK => Password requirements works as previous case.
22. Leave password blank and click submit
23. select * from message_queue;
24. Copy the link in the message and paste it in OPAC
CHECH => Generated password is 12 characters long. (Copy user id for next steps)
25. In admin set OpacResetPassword to Allow
26. Go back to OPAC, reload and click on “Forgot password?” link
27. Paste user id and click submit
28. Repeat steps 23 and 24
CHECK => Info message says “Your password must contain at least 12 characters, including UPPERCASE, lowercase and numbers.”
CHECK => enter an invalid password and you’ll get the same message in warning.
29. Login OPAC with the last user and your newly created password
30. Go to “Change your password” option
CHECK => Info message says “Your password must contain at least 12 characters, including UPPERCASE, lowercase and numbers.”
CHECK => enter an invalid password and you’ll get the same message in below “New password” input.
31. prove t/db_dependent/AuthUtils.t t/db_dependent/Koha/Patron/Category.t
32. Sign off
Sponsored-by: Northeast Kansas Library - NEKLS
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This was wrong!
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
It defaults to 0 in get_template_and_user
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds the ability to exclude patrons (by category) from local
holds, and items, by editing the item itself or by batch item
modification tool.
To test:
1. apply patches
2. updatedatabase
3. Enable LocalHoldsPriority preference, and leave
LocalHoldsPriorityPatronControl in pickup library, and
LocalHoldsPriorityItemControl in holding library.
4. Search for a biblio with one item.
5. Place a hold with a patron (patron1) and set pickup location to a different
library of the item's home library
6. Place another hold with another patron (patron2) and set pickup location to be
the same as the item's home library
7. ./misc/cronjobs/holds/build_holds_queue.pl
8. Go to circulation -> holds queue
9. Search by the item's home library
CHECK => only the hold for patron2 (with the pickup location the same as the
item's home library) appears in the table
10. Go back to the biblio details page and click on "Items" tab
CHECK => There is a new section in the item's details between "Statuses"
and "History" called "Priority"
11. Set exclude to "Yes" and update
12. repeat steps 7 to 9
SUCCESS => only the hold for patron1 now appears, even the other hold had local
hold priority
13. Repeat step 10 and 11 but this time set exclude to "No"
14. repeat steps 7 to 9
CHECK => the hold for patron2 is back
15. Edit patron2's category and set exclude from local holds priority to
"Yes"
16. Repeat steps 7 to 9
SUCCESS => the hold for patron1 is back
17. Go to tools -> Batch item modification and in barcode list place
several (existing) barcodes and press continue
CHECK => There is a new section in the bottom called "Priority"
18. Set exclude to "Yes" and save
SUCCESS => all items in the list now have exclude setted to "Yes"
19. Try to checkout the first item to a patron3
SUCCESS => Alert message appears saying that patron1 has a hold on that
item
20. Click on Yes and then checkin that item
SUCCESS => There is a modal window saying that a hold was found for
patron1
21. prove t/db_dependent/HoldsQueue.t t/db_dependent/Holds/LocalHoldsPriority.t
22. Sign off
Sponsored-by: Cooperative Information Network (CIN)
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The match-heading field is a special field used only by the linker, not accessible
to staff or patrons via the interface. This field is used to store the constructed
'search form' used for matching bib headings to authority fields.
In bug 24269 I attempted to use the mappings defined in the inferface and also inject the search term.
This did not work as too many subfields were indexed on their own and leading to false matches.
In this bug we remove the mappings for this field, and create it ourselves during
the indexing process. The C4::Headings module is still used to generate the correct form,
however, the mappings are set based on the authority types in the system. This gives the user
the ability to add new typoes, but prevents mapping changes from breaking linker functionality
To test:
1 - Start form a sample database with ElasticSearch working
2 - Download via Z39.50 2 authorities, one of which is a narrower heading of the other, e.g.:
Waterworks
Waterworks - Costs
3 - Place a heading for the broader term in a record. e.g. Waterworks
In 650$a, without the cataloguing authority plugin. We don't want
the link created now.
You need syspref BiblioAddsAuthorities => allow
4 - Make sure linker is set to default
5 - Attempt to link the records
misc/link_bibs_to_authorities.pl
6 - Linking fails
7 - Apply patch
8 - refresh index settings (if using a custom file, remove 'match-heading')
You can reset mappings in the UI or run this:
misc/search_tools/rebuild_elasticsearch.pl -v -d -r
9 - Reindex ES
10 - Try to link again
11 - It succeeds!
12 - Run the tests
prove t/db_dependent/Koha/SearchEngine/Elasticsearch.t
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Bug 25273: (follow-up)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Rather than limiting initials to [A-Z] we should test for a broad
range of uppercase letters.
The ES/Zebra changes are slightly different because of Perl vs Java regex
conventions. POerl may support either, but I found 'Uppercase' to be a bit more explicit
More info here:
https://perldoc.perl.org/perlunicode.html
TO test:
Same plan as before but use Ж. as the ending initial
Confirm the period is preserved and other punctuation removed
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The current code for facets doesn't pull strip ending punctuation from facets
This causes duplicate facets for terms that should be combined
Sometimes series can have different punctuation depending on the field they are in
Author initials punctuation should be preserved
To test:
1 - Do search and pull up some records
2 - Edit some of the records to have authors like:
Date, C.J.
Date, C.j.
Date, C.J .
3 - Edit the records to have some series statments like:
830 $aDate, C.J. ;$v5
830 $aDate, C.J. ; $v5
830 $aDate, C.J.; $v5
4 - Add some 490s to the record with first indicator 1 and series like:
You wouldn't want to--
You wouldn't want to
You wouldn't want to..
5 - Search again and note you have 3 facets each for author and series
6 - Apply patch
7 - Repeat
8 - Now you get 2 facets for author, period not removed when following Upper case immediately, is otherwise
9 - Now you should have a single series facet
10 - Switch search engine to ES (index before applying patch)
11 - Note facets are separate again
12 - Reset mappings and reindex
perl misc/search_tools/rebuild_elasticsearch -v -r
13 - Repeat search, facets combined as above
Signed-off-by: Sarah Cornell <sbcornell@cityofportsmouth.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>