Bug 14866: Make high holds work with different item types
To test:
1) Apply patch, update database, restart services
2) Enable decreaseLoanHighHolds sysprefs if not already active
3) Go to circulation rules and set a value under 'Decrease loan holds
(day)' that is DIFFERENT from decreaseLoanHighHoldsDuration
4) Check out an item with holds and confirm that the value from the rule
is used instead of the system preference
5) Confirm tests pass before and after the patch
t/db_dependent/DecreaseLoanHighHolds.t
Sponsored-by: Catalyst IT Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com> Signed-off-by: Henry Bolshaw <bolshawh@parliament.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 23091: Simplify tests by turning off AccountAutoReconcile
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Wed, 15 Jul 2020 10:23:38 +0000 (11:23 +0100)]
Bug 23091: Unit Tests
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Fri, 5 Jun 2020 08:19:48 +0000 (09:19 +0100)]
Bug 23091: Add template handling for new messages
This patch adds handling for the display of the two new messages added
by this patchset in the returns screen.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Tue, 14 Jul 2020 12:59:06 +0000 (13:59 +0100)]
Bug 23091: Make relations more explicit
This patch simply makes the queries built for the ->debits and ->credits
relations in Koha::Account::Line more explicit.
Test plan
1/ Ensure tests continue to pass
2/ Run tests with DBIC_TRACE=1 DBIC_TRACE_PROFILE=console and note that
the related queries not include 'credit.' and 'debit.' as appropriate.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Mon, 13 Jul 2020 14:51:24 +0000 (15:51 +0100)]
Bug 23091: Add tests for _RestoreOverdueForLostAndFound
This patch adds unit tests for the newly introduced
_RestoreOverdueForLostAndFound method in C4::Circulation.
Test plan
1/ Read the new tests added to t/db_dependent/Circuation.t to ensure
they make sense
2/ Run the tests and verify they pass
3/ Signoff
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Wed, 23 Oct 2019 10:32:28 +0000 (11:32 +0100)]
Bug 23091: Add handling for new lostreturn rules
This patch adds handing for the new values available for the lostreturn
policy settings.
* undef - Do nothing, leave fees and fines as they were at the point of
lose.
* refund - Refund the lost item fee only
* charge - Refund the lost item fee and charge a fresh overdue fine
dated for a return on the date the item is 'found'
* restore - Refund the lost item fee and restore the original overdue
fine (dated for a 'return' on the date the item was 'lost'
Test plan
1/ apply patch
2/ updatedatabase, restart_all
3/ verify finesmode and CalculateFinesOnReturn and WhenLostChargeReplacementFee are on
4/ verify WhenLostForgiveFine is set to "Forgive"
5/ verify circ rules include fines
6/ set Default lost item fee refund on return policy to "Refund lost item charge"
7/ create 4 overdue checkouts that will incur fines
8/ run fines.pl
9/ confirm 4 items checked out with accruing fines
10/ confirm all 4 items have a replacement price
Item 1
11/ mark the first item lost
12/ verify that fine is gone and lost fee has been charged
13/ check item in
14/ verify that lost fee is gone and overdue charge has not returned
Item 2
15/ set Default lost item fee refund on return policy to "Refund lost item charge and charge new overdue fine"
16/ mark second item lost
17/ verify that fine is gone and lost fee has been charged
18/ check item in
19/ verify that lost fee is gone and a new overdue charge has been made
Item 3
20/ set Default lost item fee refund on return policy to "Refund lost item charge and restore overdue fine"
21/ mark third item lost
22/ verify that fine is gone and lost fee has been charged
23/ check item in
24/ verify that lost fee is gone and the old overdue charge has been restored
Item 4
25/ set Default lost item fee refund on return policy to "Leave lost item charge"
26/ mark fourth item lost
27/ verify that fine is gone and lost fee has been charged
28/ check item in
29/ verify that lost fee remains and the overdue charge is still gone
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Wed, 3 Jun 2020 15:25:31 +0000 (16:25 +0100)]
Bug 23091: Update unit test
This patch updates the unit test for get_lostreturn_policy to reflect
the rule_name and return code changes.
Test plan:
1/ Read the code changes in t/db_dependant/Koha/CirculationRules and
t/db_dependant/Koha/IssuingRules and confirm they make sense.
2/ Run the updated tests and ensure they pass.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Wed, 3 Jun 2020 15:01:39 +0000 (16:01 +0100)]
Bug 23091: Database update
This patch updates the 'refund' circulation rule to be called
'lostreturn' and populates the value with 'refund' where appropriate.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nicolas Legrand [Thu, 5 Nov 2020 13:52:02 +0000 (14:52 +0100)]
Bug 24412: (follow-up) prevent js injection
Some js variables are not properly escaped and can be executed if
containing javascript.
1. have some waiting reserve attached to a desk
2. change this desk name to : <script>alert("❤");</script>
3. go to user's checkout page (circulation.pl) and click on the
Hold(s) tab
4. you should see some popup with a ❤ in it.
5. apply patch and refresh page
6. now you should see the desk name printed properly in the page:
<script>alert("❤");</script>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nicolas Legrand [Thu, 5 Nov 2020 13:10:09 +0000 (14:10 +0100)]
Bug 24412: (follow-up) prevent request.pl from failing
When no desk is defined request.pl returns an internal server
error. Check a desk is defined before asking for reservation deskname.
Plan test:
1. log in with a library with no desk
2. check in a reserved book so it'll be switch to “waiting reserve”
3. go to the book notice and click the Holds tab (request.pl page)
4. boum
5. apply patch, restart plack
6. refresh page
7. now loading properly
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nicolas Legrand [Mon, 13 Jan 2020 16:56:41 +0000 (17:56 +0100)]
Bug 24412: Attach waiting reserve to desk
When an item is checked in and marked 'Waiting' or already 'Waiting'
and there is a desk attached to the session, the item is marked
waiting at the current desk of the current library.
The information is displayed on the OPAC and on the intranet. The
patron can then know at which desk he can retrieve his document.
Desk Management (Bug 13881) is now useful.
Test plan :
1. apply Bug 24201
2. $KOHA_PATH/installer/data/mysql/updatedatabase.pl
3. Check out some document to someone
4. make another one reserve this document
5. check in the document
6. you can see the document is attach to the current library
7. create some desks and attach one to your session (see Bug 13881 and
Bug 24201)
8. cancel the preceding reserve and redo steps 3 to 5
9. you should see the document is waiting at the current library and
current desk on:
a. the intranet document request page
b. the intranet borrower holds tab
c. the item list where the document is listed on the bibliographic
details
d. the borrower's OPAC holds tab.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 24412: (follow-up) QA
Following Josef Moravec QA comments :
- rewrite Koha::Hold->desk according to Object Oriented Koha
Guidelines and use it to fetch desk name in various templates
- remove unused Desks.GetName
- Check for columns existence in db update
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 24412: (follow-up) QA: useless change
Maybe it was a relic of something usefull... anyway
not anymore.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 24412: (follow-up) Fix POD
Koha::Desk and not Koha::Library...
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Sponsored-by: Theke Solutions Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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>
Bug 24633: Add support for gitlab searching of plugins
This patch adds the option to add Gitlab repositories to look for
Koha plugins. As with Github, plugin projects need to be named
koha-plugin-* and the release file needs to be named with the .kpz
extension.
To test:
1. Apply this patchset
2. Check either koha-conf.xml or koha-conf.site.xml.in for sample
configurations of gitlab targets.
3. Tweak your koha-conf.xml accordingly. You could have:
4. Flush memcached and restart plack:
$ flush_memcached
$ koha-plack --restart kohadev
5. Open the plugins page, search for anything, like 'gobi' or 'a'
=> SUCCESS: You get Theke results!
6. Pick a gitlab plugin for install
=> SUCCESS: It is installed!
7. Sign off :-D
Sponsored-by: Theke Solutions Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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>
Martin Renvoize [Fri, 6 Nov 2020 12:48:28 +0000 (12:48 +0000)]
Bug 24665: (QA follow-up) Fix selection default
This patch updates the html_helper for the cash register selection block
to remove the 'empty option' such that it can be correclty set for each
select case and updates all existing cases where we used the process
block previously to include the relevant blank option '-- Select an
option --', '-- None --', 'Library default' and finally the new '-- All
--' options introduced with this bug.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Tue, 21 Jul 2020 13:54:09 +0000 (14:54 +0100)]
Bug 24665: Add support for filtering by cash register
This patch makes it possible to filter on cash register
on the cash register statistics page.
To test:
- Activate UseCashRegisters
- Create a cash register or more to use
- Create some manual fees and fines
- Pay some of them off
- Go to Tools > Cash register statistics
- Test if the new filter for cash registers works as it should
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Fri, 6 Nov 2020 14:42:42 +0000 (14:42 +0000)]
Bug 24786: (QA follow-up) Ensure tests pass with existing data
The tests for Koha::Template::Plugin::Registers assumed that no
registers were pre-set in the database. This patch updates the test to
ignore pre-existing data or take it into account in totals.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Fri, 6 Nov 2020 14:04:49 +0000 (14:04 +0000)]
Bug 24786: (QA follow-up) Reset beenSubmitted on validation failure
When the form submision fails due to validation errors we need to also
reset the preventFormDoubleSubmit state to allow for a second submission
with corrected form fields.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Fri, 6 Nov 2020 11:51:30 +0000 (11:51 +0000)]
Bug 24786: (QA follow-up) Do not use 'hidden' attribute
The hidden attribute for loading an element hidden is known to have
issues and inconsistencies accross browsers.
This patch instead updates the relevent input options to use an inline
style of 'display: none' to hide the elements on page load and then
.show, .hide for subsquent changes linked to the library branch picker
change.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Fri, 6 Nov 2020 10:55:13 +0000 (10:55 +0000)]
Bug 24786: (QA follow-up) Hide archived registers
This patch hides archived registers from the list when useing the
Registers template plugin. It also includes a check for
UseCashRegisters so that if the preference is disabled after some
registers have been defined then the plugin will no longer return the
list regardless.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Thu, 15 Oct 2020 12:41:16 +0000 (13:41 +0100)]
Bug 24786: (QA follow-up) Add validation to paycollect
This patch adds conditional validation to the cash register field on
paycollect such that if 'CASH' is selected as the payment type and cash
registers are enabled, then a cash register will be required.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Fri, 2 Oct 2020 09:19:14 +0000 (10:19 +0100)]
Bug 24786: Add validation to point of sale
The Point of Sale page relied upon serverside validation prior to this
patch; As such with the introduction of the ability to select '--None--'
at the session register level (to require the librarian to pick their
register for every transaction) we could result in a server error page.
This patch introduced clientside validation to add checks for both the
'collected' and 'registerid' form fields.
Test plan:
1/ Select a branch with cash registers available
2/ Select the '--None--' option for the session cash register
3/ Navigate to the point of sale page
4/ Attempt to make a sale without having picked your cash register
5/ Note that the submission was prevented and the fiedl is highlighted
as required in red.
6/ Signoff
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Tue, 11 Aug 2020 13:24:19 +0000 (14:24 +0100)]
Bug 24786: Default to 'branch default' on auth.
If no branch is selected (i.e. 'My library') then we should default to
'branch default' if one is defined for the users library at login.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Tue, 4 Aug 2020 12:27:06 +0000 (13:27 +0100)]
Bug 24786: (follow-up) Cache the register_name in the session
This leads to one DB hit less per page load in the staff client when
cash registers are enabled.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Tue, 21 Jul 2020 09:52:49 +0000 (10:52 +0100)]
Bug 24786: Update borroaccount to use session register
This patch adds handling to allow for the use of the session cash
register by default if it has been set, otherwise it defaults to '--
None --' and requires the end user to select the register to proceed
with the refund or payout action.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Tue, 21 Jul 2020 09:30:09 +0000 (10:30 +0100)]
Bug 24786: Update paycollect to use session register
This patch adds handling to allow for the use of the session cash
register by default if it has been set, otherwise it defaults to '--
None --' and requires the end user to select the register to proceed
with the payment.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Tue, 21 Jul 2020 12:08:18 +0000 (13:08 +0100)]
Bug 24786: Update point of sale to use session register
This patch adds handling to allow for the use of the session cash
register by default if it has been set, otherwise it defaults to '--
None --' and requires the end user to select the register to proceed
with the sale.
Test plan
1/ Enable cash registers via the 'UseCashRegisters' system preference
2/ Enable point of sale via the 'EnablePointOfSale' system preference
3/ Navigate to the point of sale page
4/ Note that if you are logged in at a branch with no cash registers yet
defined, then an alert should appear
5/ Note that when you are logged in at a branch with cash regsiters
defined, but without a cash register associated with your session then
the cash 'Cash register' select box is populated with '-- None --' and
you are required to select a register prior to submission
6/ Note that upon selection, the '-- None --' option is disabled
7/ Note that when you have a register associated with your session then
the 'Cash register' select box is pre-populated with that register.
8/ Signoff
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Tue, 21 Jul 2020 12:37:16 +0000 (13:37 +0100)]
Bug 24786: Allow selection of cash register at login
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Mon, 20 Jul 2020 15:14:17 +0000 (16:14 +0100)]
Bug 24786: Allow setting a register for the session
This patch adds the ability to set a register for the current session
from the 'set library' page.
Upon entering the page, the current selection will be displayed.
Changing the branch will trigger the register select list to update to
display only those registers associated with the updated branch and will
automatically select either 'no register' or the 'branch default'
register. The user can then override that selection to choose a
different register for the session.
Test plan
1/ Enable cash registers with the 'UseCashRegisters' system preference
2/ Select the 'Set library' option from the top right menu
3/ Note that you can now select a cash register from the subsequent page
4/ Change the branch and note that the cash register selection is
updated to reflect the change
5/ Note that the 'branch default' register is auto-selected upon branch
selection if one has been defined, otherwise '-- None --' is selected
6/ You can then alter the selection before submitting the form
7/ Once submitted note that you are returned to the page you were on
prior to attempting to change the library and register
8/ Note the present of the register name next to the library name at the
top of the screen.
9/ Signoff
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Julian Maurice [Sun, 29 Mar 2020 12:56:20 +0000 (14:56 +0200)]
Bug 25067: Move PO file manipulation code into gulp tasks
misc/translator/translate was doing three different things:
- extract translatable strings
- create or update PO files
- install translated templates
This patch separates responsibilities by moving the string extraction
code into several 'xgettext-like' scripts and adds gulp tasks to
automate string extraction and PO files update
This has several benefits:
- gulp runs tasks in parallel, so it's a lot faster (updating all PO
files is at least 10 times faster with my 4-cores CPU)
- there is no need for $KOHA_CONF to be defined
LangInstaller.pm relied on $KOHA_CONF to get the different paths
needed. I'm not sure why, since string extraction and PO update should
work on source files, not installed files
- string extraction code can be more easily tested
This patch also brings a couple of fixes and improvements:
- TT string extraction (strings wrapped in [% t(...) %]) was done with
Template::Parser and PPI, which was extremely slow, and had some
problems (see bug 24797).
This is now done with Locale::XGettext::TT2 (new dependency) which is
a lot faster, and fixes bug 24797
- Fix header in 4 PO files
For backward compatibility, 'create' and 'update' commands of
misc/translator/translate can still be used and will execute the
corresponding gulp task
Test plan:
1. Run `yarn install` and install Locale::XGettext::TT2
2. Run `gulp po:update`
3. Verify the contents of updated PO files
4. Run `cd misc/translator && ./translate install <lang>`
5. Verify that all (templates, sysprefs, xslt, installer files) is
correctly translated
6. Run `gulp po:create --lang <lang>` and verify that it created all PO
files for that language
7. Run `prove t/misc/translator`
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Need to install yarn & gulp, no errors
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Tue, 3 Nov 2020 18:00:57 +0000 (18:00 +0000)]
Bug 26727: (follow-up) More markup corrections
This patch makes more markup changes to the templates previously
modified in order to try to arrive at some agreeable solutions.
- In the value_builder EXAMPLE template, the <p> is unnecessary and is
removed. Also removed is the script "type" attribute and obsolete
CDATA markers.
- In the article request template an unnecessary <p> is removed.
- In the merge patrons template the submit button is now in a <fieldset
class="action"> as is consistent with other forms.
- In the MARC modifications template I've added <div>s around each
"line" in the form to add the line break, along with some CSS to add
margins.
- The submit button is now inside a <fieldset class="action"> and the
"Cancel" link now has the "cancel" class.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Sun, 18 Oct 2020 16:30:24 +0000 (16:30 +0000)]
Bug 26727: Fix <p/> appearing in the templates
The self-closing p is not valid in HTML5:
Error: Self-closing syntax (/>) used on a non-void HTML element.
Ignoring the slash and treating as a start tag.
To test:
1)
- Activate Article requests
- Search for a record to place an article request on in staff
- Look up the patron
- Verify the article request form looks ok
2)
- Search for a list of patrons
- Check 2 patrons and merge them using the button above the list
- Verify the distance between the button and the table looks ok
3)
- Create a new MARC modification template
- Create a new action
- Verify the distances between the first and second line of form
elements looks ok
4)
- Place a hold in staff
- Click on the Suspend link in the holds table (not below)
- Verify the modal looks ok
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Wed, 29 Apr 2020 11:22:26 +0000 (07:22 -0400)]
Bug 14708: Don't allow merging of other patron records into Anonymous Patron
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Wed, 15 Apr 2020 17:48:09 +0000 (13:48 -0400)]
Bug 14708: Don't allow merging of Anonymous Patron into other patron records
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Wed, 15 Apr 2020 17:31:59 +0000 (13:31 -0400)]
Bug 14708: Skip AnonymousPatron in GetBorrowersToExpunge
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Wed, 15 Apr 2020 16:48:02 +0000 (12:48 -0400)]
Bug 14708: Prevent deletion of Anonymous Patron at Koha::Patron::delete
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Wed, 27 Feb 2019 17:00:03 +0000 (12:00 -0500)]
Bug 14708: Enforce restriction in delete_patrons.pl
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Wed, 27 Feb 2019 11:59:08 +0000 (06:59 -0500)]
Bug 14708: The patron set as the anonymous patron should not be deletable.
Right now it's possible to delete the anonymous patron at any time. When this happens the system will break just as if anonymouspatron was unset but patrons still have an "always anonymize" privacy setting.
This issue occurs more frequently than one would expect.
We should make it so that the patron set in AnonymousPatron is not deletable.
Test Plan:
1) Apply this patch
2) Set a patron to by AnonymousPatron
3) Attempt to delete that patron from the members toolbar
4) Note the error message!
Signed-off-by: Devinim <kohadevinim@devinim.com.tr> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Thu, 30 Apr 2020 17:35:48 +0000 (13:35 -0400)]
Bug 25334: Add generic 'phone' message transport type
As bug 25333 changed the 'phone' transport type to 'talkingtech', we can
now re-add 'phone' as a transport type again, and allow it to behave and
support the same notices as the email transport type.
Test Plan;
1) Apply this patch
2) Run updatedatabase
3) Restart all the things!
4) Disable TalkingTechItivaPhoneNotificationi if enabled
5) Enable new PhoneNotification system preference
6) Go to a patron's messaging preferences, not you can select the
'phone' option for all the same notices as the 'email' option
7) Enable the phone option for all the message types
8) Browser to the Notices and slips editor
9) Add a phone notice version for each notice you wish to test
10) Test some notices ( CHECKIN, CHECKOUT, etc )
11) Notices should show in the patron's messages as 'phone' notices
Signed-off-by: Christopher Zorn <Christofer.Zorn@ajaxlibrary.ca> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Julian Maurice [Tue, 2 Jun 2020 07:27:02 +0000 (11:27 +0400)]
Bug 25650: Add location and itype descriptions in ILS-DI GetRecords
Test plan:
1. Create a record with an item, and set the item's shelving location
and itemtype.
2. Go to
http://<OPAC>/cgi-bin/koha/ilsdi.pl?service=GetRecords&id=<biblionumber>
3. Check that there is <itype_description> and <location_description>
and that their value is correct.
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Mon, 2 Nov 2020 18:13:04 +0000 (18:13 +0000)]
Bug 26148: OpenLibrary "Preview" link target is unclear to patrons
This patch makes changes to the display of the Open Library "read" links
in the OPAC search results and detail page. The link is now grouped with
other details about the record ("Publisher," "Location(s)," etc. On the
detail page, the "Preview" link will no longer appear under the cover
image.
The label is changed to "Found in Open Library," and the link now opens
the Open Library reader in a new window.
The patch also changes the Open Library button image links so that they
use https and makes it so that the "Found in Open Library" information
is hidden until the availability information has loaded.
To test, apply the patch and enable the OpenLibrarySearch system
preference.
- Perform a search in the OPAC which will return results found in Open
Library, e.g. "poetry" in the sample data.
- Confirm that the "Read now" images from Open Library appear on some
search results.
- View the detail page for one of these titles.
- Confirm that the "Read now" button appears in the same format on the
detail page.
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>
Martin Renvoize [Fri, 7 Aug 2020 09:15:20 +0000 (10:15 +0100)]
Bug 26172: Add cashup summary view modal
This patch adds a cashup summary modal to the register details page.
Test plan
1/ Enable Cash Registers and Point of Sale
2/ Enable some debit_types as 'Sale items'
3/ Perform a series of transactions
4/ Perform a 'Cashup' on the register
5/ Note the new '(Summary)' link next to the last cashup on the register
page.
6/ Click the link and confirm the modal contains the pertinent
information
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 26584: Remove unused C4::Acquisition::CloseBasket function
This patch makes code use the new Koha::Acquisition::Basket->close
method and makes CloseBasket obsolete.
It then removes it, and adapts the few places in which it was used.
1. Apply this patch
2. Run:
$ kshell
k$ git diff origin/master --name-only | grep -e '\.t$' | xargs prove
=> SUCCESS: Tests pass!
3. Try playing with baskets, closing them
=> SUCCESS: All works as expected!
4. Sign off :-D
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 adds two methods to Koha::Acquisition::Basket:
- 'closed': that tells if the basket is closed
- 'close': that closes the basket
It inherits the behaviour from CloseBasket (as it actually makes sense).
It improves CloseBasket by wrapping the action inside a transaction. It
uses the $orders->update call with no_trigger as there's no trigger to
trigger and the update can be done on a single DB call.
A new exceptions file is added for basket-related exceptions. The only
specific exception that gets added is
Koha::Exceptions::Acquisition::Basket::AlreadyClosed
To test:
1. Apply this patches
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Acquisition/Basket.t
=> SUCCESS: Tests pass!
3. Sign off :-D
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>
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>
Jonathan Druart [Thu, 5 Nov 2020 08:12:12 +0000 (09:12 +0100)]
Bug 26935: Don't use basket for claimacquisition and claimissues
Incorrect basketid is sent for claimacquisition and claimissues.
The basket info are not used in the default template of these notices, but if it
is used, a wrong basket may be passed to generate the notice.
This has been caught by a test failure after bug 26745.
# Failed test 'SendAlerts - claimissue'
# at t/db_dependent/Letters.t line 642.
C4::Letters::_substitute_tables(): DBI Exception: DBD::mysql::st execute failed: called with 2 bind variables when 1 are needed [for Statement "SELECT * FROM aqbasket WHERE basketno = ?" with ParamValues: 0=53] at /kohadevbox/koha/C4/Letters.pm line 679
This is a quick patch to fix the failing test, but more work would needed.
We are removing the basket info from those 2 notices and keeping it only
for orderacquisition.
Technically: the $externalid is coming from the parameter list of
SendAlerts, but it is a basketno only for orderacquisition. We must not
pass it for other notices.
Test plan:
Confirm that the failing test is now passing and that the changes make
sense.
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>
Kyle M Hall [Tue, 3 Nov 2020 13:31:39 +0000 (08:31 -0500)]
Bug 26908: Restore ability to view and select EDI plugins for a vendor account
Test Plan:
1) Install an EDI plugin
2) Browse to edi_accounts.pl, create or edit an account
3) Note the plugins pulldown is missing
4) Apply this patch
5) Restart all the things!
6) Reload the page
7) Note the pulldown is back!
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Tue, 3 Nov 2020 15:45:33 +0000 (16:45 +0100)]
Bug 26911: (bug 18936 follow-up) Remove invalid data before copying the circ rules
UPDATE: changed queries to not touch * values
To test:
1 - Checkout 19.11.x and reset_all
2 - Add a new patron category, itemtype, and branch to your system
3 - Create issuing rules using thise 3 values, and others
4 - Delete the new category, itemtype and branch
5 - Checkout master
6 - Restart_all
7 - updatedatabase
8 - you get errors
9 - repeat 1-5
10 - apply patch
11 - restart_all
12 - updatedatabase
13 - no errors!
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Wed, 4 Nov 2020 08:04:19 +0000 (09:04 +0100)]
Bug 26915: Fix FinePaymentAutoPopup behaviour
The behaviour of the syspref FinePaymentAutoPopup is broken, the popup
explodes with
Can't call method "unblessed" on an undefined value at /home/vagrant/kohaclone/members/printfeercpt.pl line 64
It has been broken by
commit a2449a81be55aa5b3710ca2c6df7884513f89540
Bug 23051: (follow-up) Add renewal feedback and move code to subroutines and test
which modified the return value of Koha::Account->pay (from $payment_id
to a hashref)
Test plan:
- To test activate FinePaymentAutoPopup
- Create a manual fee
- Write it off using the write off button on the account line (not below table)
=> Without the patch you get the error
=> With the patch applied the popup is correctly displayed
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>