Martin Renvoize [Fri, 17 Apr 2020 07:16:10 +0000 (08:16 +0100)]
Bug 25147: Rename preference
This patch renames the preference from the ambiguous 'AllowSelfCheckReturns'
to 'SCOAllowCheckin' which is more consistent with other preferences
affecting this module.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
I agree with the following comment and as such have reverted the patch.
Quoting Phil Ringnalda <phil@chetcolibrary.org>:
Everything currently in the chunk labelled "Self Checkout" is
preferences used to control sco-main.pl, a feature that does checkout
and renewal, and optionally with the preference AllSelfCheckReturns,
also checkin.
Everything currently in the chunk labelled "Self check-in module" is
preferences used to control sci-main.pl, a separate feature that does
only checkin, and does checkin whether or not AllowSelfCheckReturns is
set.
I'd think a better solution would be to either rename the preference,
which is actually AllowReturnsInSelfCheckout, or rename the chunks to
make it more clear that they are preferences for two different features.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
David Roberts [Wed, 15 Apr 2020 16:34:40 +0000 (16:34 +0000)]
Bug 25147: AllowSelfCheckReturns is in the wrong system preference section
This patch moves the AllowSelfCheckReturns system preference to the "Self check-in module" section of the Circulation system preferences.
To test:
1) Check that the AllowSelfCheckReturns system preference is currently
in the "Self Checkout" section of the Circulation system preferences.
2) Apply the patch
3) The preference should now be in the "Self check-in module" section of
the Circulation system preferences.
Signed-off-by: Devinim <kohadevinim@devinim.com.tr> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Lucas Gass [Wed, 15 Apr 2020 22:46:23 +0000 (22:46 +0000)]
Bug 25136: Make PatronSelfRegistrationLibraryList only effect new registration
This patch makes it so PatronSelfRegistrationLibraryList will only effect the registration from and not the modification form.
TO TEST:
1. Turn on self reg and add some libaries to PatronSelfRegistrationLibraryList.
2. Notice that the libaries that display in the borrower_branchcode dropdown are the ones you selected on both the new registration from and the modification form.
3. Apply patch.
4. Now only the new registration from should show libaries on PatronSelfRegistrationLibraryList.
5. The modifciation dropdown should still show all libraries.
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>
Owen Leonard [Sat, 28 Mar 2020 17:42:50 +0000 (17:42 +0000)]
Bug 25007: (follow-up) Fix the way image check alters layout
A question in the bug report asks: Why is is necessary to change the
Bootstrap class to col-xs-12? The JavaScript which checks for the
existence of an Amazon cover image is designed to remove the Amazon
cover's container if there is none. Changing the class of
cover image column is gone.
However, the check is incorrect because it doesn't account for Local
Covers. There might be both a 1 x 1 pixel Amazon image and a local cover
image, so the layout shouldn't be changed unless there are no images
present.
To test, apply the patch and view the bibliographic details page of
various titles including:
- Amazon cover present, no local cover
- No Amazon cover, local cover image present
- Both Amazon and local cover image
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>
Lucas Gass [Fri, 27 Mar 2020 20:40:30 +0000 (20:40 +0000)]
Bug 25007: Check for normaalized ISBN when building Amazon link
TO RECREATE:
-Have Amazon images turned on and local images too.
-Have a record with a local cover image
-Make sure the record has no ISBN in 020 field.
-Load detail page of that record and see that the local cover images is
not on the right hand side like it should be but forced underneath
'catalogue_detail_biblio' in an odd spot.
-Apply patch and reload page
-The image should be back in its normal spot
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> 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 25131: Skip loading API plugins if Koha is not installed
This patch adds a check on Koha being actually installed to the
PluginRoutes Mojolicious plugin.
If Koha is not installed, plugin routes won't be tried to get installed.
This has the effect of making the webinstaller functional again (when
enable_plugins is set to 1).
To test:
1. Apply the regression tests patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/REST/Plugin/PluginRoutes.t
=> FAIL: Tests fail!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Reset your working branch
6. Delete your database (e.g. in koha-testing-docker):
$ mysql -hdb -ppassword
> DROP DATABASE koha_kohadev;
> CREATE DATABASE koha_kohadev; \q
7. Set enable_plugins to 1 in koha-conf.xml
8. Restart all:
$ service memcached restart
$ koha-plack --restart kohadev
9. Open the staff interface
=> FAIL: Hangs, the logs show nasty errors (koha-plack-err)
10. Apply this patches
11. Restart all
12. Repeat 10
=> SUCCESS: The web installer shows up :-D
13. Sign off :-D
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: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This trivial patch adds a new convenient way to ask if Koha is
installed. It uses the same approach as C4::Auth:730
To test:
1. Apply this patch
2. Run:
$ kshell
k$ t/Context.t
=> SUCCESS: Tests pass!
3. Sign off :-D
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>
Jonathan Druart [Wed, 15 Apr 2020 13:17:11 +0000 (15:17 +0200)]
Bug 24131: Prevent the first description to be displayed twice
If there are several lines to display, the first one was displayed
twice:
Upgrade to 19.12.00.071 done [13:10:22]: Bug 22887 - Add unique constraint to authorised_values
- Add unique constraint to authorised_values
- WARNING - Cannot create unique constraint on authorised_value(category, authorised_value)
- The following entries are duplicated: COUNTRY:aaa (2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Katrin Fischer [Mon, 13 Apr 2020 02:32:56 +0000 (04:32 +0200)]
Bug 22468: Standardize on labelling ccode table columns as Collections
We now display the descriptions everywhere, so we should drop the
'code' from labels.
This changes text in a lot of playes in Koha, including:
- The relatives checkouts table when displayed for the guarantor
- The new order and order receive forms in acquisitoins (item creation)
- The description of CCODE in the authorised values table
- The column description on results in item search
- The branch tranfers page
- Course reserves: add reserve items (one and in batch)
- Patron account > statistics tab
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Katrin Fischer [Mon, 13 Apr 2020 02:18:36 +0000 (04:18 +0200)]
Bug 24939: Fix capitalization of labels in sys pref editor
The headings/labels of sections in the sys pref editor didn't follow
Koha's capitalization rules.
To test:
- Go to Administration > System preferences
- Check all tabs for the spelling of the headings
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Kyle M Hall [Wed, 8 Apr 2020 14:39:28 +0000 (10:39 -0400)]
Bug 24380: Add syspref CalculateFinesOnBackdate
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Kyle M Hall [Wed, 8 Jan 2020 20:27:31 +0000 (15:27 -0500)]
Bug 24380: Backdated returns do not update fines unless CalculateFinesOnReturn is enabled
In Koha 18.11 backdating a return triggered a recalculation of the fine. This was removed in bug 14591, and I believe it was in error. The bug report itself has no justification for the change in behavior.
Test Plan:
1) Disable CalculateFinesOnReturn
2) Backdate an overdue with fines, note the fine does not change
3) Apply this patch
4) Repeat step 2
5) The fine should be updated!
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Kyle M Hall [Wed, 22 Jan 2020 19:01:14 +0000 (14:01 -0500)]
Bug 24380: Unit Test
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Katrin Fischer [Sat, 11 Apr 2020 13:40:39 +0000 (13:40 +0000)]
Bug 25120: Make accounting the default tab when opening the pref editor
The default/active tab when opening the sys pref editor used
to be 'Acquisitions' as the first tab, but should now be the new
first 'Accounting'
To test:
- Go to Administration > System preferences
- Verify the Aquisition tab is second and preselected
- Apply patch
- Repeat
- Verify now Accounting is selected
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
The lack of parenthesis makes the condition evaluated wrong.
Test plan:
- confirm you have a branch with code X
- enter X in PatronSelfRegistrationLibraryList
- go to cgi-bin/koha/opac-memberentry.pl (either as a logged in patron or as a self-reg patron)
- confirm branch dropdown is not empty and contain X
- empty out PatronSelfRegistrationLibraryList
- reload cgi-bin/koha/opac-memberentry.pl and confirm branches show
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Fri, 6 Mar 2020 11:38:03 +0000 (11:38 +0000)]
Bug 24820: Use 'date' instead of 'timestamp' for cashup
Prior to this patch we were comparing cash register action timestamp to
accountlines date fields to fetch the list of outstanding accountlines.
accountlines.date is a transient field used as 'updated_on' and so this
was a logical mistake. We should be using the 'date' field which is
fixed 'created_on' time.
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>
Martin Renvoize [Tue, 14 Apr 2020 09:16:58 +0000 (10:16 +0100)]
Bug 25139: Corrections to date picker handling
It would appear one has to format the dates in the controller rather
than in the template for input fields.. I wasn't aware of this caveat
until now.
Test plan
1/ Prior to applying patch attempt to look at previous transactions
ensuring you enter a 'to' date.
2/ Note a catastrophic failure
3/ Apply patch
4/ Look at the same date range and note you no longer get a failure but
are instead faced with the requested transactions.
5/ Signoff
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>
Jonathan Druart [Thu, 26 Mar 2020 09:28:50 +0000 (10:28 +0100)]
Bug 22887: Warn if duplicates exist
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Fri, 10 May 2019 14:32:03 +0000 (15:32 +0100)]
Bug 22887: Add unique constraint to authorised_values
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Mon, 10 Feb 2020 18:19:07 +0000 (18:19 +0000)]
Bug 24620: Close existing transfers when setting item to waiting
This patch adds a clause in ModReserveAffect to check if there
are existing transfers and close them when setting a hold to waiting
To test:
1 - Set AutomaticItemReturn to Do
2 - Checkin an item from Library B at Library A
3 - Confirm item is in transfer (check the details page)
4 - Place a item level hold for pickup at library A
5 - Checkin the item at Library A
6 - Confirm the hold
7 - View the details page
8 - Note the item is in transit and waiting
9 - Apply patch
10 - Delete hold and repeat
11 - Confirm that transfer is closed when hold marked waiting
Signed-off-by: Sally <sally.healey@cheshirewestandchester.gov.uk> Signed-off-by: Stina Hallin <stina.hallin@ub.lu.se> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 23571: (QA follow-up) Add missing newline in warning
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 23571: Prevent concurrent execution of fines.pl
This patch introduces locking in fines.pl. It does so by leveraging on
bug 25109, which introduces a generic locking implementation on
Koha::Script.
The introduced changes:
1. Try to get the lock
2.a. If success, normal execution happens
2.b. If rejected, cronlogaction is called with a meaningful message and
a normal exit happens, so we don't flood the logs in vain. --verbose
will make the script print the same message on STDERR, as already is
the case with this script
To test:
1. Apply this patch
2. In two separate consoles run:
$ kshell
k$ perl misc/cronjobs/fines.pl --verbose
SUCCESS => The first one runs normally, the second one exists really fast
and prints a message about the lock.
3. Sign off :-D
Sponsored-by: Orex Digital Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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 25109: (QA follow-up) Add a test for lockdir writable in about.pl
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This simple patch introduces a test for the lock waiting scenario. It
replicates the previous tests, but calls a script that passes the wait
=> 1 parameter to ->lock_exec.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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 25109: Add ->new and ->lock_exec to Koha::Script
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 25109: Add entry in about.pl about the configuration lockdir entry
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>
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>
Fridolin Somers [Tue, 22 Oct 2019 12:31:08 +0000 (14:31 +0200)]
Bug 23871: data inconsistencies - check title exists
In biblio records, a field must be linked to biblio.title.
200$a in UNIMARC, 100$a MARC21 (and other).
If this field is undefined, some pages like checkouts table can fail.
Test plan :
1) Remove biblio title in SQL :
UPDATE biblio SET title='' WHERE biblionumber=XXX
2) Run misc/maintenance/search_for_data_inconsistencies.pl
3) You see the record as an inconsistency
4) Reset a title
UPDATE biblio SET title='50 shades of Grey' WHERE biblionumber=XXX
5) Run misc/maintenance/search_for_data_inconsistencies.pl
6) Record is no longer an inconsistency
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Fridolin Somers [Mon, 19 Nov 2018 14:45:49 +0000 (15:45 +0100)]
Bug 21865: add confirm to remove_unused_authorities.pl script
Like in most scripts in misc, add confirm argument
to ensure script is not run without knowing what it does.
Test plan:
1) Run misc/migration_tools/remove_unused_authorities.pl -h
2) You see help line for confirm
3) Run misc/migration_tools/remove_unused_authorities.pl
4) You see help and script does nothing
5) Run misc/migration_tools/remove_unused_authorities.pl -c
6) Script runs like wanted
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Fridolin Somers [Mon, 19 Nov 2018 14:19:46 +0000 (15:19 +0100)]
Bug 21865: ES compatiblity of remove_unused_authorities.pl
The script misc/migration_tools/remove_unused_authorities.pl directly checks if Zebra search is OK.
This patch changes so that this test is only if Zebra is the search engine.
It also adds a test on the search off any authority number indexed (index 'an').
With Zebra its : an,alwaysmatches=''
With ES its : an:*
This test ensure that biblios records are indexed and that not all autorities will be deleted.
Test plan:
1) On a catalog create a new authority
2) Use Zebra in systempreference SearchEngine
3) Stop Zebra server
4) Run misc/migration_tools/remove_unused_authorities.pl -c
5) The script does nothing and says :
Zebra server seems not to be available. This script needs Zebra runs.
6) Restart Zebra server
7) Delete biblio index base
8) Run misc/migration_tools/remove_unused_authorities.pl -c
9) The script does nothing and says :
Searching authority number in biblio records seems not to be available : an,alwaysmatches=''
10) Use ElasticSearch in systempreference SearchEngine
11) Delete biblio index base
12) Run misc/migration_tools/remove_unused_authorities.pl -c
13) The script does nothing and says :
Searching authority number in biblio records seems not to be available : an:*
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
remove_unused_authorities.pl script can be improved.
This patch changes changes verbosity so than test mode can be used
to know the autorities that are used and those that can be deleted.
It also writes a line in output if limited authority type(s).
This patch also removes the unused vars $thresholdmin and $thresholdmax.
It also changes the query to use SQL with parameters for authority types.
Test plan :
1) On a catalog create a new authority
2) Be sure catalog is well indexed
3) Run misc/migration_tools/remove_unused_authorities.pl -t
4) You will see the line :
*** Testing only, authorities will not be deleted. ***
5) You will see lines of :
authid=x type=y : used X time(s)
6) You will see the line for the authority created in 1) :
authid=x type=y : can be deleted
7) You will see at the end :
x authorities parsed
y can be deleted because unused
z unchanged because used
8) Run misc/migration_tools/remove_unused_authorities.pl
9) You don't see the line :
*** Testing only, authorities will not be deleted. ***
10) You will see lines of :
authid=x type=y : used X time(s)
11) You will see the line for the authority created in 1) :
authid=x type=y : deleted
12) You will see at the end :
x authorities parsed
y deleted because unused
z unchanged because used
13) Run misc/migration_tools/remove_unused_authorities.pl --auth NP --auth CO
14) You see the line :
Restricted to authority type(s) : NP,CO.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Katrin Fischer [Mon, 13 Apr 2020 18:28:06 +0000 (20:28 +0200)]
Bug 22774: (QA follow-up) Rephrase OPAC notes
I've changed the OPAC notes a little bit, main change is
the removal of the <b> tags used to highlight single words
in one sentence as they would result in splitting up the
sentence into multiple parts which makes proper translations really
hard.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Devinim [Thu, 9 Jan 2020 10:48:15 +0000 (10:48 +0000)]
Bug 22774: Limit Purchase Suggestion in a specified Time period
Test plan:
1 - Apply this patch
2 - Run updatedatabase.pl
3 - By default the preferences are blank and do not limit.
4 - Set the limits to 3 in 30 days
5 - Go to purchase suggestion page from OPAC as a logged in patron
6 - Place 3 suggestions and confirm you cannot place any more
7 - Alter one of the suggestions to have been made more than 30 days ago
UPDATE suggestions SET suggesteddate = '2020-01-01' WHERE suggestionid=3;
8 - Confirm you can place another suggestion
9 - Log out of OPAC
10 - Make sure AnonSyggestions is set to 'Allow' and AnonymousPatron is set
11 - Confirm anonymous suggestions are not limited by the syspref
12 - Confirm that a blank value in either MaxTotalSuggestions or NumberOfSuggestionDays does not limit suggestions
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Rhonda Kuiper <rkuiper@roundrocktexas.gov> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nazlı Çetin [Fri, 21 Feb 2020 14:08:16 +0000 (14:08 +0000)]
Bug 22774: New systempreferences for suggestions added to sysprefs.sql
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Fri, 15 Mar 2019 22:38:29 +0000 (19:38 -0300)]
Bug 20728: Remove the 2 GetLastOrder* subroutines
At this point the 2 subroutines are no longer in used.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Fri, 15 Mar 2019 22:37:52 +0000 (19:37 -0300)]
Bug 20728: Replace the calls by their Koha::Acq::Orders->search equivalent
There are 2 subroutines from C4::Acquisition that could be removed:
- GetLastOrderReceivedFromSubscriptionid
- GetLastOrderNotReceivedFromSubscriptionid
After bug 20726 only GetLastOrderReceivedFromSubscriptionid will be used
(from acqui/neworderempty.pl) and this call could be replaced easily with Koha::Acquisition::Orders
The code (+ tests) related to these 2 subroutines could then be removed.
The parameters for the search is basic and does no really deserve its own subroutine.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Fri, 15 Mar 2019 22:24:19 +0000 (19:24 -0300)]
Bug 20728: Proof that there is no cheating
To make sure the replacing code will acchieve the same things as the
actual one, we replace the raw SQL query with the DBIC version of it.
Then the tests will show us that they are equivalent.
Test plan:
Apply only this patch, run the tests, confirm they pass.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Tue, 19 Nov 2019 16:35:09 +0000 (17:35 +0100)]
Bug 23591: Hide archived suggestions
However we are adding a note on top of the table to tell how many
suggestions are archived. It seems that there is no good reason to
display the archived suggestions on this table.
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Mon, 18 Nov 2019 14:50:55 +0000 (15:50 +0100)]
Bug 23591: Display a new "Suggestion detail" tab on the bib detail page
This patch adds a new "Suggestion detail" tab on the bibliographic
detail page. It will help suggestion management.
Test plan:
- Create several suggestions for a given biblio
- Go to the detail page of the bibliographic record and confirm that
there is a new "Suggestion detail" tab with all the suggestions you
created.
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Fri, 8 Nov 2019 14:50:57 +0000 (15:50 +0100)]
Bug 23596: Edit suggestion's reason when receiving
This patch displays and let the librarian edit the suggestion.reason
information when receiving an order.
Note that if no reason was given the edit is not possible (easily
modifiable if needed but it seems that we do not want to display too
much details unnecessarily)
Test plan:
- Create a suggestion and fill the reason
- Create an order from this suggestion
- Close the basket and start receiving the order
=> The reason is displayed and editable
- Modify the reason and click Save
- Receive again
=> The reason has been correctly modified
- Play with the "Others..." option and give a specific reason
Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
David Roberts [Sat, 4 Apr 2020 23:13:00 +0000 (23:13 +0000)]
Bug 25053: Clarify the description of syspref PatronSelfRegistrationExpireTemporaryAccountsDelay
This patch changes the wording of this system preference.
To test:
1) Check the current wording of this system preference.
2) Install the patch.
3) Check that the wording of this system preference has changed to "Delete patrons still in the category indicated by PatronSelfRegistrationDefaultCategory X days after account creation."
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>
Katrin Fischer [Sat, 11 Apr 2020 09:39:31 +0000 (09:39 +0000)]
Bug 22784: Fix small display issue with fa icon in suggestions table
The <i> was not closed resulting in the "Archived" displaying in
the wrong font. Might be a browser specific issue, but adding the
closing </i> fixed it and follows the existing pattern.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Thu, 14 Nov 2019 15:41:40 +0000 (16:41 +0100)]
Bug 22784: Add a cronjob to archive suggestions given age or status criteria
In order to deal automatically with suggestions that need to be
archived, this cronjob will help to add the "archived" flag following
their age or status.
Test plan:
- Execute the script with the --help parameter and read the documentation.
- Does it make sense?
- Use it without the --confirm flag and try several combination
For instance you will want to archive suggestions that have been
rejected for more than a week:
perl misc/cronjobs/archive_purchase_suggestions.pl
--age-date-field=rejecteddate --age=weeks:1
or even suggestion that have been suggested for more than a year and
have a ORDERED status:
perl misc/cronjobs/archive_purchase_suggestions.pl
--age-date-field=suggesteddate --age=years:1 --status=ORDERED
- Use it with the --confirm flag and make sure the suggestions have been
archived.
Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Mon, 18 Nov 2019 14:16:24 +0000 (15:16 +0100)]
Bug 22784: Do not display an empty table
This is terrible and highlight that the whole script must be rewrite.
GetDistinctValues does not handle the "archived" flag (and we do not
want to put our hands there), so let's hack that and plan to rewrite the
whole script.
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Wed, 13 Nov 2019 15:34:56 +0000 (16:34 +0100)]
Bug 22784: Add the ability to archive/unarchive a purchase suggestions
There are performance issues when searching suggestions if there are
thousands of suggestions.
To prevent that we are going to add the ability to archive purchase
suggestions, in order to remove them from the search list (by default).
Test plan:
0. Apply all the patches, execute the updatedatabase.pl script, restart
all
1. Create some suggestions
2. Search for them
3. Use the "Archive" action button for one of them
4. Restart the search
=> The archived suggestion does no longer appear in the list
5. Use the filter "Included archived" in the "Suggestion information"
filter box
=> The archived suggestion is now displayed
6. Use other filters
=> The "archived" filter is kept from one search to another
7. Use one of the action at the bottom of the suggestion list (change
the status for instance)
=> The "archived" filter is still kept
Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Kyle M Hall [Thu, 30 Jan 2020 15:29:05 +0000 (10:29 -0500)]
Bug 24547: Add more action logs for holds
It seems like ModReserveFill and ModReserveAffect should both produce action logs for holds.
Test Plan:
1) Apply this patch
2) Place a hold
3) Check in the item to trap the hold
4) Check out the item to fill the hold
5) Check the action logs for that reserve id
6) Note the new logs!
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>
Marcel de Rooy [Thu, 30 Jan 2020 09:27:56 +0000 (09:27 +0000)]
Bug 21190: (follow-up) Save patron id in failure when available
The wrong password might belong to an existing user. If that is the case,
we have a $patron.
Note that logaction will save the object info but has no user in the
context environment for a failure.
Test plan:
Login with good user, bad pw and bad user, bad pw. Check logviewer.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Marcel de Rooy [Mon, 28 Oct 2019 10:06:11 +0000 (10:06 +0000)]
Bug 21190: Add tests for authentication success and failure
Test plan:
Run t/db_dependent/Log.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Marcel de Rooy [Fri, 25 Oct 2019 10:12:16 +0000 (10:12 +0000)]
Bug 21190: Allow browsing the system logs for AUTH events
Trivial change, adding AUTH to viewlog template only.
Test plan:
Look for the Authentication log lines in viewlog.pl (intranet tools).
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Marcel de Rooy [Fri, 25 Oct 2019 09:55:32 +0000 (09:55 +0000)]
Bug 21190: Add authentication logging to checkpw
Add optional logging for successful and failing login attempts in
checkpw.
Test plan:
Enable the preferences
Perform a good login and a bad attempt
Check action_logs
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Marcel de Rooy [Fri, 25 Oct 2019 09:36:03 +0000 (09:36 +0000)]
Bug 21190: Introduce preferences AuthFailureLog and AuthSuccessLog
Test plan:
Run atomic update.
Check the Logs tab of preferences.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Marcel de Rooy [Fri, 25 Oct 2019 08:21:20 +0000 (08:21 +0000)]
Bug 21190: Remove t/Log.t
Since we have t/db../Log.t and t/Log.t simply does nothing, we would
better remove it.
No test plan either :)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Marcel de Rooy [Fri, 25 Oct 2019 08:10:18 +0000 (08:10 +0000)]
Bug 21190: Add interfaces parameter to POD in C4::Logs
Just fixing documentation along the way.
No test plan, just read the patch.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Marcel de Rooy [Fri, 25 Oct 2019 07:32:56 +0000 (07:32 +0000)]
Bug 21190: Add subtest to Log.t for GDPR logging
Apart from a new subtest, doing some more cleanup:
[1] Copyright statement
[2] Removing the (unneeded) flush
[3] Removing C4::Log from the BEGIN block; we seem to skip that nowadays.
[4] $succes goes to the subtest, $schema and $dbh are global our vars.
Not required but just what we should do if it would run under Plack.
Test plan:
Run t/db_dependent/Log.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Marcel de Rooy [Fri, 25 Oct 2019 07:14:18 +0000 (07:14 +0000)]
Bug 21190: Prepare Log.t for further changes
This patch only makes cosmetic changes:
[1] It moves the existing tests at 'root level' inside a new subtest.
[2] It obviously adds indentation for step 1.
[3] It fixes some whitespace (tabs, space before newline)
Test plan:
Run t/db../Log.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Michal Denar <black23@gmail.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, 31 Mar 2020 14:39:12 +0000 (16:39 +0200)]
Bug 25027: Use localStorage instead of sessionStorage for results browser
Staff side, when a search a done and a result clicked, a browser appears
on the left, to navigate between the different results.
We use sessionStorage to know the list of biblionumber from the result.
As sessionStorage is only for the current tab, we do some ugly things,
to catch the click events, then open the new tab, attach it to the
current window, and put the focus back on the result list.
We really should not do that, and let the user decide what they want to
do with their clicks!
To do so, let use the correct storage, localStorage, and have the
results shared between the windows.
We may need to clear that at some point, isn't it?
Test plan:
Launch a search, click result (left or middle), confirm you see the
browser and that the window/tab opened like any other websites
(depending on your web browser settings).
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Thu, 2 Apr 2020 14:03:17 +0000 (16:03 +0200)]
Bug 25044: Remove the need to define koha_object[s]_class for standard object class names
In Koha::Object[s]->prefetch_whitelist, there is a call to the koha_object[s]_class DBIC resultset class. We should not, otherwise those 2 methods will have to be defined all the time, even when we can guess it easily.
Koha::Item <> Schema::Result::Item => standard
Koha::Acquisition::Order <> Schema::Result::Aqorder => non-standard
sub _get_object_class {
my ( $type ) = @_;
return unless $type;
Test plan:
% prove t/db_dependent/Koha/Object.t t/db_dependent/Koha/Objects.t
should return green before and after this patch
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>