Hold cannot be suspended if found=W:
Koha::Hold->suspend_hold
90 if ( $self->is_found ) { # We can't suspend found holds
So when TestBuilder generate a hold with found=W the test fail.
A question however:
Why did not we have the correct exception displayed somewhere? That
would be much more helpful to find the problem!
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch modifies the output of template toolkit variables so that
values in the in-page JavaScript are quoted. This avoids JavaScript
errors when the template variable is empty.
To test, apply the patch and perform a catalog search in the staff
client. Use the browser's developer tool to check for JavaScript errors
in the console. There should be none.
Test with AmazonCoverImages both on and off.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
On request.pl, the table of holds shows a suspend_until date picker for each hold, *unless* that hold is waiting or in transit. The script reserve/modrequest.pl assumes that there will be a suspend_until input for each hold, but that is incorrect. Assume there are 20 holds on a record, and 10 of them are waiting or in transit. If you were to then set the suspend until date on the 10 open holds, and use the "Update hold(s)" button, those 10 suspensions would apply to the 10 found holds and not the holds they should apply to!
Test Plan:
1) Place two holds on a record
2) Check in an item and trap it for the first hold
3) Now that one hold is waiting and the other is not, attempt to set
a suspension date using the "Update hold(s)" button
4) Note your hold does not get suspended!
5) Apply this patch
6) Restart all the things!
7) Repeat steps 1-3
8) Your hold should now be suspended!
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
In UNIMARC default configuration the 001 is linked to biblio.biblionumber.
In some XSLT files, 090$a is used.
This is by default biblioitems.biblionumber so it usually works but it may not be the same and var biblionumber is used to create hyperlinks to record detail page.
Test plan :
1) Use UNIMARC database
2) Set default in all XSLT system preferences
3) At OPAC, perform a search and click on a result
4) Check displayed page shows the correct biblio record
5) Same at intranet
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested on clean UNIMARC install.
Before insert new records: "alter table biblioitems AUTO_INCREMENT = 5"
Added two records, with result:
+--------------+------------------+
| biblionumber | biblioitemnumber |
+--------------+------------------+
| 1 | 5 |
| 2 | 6 |
+--------------+------------------+
Without patch, OPAC results shows for first record
http://opac/cgi-bin/koha/opac-detail.pl?biblionumber=5, Wrong!
with patch result is correct
Works, no errors
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch corrects a couple of invalid Template Toolkit comments in the
Circulation and Fines rules template.
To test, apply the patch and log into the staff client as an
administrator.
On the Circulation and Fines Rules page "View source" and look for
instances of the text "[#% Default branch %#]" There should be none.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] There is a theoretical difference between [% # and [%#. The latter
marks the whole directive as a comment and not just until EOL.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch removes the "data-toggle" attribute from the login link in
order to avoid a JavaScript error. Since we have a custom click handler
to trigger the modal we don't need Bootstrap's "automatic" modal
handling.
Test plan:
1. Apply patch
2. Open F12 dev tools
3. Click "Log in to your account" on OPAC
4. Observe no Javascript errors in console
Signed-off-by: David Cook <dcook@prosentient.com.au>
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: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch replaces the CGI "http" object method with its equivalent
class method, which doesn't require object instantiation and thus skips
global initialization and premature handling of the incoming HTTP request.
Test plan:
0. Disable Plack if it is enabled
1. Set koha_trusted_proxies in koha-conf.xml to 1.1.1.1
2. Clear Memcached
3. Try to upload MARCXML file to /cgi-bin/koha/tools/stage-marc-import.pl
4. Note that form below "Upload progress" never appears and errors show
in browser console
5. Apply the patch
6. Try to upload MARCXML file to /cgi-bin/koha/tools/stage-marc-import.pl
7. Note that form appears below "Upload progress"
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Cashup of a single register was resulting in a redirect to the register
details page. It should return to the branch details page instead.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds a new 'branch details' page to the POS system which
displays a summary of the cash register transactions for a branch
since each register was last cashed up. It also allows for cashing
up individual registers or cashing up all registers at a given branch
in one transaction.
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: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds CORS support for API requests. It uses the
AccessControlAllowOrigin syspref. To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/api/v1/auth.t
=> SUCCESS: Tests pass!
3. Set the AccessControlAllowOrigin to any string (for example, *)
4. Use any API testing tool (Postman?) to place a request on the API
=> SUCCESS: The response headers include Access-Control-Allow-Origin,
containing what you set on the syspref
5. Sign off :-D
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds CORS support to output_with_headers(). It will use the
AccessControlAllowOrigin syspref to pick the value and set the Access-Control-Allow-Origin header.
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/Output.t
SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
There is no need to specify the `client` param here because
'5_0::Direct' is the default value for Search::Elasticsearch 5.x and it
breaks when Search::Elasticsearch 6.x is installed
Test plan:
1. Apply the patch
2. Make sure you have Search::Elasticsearch 5.x
3. Reload starman
4. Verify that search works
5. Install Search::Elasticsearch 6.x
6. Reload starman
7. Verify that search works
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
The form element for selectin cash register override at point of sale was
misnamed and as such one could not actually override the cash register.
This patch corrects the form element name and updates the logic very
slighlty to ensure we still fall back to the defualt no the subsequent
page load.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
The form element for selectin cash register override at point of sale was
misnamed and as such one could not actually override the cash register.
This patch corrects the form element name and updates the logic very
slighlty to ensure we still fall back to the defualt no the subsequent
page load.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This trivial patch adds 'Point of sale' to the dropdown.
To test:
1. Notice there is no 'Point of sale' entry in the staff dropdown
=> FAIL: No dropdown
2. Apply this patch and reload
=> SUCCESS: Point of sale displays and works
3. Play with enabling/disabling the feature and removing permissions
=> SUCCESS: The entry in the dropdown respects the configured
permissions and settings.
4. Sign off :-D
Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch introduces missing TT filters and also replaces tabs for
spaces to fix indentation problems.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds the new `anonymous_refund` permission to the
`cash_management` flag and binds it to the visability of the register
details page.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
The svc/members/search script can be used to retrieve patrons with a
specific permission. This feature is only used once, to link patrons to
funds.
The code in the script is duplicated from what we have in
C4::Auth::haspermission, and it makes sense to clean it.
Test plan:
Create a fund and add users to this fund.
When you search for users you must only have a list of patrons with the
acquisition.order_manage permission.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described. No errors
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
To make sure we are going to be able to click on the "Delete" button of
our newly created category PATRON_CAT, we are displaying them all.
Test plan:
Create several patron categories that will fill the first page:
use t::lib::TestBuilder;
my $builder = t::lib::TestBuilder->new;
for my $i ( 1..20 ) {
$builder->build_object({ class => 'Koha::Patron::Categories', value => { description => "cat_$i" } });
}
Execute the selenium tests.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch simply adds an ID to the submit button to make it easier to
overide styling and functionality.
Test Plan:
0/ Inspect the element on page and note there is no id
1/ Apply patch
2/ Refresh page
3/ Inspect the element on page and note there is now an id
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds the use of the $Price TT filter to properly format '0'
amounts in the POS system.
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds the ability to apply discounts to existing patron
charges from the boraccount page.
Test plan
1/ Carry out some accounting actions that end up with debts on the
patron record. (Add a manual invoice for example)
2/ Note a new 'Apply discount' action button on the unpaid debt
3/ Paid debts do not display the action button
4/ Click the button
5/ Enter an amount into the resulting modal and click confirm
6/ Confirm that the outstanding debt has been reduced by the amount you
specified.
7/ Confirm that a new 'Discount' line appears on the patrons account
8/ Confirm that in the 'details' view of the debt that the discount line
was used against the debt to create the reduction.
9/ Signoff
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds the DISCOUNT type to the handled types list in the
reduce method introduced in bug 23442
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds the credit_type, offset_type and permissions required
for the addition of a discounting workflow in the accounts system.
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch prevents the add button being triggered by hitting return
from inside the collected from patron form input.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Previous version of the SQL query did not deal correctly with subgroup.
Test plan:
checkout the following commit to be just before 017
commit 715da06db5
Bug 22868: DBRev 19.12.00.016
reset_all # recreate the DB
Create a complex tree of library groups, with several groups, subgroups,
etc.
When you add a new library, refresh the page to add it several time.
When ready, git checkout master, restart all the things, execute the
updatedatabase script, then go to the library groups page.
You should see that the duplicated entries have been removed, but
subgroups have not been deleted
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested with duplicated entries on groups and subgroups,
going back to the right commit and doing clean install.
Patch works, subgroups are preserved. No errors.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
As part of an accidental push of a DO NOT PUSH schema update commit
we re-introduced a formerly removed relationship accessor
This patch removes that mistake.
Tests added to the pre-push hook to prevent future mishaps.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds a simple modal to confirm the cashup action adding a
safely measure to it.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch makes the parameter naming more consistent and also fixes the
tests (there was a missmatch on the parameter naming, and tests count
was incorrect).
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Add new 'cashup' sub-permissions to the 'cash_management' permission to
allow fine grained control over whome may 'cashup' a cash register.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds a new page which can be accessed via the menu to the
left of the point of sale page. This new page displays a list of
transactions since the last 'cashup' action, a summary of transaction
amounts and a button to allow the recording of a new 'cashup action.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch simply splits the existing tests for accountlines into two
test files, one for the singular object and one for the set.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>