Some code executed in the script opac-suggestions.pl if the system preference AllowPurchaseSuggestionBranchChoice is enabled assumes there is a logged in user. If there is not, patrons will see the error "Internal Server Error".
Test Plan:
1) Enable AllowPurchaseSuggestionBranchChoice
2) Enable AnonSuggestions
3) In the OPAC, perform a search that will have no results,
click the "Make a purchase suggestion" link.
4) Note the error
5) Apply this patch
6) Reload the page
7) The page should load now!
Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
There is no accountlines.biblionumber field, if the account line is
linked to an item, accountline-details.pl will explode with:
Template process failed: undef error - The method biblionumber is not
covered by tests!
Test plan:
Create a fine for a given item
Pay the fine
View the detail of the account line
=> Without this patch you get a software error
=> With this patch applied you will see the biblio's title
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>
Both biblionumber and biblioitemnumber for item were set to
biblionumber, when they don't line up tests fail
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 19453 "fixed" the fund validation that never actually worked. This validation should be removed altogether instead. It is overly simplistic and simply checks to see if each record in the batch has a fund selected regardless of whether that record will be imported or not.
In addition, the code completely ignores items generated by MarcItemFieldsToOrder such that even if items on that page have a fund selected, the javascript forces the librarian to make a selection from the left-hand fund pulldown even though it will not be used.
Considering this bad validation is basically 'new' as it never worked before, the most sensible course of action would be to 'undo' the change and remove the validation.
Test Plan:
1) Add records to a basket from an import batch
2) Select only some of those items in the batch
3) Note Koha will not let you import them unless you set funds for *all*
records in the batch
4) Apply this patch
5) Note Koha no longer forces a budget to be selected in the pulldown
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=20789
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
To test:
1 - Load the advanced cataloging editor
2 - Inspect the network tab in your browser (F12)
3 - Note failure to load 'cataloging_.js'
4 - Note some other scripts don't have versioning
5 - Apply patch
6 - Reload page
7 - Note cataloging.js loads with version number
8 - Note more js files have versioning
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comparisons like $a eq undef should normally raise a warning like:
Use of uninitialized value in string eq at ...
But unfortunately we still suppress warnings here and there.
Test plan:
[1] Just read this patch and confirm the small changes.
[2] Git grep on "eq undef" and do not find other occurrences.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Passes test plan and QA tools. Searching works correctly.
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
To test:
1 - Browse to Admin->Patron Categories
2 - Click '+ New category'
3 - Enter data as required, however, enter 0 in 'Enrolment period' ->
'in months'
4 - Save
5 - View the list of categories, the new category has 'Enrolment period'
= 'until'
6 - Create a patron in this category, note their dateexipry is
'0000-00-00'
7 - Search for them
8 - internal server error
9 - Delete that patron
10 - Apply patch
11 - Edit the category, note you cannot save with 0 months
12 - Set 1 month and save
13 - Create a patron in this cateogry
14 - Note they have a valid dateexpiry
15 - Search for them
16 - All works
17 - Create a new category and verify you cannot add with 0 months
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>
When a method is not allowed yet (not covered by tests), developers get
an error the is not really useful: "The method XXX is not covered by
tests!"
It would be more useful to have a stack trace in order to know where
this error come from.
Test plan:
Modify some code to display this stack trace and confirm it makes sense
to have it, i.e. it will make debug easier
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
- Print summary (summary-print.pl)
- Print quick slip (printslip.pl)
- Print slip (printslip.pl)
- Print overdues (print_overdues.pl)
Perl scripts all require circulate_remaining_permissions, while
in the template we were checking for edit_borrowers.
Now the print pull down will only be visible if the patron has
circulate or circulate_remaining_permissions.
To test:
- Verify that printing the listed slips works for staff users
with either circulate or circulate_remaining_permissions
and without edit_borrowers.
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch makes a minor correction to the markup of the lost items
report template.
To test, apply the patch and run the lost items report with parameters
which will return results. The report results should look correct, and
the page should validate with no relevant errors.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
- Activate EnableBorrowerFiles
- Go to any patron account in staff
- Go to the files tab
- Check that strings on the page ar all properly capitalized
- button
- legend on section
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>
- Standardizes spelling to 'Notices & slips'
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
When a fund is created or edited and does not have a owner yet, the
name of the patron will not be displayed when selected.
The HTML element the JS code expects is not present in the DOM.
Test plan:
- Create a fund, set a owner
- remove the owner, edit, etc.
- Save
- Edit again
Make sure it works as expected.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
1 chomp was missing, spaces were replaced with %20
This patch adds extra chomps, but it does not hurt
Test plan:
Advanced Search
Choose an Item type (do not enter any other search limits)
Search
Click on Sort (it doesn't appear to matter what you sort on)
Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Caused by
commit ab47e46ea0
Bug 18789: Pass a Koha::Patron object from returns.pl
circ/returns.pl does not send a $patron Koha::Patron object to the
template in case print_slip is set
Test plan:
Confirm a hold and print the slip
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
On bug 19943:
- elsif ($biblioitem->{'notforloan'} == 1){
+ elsif ($biblioitem->notforloan == 1){
The biblioitems table does not contain a notforloan column, this comes
from the item type.
This bug only appears when item type is defined at biblio level
(item-level_itypes=0)
Test plan:
Set item-level_itypes = biblio
Check an item out
Without this patch it explodes with
"The method notforloan is not covered by tests!"
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
I reproduced the error condition and verified the tests failed without
this patch. After this patch is applied, tests pass and checkout
succeeds.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
There was once an ILS from New Zealand
They said "How hard could it be?" and
So we all came together
To help make it better
Come join us! The adventure will be grand!
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
1.
<failure message="msgfmt
failure">misc/translator/po/fr-CA-staff-prog.po:713: number of format
specifications in 'msgid' and 'msgstr' does not match
2.
<failure message="msgfmt
failure">misc/translator/po/hy-Armn-staff-prog.po:53901: 'msgstr' is
not a valid C format string, unlike 'msgid'. Reason: The character
that terminates the directive number 1 is not a v
alid conversion specifier.
Found with:
sudo apt-get install translate-toolkit
junitmsgfmt misc/translator/po/ar-Arab-staff-prog.po
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
TO test:
1 - Be signed in to Koha
2 - Add a manual invoice to an account, works fine
3 - Now do it via url: http://localhost:8081/cgi-bin/koha/members/maninvoice.pl?borrowernumber=5&type=test&amount=5&add=Save
4 - Apply patches
5 - Test that everything continues to work as expected (but more securely)
6 - Try adding a new invoice via URL
7 - Should get 'internal server error' and wrong csrf token in logs
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds a required JS asset to the patron API key interface.
Without it, JS-based functions in the toolbar do not work.
To test you must have RESTOAuth2ClientCredentials enabled.
- From a patron detail page, choose More -> Manage API keys.
- Test the toolbar buttons on this page, especially "Search to hold"
and the various print options.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
No need to add more information here, it's self-explanatory...
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Move memcached from suggested to depends for Debian packages.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
libhttp-oai-perl in Stretch is 4.03 and broken. Koha depends on
libhttp-oai-perl << 4 for that reason. To make the installation of Koha
on Stretch as easy as possible, this patch adds the alternative
libhttp-oai-3.27-perl which we provide in the Koha repository.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This reverts commit f489d2034b.
This commit breaks the install process when using debian packages.
Reverting as we are very close to the 18.05.00 release
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
translated_language is not a Koha::Patron's method but a simple variable
sent to the template.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Hmm. I would have liked the opac parameter even better ;)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This is the alternative patch of Kyle's
"""
If a hold is 'waiting' for the patron to collect then the patron should
be prevented from cancelling the hold via their account in the opac.
If a patron tries to cancel the hold, Koha will give an 'are you sure'
alert and when you click Yes the page just refreshes and the hold
remains.
Staff can cancel the hold from the staff interface but they can then
action the waiting hold.
I think therefore that it is correct behaviour that a patron cannot
cancel a hold when it reaches waiting state via the opac but it would be
useful to either have a warning to prevent the cancellation or a useful
message when they attempt to do so.
The template was using a method that tells Koha if *staff* can cancel a
hold,
instead of patron.
Test Plan:
1) Set up a waiting hold
2) Try to cancel it from the opac
3) Note you cannot
4) Apply this patch
5) Reload the page
6) Note the cancel button has disappeared for found holds
"""
It sounds better to keep the ->is_cancelable method, for readability
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The RoutingListAddReserves feature currently doesn't work as
expected (see bug 2894) and should be turned off for new
installations until properly fixed.
To test:
- Run the web installer
- Confirm that RoutingListAddReserves is set to "Don't place"
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Before there is no href.
After there is.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
As we don't have a fix yet to link to the right translated manual,
this adds /en to the links from the help files to the manual to
make them work again.
Check with both patches applied, that the links work.
You will have to change 17.11 to 18.05.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The numbering in front of the chapter file names has been removed,
so the links need to be adapted accordingly.
Note:
Testing this in master currently won't work for 2 reasons:
- We are still using 17.11 as version variable, will be 18.05 later.
- We are missing the lanugage code before /html and this leads
to an outdated version of the 18.05 manual.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Victor Grousset <victor.grousset@biblibre.com>
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: Victor Grousset <victor.grousset@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
We need to call Koha::Hold->set_waiting to correctly
calculate the expiration date.
It fixes a regression introduced by
commit 26634151db
Bug 12063 - Fix QA failures
The expiration date has to be set for waiting holds
== Test plan (time to execute: less than 4min) ==
1. Set ReservesNeedReturns to "Don't automatically"
2. Place a hold on a specific item
3. Check it in and confirm hold
4. The hold should have an expiration date
record page → Hold → "Expiration" column
5. It should be listed in staff:/cgi-bin/koha/circ/waitingreserves.pl
6. Set ReservesNeedReturns to "Automatically"
7. Place a hold on a specific item
(which should also behave like we check the item in to
keep it for the patron)
8. The hold should have an *empty* expiration date
record page → Hold → "Expiration" column
9. Holds awaiting pickup page should crash
staff:/cgi-bin/koha/circ/waitingreserves.pl
10. Cancel the hold to remove the corrupted data
record page → Hold → the red X
11. Apply this patch
12. Place a hold on a specific item
13. The hold should have an expiration date (not empty)
14. It should be listed in staff:/cgi-bin/koha/circ/waitingreserves.pl
15. Celebrate!
Signed-off-by: Victor Grousset <victor.grousset@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Until HTTP::OAI is patched so it actually works, and bug 17704 fixes the API change Koha-side, we need to explicitly pull the right version. Otherwise people using Debian 9+ derived distros (Ubuntu 16.04+) are seeing production issues.
This implies packaging our custom libhttp-oai-perl distribution in the meantime.
This patch makes Koha require a version lower than 4.0.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>