The $search_results is considered as an arrayref but is not defined if
no patron matches the recovery infos.
Test plan:
- Set syspref OpacResetPassword to "Allow"
- Go to OPAC
- Click link "Forgot your password?
- On the following screen "Forgotten password recovery", do not fill in
form fields, click "Submit"
=> Without this patch you got the software error
=> With this patch apply, you will get "No account was found with the
provided information."
Sign-off on counter patch.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Regression introduced by bug 13918: the library names are not displayed
anymore for holds in transit.
They are 2 warns in the logs:
No method wbrname! at
/home/koha/src/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
line 603.
No method wbrcd! at
/home/koha/src/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
line 603.
Test plan:
Make sure you have holds in transit and go the opac-user.pl
In the "Holds" tab, you should see "Item in transit to LIBRARY NAME"
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
A malicious user can delete the search history of all other users by
correctly guessing the ID value assigned to the victim's search. As
searches are assigned values sequentially, an attacker could quickly
remove the searches belonging to all of the application's users.
To reproduce:
Login with patron A
launch a search
Note the id generated for this search history:
select id from search_history order by id desc limit 1;
Login with patron B
Hit /cgi-bin/koha/opac-search-history.pl?action=delete&id=<ID>
Note that the row is deleted in the DB
Test plan
Confirm that this patch fixes the issue.
The same test can be made at the staff interface
Reported by Alex Middleton at Dionach
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 10067 has introduced a regression on the sticky due date behavior:
If "remember for session" is checked and the due date is changed from 1
checkout to another, the old due date will be used.
The code added by bug 10067 is really confusing and it's hard to say
this patch won't introduce another regression.
The manipulation of $restoreduedatespec, $duedatespec and $stickyduedate
is not easy to follow.
Test plan:
Confirm that the regression is fixed and that this patch will not
introduced a regression on bug 10067 (good luck!)
Signed-off-by: Eivin Giske Skaaren <eivin@sysmystic.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
To make sure the return can be done, AddIssue must not trust callers (they
should have done their job, but we are not sure) and check that the issue can
be returned before issuing to the patron.
There is no test plan here, this should not be possible from the Koha
interface.
However, looking at the code, it may be possible using SIP.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
If an issue is already checked out, CanBookBeIssued must check if the
issue can be checked in before processing the return.
In such cases (depending of the AllowReturnToBranch pref), the issue
should not be allowed.
Prior to this patch, the checkin was not done and the checkout failed
with "Duplicate entry '1204321' for key 'itemnumber'". Indeed since bug
14978, there is an uniq key on issues.itemnumber. Before bug 14978 the
issue existed but was hidden (and some weird behaviors certainly
happened!).
To avoid Koha to crash, a check is added to CanBookBeIssued (call to
CanBookBeReturned) and the librarian is not able to process the
checkout.
Test plan:
- Set AllowReturnToBranch to anywhere
- Check an item (homebranch Library 1, holding branch Library 1) out from Library 1
- Check the item out from Library 2
=> Confirm the checkout (should work with and without this patch)
- Set AllowReturnToBranch to holdinbranch ("only the library the item
was checked out from").
- Check an item (homebranch Library 1, holding branch Library 1) out from Library 1
- Check the item out from Library 2
=> Without this patch, Koha crashed
=> With this patch, you will be warned that the checkin is not possible.
Try other combinations of the AllowReturnToBranch syspref
Followed test plan, works as expected
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
To reproduce:
- Prepare a patron car layout with Image 1 using Patron Image
- Create a patron card for a patron without patron image
Result: OK, PDF can be opened wit PDF viewer
- Try to create a patron card with a patron who has a patron image
Result: The PDF file is corrupt (contains text only with error message)
intranet error log contains: create-pdf.pl: Illegal division
by zero at /usr/share/kohaclone/patroncards/create-pdf.pl line 200
To test:
- Apply patch
- Create a patron card with a patron who has a patron image
Result: PDF is OK and contains the image
Bonus test: Do the same with a card layout with an additional image
(Image 2: Image source: Other image)
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Test and bonus test pass: PDF generated without errors.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
The text of the submit button should be init getting the val(), and not
the text().
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This follow-up corrects a JavaScript error by using jQuery, which is is
more forgiving when selecting elements which may not exist on the page.
Also changed: Corrected a duplicate class attribute and fixed a jshint
error.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
.. when click on buttons
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch makes changes to the layout and behavior of the marc
modification template management page to make it adhere better to common
interaction patterns in Koha.
- The initial view shows a list of templates rather than pre-selecting
the first available template for editing.
- A toolbar has been added with a "New template" button.
- The initial view of existing templates has an actions menu containing
menu items for 'Edit actions,' 'Duplicate,' and 'Delete.' It doesn't
appear to be possible to edit an existing template's name.
- The "Create template" form is no longer shown all the time.
- Clicking the "New template" toolbar button triggers a modal with the
form for creating a template. An existing template can be chosen to
duplicate.
- Choosing "Duplicate" from one of the template menus triggers the
"New template" modal and preselects the corresponding template in
the "duplicate" <select>.
- When editing actions for a template:
- The breadcrumbs menu now reflects that a template is being modified.
- The template name has been added as a heading.
- A "New action" button appears in the toolbar
- The "Edit" and "Delete" links now have a Bootstrap button style.
- The add/edit form is now hidden by default.
- Clicking "New action" or "edit" shows the add or edit form.
- Clicking "Cancel" in the add/edit form hides the form.
To test, apply the patch and clear your cache if necessary.
- Got to Tools -> MARC modification templates
- Test the "New template" button.
- Confirm that new template creation works.
- Confirm that duplicating a template works.
- Test the menu items in the "Actions" menu:
- "Duplicate" should trigger the new template modal and preselect the
template you chose to duplicate. Confirm that the template is
successfully duplicated.
- "Delete" should prompt you to confirm the deletion. Test both
cancelling and confirming this operation.
- "Edit actions" should load the page for adding or editing actions to
a template. Test the operations on this page: New action, edit,
delete, changing action order.
Note that this patch does not fix Bug 15814, so action descriptions
must still not contain single quotes.
Signed-off-by: Filippos Kolovos <f.kolovos@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch replaces the address part in moremember-print.tt to print identical
address information as displayed on the screen (including street numer, formatted as required by syspref 'AddressFormat'
To test:
- Apply patch
- Search for a user with all address information filled
- Verify that 'Print summmary' displays the same information
as displayed on the screen.
- Change value of syspref 'AdressFormat'
- Verify that address format on 'Print summary' changes
as appropriate
Signed-off-by: mehdi <mehdi@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
It is not used since bug 11703
Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
It would be very helpful if the cleanup_database.pl script had the
ability to delete holidays from the special_holidays table there were
older than a given number of days in the past.
Test Plan:
1) Apply this patch
2) Create some unique holidays in the past of varying ages
3) Test the new switch '--unique-holidays DAYS' for cleanup_database.pl
4) Verify only holidays older then the specified number of days are removed
NOTE: The language 'unique holdays' is used in the interface to match
it's use in the staff web interface.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch modifies the Patron attribute types page, converting edit and
delete links to Bootstrap buttons with Font Awesome icons.
To test, apply the patch and go to Administration -> Patron attribute
types. The 'Edit' and 'Delete' buttons should look correct and work
correctly.
Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch modifies the cities administration page, converting edit and
delete links to Bootstrap buttons with Font Awesome icons.
To test, apply the patch and go to Administration -> Cities and towns.
The 'Edit' and 'Delete' buttons should look correct and work correctly.
Signed-off-by: rainer <archiv@a-bibliothek.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
"Delete tag" seems more appropriate than "Delete" on this tag, but I may
be wrong.
This patch also removes an extra space.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Add Font Awesome Icons to section Patrons and circulation in Tools module.
Also correct a error dialog in JQuery functions
To test:
-Apply patch
-Goto Tools -> Patron list -> my_list_saved -> Add patrons -> Remove selected patrons,
Clear all, Select all.
-Add new patron list and add some patrons, notice about the trash icon.
-Make some comments in some bib records and goto Tools->Comments
you will presented with two tabs "Approved comments" and
"Comments awaiting moderation".
See the three new buttons: Approve, Delete, Unapprove.
-Set syspref TagsModeration to Require. This will show all pending tags to review.
-Make some tags in bib records and goto Tools -> Tags.
-Notice about the new look.
-In the new screen look the icons in buttons "Apply filter(s)", "Test", "Approved",
"Reject". Notice about the new header bar above the DataTable with options: Select all,
Clear all, Select all pending.
-Play with filters; Check if terms exist or not in appoved/rejected lists
-Play with Terms summary and see if DataTable is working as expected
-Click in some term tag with multiple titles
-A table with titles tagged with the term is presented
-See the new button 'Remove'
-Verify if you can remove tag from a selected title.
-Verify that all tools work as expected
NOTE: The Tag and Comments tools has been revised to fit with others
interfaces in Koha.
Bug ammended according with QA comment 5
Bug rebased because bug 16005
Test plan amended for clarity
Clock icon for "Select all pending" removed (QA comment 23).
Fix some forbidden patterns (tab char) in review.tt according by IRC comment
by Marc Veron
Followed test plan, looks and works as expected
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch changes the "Discharge" menu in the patron sidebar to read
"Discharges," and adds a "Discharge" menu item to the patron toolbar.
This adds some redunancy, but fits with the pattern of including "views"
in the sidebar and "actions" in the menu. The discharge feature can be
thought of either way.
To test you must have the 'useDischarge' system preference enabled.
- View the detail page for any patron.
- Confirm that the sidebar menu reads "Discharges."
- Confirm that the "More" menu contains a "Discharge" link which works
correctly.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Orders by fund has wrong link to css and other issues
-> The example in the wiki is wrong: <https://wiki.koha-community.org/wiki/DataTables_HowTo>
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
[% INCLUDE 'datatables.inc' %]
-> Must be:
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
-> Missing <th></th> in <tfoot> tag
-> Wrong word used "Date deceived" should be "Date received"
NOTE: Wiki needs to be updated
To test:
-Look the code and notice about if else cluase without curly brackets
-Go to Reports > Orders by fund
-Play with: in filters 'All fund' Output: 'to screen into the browser'
-You will see a DataTable displayed in screen clutter
-Notice about 'Date deceived' and the foot of table
-Apply patch
-Refresh or execute again the report
Signed-off-by: Sinziana <s.paltineanu@berlin.bard.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
$category was a categorycode, to help the readability it's better to
name it $categorycode or assign a Category to $category
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
There is actually no need to use the hardcoded patron category S in
this test.
Test plan:
Run t/db_dependent/Holds.t.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Test passes OK
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Test t/db_dependent/Accounts.t:
This test created a MPL branch, but did not use it any more.
Test t/db_dependent/Items/AutomaticItemModificationByAge.t:
This test still used CPL/MPL branches. Now it uses two new branches.
Test plan:
[1] Run t/db_dependent/Accounts.t.
[2] Run t/db_dependent/Items/AutomaticItemModificationByAge.t.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Both tests pass OK
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
The current test had no warnings, when you have no MPL branch, and only
catches the warn from the second build on line 57. If you do have MPL,
a warning comes from line 56.
This patch fixes it by removing MPL from the test. A new branch is created
first and then we try to create it again.
Test plan:
Run the test.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
When testing a wrong case in TestBuilder.t, two warns show up.
We can catch them with warning_like.
Test plan:
Run t/db_dependent/TestBuilder.t
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
The update_dbix_class_files.pl script generates ActionLog.pm instead, which is
already on the source tree.
To test:
- Apply the patch
=> SUCCESS: Koha/Schema/Result/ActionLogs.pm is removed
- Run:
$ mysql -uroot
> CREATE DATABASE dbic; \q
$ mysql -uroot dbic < kohaclone/installer/data/mysql/kohastructure.sql
$ misc/devel/update_dbix_class_files.pl --db_name dbic --db_user root
=> SUCCESS: Koha/Schema/Result/ActionLogs.pm is not re-generated
- Run:
$ git grep ActionLogs
=> SUCCESS: There's no code using it
- Sign off
Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
An improper method call was left over in C4::Serials::NewIssue from the
switch from DBIx::Class to Koha::Object.
Test Plan:
1) prove t/db_dependent/Serials.t
2) Note the errors
3) Apply this patch
4) prove t/db_dependent/Serials.t
5) No errors!
Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Trivial changes that speak for themselves..
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
The current test assumes that GetPlugins will return the test plugin
as the first one in the array. This is not correct.
This patch adjusts the test to a grep.
Test plan:
Run the test.
Bonus: Add additional plugins. Run the test again.
Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
In order to verify if the delete now really works, we add one test
in Plugins.t.
Test plan:
[1] Run the test.
[2] Bonus: Comment line 63 in Plugins.t where delete is called.
Run the test again. It should fail now.
Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
If you run Plugin.t, the above table will still be present (when you
did not enable UseKohaPlugins). This would trigger a warning when
running the test a second time.
Why? The uninstall call does its work not completely due to a small
inconsistency in Koha::Plugins::Handler::delete when calling run
without the enable_plugins parameter.
This patch resolves that inconsistency and also removes an unneeded skip
in Plugin.t in case the KitchenSink module already exists.
Note: This is a small fix. But I wonder if the Handler routines run and
delete should not have been implemented in Koha::Plugins::Base.
Also note that plugins/plugins-uninstall.pl will not be affacted by this
change, since it checks whether the pref is enabled before calling the
delete method.
Test plan:
[1] Do not yet install this patch.
[2] Verify that plugins are enabled in koha-conf.xml.
[3] Disable UseKohaPlugins in System Preferences!
[4] Run t/db_dependent/Plugins.t.
[5] Verify that table koha_plugin_com_bywatersolutions_kitchensink_mytable
still exists. (It should have been deleted.) Remove it manually.
[6] Apply this patch.
[7] Run the test again.
[8] Verify that the table does not exist.
[9] Run the test again (without warnings).
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
On running all Items-related tests some useless diag showed up. Removing it.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
With the global %default_values_for_mod_from_marc variable, the changes
made to the marc_subfield_structure table and especially the links
between MARC and DB fields are not safe and might be outdated (if a
field is linked/unlinked)
Test plan:
Under Plack:
- Link the barcode field, edit a record and set a barcode.
- Remove the mapping for the barcode field and then update again the
barcode of the record.
The items.barcode DB field must not have been updated.
Without this patch, the field should have been updated.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Added a new sub to Serials.pm to be able to get serials with their statuses.
Now the sub ModSerialStatus checks for other serials with an "expected" status before doing anything.
Also modified Serials.t to be able to test those changes.
Test Plan
1) Apply patch
2) Run ./t/db_dependent/Serials.t
3) Validate that there are no errors
4) Go on "Serial collection information" page for a serial of your choice
5) Click on "Generate next"
6) Change the status of the original serial from "late" to "expected"
7) Change the newly generated serial from "expected" to "delete"
8) Validate that there are no new serials created by instruction 7 and that the serial was deleted
9) Run ./t/db_dependent/Serials.t
With QA Fixes
- Use the constant instead of the code (1 vs EXPECTED)
- Avoid interpolation in query
- use selectall_arrayref instead of fetchall_arrayref
Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch replaces Greybox modals on the acquisitions receipt summary
page with Bootstrap modals.
To test, apply the patch and go to Acquisitions -> Invoices -> View an
invoice -> Go to receipt page.
- In the list of pending orders, test the "MARC" and "Card" links for
various titles. Each should trigger a Bootstrap modal with the correct
content.
- Repeat the same tests in the list of already received orders.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>