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>
This takes care of more occurences of staff client and changes it to
staff interface, including in code comments.
To test:
- I think in this case careful code review is what we look for.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
To test:
1 - Set 'ShowAllCheckins' to show
2 - Set a collcection code for an item
3 - Check it in
4 - Note it displays in the the 'Item type' column
5 - Apply patch
6 - Check it in again
7 - Note the new 'Collection' column
8 - Hide/show the column using column visibility on the checkins page
9 - Go to Admin->Configure columns
10 - Test the various settings for this column and check in the item to
make sure they work as expected
Signed-off-by: Devinim <kohadevinim@devinim.com.tr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This feature is disabled by default for all credit types. To enable it
you have to set the syspref AutoCreditNumber to the value of your choice
and then enable the feature for each credit type you want.
System credit types can be modified too (but only this particular field
can be modified)
Also, throw an exception when the feature is enabled and a value for
credit_number has already been set
Updated test plan:
Test plan:
0. Apply patch, run updatedatabase and update_dbix_class_files
1. Go to Admin » Column settings, and uncheck the 'hidden' box for
column credit_number in table account-fines. It will be easier for
testing
2. Create a manual credit for a borrower. Verify in Transactions tab
that this credit has no number generated
3. In Admin » Credit types:
a. edit the FORGIVEN type and enable credit number generation
b. create a new type A, check "can be manually added" and "enable
credit number"
c. create a new type B, check "can be manually added". Do NOT enable
credit number
4. Change syspref 'AutoCreditNumber' to 'incremental'
5. Create more manual credits with types CREDIT and B, and verify that
the numbers are not generated
6. Create more manual credits with types FORGIVEN and A, and verify that
the numbers generated are 1, 2, 3, ...
7. Change syspref 'AutoCreditNumber' to 'annual'
8. Create more manual credits with types CREDIT and B, and verify that
the numbers are not generated
9. Create more manual credits with types FORGIVEN and A, and verify that
the numbers generated are '2020-0001', '2020-0002', ...
10. Change syspref to 'AutoCreditNumber' to 'branchyyyymmincr'
11. Create more manual credits with types CREDIT and B, and verify that
the numbers are not generated
12. Create more manual credits with types FORGIVEN and A, and verify
that the numbers generated are 'BRANCHA2020020001',
'BRANCHA2020020002', ... (assuming you are connected to library
BRANCHA, and it's February 2020)
13. Set library to another one, say BRANCHB
14. Create more manual credits with types FORGIVEN and A, and verify
that the numbers generated are 'BRANCHB2020020001',
'BRANCHB2020020002', ...
15. Edit the letter ACCOUNT_CREDIT, and add [% account.credit_number %]
somewhere. Go back to Transactions tab and click on 'Print' for one
line that has a credit number. Make sure the number is there.
16. prove t/db_dependent/Koha/Account.t
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>
In some areas it's required to sequentially number payment slips /
receipts.
This patch adds a database column accountlines.credit_number and a
system preference AutoCreditNumber to control how this number will be
generated. The following options are available:
- Do not automatically generate credit numbers.
This is the current behaviour and the default syspref value.
- Automatically generate credit numbers in the form <year>-0001 (annual)
- Automatically generate credit numbers in the form
<branchcode>yyyymm0001 (branchyyyymmincr)
where <branchcode> is the branch where the user (staff member) is
logged in
- Automatically generate credit numbers in the form 1, 2, 3
(incremental)
It also adds a column (hidden by default) in the table under
Transactions tab to display this number.
Test plan:
0. Apply patch, run updatedatabase and update_dbix_class_files
1. Go to Admin » Column settings, and uncheck the 'hidden' box for
column credit_number in table account-fines. It will be easier for
testing
2. Create a manual credit for a borrower. Verify in Transactions tab
that this credit has no number generated
3. Change syspref 'AutoCreditNumber' to 'incremental'
4. Create more manual credits, and verify that the numbers generated are
1, 2, 3, ...
5. Change syspref 'AutoCreditNumber' to 'annual'
6. Create more manual credits, and verify that the numbers generated are
'2020-0001', '2020-0002', ...
7. Change syspref to 'AutoCreditNumber' to 'branchyyyymmincr'
8. Create more manual credits, and verify that the numbers generated are
'BRANCHA2020020001', 'BRANCHA2020020002', ... (assuming you are
connected to library BRANCHA, and it's February 2020)
9. Set library to another one, say BRANCHB
10. Create more manual credits, and verify that the numbers generated are
'BRANCHB2020020001', 'BRANCHB2020020002', ...
11. Edit the letter ACCOUNT_CREDIT, and add [% account.credit_number %]
somewhere. Go back to Transactions tab and click on 'Print' for one
line that has a credit number. Make sure the number is there.
12. prove t/db_dependent/Koha/Account.t
Signed-off-by: Michal Denar <black23@gmail.com>
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 - Browse to Administration -> Item types
2 - Not a new colum for prent type
3 - Edit an existing type and not you can select any type (except the current) as a parent
4 - Select one
5 - Edit the type you selected as parent
6 - Note it cannot have a parent defined
7 - Edit a new type, note you can select a parent
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds the datelastseen column to the holdings table and also makes it column configurable.
To Test:
-Apply patch and have a look at some item records.
-Notice the datalastseen column
-Make sure it wroks and its displaying the datelastseen correctly
-Go to the column configuration tools and make sure you can properly hide this column.
Signed-off-by: Sally <sally.healey@cheshiresharedservices.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 replaces all calls to RefundLostItemFeeRules with
Koha::CirculationRules->get_lostreturn_policy and removes the module it
makes redundant.
Test plan
1/ Confirm that there are no longer any uses of RefundLostItemFeeRules
in the codebase
2/ Confirm circulation tests still all pass
3/ Confirm you can still set and unset the lost return rules
4/ Signoff
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds column configuration to the orders by funds report
results table. The "Basket" column is excluded from being togglable.
To test, apply the patch and clear your browser cache if necessary.
- Go to Reports -> Orders by fund
- Submit parameters which will return multiple results.
- Test that the "Column visibility" button works to show and hide
columns. The "Basket" column should be excluded.
- Test the export options (Excel, CSV, etc)
- Go to Administration -> Columns settings and edit the default
configuration of the orders by fund report. Confirm that these changes
are reflected in the report results.
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
1) System preference: EnablePointOfSale - set to Enable
2) System preference: UseCashRegisters - set to Use
3) Administration > Accounting > Cash registers - create a new cash register for the library you're logged in as
4) Administration > Accounting > Debit types - create at least one debit type
5) Home > Point of sale - verify that all four columns exist in the Items for purchase table: Code, Description, Cost, Action
6) Administration > Additional parameters > Table settings > Point of sale - change which columns can be hidden and/or toggled
7) Home > Point of sale - verify that your choices have been implemented (columns are hidden, columns can be toggled, columns can't be toggled)
8) Repeat steps 6 and 7 for different combinations, checking that they all work.
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Added Sally's test plan.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch tweaks the UI so it forbids changing the hidden values when
they are correct (i.e. when they are not hidden in OPAC and intranet).
To test:
1. Apply the first patch
2. Play with the hidden values of the subfield you have mapped to
biblio.biblionumber in your picked framework. This is usually 999$c
in MARC21, and 001 in UNIMARC.
=> SUCCESS: When you verify the about.pl, it mentions issues when you
hide in some of the interfaces
3. Apply this patch and reload everything
4. Repeat 2
=> SUCCESS: If your framework is 'ok', it prevents you from editing this
values, otherwise you can change them.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
If we try to put malformed data into an integer field, Elasticsearch
rejects the whole document.
Setting 'ignore_malformed' to true allows to ignore malformed data and
process the other fields of the document normally
https://www.elastic.co/guide/en/elasticsearch/reference/7.8/ignore-malformed.html
Test plan:
* Without the patch
1. In search engine configuration, change the type of a text field to
'Number' (for instance 'title')
2. misc/search_tools/rebuild_elasticsearch.pl -d -b
3. See that the index is empty (unless you have titles consisting only
of digits)
* With the patch
1. misc/search_tools/rebuild_elasticsearch.pl -d -b
2. Now records are correctly indexed
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds DataTables with columns configuration to the log viewer.
The table of log entries is now sorted by default by date descending.
To test, apply the patch and go to Administration -> Table settings.
- Expand the "Tools" section and confirm that there is a section for
"logviewer."
- Go to Tools -> Log viewer.
- Perform a search which will return multiple results.
- Confirm that the results are sorted by date descending.
- Test that the table controls work correctly: Paging, columns, export.
- Return to the Table settings administration page and test that
changes to those settings are correctly reflected in the log viewer
table.
Signed-off-by: barbara <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
JD amended patch: Fix indentation in .yml to match other entries
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Will conflict with bug 20443 \o/
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch introduces a new way for users to select database columns for
system preferences like BorrowerMandatoryField, which currently
require hand-typing of database names.
This new system uses a JSON file containing label:column pairs for
database columns which are relevant to preferences which reference
borrower table columns. My intention was to have user-friendly values as
the labels, but embedding English strings in JSON would make them
untranslatable.
The following preferences are affected:
- BorrowerMandatoryField
- BorrowerUnwantedField
- PatronSelfModificationBorrowerUnwantedField
- PatronSelfRegistrationBorrowerMandatoryField
- PatronSelfRegistrationBorrowerUnwantedField
== Test plan ==
- apply the patches
- regenerate the staff client CSS (yarn build)
- updatedatabase
- dbic
- flush_memcached
- restart_all to make sure the updated .pref file is used
- Go to Administration -> System preferences, and search for
"PatronSelf"
- The input fields for PatronSelfModificationBorrowerUnwantedField,
PatronSelfRegistrationBorrowerMandatoryField, and
PatronSelfRegistrationBorrowerUnwantedField should appear as "locked"
(read-only) inputs.
- Clicking the input field should trigger a modal window with
checkboxes for each available column from the borrowers table.
- Test that the "select all" and "clear all" links work correctly.
- Test that the "cancel" link closes the modal without saving your
selections.
- Test that the "Save" button closes the modal, copies your selections
to the form field, and triggers the preference-saving function (this
eliminates the need to click a save button again after closing the
modal).
- Test this process by making modifications to all three different
preferences, confirming that the right data is preselected each
time the modal is shown and the right data is saved to the right
field each time.
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This warning emitted:
Use of uninitialized value $maxsuspensiondays in string eq
at /admin/smart-rules.pl line 257.
But that not just undef-warning, there is broken logic,
these two lines are mutually contradictory and goes one-by-one:
$maxsuspensiondays = undef if $maxsuspensiondays eq q||;
$maxsuspensiondays = '' if $maxsuspensiondays eq q||;
Fix is simple: to make it '' if it comes undef.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This warning emitted:
Use of uninitialized value in string eq at /admin/smart-rules.pl line 289.
It is solved by one line added to exclude comparison with 'on' string
when variable is 'undef'.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This warning emitted:
Use of uninitialized value in hash element
at /admin/smart-rules.pl line 569.
that happened because we have NULLs in SQL results for 'categorycode'
and 'itemtype' which later used as 'any' kind of category/item in the
template, so for the template it passed this way:
$rules->{ $r->{categorycode} }->{ $r->{itemtype} }->...
but undef will stringify as "" to become a hash key ("Hashes are
unordered collections of scalar values indexed by their associated
string key" https://perldoc.perl.org/perldata.html),
that's why "undef warning". To prevent warning here is the simple fix:
$rules->{ $r->{categorycode} // '' }->{ $r->{itemtype} // '' }->...
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This warning emitted:
CGI::param called in list context from /admin/smart-rules.pl line 262,
this can lead to vulnerabilities. See the warning in "Fetching the value
or values of a single named parameter" at CGI.pm line 412.
Explained here: https://metacpan.org/pod/CGI#Fetching-the-value-or-values-of-a-single-named-parameter
And because all these params are not multi-params, so simple "scalar .."
forcing for CGI->param is the fix. Changes are transparent and same
values should be assigned as before, just no more warnings.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
In code CGI param 'no_auto_renewal_after_hard_limit' assigned to
"$no_auto_renewal_after_hard_limit" var, and then just in the next line
again variable "$no_auto_renewal_after_hard_limit" reassigned with
call to same "$input->param('no_auto_renewal_after_hard_limit')".
Fixed. No logic or results should be changed.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
In that case it's equal to 0 and we need to adjust the test condition.
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch is the main patch of this patchset, you will find the
description and the test plan.
The idea of this new enhancement is to add the ability to define the
default sort order and the default number of rows displayed on the
acquisition basket page.
The existing "columns settings" feature was replaced by a
"tables settings" feature. To prepare the ground, there were some
works that were needed:
* rename variables and files
* Modify the structure of the yml files
* Create a new DB table to store the tables settings
Test plan:
0)
a. Execute the update DB entry to create the new table
b. Restart all (to get a new version of the yml file, that is cached by
memcached)
c. Create several orders for a given basket
1) Go to the basket view page
=> The default values are the same than without this patchset, the
number of entries to display is set to "20" and the table is sorted by
basket number (first column)
2) Go to the "Columns settings" page
3) Unfold the "Acquisition" tab
=> Notice the 2 dropdown lists at the bottom of the basket table
4) Select different values for "Default display length" and "Default
sort order"
5) Refresh the basket view page
=> Notice that the default settings are now effective on the table
QA note: We can decide to replace the different occurrences of "Columns settings"
by "Tables settings" if needed.
Sponsored-by: Institute of Technology Tallaght
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
To match the new structure, we adjust the other tables.
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Modification of the structure of the yml file.
It was
table:
- column list
It now becomes
table:
default_display_length: X
default_sort_order: Y
columns:
- column list
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
We are preparing the ground with this patch. As the "Columns settings"
page will now add the ability to modify settings for the whole table, it
makes sense to rename the file and the variables.
Note that the controller script (admin/columns_settings.pl) and the yml
(admin/columns_settings.yml) files have not been moved to not break
shortcuts and abits people could have. But if QA decides, it could be
easy to do.
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch changes the new circulation rule that's introduced from
useDaysMode to daysmode to improve consistency with other rule names.
We also update the accessors and code using them to reflect the new
term.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Sponsored-by: Institute of Technology Carlow
Signed-off-by: Simon Perry <simon.perry@itcarlow.ie>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
After the QA round on bug 25279, some things needed to get fixed:
- Data needs to be escaped
- When no library is defined, we should keep the original behaviour and
message.
- aria-hidden="true" for FontAwesome coding guideline enforced
- Added role="button" as well.
This patch does that.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch makes the general libraries datatable use the API for rendering.
To test:
1. Test the datatable behaviour
2. Apply this patch
3. Repeat your tests
=> SUCCESS: Things work! Filtering and sorting specially
Bonus: Use the browser inspector to notice each interaction with thex
datatable triggers an API call with the right query parameters
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch moves the OPAC problem report management page from the
Administration section to the Tools section.
I think this makes sense because management of reports is an ongoing
task, not a configuration.
To test, apply the patch and enable the OPACReportProblem system
preference.
- Go to Administration. There should be no link to OPAC problem
reports.
- Open an administration page which shows the Administration menu in
the left-hand sidebar, e.g. Libraries. There should be no link to
OPAC problem reports in the menu.
- Go to Tools. There should be a link to OPAC problem reports in the
"Addional tools" section.
- Open the OPAC problem reports page and confirm that it works
correctly.
- The breadcrumbs menu should show "Tools > OPAC problem reports."
- Confirm that the link in the sidebar menu works correctly.
- If necessary, submit an OPAC problem report via the OPAC so that
there is a pending report. Go to the staff interface home page and
check that the "OPAC problem reports pending" link works correctly.
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 the column configuration tool for basket.pl
TO TEST:
1. Go to Acquisitions and look at basket.pl
2. Open another tab and go to column configuration and try to hide some columns like Quantity.
3. See that the wrong columns are being hidden.
4. Apply patch
5. Trying hiding each column in the table and make sure the correct one is being hidden.
6. Rejoice!
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
When modifying an existing authorised value, the category is not
correctly passed to the template and so it is not passed to the
POST request, which results in the authorised value switching to
category '', which effectively make it disappear from the interface.
This patch fixes that.
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
returnbranch has to pass an itemtype key when setting the rule (here
setting it to unlimited for any item types)
Test plan:
1. Go the "Circulation and fine rules" admin page
2. Set a rule for "Default checkout, hold and return policy"
3. Unset it
4. Select a library
5. Set a rule for "Default checkout, hold and return policy"
6. Unset it
Display should be consistent with what you selected
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
It must be NULL/undef, the default from the DB.
The method Koha::Patron::Attribute::Type->categorycode is not covered by tests!
To recreate:
Create a new patron attribute type, don't select a patron's category (and not repeatable or unique)
Go to the batch patron modification tool, enter a cardnumber, next.
=> boom!
Apply the patch, edit the patron attribute, save
Go to the batch patron modification tool, enter a cardnumber, next.
=> success!
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Test plan:
1- View a record with Materials specified (field 3) data in the opac
2- Apply patch
3- Log in to staff client
4- Home->Administration->Column Settings->OPAC->holdingst
5- Set item_materials visibility
6- Refresh OPAC page
7- Confirm that the materials specified column has been added after the
Call number column.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
It prevents:
* The screen to display "no city, create one" if we are
searching for a string that does not return any results.
* The list to display only the city we have just created
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch does the following things:
- Uses a call to Koha::Cities->search(*)->count to display the same
message we displayed before when no city was found/defined (datatable
not rendered at all).
- Restores the main search box functionality, the passed param is used
to query on the city name with wildcards on both sides, for (a)
counting results and for (b) apending to the API call with the same
behaviour.
The only missing bit from QA is HTML/URI escaping values from cells, but
this is going to happen at DT level most sure.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch makes the general cities datatable use the API for rendering.
To test:
1. Test the datatable behaviour
2. Apply this patch
3. Repeat your tests
=> SUCCESS: Things work! Filtering and sorting specially
Bonus: Use the browser inspector to notice each interaction with the
datatable triggers an API call with the right query parameters
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
TO TEST:
1. Have a patron with some fines on an item. Try accruing fines.
2. Go to the accounting tab and look at both the Tranaction tab and Make a payment Tab
3. No Issue Date
4. Apply patch
5. Check those tabs again and see the issue date displays.
6. Go to column configuration and try to hide the issuedate, make sure it hides properly. Try this for both tables. Also make sure other columns hide properly.
7. Sign off!
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
The date accessioned column in the items table was not
configurable in the columns settings.
To test:
- Make sure the Date accessioned is shown in the column list
on both tables
- Make sure that configuring it via Adminitration > Configure
columns works as intended
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>