The template conditional for showing the limit menu should be changed
to:
[% IF ( unlimited_total > 10 && limit <= 1000 ) %]
- "unlimited_total > 10" so that the "rows per page" button only shows
if there are more than 10 total results, because 10 is the smallest
increment the "rows per page" control offers.
- "limit <= 1000" so that the "rows per page" button will show when the
current result limit is less than or equal to 1000, because 1000 is
the upper limit to the "rows per page" control.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch creates a new Bootstrap button menu for selecting the number
of search results to be shown. This replaces the HTML <select>.
To test, apply the patch and go to Reports -> Saved reports.
- Test the appearance and functionality of the "Rows per page" button in
various situations:
- A report that returns more than 10 results
- A report that returns fewer than 10 results
- A report that returns no results
- Test that the batch operations button menu appears correctly when
there are biblionumbers, itemnumbers, or cardnumbers in the results.
- When there are no results, or fewer than 10 results with no batch
operations possible the toolbar shouldn't appear at all.
Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Using this search option in the GUI would require the user to
enter the codes from MARC, LDR 19, see:
https://www.loc.gov/marc/bibliographic/bdleader.html
So I think it's better to leave this out for the moment.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This adds mrl as appreviation of Multipart-resource-level to
the Zebra configuration and Search.pm so it can be used when
searching.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Sponsored-by: Bibliotheksservice-Zentrum Baden-Wuerttemberg
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
To avoid Getopt::Long treating upper case and lower case options,
this patch restores removed ":config no_ignore_case".
Steps to reproduce:
1. Start koha-z3950-responder deamon for any instance.
2. Check z3950.log log file, there should be
"[fatal] Failed to listen on ...-koha-z3950" in it.
3. Alternatively you can "curl localhost:2100/biblios?version=1.1 -v"
to ensure that it doesn't work "Failed to connect to localhost
port 2100: Connection refused".
4. Apply the patch.
5. Stop and start daemon again.
6. Check the logs again, there should be no new error there.
7. Same way do the curl to ensure that this time it listens on that port.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Fixes another occurence of the fines to charges.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
It is not just fines, it is also fees, etc.
To test:
1. Have a patron with debt
2. Go to the circulation page for the patron
=> FAIL: There's a button saying 'Pay all fines'
3. Apply this patch and reload page
=> SUCCESS: The button now says 'Pay all charges'
4. Enjoy the new terminology
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
On moremember.pl we load the messaging preferences for display only, we do
not need to load the JS for editing the preferences
To test:
0 - Enable EnhancedMessagingPreferences
1 - Load the detais tab for a member
2 - Note the digest column in messaging preferences is clickable
3 - Apply patch
4 - Reload, it is not clickable
5 - Confirm editing the patron (or their messaging prefs) works as expected
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>
Use of uninitialized value $_ in concatenation (.) or string at t/db_dependent/Holds.t line 1658.
Results from copying line 70.
Test plan:
Run Holds.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This expands the regex to handle this specific case
To test:
1 - Load record created for last patch
2 - Note analytics error
3 - Apply patch
4 - Restart and reload
5 - No more errorm also no Analytics link
6 - Add a 773$t to a record with title used before:
Digger does it all (not really!)
7 - reload the initial record
8 - See 'Show analytics' link
9 - Click the link
10 - You should end up on the record you added the 773 to
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds an eval around the call to search for analytic records
It pases a value to the template on the staff side, but logs the warning on
the opac
This seems similar to 'decoding_error' which is noted on staff side, but absent on OPAC
The eval follows the patter used during searching
To test:
1 - Add a title to catalog, with 245a:
Digger does it all (not really!)
2 - Set searchEngine preference to: Elasticsearch
3 - The record does not load
4 - Apply patch
5 - The record loads, there is a note about analytics at the top fo the record
6 - View record in opac, no note
7 - Check logs on intranet and opac, searching error is logged
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Object.t was still testing for the return of DateTime objects from
attributes_from_api. I checked all calls to attrbutes_from_api for
reliance of DateTime objects and confirmed they all get passed into
search calls and thus are better served as SQL formatted strings.
I then converted the test to check that the rfc3339 formatted dates
passed in were converted to strings appropriate for feeding into SQL
where statements instead.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
JD amended patch:
FAIL spelling
formated ==> formatted
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patchset takes the GET /patrons route as a sample usage for filtering
on date and date-time (including timestamp) fields.
It then makes Koha::Object->attributes_from_api use the DB storage
datetime parser for format the parameters correctly.
To test:
1. Apply the regression tests
2. Run:
$ kshell
k$ prove t/db_dependent/api/v1/patrons.t
=> FAIL: It doesn't find the patron when filtering by date
3. Apply this patch
4. Repeat 2
=> SUCCESS: It works now!
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds tests for filtering GET calls with date/date-time
parameters. Tests fail because the feature is not working
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch modifies the patron entry form to correct a problem with the
write_age() function introduced by the switch to Flatpickr on this page
(Bug 28937).
Rather than selecting the element based on the sequence of elements on
the page, we should add an ID for direct selection.
To test, apply the patch and go to Patrons.
- Locate a patron record which has a date of birth saved.
- When you open that patron for editing, you should see their age
displayed below the date of birth input field, e.g. "Age: 23 years 9
months."
- Changing the date in the date of birth field should update the age
string correctly.
- Go to Patrons -> New patron.
- The date of birth field should have a hint showing the required date
format, e.g. "(DD.MM.YYYY)".
- When you select a date of birth using the Flatpickr calendar the age
string should be updated 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>
The JS code is only used when placing a hold for club BUT the date
inputs are not displayed there.
Test plan:
Place holds for patrons and clubs and confirm that the two date inputs
are working 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>
When a past date is set for a flatpickr instance with the .futuredate
class, only dates in the future are available AND the input is blanked.
It does not display the date in the past.
For instance if a hold is expired (expirationdate in the past), the date input will be blanked.
We can use the flatpickr's allowInvalidPreload option to allow date in the past to be displayed.
Test plan:
Place a hold
Edit its expirationdate and set a date in the past (yesterday is fine)
Go to /reserve/request.pl?biblionumbers=42
=> With the patch you see the date, and the widget let you chose anoter date,
in the future
=> Without this patch the expiration date is not displayed
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>
The previous installation tests were testing the full onboarding process
by not selecting all the sample data.
It would be good to test the whole sample data set.
So there are now 2 files, 00-onboarding.t and 01-installation.t
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
== Test plan ==
1. Apply the patches (including bug 19821)
2. restart_all
3. prove -Mt::lib::Bootstrap t/db_dependent/selenium/00-installation.t
4. result: Config entry 'database_test' does not exist at
/home/vagrant/kohaclone/t/lib/Bootstrap.pm line 18
5. Edit $KOHA_CONF, add a database_test entry identical to database
You should have:
<database>koha_kohadev</database>
<database_test>koha_kohadev</database_test>
6. restart_all
7. prove -Mt::lib::Bootstrap t/db_dependent/selenium/00-installation.t
8. result: Entries 'database_test' and 'database' have the same value in your
config at /home/vagrant/kohaclone/t/lib/Bootstrap.pm line 20.
9. Edit $KOHA_CONF, edit database_test with koha_test as DB name
10. restart_all
11. prove -Mt::lib::Bootstrap t/db_dependent/selenium/00-installation.t
12. result: Access denied for user 'koha_kohadev'@'localhost'
to database 'koha_test'
13. Connect to the DBMS
14. Example for koha_testing_docker
docker exec -it koha_db_1 bash
mysql -u root --password=password
15. GRANT ALL PRIVILEGES ON `koha_test`.* TO 'koha_kohadev';
16. prove -Mt::lib::Bootstrap t/db_dependent/selenium/00-installation.t
17. result: All tests successful.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
- The marcflavour select needs an id to be selected easily
- "Continue to the next step" should be a button (like others)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
During the installation process we do not have fieldset.action, in order
to not complicate changes we are just going to use the submit button if
only one exists.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
To prevent developpers to drop their database.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
If the database_test entry exists in the config file we are going to use
it. This will be a trick for developers and CI
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
I have tried to use the original idea of this patch for bug 19185, but
it cannot work as it. ENV is not shared between processus and KOHA_CONF
will not be read by webserver (used for selenium tests).
Moreover on bug 19185 we are testing the installation process and we do
not want the database to be populated with sample data, we just need a
new and clean DB.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
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>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Also move .proverc to .proverc.dist, so it cannot be used by accident.
Different ways to use it:
1/ prove --rc .proverc.dist
Use defaults
2/ cp .proverc.dist .proverc && prove
Allows to configure db name, marcflavour, and prove options
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Running the tests on the same database as the one used for dev has some
drawbacks:
- Everybody has different data, so we cannot make any assumptions about
data in tests and it can make tests fail for non-obvious reasons.
- Tests have to clean up every change to the database using SQL
transactions, so we cannot write testable code that use transactions
(AFAIK)
- Transactions in tests happen to be committed sometimes, resulting in
garbage data added to the dev database
This patch provides a .proverc file that will load t/lib/Bootstrap.pm
before the tests are run.
t/lib/Bootstrap.pm is responsible for recreating a fresh database and
telling the test scripts to use it.
To use it, just run prove normally from the root directory of Koha.
By default, the database is 'koha_test' and it's created using MARC21
SQL files, it can be changed by running:
prove --norc \
--Mt::lib::Bootstrap=database,koha_test,marcflavour,UNIMARC
Test plan:
1. Apply bug 19185 which will also apply these patches
2. In the DBMS run `select count(*) from koha_kohadev.borrowers;`
(adapt if your usual koha DB isn't koha_kohadev)
3. Run the test plan of bug 19185 and during execution of the
installation test, pay attention to the following:
4. List the databases in the DBMS (show databases;) to ensure that
koha_test is created
5. After the test has run, the koha_test database should not be here anymore.
6. In the DBMS run `select count(*) from koha_kohadev.borrowers;`
7. That was to verify that the database you use usually was untouched.
The counts should be the same.
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch corrects a stray instance of the "datepicker" class in the
inventory template and replaces it with "flatpickr" to trigger a
Flatpickr.
To test, apply the patch and go to Tools -> Inventory. Check that the
"Last inventory date" field is a Flatpickr widget.
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 makes minor HTML corrections to several templates, primarily
to wrap form help text in <span class="hint"> or <div class="hint">.
To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
View the following pages to confirm that forms look correct:
- Administration -> Authority types -> Authority type -> Edit.
- Administration -> Authority types -> Authority type -> MARC structure.
-> Subfields -> Edit.
- Administration -> Authorised values -> View category -> New authorized
value.
- Administration -> Credit types -> New credit type.
- Administration -> Debit types -> New debit type.
- Administration -> Item types -> New item type.
Also changed: Added link to ITEMTYPECAT authorized value page for
users with the correct permission.
- Administration -> MARC frameworks -> MARC structure -> Edit subfields.
- Administration -> Patron attribute types -> New patron attribute type.
- Administration -> Share content with Mana KB.
- Administration -> Z39.50/SRU servers -> New Z39.50 server.
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 reworks the controls for adding patrons to a list from the
patron search results page. The <select> is converted to a Bootstrap
dropdown menu, and the list creation form is moved into a Bootstrap
modal.
To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
- In the staff interface, perform a patron search that will return
multiple results.
- In the toolbar at the top of the search results you should see two
disabled Bootstrap-styled buttons: "Add to patron list" and "Merge
selected patrons."
- The "Select all" and "Clear all" links should work to enable and
disable the toolbar buttons.
- "Clear all" and then check the checkbox next to one of the results.
The "Add to patron list" button should be enabled.
- Check a second checkbox. The "Merge selected patrons" button should be
enabled.
- Test the "Add to patron list" button. It should trigger a dropdown
menu listing existing patrons lists and a "New list" link.
- Test adding to an exising patron list. It should trigger a message
at the top of the page which shows a link to that list.
- Test adding to a new list. It should trigger a Bootstrap modal where
you can enter the name of the new list.
- Submitting the list title form should close the modal and trigger
the display of the message showing how many patrons were added to
your new list. The link to the new list should be correct.
- Test the "Merge selected patrons" button. It should send the selected
patrons to the patron merge screen.
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 modifies templates so that instances of "cardnumber" are
replaced with "card number."
Some instances where the word "card" is used by itself have been updated
to "library card" to add some context.
To test, apply the patch and view the following pages:
- Circulation -> Built-in offline circulation interface -> Submit the
"Check out" form without entering number. Check the alert message
which appears.
- Go to Administration -> System preferences and enable the
AutoMemberNum system preference and use the BorrowerMandatoryField
preference to make card number mandatory.
- Go to Patrons -> New patron. The hint under the "Card number" field
should refer to "card number" instead of "cardnumber."
- Go to Tools -> Import patrons.
- Under the page heading, the note should read "If a card number
exists..."
- Under "Field to use for record matching" you should see a "Card
number" option in the menu.
- If you try to import a CSV with an invalid card number you'll see an
error message, "Card number X is not a valid card number."
- Under Tools -> Upload patron images, check the "image file" radio
button. The card number field label should read "Enter patron card
number."
- Log in to the OPAC as a patron whose card has been marked lost. Try to
place a hold. You should see a message containing "please take your
library card to the circulation desk"
- On the "your summary" page you should see a message, "Your library
card has been marked as lost or stolen."
- Try to check out an item to this patron in the self-checkout system.
You should be shown a message, "This library card has been declared
lost."
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>
The print notices template had it's own implimentation of a message
dialog. To make it consistent with other area's, we should add the
dialog class.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch moves the message css rules inside the dialog ruleset to
clarify their intention and removes the width so it inherits from the
dialog class.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>