Oliver Behnke [Fri, 7 Feb 2020 12:31:31 +0000 (12:31 +0000)]
Bug 16719: Pass through undef rather than empty string in LDAP mapping
Nullable DB fields should be passed null in cases where ldap fields are
empty and not replaced with empty strings.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Tue, 28 Jan 2020 14:05:35 +0000 (14:05 +0000)]
Bug 24525: Remove SIP payment types from point of sale
This patch removes the SIP payments types from displaying in the select
options on the point of sale payment page.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Thu, 14 Nov 2019 09:50:24 +0000 (10:50 +0100)]
Bug 23640: Flushing L1 on every SIP connection
This patch flushes the L1 cache on each SIP connection
(ie every invocation of process_request).
This means each SIP connection will fetch values from the
L2 cache (ie memcached) and persist the L1 cache (in Perl
memory cache) only until a new SIP connection comes in.
Without this patch, the L1 cache persists for the length
of the server process, which means the L1 cache will become
stale very quickly, which can lead to unexpected behaviour.
Test plan:
1. Enable IssueLog
2. Start SIP server
2a. change to Koha git directory
2b. koha-shell kohadev
2c. perl C4/SIP/SIPServer.pm /etc/koha/sites/kohadev/SIPconfig.xml
3. Issue book via SIP
(Note: After applying the patch, you have to restart the SIP server.)
Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Mon, 27 Jan 2020 14:56:35 +0000 (14:56 +0000)]
Bug 24482: Fix for formatted price issue with value over 1000
This patch for the point of sale feature fixes an issue where items for
purchase with a value of $1,000 or more break the payment calculations.
Test plan:
1) Enable the point of sale feature
(EnablePointOfSale + UseCashRegisters system preferences)
2) Add a cash register for a library
(Home > Point of sale > Cash registers > New cash register)
3) Create a purchase item with a cost of $1000
(Home > Point of sale > Purchase items > New debit type)
4) Go to to the point of sale page and attempt to sell one of your items
(Home > Point of sale > click 'Add' next to the item to purchase)
5) Note that Koha inserts a comma into the price in the list of items for
purchase
6) Note that the 'Amount being paid' changes to 0.00 instead of $1,000,
which affects the other calculations
7) Apply the patch
8) Repeat step 4
9) Amount being paid and other calculations should now be correct
10) Enter an amount for 'Collected from patron' and click 'Confirm'
check that the change calculation is correct.
11) Sign-off the patch!
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 24602: Make get_onshelfholds_policy fallback to 0
The onshelfholds circulation rules values are more of an ENUM type (as
opposed to other rules with integers like max*qty). In the
quantities cases, it makes sense to have undef mean unlimited. In the
enum type it is clearer to just set a default value (0) as the code
already expects (Note: undef and 0 both eval to false so there's no
behaviour problem, but warnings or we get forced to check for
defined when the rule is used. It seems trivial to just make the
rule fallback to a chosen default value).
This patch makes it fallback to 0.
To test:
1. Run:
$ kshell
k$ prove t/db_dependent/Koha/CirculationRules.t \
t/db_dependent/Reserves.t
=> FAIL: CirculationRules.t fails and Reserves.t prints a warning
2. Apply this patch
3. Repeat (1)
=> SUCCESS: Tests pass! No warning!
4. Sign off :-D
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Ths patch introduces tests for get_onshelf_policy.
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/CirculationRules.t
=> FAIL: Tests fail because the current code returns undef instead of 0
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
When a high enough number of forks try to access for example system
preferences with Koha::Cache using memcached as backend the results of
different cache requests get mixed up.
The problem is fixed by using Cache::Memcached::Fast::Safe that is a
fork safe version of Cache::Memcached::Fast.
Sponsored-by: The National Library of Finland Signed-off-by: David Cook <dcook@prosentient.com.au>
Works as described, and solves an insidious difficult to debug
problem in Koha.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 24554: Only embed relations from Koha::Biblio in to_api
This patch simplifies the behaviour of Koha::Biblio->to_api. It was
designed with the idea of handling possible methods that would be added
to Koha::Biblioitem. But it had a weird fallback behaviour was
highlighted by using it with bug 24528.
On fixing it it become obvious that it was unnessessarily complex and
that it was not worth. That's the reason there wasn't any test for it,
as Koha::Biblioitem doesn't implement any extra methods.
To test:
1. Run:
$ kshell
k$ prove t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat (1)
=> SUCCESS: Tests pass!
4. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Tue, 6 Aug 2019 13:56:44 +0000 (08:56 -0500)]
Bug 13420: Fallback to the previous behavior if published date is not used
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Mon, 29 Apr 2019 02:53:55 +0000 (22:53 -0400)]
Bug 13420: Sort "Serial enumeration" by published date
So far the sorting on volume information is incorrect. It sorts by the
string displayed in the cell, which may not have any logics.
A better solution would be to use Kyle's suggestion, see comments 7, 8,
but it will need much more work.
This patch suggests to use the publication date to sort this column.
Note: In the code there is a switch depending on the existence of
items.publisheddate, but I do not think it is valid, this valid should
always exist if the item is received (did I miss something?)
Test plan:
You need to have different existing subscription, using different
numbering.
On the detail page of the bibliographic record you should be able to
sort the serials (tab "Holdings") by "Serial enumeration".
The sort will now use the publication dates.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Katrin Fischer [Sat, 2 Nov 2019 06:39:28 +0000 (06:39 +0000)]
Bug 23784: Show subtitle, number and part in course reserve list of records
At the moment only the title will display in the course reserves
details, but not the information from other title fields. For
series with multiple volumes that can lead to confusing display.
The patch makes use of the new include to display 245$abnp.
To test:
- Add mulitple records to a course reserce course
Make sure you have some with different combinations of 245$b$n$p
- Look at the course details in the OPAC
- Verify only $a displays
- Apply patch
- Reload
- Verify now the full information displays
Depending on your installation, you might want ot check that the 245
are correctly mapped and save the record once so the database
fields are correctly filled.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Agustin Moyano [Mon, 21 Oct 2019 22:18:55 +0000 (19:18 -0300)]
Bug 23673: Add "Updated on" column to patron's notices
This patch adds "Updated on" column to patron's notices tab. It also adds logic to C4::Letters to retrieve updated_on column.
To test:
1. Apply patches.
2. Restart plack.
3. Choose a patron and add a purchase suggestion.
4. Change suggestion status.
5. Open patron's notifications.
CHECK => Messages table has now "Updated on" and "Time created" columns, and "Time" column is gone.
SUCCESS => There is a message with status pending, with a "time created" that equals "updated on"
6. Execute in the shell in Koha directory
$ ./misc/cronjobs/process_message_queue.pl
7. Open patron's notifications one more time.
SUCCESS => The message changed status. Time created remained the same, and now "updated on" has the current timestamp.
8. Resend the message and repeat sep 6.
SUCCESS => Every time you change the status, time created remains the same and updated on updates.
9. Run `prove t/db_dependant/Letters.t`
10. Sign off
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Agustin Moyano [Mon, 21 Oct 2019 20:29:44 +0000 (17:29 -0300)]
Bug 23673: Change DB Structure
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Fri, 17 Jan 2020 14:29:42 +0000 (14:29 +0000)]
Bug 24449: Add too_many_overdue to patron status for SIP
To test:
1 - Have sip running and use the cli to get info for a patron
example: perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su koha -sp koha -l CPL -m patron_status_request --patron koha
2 - Checkout an item to the patron, backdated so it is overdue
3 - Set syspref 'OverduesBlockCirc' to anything but "Don't Block"
4 - Get the patron status via SIP, note circ blocked flag is set, but too_many_overdue is not
5 - Apply patch
6 - Restart all the things
7 - Get the patron status via SIP
8 - Note the too_many_overdue flag is now triggered and there is a message
example: READ: 24Y Y 00120200117 142716AEEdna Acosta|AA23529001000463|BLY|CQN|BV0.25|AFGreetings from Koha. -- Patron has overdues -- Patron owes 0.25|AOCPL|
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Wed, 29 Jan 2020 13:18:20 +0000 (13:18 +0000)]
Bug 24529: Silence warnings for title level holds
This patch simply adds a test for itemnumber being defined in the
reserve before comparing it to silence the warning.
Test plan:
1) Prior to patch, run prove t/db_dependant/Circulation.t and note lots
of `Use of uninitialized value in numeric eq (==) at
/kohadevbox/koha/C4/Reserves.pm line 790` warnings.
2) Apply the patch, re-run the test and note the tests still pass but
the warnings are now gone.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Wed, 5 Feb 2020 09:36:14 +0000 (10:36 +0100)]
Bug 24590: Fix Koha/Object.t on MySQL 8
% prove t/db_dependent/Koha/Object.t
is failing on MySQL 8 with:
kohadev-koha@9bbf9ac68519:/kohadevbox/koha$ prove t/db_dependent/Koha/Object.t
t/db_dependent/Koha/Object.t .. 15/18
# Failed test 'Exception field is correct'
# at t/db_dependent/Koha/Object.t line 650.
# got: 'api_keys.secret'
# expected: 'secret'
# Looks like you failed 1 test of 16.
t/db_dependent/Koha/Object.t .. 16/18
# Failed test 'store() tests'
# at t/db_dependent/Koha/Object.t line 723.
MySQL 8 displays the tablename in the error.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Lucas Gass [Tue, 14 Jan 2020 15:40:38 +0000 (15:40 +0000)]
Bug 24420: Display waiting on hold items in the Cataloging search results Location column
To Test:
1. Place a hold on an item and trigger it.
2 Do a cataloging search that would include this record.
3. Notice that the 'Location' column does not account for this onhold
item.
4. Apply patch and look at catalog results again.
5. You should see information display about the item being on hold.
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick [Fri, 18 Oct 2019 18:26:38 +0000 (18:26 +0000)]
Bug 23844: Check if field defined in framework and specify 'Default' for framework
To test:
1 - Go to Cataloguing
2 - New from Z3950
3 - Find an import a record
4 - Check the plack logs:
Use of uninitialized value in string ne at /kohadevbox/koha/cataloguing/addbiblio.pl line 565.
Use of uninitialized value in string ne at /kohadevbox/koha/cataloguing/addbiblio.pl line 580.
Use of uninitialized value $frameworkcode in string eq at /kohadevbox/koha/cataloguing/addbiblio.pl line 711.
Use of uninitialized value $frameworkcode in string eq at /kohadevbox/koha/cataloguing/addbiblio.pl line 715.
Use of uninitialized value $frameworkcode in string eq at /kohadevbox/koha/cataloguing/addbiblio.pl line 734.
5 - Apply patch
6 - Repeat
7 - No new errors
8 - Confirm selecting 'Default' from 'New from Z3950' dropdown also generates no errors
Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Tue, 4 Feb 2020 14:16:26 +0000 (14:16 +0000)]
Bug 22302: Make ITEMTYPECAT descriptions fallback to lib description if no opac description
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Tue, 4 Feb 2020 14:15:36 +0000 (14:15 +0000)]
Bug 22302: Unit tests
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Tue, 28 Jan 2020 13:57:32 +0000 (13:57 +0000)]
Bug 24485: Allow hold when some can be overridden
The check to see if we can place a hold counts the number that we can override vs the number of items on the record.
We cannot override if we already have a hold on an item, however, we don't count these to see if they plus
the number of overrides equal the items on the record.
To test:
1 - Set max reserves to 2, allow 2 holds per recrod
2 - Place 2 holds for a patron on some records
3 - Find another record with 2 items
4 - Place a hold on the first item, you will be notified about the limit but you can override
5 - Attempt to place hold on second item, cannot be done, button disabled
6 - Apply patch
7 - Repeat
8 - You can place the second hold
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 19008: More database cleanups - item transfers
misc/cronjobs/cleanup_database.pl provides some database cleanup.
Yet some tables that could need cleanup are not in this script.
This patch adds cleanup for branchtransfers table.
Test plan :
- Count : select count(*),datearrived from branchtransfers group by datearrived;
- Run cleanup : misc/cronjobs/cleanup_database.pl -v --transfers 30
- Recount
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
misc/cronjobs/cleanup_database.pl provides some database cleanup.
Yet some tables that could need cleanup are not in this script.
This patch adds cleanup for old_reserves table.
Test plan :
- Count : select count(*),date(timestamp) from old_reserves group by date(timestamp);
- Run cleanup : misc/cronjobs/cleanup_database.pl -v --old-reserves 30
- Recount
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
misc/cronjobs/cleanup_database.pl provides some database cleanup.
Yet some tables that could need cleanup are not in this script.
This patch adds cleanup for old_issues table.
Test plan :
- Count : select count(*),date(timestamp) from old_issues group by date(timestamp);
- Run cleanup : misc/cronjobs/cleanup_database.pl -v --old-issues 30
- Recount
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 19008: More database cleanups - deleted patrons
misc/cronjobs/cleanup_database.pl provides some database cleanup.
Yet some tables that could need cleanup are not in this script.
This patch adds cleanup for deletedborrowers table.
Test plan :
- Count : select count(*),date(updated_on) from deletedborrowers group by date(updated_on);
- Run cleanup : misc/cronjobs/cleanup_database.pl -v --deleted-patrons 30
- Recount
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 19008: More database cleanups - deleted catalog
misc/cronjobs/cleanup_database.pl provides some database cleanup.
Yet some tables that could need cleanup are not in this script.
This patch adds cleanup for deleted catalog tables.
Note that deletedbiblio_metadata is managed by foreign key on biblionumber.
Test plan :
- Count :
select count(*),year(timestamp) from deleteditems group by year(timestamp);
select count(*),year(timestamp) from deletedbiblio group by year(timestamp);
select count(*),year(timestamp) from deletedbiblioitems group by year(timestamp);
- Run cleanup : misc/cronjobs/cleanup_database.pl -v --deleted-catalog 30
- Recount
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
misc/cronjobs/cleanup_database.pl provides some database cleanup.
Yet some tables that could need cleanup are not in this script.
This patch adds cleanup for statistics table.
Test plan :
- Count statistics : select count(*),date(datetime) from statistics group by date(datetime);
- Run cleanup : misc/cronjobs/cleanup_database.pl -v --statistics 30
- Recount statistics
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Wed, 29 Jan 2020 11:44:57 +0000 (12:44 +0100)]
Bug 21466: Keep all AVs for a given framework
There was a major (and silly) issue in the previous version, only one AV
was kept as we erased the hash value at the end of each iteration:
$invalid_locations_per_framework->{$framework->frameworkcode } =
{ items => $items, av_category => $mss->authorised_value, kohafield => $kohafield };
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Wed, 20 Nov 2019 17:00:52 +0000 (17:00 +0000)]
Bug 9993: On editing basket group delivery place resets to logged in branch
This patch modifies basketgroups.pl so that existing data about a basket
group's billing and delivery place are correctly preselected in the edit
form. These fields shouldn't reset to the logged-in user's home branch
just because they have an empty value.
To test, apply the patch and go to Acquisitions -> Vendor -> Basket
groups.
When adding or editing a basket group the pre-selected value for
"Billing place" and "Delivery place" should be correct:
- When creating a new basket group: The logged-in user's library
should be pre-selected.
- When editing a basket group which has a library defined for either
the billing or delivery places, the correct library should be
pre-selected.
- When editing a basket group which has no library defined for either
the billing or delivery place there should be no library
pre-selected (the "--" option should be pre-selected).
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Tue, 19 Nov 2019 17:02:02 +0000 (17:02 +0000)]
Bug 10879: OverDrive should check for OverDriveLibraryID before performing search
This patch modifies the OPAC search results template to check for three
populated system preferences before performing an OverDrive search:
OverDriveLibraryID, OverDriveClientKey, and OverDriveClientSecret.
Previously OverDriveLibraryID was not checked, but without it the
interface reports an error performing the search.
To test you must have credentials for the OverDrive API as defined
in OverDriveClientKey, OverDriveClientSecret, and OverDriveLibraryID
system preferences.
- With OverDriveLibraryID defined, the catalog search results page in
the OPAC should show a link to results in the library's OverDrive
collection.
- With no value in the OverDriveLibraryID preference the catalog
search page should not show any message about an OverDrive
collection.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Lucas Gass [Sat, 1 Feb 2020 16:42:10 +0000 (16:42 +0000)]
Bug 24560: Remove No public list text from OPAC
On the OPAC, the dropdown for Lists always includes
the heading Public Lists, even if no public lists exist.
This is sub-optimal for libraries that want VirtualShelves
enabled for private lists but don't want to use public lists.
TEST PLAN:
1. have no public list and look at the List dropdown on the OPAC. It says No Public Lists.
2. Apply patch
3. It should now not say anything about public lists but still be formatted nice.
4. Add some public lists and confirm that everything looks normal.
5. Sign off
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Tue, 10 Dec 2019 17:30:41 +0000 (17:30 +0000)]
Bug 23533: (follow-up) Add markup comments
This patch adds comments to the template to highlight the markup
structure.
This patch should have no effect on the interface or functionality.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Tue, 10 Dec 2019 16:34:56 +0000 (16:34 +0000)]
Bug 23533: Reindent patron entry form (memberentrygen.tt)
This patch re-indents the template for patron entry/editing. It
makes only whitespace changes. It should have no effect on the behavior
of the page.
To test, create or edit a patron.
Test every aspect of the process. At each step the page should work
correctly. Including:
- Adult patron
- Child patron
- Organizational patron
- Quick patron add
- Duplicate patron
- With mandatory fields
- With 'BorrowerUnwantedField's defined
- With ExtendedPatronAttributes enabled
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
David Roberts [Mon, 27 Jan 2020 15:41:32 +0000 (15:41 +0000)]
Bug 24490: Clarify wording and function of Purchase Items link on POS
This patch changes the wording of the links on the POS side menu
To test:
1) Apply the patch
2) Check that the links on the left hand side of the screen read "Configure cash registers" and "Configure items for purchase"
3) Click both links to ensure you are taken to the relevant config pages.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 24440: (follow-up) Make related objects prefetchable
This patch creates aliases for the relations used to retrieve the linked
objects from other tables. It makes the accessor names match the used
relation name, for consistency.
This is important for code trying to be smart and guessing what needs to
be prefetched, like the API code.
To test:
1. Run:
$ kshell
k$ prove t/db_dependent/Koha/Acquisition/Order.t
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat (1)
=> SUCCESS: Tests pass! No behaviour change
4. Verify the POD changes make sense
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 24440: Add ->current_holds to Koha::Acquisition::Order
This patch introduces a method to fetch the current holds associated with the
items linked to an order line. It basically implements what's done in
parcel.pl, but fully tested and suitable for using on the API.
To test:
1. Apply this patches
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Acquisition/Order.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Mon, 23 Dec 2019 13:06:06 +0000 (14:06 +0100)]
Bug 24171: Check auto_renew if confirmation is needed
Test plan:
Add some fines
Check auto_renew and check an item out, using a title keyword
Pick one item
You get the confirmation box
=> Notice that the auto_renew checkbox is checked
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Tue, 17 Dec 2019 11:10:28 +0000 (12:10 +0100)]
Bug 24171: Preserve auto_renew when triggering itemBarcodeFallbackSearch
The auto_renew parameter is not sent to the template when the popup
triggered by itemBarcodeFallbackSearch is displayed.
Test plan:
- Turn on itemBarcodeFallbackSearch
- Open a patron account
- Check the checkboxes for automatic-renewal
- Search for a title keyword in the checkout input box
- Verify that auto-renewal flag is set
Note for QA: The auto_renew flag will be set in any cases. Should we
expect regression?
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Joonas Kylmälä [Wed, 29 Jan 2020 14:06:00 +0000 (14:06 +0000)]
Bug 18936: (follow-up) Fix checkouts endpoint and its tests
- Fixes a bug caused by the refactoring in
Koha/REST/V1/Checkouts.pm (run the tests without this patch and you
will see the tests fails because 'rule_name' parameter was
forgotten).
- Changes the tests to use the new Koha::CirculationRule objects
instead of directly using issuingrules DB table
Signed-off-by: Minna Kivinen <minna.kivinen@hamk.fi> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Joonas Kylmälä [Tue, 28 Jan 2020 15:05:15 +0000 (15:05 +0000)]
Bug 18936: (follow-up) Make possible to have unlimited value for holds_per_day
Without this it is not possible to make for a specific patron category
or itemtype a more specific unlimited holds_per_day rule if you have a
catch all rule (categorycode = *, itemtype = *) with limited
holds_per_day value.
Signed-off-by: Minna Kivinen <minna.kivinen@hamk.fi> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Mon, 27 Jan 2020 09:13:44 +0000 (10:13 +0100)]
Bug 18936: (QA follow-up) Fix inconsistencies in IssuingRules.t
* get_effective_rule should not pass rule_value
* indentation fix
* add comment to list the rules we have when the test _is_row_match
is executed
* compare ->rule_name and ->rule_value returns
Signed-off-by: Minna Kivinen <minna.kivinen@hamk.fi> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Joonas Kylmälä [Wed, 22 Jan 2020 17:03:03 +0000 (19:03 +0200)]
Bug 18936: (follow-up) Add missing circulation rule to fix tests
The tests passed before by a chance because the default kohadevbox
installation script added a issuing rule that had lengthunit =
days. If you use a Koha version before the commits introduced by Bug
18936 you can reproduce the Fees.t tests failing by deleting all the
issuing rules from database with
> delete issuingrules;
and then running
$ prove t/db_dependent/Koha/Charges/Fees.t
Signed-off-by: Minna Kivinen <minna.kivinen@hamk.fi> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Wed, 22 Jan 2020 11:27:22 +0000 (12:27 +0100)]
Bug 18936: Fix some more tests
* CanItemBeReserved
Prior to "Bug 18936: Convert issuingrules fields to circulation_rules",
GetHoldRule returned holds_per_record even if no reservesallowed was
defined. This change restores this behavior.
FIXME Note: In GetHoldRule we return itemtype only if reservesallowed is set,
not sure it is correct.
* t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t
When setting returnbranch, holdallowed and hold_fulfillment_policy, we
should not provide categorycode.
* t/db_dependent/Holds.t
Prefer to keep the existing rules instead of removing them. It got quite
hard to understand what was going on here because of the mixup with
the rule reservesallowed that was in issuingrules, and the other rules
we used for the tests. Also, categorycode should not be passed to set
those 3 rules (holdallowed, hold_fulfillment_policy and returnbranch)
* t/db_dependent/Circulation.t
Setting lengthunit to 'hours', no need to make sure the rule has been
correctly be saved
* t/db_dependent/Circulation/CalcDateDue.t
It uses hardcoded data that is not in the sample data (categorycode=C).
Let use K that exists and postpone a refactore of the whole script (to
make it create the data it needs).
* t/db_dependent/Circulation/ReturnClaims.t
* t/db_dependent/Circulation/IssuingRules/maxsuspensiondays.t
Simple replace Koha::IssuingRule with Koha::CirculationRules
* t/db_dependent/Koha/Charges/Fees.t
=> FIXME Still failing, stuck here, need help
Signed-off-by: Minna Kivinen <minna.kivinen@hamk.fi> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Tue, 26 Nov 2019 11:00:52 +0000 (12:00 +0100)]
Bug 18936: fixes from comment #88
- holds per day are not transferred in database update (actually not
displayed)
- in note column, I can see link "view notes" even if there is no note
- No automatic renewal after (hard limit) does not respect dateformat
and is shown in iso format
Signed-off-by: Minna Kivinen <minna.kivinen@hamk.fi> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>