When creating an entirely new itemtype the script would fail upon
attempting to lookup existing itemtype branch limits. This patch adds a
ternary to prevent the failure.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds a select multiple when you add/edit an itemtype, creates functions to return itemtypes by library, and filters the options of itemtype select in additem
To test:
1) Apply this patch set
2) perl installer/data/mysql/updatedatabase.pl
3) In koha administration => item types, edit "Books" itemtype
CHECK => there is now a select multiple whith libraries at the bottom
4) select centerville and save
5) set centerville as current libary
6) search for any biblio in the catalog
7) click on "edit items"
CHECK => book item type is present
8) set any other libary as current library
SUCCESS => book item type is not present
9) Sign off
Sponsored-by: Northeast Kansas Library System
Sponsored-by: Southeast Kansas Library System
Sponsored-by: Central Kansas Library System
Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
If a budget is locked, there is a "New fund for $budget" link that is
disabled but clickable.
We should ensure that the link is not clickable and prevent it at
controller level (do we need it at module level, ie.
Koha::Acquisition::Fund->store?)
Test plan:
- Create a budget, lock it
- Go to /cgi-bin/koha/admin/aqbudgetperiods.pl
- Click on the name of the budget you just created
=> The "New > New fund for $budget_name" button should be disabled
- Click it anyway
=> Without this patch the form to add a new fund is displayed
=> With this patch applied nothing happens
- Hit /cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_period_id=XXX
With XXX the budget's id
=> Without this patch the form is displayed
=> With this patch applied you get a message:
"The budget is locked, fund creation is not possible."
And you are not able to create a new fund
QA notes:
1. See description
2. The add_validate op can still be forced, let trust librarians with
administration permissions for now.
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Increases maximum field count from the default 1000 to 10000 to accommodate large records and MARC as an array.
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Adds preference ElasticsearchMARCFormat that controls whether MARC records are stored as ISO2709/MARCXML or array. Array is searchable by field and also indexes all subfields in the _all field for searching.
Test plan:
1. Test that searching and indexing works with the patch without any changes.
2. Switch to array format and index some records.
3. Check e.g. the 008 field of a record and verify that the record can be found with the contents enclosed in quotes.
4. Check that it's possible to search for a specific field/subfield. Search query: marc_data_array.fields.655.subfields.a:Diaries
5. Check that tests still pass, especially t/Koha/SearchEngine/Elasticsearch.t
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
If strict SQL modes are set, the insertion of a new Z3950 server can
fail.
DBIx::Class::Storage::DBI::_dbh_execute(): Incorrect integer value: ''
for column 'checked' at row 1 at
/home/vagrant/kohaclone/admin/z3950servers.pl line 82
Using Koha::Z3950Servers fixes the issue (handled from
Koha::Object->store)
Test plan:
- Turn the strict SQL modes on (config strict_sql_modes)
- Create a new Z3950 server filling only the mandatory fields.
=> Without this patch you will get the failure, with this patch applied
the server will be inserted sucessfully
- Delete it
=> No regression should be found
- Search for servers
=> No regression should be found (the search is a start-with, LIKE "$pattern%")
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
It will fix the insert of new subfields with SQL strict modes
DBD::mysql::st execute failed: Incorrect integer value: '' for column
'hidden' at row 1 [for Statement "
Test plan:
- Turn the config strict_sql_modes ON
- Add a new subfield to a field
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds columns configuration to the DataTable which displays
Z39.50 search results in the cataloging module.
The Z39.50 results screen has its own server-side paging system, so I
added some code to copy the page number information ("Page 2 / 6") to
the DataTable toolbar for a more consistent appearance. The wording of
that information has also been modified for consistency's sake.
To test, apply the patch and restart Plack (or restart_all on
kohadevbox)
- Go to Cataloging -> New from Z39.50/SRU.
- Perform a Z39.50 search which will return multiple pages of results.
- Confirm that the DataTable controls work correctly: Search, columns
show/hide, export.
- Confirm that the page number information is correct as you navigate
through pages of results.
- Go to Administration -> Columns settings.
- Confirm that the columns configuration settings for the z3950_search
table in the "Cataloging" section works correctly. Changes made here
should be reflected in the table of Z39.50 search results.
- Test other tables which use columns configuration to confirm that the
changes made in this patch doesn't disrupt their behavior. Test that
any custom columns configuration are applied. For example:
- Administration -> Libraries
- Reports -> Saved reports
- Circulation -> Holds queue
Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Also fixes the mappings.yaml to use correct field name (left over issue from bug 19575), so reset mappings and reindex before testing.
Test plan:
1. Reset mappings and reindex biblios.
2. Check that tests in t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t pass.
3. Try that all of the following year range type work in publication date search and year limit in advanced search:
yyyy
yyyy-yyyy
-yyyy
yyyy-
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch removed references to setting and getting the items.paidfor
field. Where it was used for display, in moredetail.pl, we replace it
with a query on the accountlines.
Test plan:
1) Apply patch
2) Pay off a LOST item
3) Check for the associated display of 'Paidfor?:' on the itemdetails
page
4) Writeoff a LOST item
5) Check that a 'Paidfor?:' is not displayed on the itemdetails page.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch will move the list item refund rules from a dedicated table to the circulation_rules table.
Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Verify lost item refund rules remain unchanged
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Test plan:
1) Set all values in Default checkout, hold and return policy section on
circulation rules admin page, try for all libraries and for one specific
library. Save.
2) Click on unset and confitm
--> without patch, the Maximum total holds allowed value remains
--> with patch the unset removex Maximum holds value too
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Test Plan:
1) Apply dependancies
2) Apply this patch set
3) Run updatedatabase.pl
4) Ensure holdallowed and hold_fulfillment_policy rules behavior remains unchanged
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
We had a mix of q||, q{} and '' in this one script. This followup just
makes them all conform to our standard style of q{}.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This gets rid of the warning "Use of uninitialized value $auto_share
in string ne at [...]" by initializing the variable with empty string.
Test plan:
1) Go to page cgi-bin/koha/admin/share_content.pl and unselect "Auto
subscription sharing". Click "Save".
2) Check plack-error.log and notice the warning "Use of uninitialized
value $auto_share [...]"
3) Apply the patch and repeat the previous steps but now this time the
warning is gone in plack-error.log.
4) Make sure the AutoShareWithMana syspref with and without the patch
is in unselected state after clicking "Save".
Sponsored-by: The National Library of Finland
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds columns configuration and export features to the
checkout history page.
This patch also removes some inline CSS: "overflow:hidden" from both the
checkout and holds history pages. This was breaking the table controls
tooltips, and didn't appear to me to be necessary.
To test, apply the patch and restart Plack (or restart_all on
kohadevbox).
- Open a patron's checkout history page in the staff client.
- The table of checkouts should have controls at the top.
for columns configuration and export/print.
- These controls should work correctly.
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
I've applied a patch on Mana test server. If you want to
test with your own Mana instance, do the folowing:
- checkout bug/22210 branch from
http://git.biblibre.com/biblibre/koha-mana.git
- run these sql queries on Mana database (we need an update DB method
i think):
- ALTER TABLE librarian ADD COLUMN name VARCHAR(50) AFTER email
- UPDATE librarian SET name = (SELECT CONCAT(firstname, ' ',
lastname))
- ALTER TABLE librarian DROP COLUMN firstname
- ALTER TABLE librarian DROP COLUMN lastname
Test plan
- set mana_config to "https://mana-test.koha-community.org",
- go to admin > Share content with Mana KB,
- set "Use Mana KB for sharing content" to yes,
- save,
- in the 2nd fieldset, enter a name and email,
- click on send to Mana KB,
- check that you got a token,
- you should receive an email (Mana KB registration)
- check the name is correct
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Move to admin
Add a permission
Remove descriptions from table
Clean up template
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Fixes handling of /0 selector in addition to several fixed field positions. Note that ff7-01-02 is in fact 00-01 in Zebra and that has been replicated here.
Test plan:
1. Before applying a patch, check from Elasticsearch (e.g. localhost:9200/koha_biblios/_search?q=_id:123) what is indexed in Elasticsearch for a record for date-entered-on-file, ff7-00, ff7-01, ff7-02 and lleader.
2. Apply the patch, update database and save the record again.
3. Verify that the contents of the forementioned fields is now correct in Elasticsearch.
4. Verify that tests pass: prove -v t/Koha/SearchEngine/Elasticsearch.t
Signed-off-by: Björn Nylén <bjorn.nylen@ub.lu.se>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Unfortunately, the tables here can't use a foreign key as one table uses null where the other uses
'*' This patchset alters the delete method so delete related rules. It is somewhat of a workaround until
all the columns in issuingrules are moved to circulation_rules
To test:
1 - Add some issuing rules in koha, making sure to set maxissueqty
2 - Check the DB: SELECT * FROM circulation_rules;
3 - note some circulation rules were created
4 - Delete your rules via the staff interface
5 - Check the DB, the circulation rules remain
6 - Apply patch
7 - Repeat
8 - Huzzah! The rules delete!
9 - Prove the tests, read the code
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch adds sorting and column configuration to the stock
rotation tables, both rotas and items. No new defaults for the table are
defined.
To test, apply the patch and clear your browser cache if necessary.
- Go to Tools -> Stock rotation.
- In the table of rotas test that sorting works correctly.
- Test that the "Column visibility" button works to show and hide
columns. The "actions" column should be excluded.
- Test that export options (Excel, CSV, etc) exclude the "actions"
column.
- Choose a rota with multiple items on it and select manage ->
items. Repeat the above DataTables functionality tests.
- Go to Administration -> Columns settings and edit the default
configuration of the stock rotation tables. Confirm that these
changes are reflected in the corresponding tables.
Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch makes the staff interface handle the new flag when editing
the categories. I didn't add the flag to the list of categories table
because it makes it too big, but can be easily added if required by
users or QA.
To test:
- Along with other patches from this bug, edit patron categories
=> SUCCESS: Notice the changes are correctly stored
- Sign off :-D
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch makes the templates relying on the OpacResetPassword syspref
use the introduced TT plugin method instead by changing:
[% IF Koha.Preference('OpacResetPassword') %]
=>
[% IF Categories.can_any_reset_password %]
To test:
- Verify that all the places in which the 'forgot password' link is
displayed in OPAC keep working, provided there's at least one category
that has the flag set
- Attempt to recover the password for a patron that belong to a valid
category (i.e. that has the flag set)
=> SUCCESS: You can go through the normal process
- Attempt to recover the password for a patron that belongs to a
category with the flag unset.
=> SUCCESS: Once Koha identifies your category, you are told you are not
allowed to do it
- Sign off :-D
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch makes the staff interface handle the new flag when editing
the categories. I didn't add the flag to the list of categories table
because it makes it too big, but can be easily added if required by
users or QA.
To test:
- Along with other patches from this bug, edit patron categories
=> SUCCESS: Notice the changes are correctly stored
- Sign off :-D
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch adds CodeMirror syntax highlighting by default to JS and CSS
system preferences. HTML preferences will use CodeMirror editors if
UseWYSIWYGinSystemPreferences is disabled.
Three new CodeMirror files are added to support three new syntax
highlighting modes: XML (for HTML), CSS, and JS.
A new option is added to *.pref file configurations for textareas which
are intended for HTML, JS, or CSS: syntax. This option is passed to the
CodeMirror configuration to control syntax highlighting mode.
Textareas without a syntax option specified will not have CodeMirror
enabled.
To test, apply the patch and go to Administration -> System preferences.
Test the behavior of several preferences which use <textarea> as their
input. For example:
- OPACUserJS (JS)
- IntranetUserCSS (CSS)
- OpacHeader (HTML)
- BibtexExportAdditionalFields (no highlighting)
Text entry in each of these should have the correct syntax highlighting
applied to them. All data should be saved correctly.
Test with UseWYSIWYGinSystemPreferences both on and off.
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch modifies the item types administration script so that it
passes a valid message type to the template, where the type is used as a
CSS class. "Error" is a nonexistent dialog class. It should be "alert."
To test, apply the patch and go to Administration -> Item types.
- Try to delete an item type which is in use. The style of the error
dialog should be correct.
- Try to add an item type using a code which already exists. The error
should look correct.
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
To test:
1 - Go to Admin->Circulation and fines rules
2 - Set All/All rules ot have a limit for Current checkouts allowed (and onsite checkouts allowed)
3 - Select an itemtype to add a new rule
4 - Save without entering any values
5 - Note that new rule displays with the same numebr as the all/all rule
6 - Check the DB, not no lines were added to circulation_rules table
7 - Delete the rule from the staff client
8 - Apply patch
9 - Repeat, note the new rule is unlimited
10 - Run selenium tests
11 - They pass!
12 - Check no rules/itemtypes are added to your system by the tests
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Test plan:
1. Create a list of patrons
2. Add some patrons to this list
3. Go to this patron list
(/cgi-bin/koha/patron_lists/list.pl?patron_list_id=XXX)
4. Verify that you can show/hide all columns except the one containing
the checkbox
5. Verify that you can export the table data using the Export menu
6. Go to admin/columns_settings.pl, and verify that the configuration
works for table 'patron-list-table'
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch add language as a facet to ES results - it adds
a new template plugin for languages to get the appropriate
description given an iso 639-2 code
To test:
1 - Make sure you have records with differing languages (in the MARC21 008
field characters 35-37 or UNIMARC 101a)
2 - Apply patch
3 - Reload Elasticsearch settings:
http://localhost:8081/cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl?op=reset&i_know_what_i_am_doing=1
4 - Reindex your records
5 - Search for a phrase that will return results in several languages
6 - Verify you see factes correctly labelled for 'Language'
7 - Verify the facets work
8 - Verify both opac and staff results
9 - prove t/db_dependent/Languages.t
Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch adds a new section 'Facet order' in the Biblio tab of the
'Search engine configuration' admin page of the Elastic mappings.
The idea is to let the librarians define the facet to display and order
them as their needs.
The ergonomic is not perfect and I am open to any suggestions.
Test plan:
Move up and down the field list to order the facets
Hide/show some facets
Rebuild index
At the OPAC and the staff interface you should see the changes on the
search result page.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Whilst working through this patch for signoff I found a case where the
calling signature of GetBudgetPeriod was incorrect. I removed the
superflous passed parameter in this followup
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Test plan:
1. Reset mappings
2. Run perl misc/search_tools/rebuild_elastic_search.pl -d -b -v
3. Do a search and verify that the Places facet works
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch adds a column for collection code to the lost items report.
To test, apply the patch and run the lost items report. You should see a
collection code column.
Test column configuration for this table: Go to Administration ->
Configure columns. Confirm that the "collection_code" column can be
configured and that configuration choices are applied correctly.
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Any important notes about an order are usually added to the
internal note. This patch makes the note visible on the
acq detail tab in the staff client.
To test:
- Add a basket
- Order something
- Add an internal note for the order
- Go to the detail page of the ordered record
- Switch to the Acquisition details tab
- Verify that with the patch the internal note shows
- Verify that the new column can be toggled using the
column visibility settings
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch adds the "Columns settings" values for the illrequests table
Signed-off-by: Niamh.Walker-Headon@it-tallaght.ie
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Bug 21063: Add ability to show / hide columns
This patch adds the "Column visibility" functionality to the main ILL
request list table.
To test:
- Ensure ILL is enabled and you have some requests
- Apply patch
- From the "Koha administration screen, select "Configure columns"
- In the "Columns settings" page:
=> TEST: Ensure an "Interlibrary loans" category exists
- Upon expanding the category:
=> TEST: Ensure a table is displayed showing columns
=> TEST: Ensure the "action" column has "Cannot be toggled"
pre-selected
=> TEST: Change values for columns and ensure they're saved
- From the main staff menu, select "ILL requests"
- In the table:
=> TEST: Click the "Column visibility" button and ensure a modal
containing all columns (except "Action") is displayed
=> TEST: Select various columns and ensure they are shown and hidden
Signed-off-by: Niamh.Walker-Headon@it-tallaght.ie
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Bug 21063: (follow-up) Add user ID to column list
As originally specified in bug 20883, there is a requirement for some
users to be able to display the user ID (borrowernumber) in the UI.
This patch adds that ability to this bug, 20883 will be marked as a
duplicate of this one.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Bug 21063: (follow-up) Amendments for rebase
Modify to add the additional changes required now we're rebasing on top
of the dependency tree. Includes adding additional columns (and changing
indexes for search/filter where appropriate)
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Bug 21063: (follow-up) Add comments to column list
Since this bug is now dependent on Bug 18591 (Allow an arbitrary number
of comments on ILLs) we need to add the comments column to this table
and the list of selectable columns. This patch does this.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Bug 21063: (follow-up) Sanitize datatable data
This mitigates bug 22268 by sanitizing data prior to display using the
built in $.fn.dataTable.render.text() helper provided by Datatables.
The patch was added here, rather that in 22268 since this is the bug
that introduced the problem by increasing the number of fields that are
displayed in the table, some of which could contain user provided
malicious data
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Deduplicate multivalued fields and make sure sort fields are not excessively long. Also updates default mappings so that sort fields are not created for item fields where it doesn't make sense.
Test plan:
1. Reset ES mappings in administration
2. Check that sort is '0' for local-classification in biblio mappings.
3. Change sort back to '1' for local-classification for the next steps.
4. Create a record with 20 items, each with a 100 character long call number
5. Check that when indexed, the record in ES does not have duplicates in any of the item fields and local-classification__sort is truncated to 255 characters.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
To test:
1 - Have three borrowers, one with order_manage permission, one with
edit_subscription permisson, andone with both
2 - Apply patch, updatedatabase
3 - Verify all three now have the manage_additional_fields permission
4 - Visit the admin page with these users, they should all see the
'Manage additional fields' link
5 - Click the link
6 - User with order_manage should see 'Order baskest'
7 - User with edit_subscription should see 'Subscriptions'
8 - User with both should see both
9 - Remove the additional permissions from a user - they should see a
note about needing additional permissions
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
A lot of code can be removed just by using Koha::Object
It also makes fetching and updating additional field values easier.
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This also moves the admin page for additional fields for all tables to a
single common screen, and factors out display/input parsing logic.
Test plan:
1. Create an additional field for a subscription (under Serials -> Add
subscription fields).
2. Apply patch.
3. Visit Additional fields under administration, and verify that
the field created above still shows under the list for the
subscription table.
4. Create at least four fields for aqbasket for each combination of
searchable/not-searchable and with/without an authorized value.
5. Create an order basket, and verify that all fields are visible and
correctly save.
6. Edit the basket, verifying that changes to these additional fields
are saved.
7. Add an order to the basket (contents are irrelevant).
8. Go to advanced search within acquisitions.
9. Verify that only the searchable fields show in the form, and that
their contents may be searched.
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
It seemed strange to only add support for Daily loans in the feature
when Koha also support loan periods in hours. This patch adds parallel
functionaliy for hourly loan periods.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Increase test coverage for CanBookBeIssued and fix a introduced during
the refactoring to Koha::Fees.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Some libraries would like to be able to charge a rental fee based on the
number of days an item will be checked out, as opposed to the flat fee
currently offered by Koha.
Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Edit an itemtype, add a daily rental fee of 1.00
4) Check an item of that itemtype out for 7 days
5) Verify the patron now has rental fee of 7.00
Signed-off-by: Matha Fuerst <mfuerst@hmcpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
There was previously an ambiguity between the branch/category/itemtype
specific max{,onsite}issueqty and the total-per-patron max{,onsite}issueqty.
The latter has been renamed to patron_max{,onsite}issueqty.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch set moves maxissueqty and maxonsiteissueqty to the
circulation_rules table.
Test Plan:
1) Apply this patch
2) Run updatedatabase
3) prove t/db_dependent/Circulation.t
4) prove t/db_dependent/Circulation/Branch.t
5) prove t/db_dependent/Circulation/GetHardDueDate.t
6) prove t/db_dependent/Circulation/Returns.t
7) prove t/db_dependent/Circulation/SwitchOnSiteCheckouts.t
8) prove t/db_dependent/Circulation/TooMany.t
9) prove t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t
10) prove t/db_dependent/Reserves.t
11) Note no changes in circulation behavior related to check out limis
both on and off site
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Adjust elastic search mappings to more closely match Zebra equivalents
resolving serveral issues with coded Zebra searches in templates and
sorting of search results in UI. Also make field names in search strings
case insensitive to accept case variations in template links and user input.
Sponsored-by: Gothenburg University Library
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch adds a separate permission for managing Mana KB.
To test, apply the patch and update the database.
- Open the permissions page for a patron with staff client privileges
- Confirm that there is a "Manage Mana KB content sharing
(manage_mana)" permission.
- Leaving this new permission unchecked, log into the staff client
with as that patron and go to the Administration home page.
- The "Using Mana-KB" link should not appear.
- Navigate directly to /cgi-bin/koha/admin/share_content.pl. You
should get a "permission denied" message.
- Modify the patron's permissions to grant them access to Mana KB.
- Confirm that the link now appears on the Administration home
page and that the user can access the page.
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch adds column configuration to the table of libraries
in administration. No new defaults for the table are defined.
To test, apply the patch and clear your browser cache if necessary.
- Go to Administration -> Libraries
- Test that the "Column visibility" button works to show and hide
columns. The "actions" column should be excluded.
- Test that export options (Excel, CSV, etc) exclude the "actions"
column.
- Go to Administration -> Columns settings and edit the default
configuration of the libraries table. Confirm that these
changes are reflected in libraries administration.
Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch adds column configuration to the table of patron categories
in administration. No new defaults for the table are defined.
To test, apply the patch and clear your browser cache if necessary.
- Go to Administration -> Patron categoires.
- Test that the "Column visibility" button works to show and hide
columns. The "actions" column should be excluded.
- Test that export options (Excel, CSV, etc) exclude the "actions"
column.
- Go to Administration -> Columns settings and edit the default
configuration of the patron categories table. Confirm that these
changes are reflected in patron category administration.
Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch makes a number of changes to the "Pay fines" template, the
goal of which is to make the interface look better in general. Changes
include:
- Styling the "Pay" and "Write off" buttons as Bootstrap buttons.
- Adding DataTables sorting, searching, and filtering.
- Adding a column showing the fine date.
- Hide the "Add note" input, add a link to show it.
- Add some missing "preventDefault" methods from events.
- Add "Writeoff selected" to the buttons which are disabled when there
is no checkbox selection.
- The <tfoot> tag is now expected by the HTML validator to be after
<tbody>, so this section has been moved to suppress validator errors.
To test, apply the patch and locate a patron who has multiple
outstanding fines.
- Go to Fines -> Pay fines
- Confirm that the table of fines is shown as a DataTable, with sorting
on columns which have data.
- Test columns settings in Administration -> Columns settings.
- Confirm that fine dates are shown, and that sorting by this column
works correctly.
- Click an "Add note" link to show a note input field. Focus should be
in the newly-displayed input.
- Confirm that notes are still saved correctly when paying or writing
off single or multiple fines.
- Confirm that when the "add note" input is hidden, its contents are
erased.
- Uncheck all checkboxes by clicking the "Clear all" link at the top.
The "Pay selected" and "Write off selected" buttons should become
disabled.
- Checking any checkbox should re-enable those buttons.
- Test that the relocated "Apply" button (for outstanding credits)
still works as expected.
Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch adds borrowers.phone as 'Primary phone' in the checkout
search results. It also ads the table to columns configuration
To test:
1 - Perform a checkout search
2 - Note phone is not displayed
3 - Apply patch
4 - Note phone does not display
5 - Visit columns configuration
6 - Unhide the 'phone' column
7 - Note phone displays
8 - Ensure page functions as before patch
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch adds column configuration to the hold ratios report
DataTable.
This patch also amends some JavaScript and markup related to some
obsolete jQuery syntax: A hover function was being used to change an
element's style on hover. It has been removed in favor of using a link
and CSS>
To test, apply the patch and view the hold ratios report using a ratio
which will return multiple results. Confirm that DataTables controls
work correctly: Paging, search, column visibility, export and print.
Click a number in the "hold ratio" column of the table and verify that
it populates the "hold ratio" field in the "refine results" form in the
sidebar.
Test setting default column configurations in Administration -> Columns
settings.
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
The table is used by circulation.pl and moremember.pl
When it is modified we need to take care of the two view.
Test plan:
Use the columns settings to hide/show the "check in" and other columns
Confirm the this patch fixes the display for moremember.pl
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Imo it is much easier to do just "$a ? 1 : 0" than testing defined($a) etc.
in the additional loop.
Less code, more readable?
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Validate the input to the fields indicating account
functionality. The only valid values are 1 and 0
non-integer (or integers other than 0/1) are invalid
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Followup change to the mappings syntax from bug 19893. Indexing as phrases allows to properly search for matching headings comprised of multiple subfields (e.g. author name with year of birth).
Sponsored-by: National Library of Finland
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Sponsored-by: Gothenburg University Library
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Add missing pods, remove obsolete syspref and add test for serialization format for records exceeding max record size
Sponsored-by: Gothenburg University Library
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Add persistent per index "index status" state to provide useful
user feedback when update of Elasticsearch server mappings fails
Sponsored-by: Gothenburg University Library
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Default to base64 encoded binary MARC with MARCXML
fallback if record exceeds maximum size
Sponsored-by: Gothenburg University Library
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Implement optimized indexing for Elasticsearch
How to test:
1) Time a full elasticsearch re-index without this patch by running the
rebuild_elastic_search.pl with the -d flag:
`koha-shell <instance_name> -c "time rebuild_elastic_search.pl -d"`.
2) Apply this patch.
3) Time a full re-index again, it should be about twice at fast (for a
couple of thousand biblios, with fewer biblios results may be more
unpredictable).
Sponsored-by: Gothenburg University Library
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
TO test:
1 - Check out an item to a patron
2 - Note the columns are misaligned
3 - Apply patch
4 - Updatedatabase
5 - Reload the patron
6 - Note the table is fixed
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch makes to corrections:
1. The "$raw" filter has been added to the column configuration
2. The columns configuration now specifies which columns are exported in
Copy, Excel, etc. operations.
To test, apply the patch and test the various table export buttons on a
both a closed and open basket. Confirm that the 'Modify' and 'Cancel'
columns are not exported.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
https://bugs.koha-community.org/show_bug.cgi?id=20996
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch adds column configuration to the table of orders in a basket.
It replaces the "Show all details" checkbox which previously was used to
show the hidden "tax included" columns. Now those columns are hidden by
default in the columns configuration file.
To test, apply the patch and view a basket with multiple orders. Test
all DataTables functionality (paging, sorting, filtering) including
showing and hiding columns.
Test with both an open and a closed basket.
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
https://bugs.koha-community.org/show_bug.cgi?id=20996
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
These subs are no longer used from scripts and should be removed. It
should be done on a separate bug report given that additional work is
needed
Sponsored-by: Goethe-Institut
Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Currently the call number splitting seems to be mostly implemented for
DDC and LC classifications.
Those are both not very common in some countries.
A lot of libraries use their own custom classification schemes so the call number
plitting is something that should be individually configurable.
This enhancement adds the ability to define custom splitting rules based
on regular expressions.
How does it work so far?
From C4/Labels/Label.pm there are 3 differents splitting methods defined, depending on items.cn_source.
if cn_source is "lcc' or 'nlm' we split using Library::CallNumber::LC
if cn_source is 'ddc' we split using a in-house method
Finally there is a fallback method to split on space
And nothing else is done for other cn_source
The idea of this patch is to mimick what was done for the "filing rules" and add
the ability to define "splitting rules" that will be used by the "Classification sources".
A classification source will then have:
* a filing rule used to sort items by callnumbers
* a splitting rule used to print labels
To acchieve this goal this enhancement will do the following
modifications at DB level:
* New table class_split_rules
* New column class_sources.class_split_rule
Test plan:
* Execute the update database entry to create the new table and
column.
I. UI Changes
a) Create/modify/delete a filing rule
b) Create/modify/delete a splitting rule
c) Create/modify/delete a classification source
=> A filing rule or splitting rule cannot be removed if used by a
classification source
II. Splitting rule using regular expressions
a) Create a splitting rule using the "Splitting routine" "RegEx"
b) Define several regular expressions, they will be applied one after
the other in the same order you define them.
Something like:
s/\s/\n/g # Break on spaces
s/(\s?=)/\n=/g # Break on = (unless it's done already)
s/^(J|K)\n/$1 / # Remove the first break if callnumber starts with J or K
c) You can test the regular expressions using filling the textarea with
a list of callnumbers. Then click "Test" and confirm the callnumbers are
split how you expected.
d) Finally create a new classification source that will use this new
splitting rule.
III. Print the label!
a) Create a layout. It should have the "Split call numbers" checkbox
ticked, and display itemcallnumber
b) Use this layout to export labels, use items with different
classification source ('lcc', 'ddc', but also the new one you have
create)
=> The callnumbers should have been split according to the regex you
defined earlier!
Notes:
* The update database entry fill the class_sources.class_split_rule
with the value of class_sources.class_sort_rule
If default rules exist it will not work, we should add a note in the
release notes (would be enough?)
* C4::ClassSplitRoutine::* should be moved to Koha::ClassSplitRule,
but it sounded better to keep the same pattern as ClassSortRoutines
* Should not we use a LONGTEXT for class_split_rules.split_regex instead
of VARCHAR(255)?
* class_sources.sql should be filled for other languages before pushed
to master!
IMPORTANT NOTES: The regular expressions are stored as it, and eval is
used to evaluate it (perlcritic raises a warning about it (Expression
form of "eval"). It can lead to serious security issues (execution of
arbitrary code on the server), especially if the modifier 'e' is used.
We could then remedy the situation with one of these following points:
- Assume that this DB data is safe (We can add a new permission?)
- Assume that the data is not safe and deal with possible attack
Cons: how be sure we are exhaustive? Making sure it matches ^s///[^e/]*$
would be enough?
- Use Template Toolkit syntax instead (Really safer?)
[% callnumber.replace('\s', '\n').replace ... %]
- Cut the regex parts: find, replace, modifiers
like we already do for Marc modification template. Cons: we are going to
have escape problems, the "find" and "replace" parts should not be
handle the same way (think "\n", "\\n", "\1", "\s", etc.)
I did not manage to implement this one easily.
Sponsored-by: Goethe-Institut
Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
The script admin/classsources.pl has been adjusted to follow usual
patterns used in other Koha scripts.
$op can be add_source, add_source_validate, etc.
Deletion steps have been removed (there is a JS confirmation box) to
simplify both script and template.
Sponsored-by: Goethe-Institut
Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
The original patch removed the need to add URLs to the template
variables. This patch removes that in the controller.
Bonus: fixes 'html' filter in URL replacing it by 'uri'.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
This patch adds a note column to the circ and fine rules to act as a
description line for the rule.
To test:
1) Apply patch, update database (may have to also update schema)
2) Go to Admin -> Circ and fine rules
3) Scroll to the right, notice new Note column
4) Confirm it works to create a brand new rule with a Note
5) Confirm it works to modify an existing rule with a Note
Sponsored-by: Catalyst IT
Lee Jamison <ldjamison@marywood.edu> rescued this patch.
It is a clean re-build of attachments 61865 and 63902
to fix the merge conflict introduced during application of both
attachments.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: macon lauren KohaCon17 <caballeromaricon@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Weight can be defined between 1 and 99.
only search fields mapped with biblios can be weighted
Test plan:
- apply this patch,
- update schema file (perl misc/devel/update_dbix_class_files.pl),
- go to Administration > Search engine configuration,
- in search fields tab, define weights for some fields and save,
- check weights has been saved,
- reset some weights (empty) and save,
- check weights has been reset
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
So far the administration module only allowed for 2 permissions:
- circulation conditions (manage_circ_rules)
- everything else (parameters_remaining_permissions)
With this patch almost every section of the administration page
will have its own granular permission.
To test:
- Create different staff users:
1) One with parameters_remaining_permissions
2) One with parameters
3) One with catalogue and no parameters
4) One superlibrarian
- Apply the patch
- Run the database update
- Check the staff users:
1) All subpermissions, but manage_circ_rules
should be checked
2) Nothing should have changed
3) manage_item_serach_fields shoudl be checked
(page had catalogue permission before)
4) Nothing should have changed
- Try different settings of the permissions and
verify that
- Administration page behaves correctly
- Administration menu behaves correctly
! You shoudl only see what you have permission for
https://bugs.koha-community.org/show_bug.cgi?id=14391
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This is a consistency issue: we store '@' as the subfield for
fixed-lenght fields, yet on editing '_' is displayed (on the form and
the tab). This was probably done to avoid URI encoding problems in the
past.
This patch restores the '@' everywhere.
To test:
- Open the MARC structure for any bibliographic MARC framework
- Choose Actions > Subfields on any fixed-length field
=> ERROR: Notice the tab has an underscore (_) and the subfield code is '_' as well.
- Cancel
=> SUCCESS: '@' is displayed on the list
- Apply this patch
- Restart all the things:
$ restart_all
- Choose Actions > Subfields on any fixed-length field
=> SUCCESS: '@' is displayed in the tab title, and on the 'Subfield
code' form field.
- Save some changes
=> SUCCESS: Things work correctly.
- Sign off :-D
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Devinim <kohadevinim@devinim.com.tr>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch removes the 'frameworkcode' template parameter. Now the
'framework' object is passed, and everytime the frameworkcode is needed
on the template, framework.frameworkcode is called.
To test:
- Apply this patch
- Run:
$ grep ' frameworkcode ' koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt
=> SUCCESS: There's no use of 'frameworkcode' in the template
- Sign off :-D
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch removes URL building from the controller
(admin/marctagstructure.pl) and does it on the templates, using the
right 'uri' filter for the query parameters.
It also removes:
- No longer used attributes that are passed to the template
- Duplicated code in the templates
To test:
- Go to Home > Administration > MARC bibliographic framework
- On any of the listed frameworks, pick the 'MARC structure' action in
the dropdown
- On any subfield, hover on the actions dropdown
=> FAIL: The URLs are wrongly formed
- Click on the links
=> FAIL: You get errors because of the bad URL
- Apply this patch
- Reload the 'MARC structure' page
- On any subfield, hover on the actions dropdown
=> SUCCESS: LInks look correct
- Click on any of them
=> SUCCESS: They work!
- Use the 'Display only used tags/subfields' checkbox
=> SUCCESS: No behaviour change!
- Sign off :-D
Sponsored-by: Theke Solutions
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch adds a DataTables toolbar to the Notices & slips table,
including a filter field, column visibility, and data export options.
To test, apply the patch and clear your browser cache if necessary.
- Go to Tools -> Notices & slips
- Confirm that there is a table toolbar with a filter, a "Column
visibility" button, and "Excel," "CSV," "Copy," and "Print" buttons.
- Confirm that showing and hiding columns via the button is working
correctly.
- Confirm that only the first four columns are sortable.
Go to Administration -> Columns settings.
- Expand the "Tools" section.
- Find "id=lettert."
- Make some selections to configure default settings of the reports
table.
- Return to reports and confirm that these defaults are applied.
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch makes the staff UI correctly handle the holds_per_day
configuration.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch adds columns configuration and print/export options to two
tables: The table listing courses and the table listing titles reserved
for a course.
To test you should have more than one course and multiple title reserved
for at least one course.
- Apply the patch and go to Course reserves
- In the table of courses, confirm that all DataTables controls work
correctly: paging, filter, column visibility, export, etc.
- View a course with multiple titles reserved. Test all DataTables
controls on this table too.
- Go to Administration -> Columns settings
- Change the settings for the courses and reserves table and confirm
that these changes are applied correctly.
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Test plan:
1) Ensure that you have four users:
a) A superlibrarian
b) A user with all `parameters` permissions (the toplevel `parameters`
box is checked).
c) A user with the `manage_circ_rules` permission (and, of course,
`catalogue`).
d) A user with the `manage_circ_rules`, `manage_circ_rules_restricted`
and `catalogue` permissions.
2) As all four users, load the "Circulation and fine rules"
administration page (admin/smart-rules.pl).
3) The page should be unchanged for the first three users. It should be
possible to view and edit the circ rules for all libraries.
4) The last (restricted) user should only be able to view and edit the
circ rules for their own library.
Amended by JD: In a second version of this patch
manage_circ_rules_restricted has been replaced by
manage_circ_rules_from_any_libraries and 'no_inherit' related code has
been removed
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
When clicking Create EDIFACT Order on /acqui/basket.pl, an EDIFACT message will not be generated if aqbasket.branch does not match edifact_ean.branchcode. This failure does not generate any sort of error message, it just fails to produce a message.
We should allow ean's to not require a branch to be set, then if we don't find a branch specific each, we can look for the default version of the ean.
Test Plan:
1) Apply this patch set
2) Run updatedatabase
3) Verify you can create a Library EAN without setting a branchcode for it
4) Verify you can use this EAN to send an EDI order where the basket has a branchcode set
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Testing will require an OverDrive account, you should be able to obtain a
developer account here:
https://developer.overdrive.com/
You will need to register a SIP connection for patron authentication
To test authentication:
1 - Set authname default in OD prefs
2 - Sign in as a patron whose branch matches authname
3 - Verify the patron can sign into OverDrive
4 - Set the patrons branch authname to be incorrect
5 - Verify branch specific authname is used and patron cannot sign in
6 - Set the default authname to be incorrect and patron's branch
authname to be correct
7 - Verofy patron can sign in
To test circulation:
1 - Fill out all OD prefs and enable circulation
2 - Sign in to opac
3 - Verify you have an OverDrive tab
4 - Click 'Login to Overdrive'
5 - If password required you shoudl be prompted, otherwise you should be
signed in and see account info
6 - Test logging out and in
7 - Log-in, perform a search on the opac - you should see hold/checkout
buttons
8 - Test the buttons
9 - After holding/checking out items, check your account page
10 - Verify info is correct
11 - Log out of overdrive
12 - Search catalog click overdrive results
13 - Test "Login to Overdrive" link on OD results
14 - Verify page is reloaded, buttons show and work
Signed-off-by: Sandy Allgood <sandy.allgood@citruslibraries.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
The 'authname' field required for OverDrive can differ per branch.
This patch adds Koha Objects for dealing with OD info and submitting
authnames per branch. The description is left open so future branch info
can be added.
To test:
1 - prove -v t/db_dependent/Koha/Library/OverDriveInfos.t
2 - visit cgi-bin/koha/admin/overdrive.pl
3 - Add some authnames for various branches
4 - Verify data saves correctly
Signed-off-by: Sandy Allgood <sandy.allgood@citruslibraries.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Koha::CirculationRules->get_effective_rule will become the method to
call to retrieve a specific rule, we should start using it when
possible.
Moreover undef could replace '*' to mean 'any', that way we will be able
to add FK on circulation_rules
TODO: Add more tests
Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Also, fix a couple small QA issues.
Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>