]> git.koha-community.org Git - koha.git/log
koha.git
4 years agoBug 20116: Prepare the ground
Jonathan Druart [Wed, 31 Jan 2018 17:36:22 +0000 (14:36 -0300)]
Bug 20116: Prepare the ground

Just refactoring to make the next patch more readable

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 25011: Improve display of MARC21 508 - Production credits in staff and OPAC
Katrin Fischer [Fri, 27 Mar 2020 22:48:56 +0000 (23:48 +0100)]
Bug 25011: Improve display of MARC21 508 - Production credits in staff and OPAC

Makes some tiny changes to improve display and consistency between
OPAC and staff:
- Capitalization fix: Production Credits - Production credits
- Changes div to span avoiding display issues
- Make sequence of fields in display match (505, 508, 586)

To test:
- Catalog one or more records with none, one and multiple 508 $a
- Check and compare the staff and OPAC detail pages, both
  should display the production credits information correctly

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 20101: Cronjob automatic_item_modification_by_age.pl does not log run in action...
Kyle M Hall [Tue, 30 Jan 2018 16:10:07 +0000 (11:10 -0500)]
Bug 20101: Cronjob automatic_item_modification_by_age.pl does not log run in action logs

C4::Log::cronlogaction() was never implemented in automatic_item_modification_by_age.pl.

Test Plan:
1) Apply this patch
2) Enable CronjobLog
3) Run automatic_item_modification_by_age.pl succesfully
4) Note the run is noted in the action logs

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 25086: DBRev 19.12.00.075
Martin Renvoize [Fri, 17 Apr 2020 08:13:13 +0000 (09:13 +0100)]
Bug 25086: DBRev 19.12.00.075

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 25086: Set changed_fields column as nullable
Agustin Moyano [Wed, 8 Apr 2020 19:53:43 +0000 (16:53 -0300)]
Bug 25086: Set changed_fields column as nullable

This patch changed_fields column as nullable.

To test:
1. Do not apply any patch
2. Set PatronSelfRegistrationVerifyByEmail preference to require
3. Fill self registration form in opac and submit
CHECK => OPAC dies with a nasty message, that says Field 'changed_fields' doesn't have a default value
4. Apply this patch and updatedatabase
5. Repeat step 3
SUCCESS => Registry process continues as expected
6. Sign off

Sponsored-by: Orex Digital
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 25147: (RM follow-up) Update pref references.
Martin Renvoize [Fri, 17 Apr 2020 08:02:58 +0000 (09:02 +0100)]
Bug 25147: (RM follow-up) Update pref references.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 25147: (RM follow-up) Update display
Martin Renvoize [Fri, 17 Apr 2020 07:30:40 +0000 (08:30 +0100)]
Bug 25147: (RM follow-up) Update display

I missed the display change in the preference name change.. oops.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 25147: DBRev 19.12.00.074
Martin Renvoize [Fri, 17 Apr 2020 07:24:57 +0000 (08:24 +0100)]
Bug 25147: DBRev 19.12.00.074

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 25147: Clarify section name
Martin Renvoize [Fri, 17 Apr 2020 07:18:44 +0000 (08:18 +0100)]
Bug 25147: Clarify section name

Clarify the preference section headings for Self-checkout and
Self-checkin.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 25147: Rename preference
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>
4 years agoBug 25152: (RM follow-up) Correction to update description
Martin Renvoize [Fri, 17 Apr 2020 06:55:09 +0000 (07:55 +0100)]
Bug 25152: (RM follow-up) Correction to update description

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 25147: AllowSelfCheckReturns is in the wrong system preference section
Martin Renvoize [Fri, 17 Apr 2020 06:51:16 +0000 (07:51 +0100)]
Bug 25147: AllowSelfCheckReturns is in the wrong system preference section

This reverts commit 8aa9f2cc078932a0a4db434f8bd793de29a8ff7b.

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>
4 years agoBug 25147: AllowSelfCheckReturns is in the wrong system preference section
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>
4 years agoBug 25136: Join the 2 ifs
Jonathan Druart [Thu, 16 Apr 2020 09:51:32 +0000 (11:51 +0200)]
Bug 25136: Join the 2 ifs

Highlight that we only need this for action="new"

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 25136: Make PatronSelfRegistrationLibraryList only effect new registration
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>
4 years agoBug 25007: (follow-up) Fix the way image check alters layout
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>
4 years agoBug 25007: Check for normaalized ISBN when building Amazon link
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>
4 years agoBug 25131: (QA follow-up) Move test for needs_install outside the plugin
Tomas Cohen Arazi [Wed, 15 Apr 2020 14:48:23 +0000 (11:48 -0300)]
Bug 25131: (QA follow-up) Move test for needs_install outside the plugin

This follow-up patch moves the check outside the register routine. The
Mojo plugin won't be loaded unless there's no need to install.

As the original tests rely on V1.pm to be able to load the plugin, they
are still valid, and they should still pass as there's no behaviour
change.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 25131: Skip loading API plugins if Koha is not installed
Tomas Cohen Arazi [Tue, 14 Apr 2020 19:24:38 +0000 (16:24 -0300)]
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>
4 years agoBug 25131: Regression tests
Tomas Cohen Arazi [Tue, 14 Apr 2020 19:24:33 +0000 (16:24 -0300)]
Bug 25131: Regression tests

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>
4 years agoBug 25131: Add C4::Context->needs_install
Tomas Cohen Arazi [Tue, 14 Apr 2020 19:21:37 +0000 (16:21 -0300)]
Bug 25131: Add C4::Context->needs_install

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>
4 years agoBug 24131: Prevent the first description to be displayed twice
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>
4 years agoBug 22887: Remove superfluous warn statements
Jonathan Druart [Wed, 15 Apr 2020 13:04:16 +0000 (15:04 +0200)]
Bug 22887: Remove superfluous warn statements

We print them in the description later

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 22887: Fix SQL syntax for MySQL 5.5
Jonathan Druart [Wed, 15 Apr 2020 13:03:15 +0000 (15:03 +0200)]
Bug 22887: Fix SQL syntax for MySQL 5.5

This does not happen on MySQL 8 or latest MariaDB, but does on MySQL 5.5

"Non-grouping field 'c' is used in  HAVING clause"

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 25152: DBRev 19.12.00.073
Martin Renvoize [Wed, 15 Apr 2020 11:37:24 +0000 (12:37 +0100)]
Bug 25152: DBRev 19.12.00.073

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 25152: Make subscription.closed tinyint(1)
Jonathan Druart [Wed, 15 Apr 2020 09:29:21 +0000 (11:29 +0200)]
Bug 25152: Make subscription.closed tinyint(1)

https://wiki.koha-community.org/wiki/Coding_Guidelines#SQL12:_Booleans

Boolean fields must be tinyint(1), not int(1)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 22468: Standardize on labelling ccode table columns as Collections
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>
4 years agoBug 24939: Fix capitalization of labels in sys pref editor
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>
4 years agoBug 24380: DBRev 19.12.00.072
Martin Renvoize [Wed, 15 Apr 2020 11:30:12 +0000 (12:30 +0100)]
Bug 24380: DBRev 19.12.00.072

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24380: (QA follow-up) Simplify condition
Jonathan Druart [Wed, 15 Apr 2020 10:44:47 +0000 (12:44 +0200)]
Bug 24380: (QA follow-up) Simplify condition

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24380: (QA follow-up) Do not use compare float with precision
Jonathan Druart [Wed, 15 Apr 2020 10:48:44 +0000 (12:48 +0200)]
Bug 24380: (QA follow-up) Do not use compare float with precision

Forbidden pattern: Do not use compare float with precision (bug 24408).

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24380: Add syspref CalculateFinesOnBackdate
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>
4 years agoBug 24380: Backdated returns do not update fines unless CalculateFinesOnReturn is...
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>
4 years agoBug 24380: Unit Test
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>
4 years agoBug 25120: Make accounting the default tab when opening the pref editor
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>
4 years agoBug 22784: (QA follow-up) booleans should be TINYINT
Tomas Cohen Arazi [Tue, 14 Apr 2020 20:02:24 +0000 (17:02 -0300)]
Bug 22784: (QA follow-up) booleans should be TINYINT

As per the coding guidelines, they should be TINYINT(1).

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24820: (RM follow-up) Fix test after switch to 'date' field
Martin Renvoize [Wed, 15 Apr 2020 10:51:12 +0000 (11:51 +0100)]
Bug 24820: (RM follow-up) Fix test after switch to 'date' field

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 25137: (bug 23084 follow-up) Fix incorrect grep ternary condition
Jonathan Druart [Tue, 14 Apr 2020 10:00:01 +0000 (12:00 +0200)]
Bug 25137: (bug 23084 follow-up) Fix incorrect grep ternary condition

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>
4 years agoBug 24820: Use 'date' instead of 'timestamp' for cashup
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>
4 years agoBug 25139: Corrections to date picker handling
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>
4 years agoBug 24697: Split items.uri on staff detail view
Marcel de Rooy [Thu, 20 Feb 2020 12:10:57 +0000 (12:10 +0000)]
Bug 24697: Split items.uri on staff detail view

If there are more URIs, we split on vertical bar and show the real URL
instead of duplicated text. Otherwise display depends on the pref
URLLinkText.

Test plan:
Create item with uri = A | B | C
Create another item with uri = D
Check the results on staff detail view (items table).

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>
4 years agoBug 22887: (RM follow-up) Fix Charges Test
Martin Renvoize [Tue, 14 Apr 2020 18:51:45 +0000 (19:51 +0100)]
Bug 22887: (RM follow-up) Fix Charges Test

The charges test added a duplicate authorised value needlessly (it's
already present in the sample data).

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 22887: DBRev 19.12.00.071
Martin Renvoize [Tue, 14 Apr 2020 16:21:25 +0000 (17:21 +0100)]
Bug 22887: DBRev 19.12.00.071

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 22887: Remove dup fr-FR for existing installs
Jonathan Druart [Tue, 14 Apr 2020 08:12:57 +0000 (10:12 +0200)]
Bug 22887: Remove dup fr-FR for existing installs

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 22887: Schema changes
Lari Taskula [Tue, 7 Apr 2020 11:47:44 +0000 (11:47 +0000)]
Bug 22887: Schema changes

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 22887: Rely on unique constraint in av admin
Jonathan Druart [Thu, 26 Mar 2020 09:29:11 +0000 (10:29 +0100)]
Bug 22887: Rely on unique constraint in av admin

Test plan:
Try to create 2 AV with the same code for the same category.
You should see a warning

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Lari Taskula <lari.taskula@hypernova.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 22887: Remove dup in fr-FR av.sql
Jonathan Druart [Thu, 26 Mar 2020 09:36:03 +0000 (10:36 +0100)]
Bug 22887: Remove dup in fr-FR av.sql

https://en.wikipedia.org/wiki/Cocos_(Keeling)_Islands
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Lari Taskula <lari.taskula@hypernova.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 22887: Warn if duplicates exist
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>
4 years agoBug 22887: Add unique constraint to authorised_values
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>
4 years agoBug 24620: Fix test, remove replaced code, use dt_from_string
Nick Clemens [Tue, 10 Mar 2020 11:12:07 +0000 (07:12 -0400)]
Bug 24620: Fix test, remove replaced code, use dt_from_string

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24620: Close existing transfers when setting item to waiting
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>
4 years agoBug 24620: Unit tests
Nick Clemens [Mon, 10 Feb 2020 18:18:45 +0000 (18:18 +0000)]
Bug 24620: Unit tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23571: (QA follow-up) Remove perlcritic warning
Jonathan Druart [Tue, 14 Apr 2020 08:18:31 +0000 (10:18 +0200)]
Bug 23571: (QA follow-up) Remove perlcritic warning

Bareword file handle opened at line 138, column 5.  See pages 202,204 of PBP.  (Severity: 5)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23571: (QA follow-up) Add missing newline in warning
Tomas Cohen Arazi [Mon, 13 Apr 2020 18:50:54 +0000 (15:50 -0300)]
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>
4 years agoBug 23571: Prevent concurrent execution of fines.pl
Tomas Cohen Arazi [Sun, 12 Apr 2020 13:27:57 +0000 (10:27 -0300)]
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>
4 years agoBug 25109: (QA follow-up) Add a test for lockdir writable in about.pl
Tomas Cohen Arazi [Mon, 13 Apr 2020 18:45:50 +0000 (15:45 -0300)]
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>
4 years agoBug 25109: (QA follow-up) Fix typo in configuration entry name
Tomas Cohen Arazi [Mon, 13 Apr 2020 15:02:29 +0000 (12:02 -0300)]
Bug 25109: (QA follow-up) Fix typo in configuration entry name

This patch fixes an error in the configuration retrieving line.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 25109: Add 'wait' tests
Tomas Cohen Arazi [Mon, 13 Apr 2020 11:43:10 +0000 (08:43 -0300)]
Bug 25109: Add 'wait' tests

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>
4 years agoBug 25109: Add ->new and ->lock_exec to Koha::Script
Tomas Cohen Arazi [Fri, 10 Apr 2020 22:37:31 +0000 (19:37 -0300)]
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>
4 years agoBug 25109: Add entry in about.pl about the configuration lockdir entry
Tomas Cohen Arazi [Fri, 10 Apr 2020 22:36:41 +0000 (19:36 -0300)]
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>
4 years agoBug 25109: Add lockdir configuration entry
Tomas Cohen Arazi [Fri, 10 Apr 2020 22:36:09 +0000 (19:36 -0300)]
Bug 25109: Add lockdir configuration 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>
4 years agoBug 23871: data inconsistencies - check title exists
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>
4 years agoBug 21865: allow test arg alone
Fridolin Somers [Wed, 11 Mar 2020 14:39:18 +0000 (17:39 +0300)]
Bug 21865: allow test arg alone

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>
4 years agoBug 21865: add confirm to remove_unused_authorities.pl script
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>
4 years agoBug 21865: ES compatiblity of remove_unused_authorities.pl
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>
4 years agoBug 21865: improve remove_unused_authorities.pl script
Fridolin Somers [Mon, 19 Nov 2018 13:46:05 +0000 (14:46 +0100)]
Bug 21865: improve remove_unused_authorities.pl script

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>
4 years agoBug 22774: DBRev 19.12.00.070
Martin Renvoize [Tue, 14 Apr 2020 15:52:49 +0000 (16:52 +0100)]
Bug 22774: DBRev 19.12.00.070

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 22774: (QA follow-up) Rephrase OPAC notes
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>
4 years agoBug 22774: (QA follow-up) Add syspref descriptions to database update and sysprefs.sql
Katrin Fischer [Mon, 13 Apr 2020 18:11:00 +0000 (20:11 +0200)]
Bug 22774: (QA follow-up) Add syspref descriptions to database update and sysprefs.sql

Moves the updatedatabase entry to the new format and
adds information for the explanation column of the
systempreferences table.

Also slightly rephrases the description in the system preference
editor.

To test:
- Verify database update still works the same with addition
  of explanations
- Verify the sys pref description makes sense

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 22774: (follow-up) Limit purchase suggestion in a specified time period
Nazlı Çetin [Mon, 23 Mar 2020 13:30:48 +0000 (13:30 +0000)]
Bug 22774: (follow-up) Limit purchase suggestion in a specified time period

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 22774: Limit Purchase Suggestion in a specified Time period
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>
4 years agoBug 22774: New systempreferences for suggestions added to sysprefs.sql
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>
4 years agoBug 20728: Remove the 2 GetLastOrder* subroutines
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>
4 years agoBug 20728: Replace the calls by their Koha::Acq::Orders->search equivalent
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>
4 years agoBug 20728: Proof that there is no cheating
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>
4 years agoBug 23591: Compiled CSS
Martin Renvoize [Tue, 14 Apr 2020 15:37:43 +0000 (16:37 +0100)]
Bug 23591: Compiled CSS

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23591: Hide archived suggestions
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>
4 years agoBug 23591: Use same css for suggestion notes
Jonathan Druart [Mon, 18 Nov 2019 15:37:43 +0000 (16:37 +0100)]
Bug 23591: Use same css for suggestion notes

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>
4 years agoBug 23591: Display a new "Suggestion detail" tab on the bib detail page
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>
4 years agoBug 23591: Add some useful methods to Koha::Suggestions
Jonathan Druart [Mon, 18 Nov 2019 14:52:57 +0000 (15:52 +0100)]
Bug 23591: Add some useful methods to Koha::Suggestions

Those are methods initially written for bug 23991. I finally need them
before than expected.

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>
4 years agoBug 23596: (follow-up) Add missing use statement and set correct variable name
Jonathan Druart [Mon, 17 Feb 2020 16:21:03 +0000 (17:21 +0100)]
Bug 23596: (follow-up) Add missing use statement and set correct variable name

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23596: Edit suggestion's reason when receiving
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>
4 years agoBug 25053: Clarify the description of syspref PatronSelfRegistrationExpireTemporaryAc...
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>
4 years agoBug 22784: DBRev 19.12.00.069
Martin Renvoize [Tue, 14 Apr 2020 15:25:31 +0000 (16:25 +0100)]
Bug 22784: DBRev 19.12.00.069

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 22784: Fix small display issue with fa icon in suggestions table
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>
4 years agoBug 22784: DBIC changes
Jonathan Druart [Fri, 27 Mar 2020 06:55:52 +0000 (07:55 +0100)]
Bug 22784: DBIC changes

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 22784: Add a cronjob to archive suggestions given age or status criteria
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>
4 years agoBug 22784: Do not display an empty table
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>
4 years agoBug 22784: Bugfix - do not modify #description build Debian packages from a git repos...
Jonathan Druart [Mon, 18 Nov 2019 13:56:05 +0000 (14:56 +0100)]
Bug 22784: Bugfix - do not modify #description build Debian packages from a git repository

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>
4 years agoBug 22784: Add the ability to archive/unarchive a purchase suggestions
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>
4 years agoBug 22784: DB Changes
Jonathan Druart [Wed, 13 Nov 2019 14:06:23 +0000 (15:06 +0100)]
Bug 22784: DB Changes

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>
4 years agoBug 24547: Add more action logs for holds
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>
4 years agoBug 21190: DBRev 19.12.00.068
Martin Renvoize [Tue, 14 Apr 2020 14:57:58 +0000 (15:57 +0100)]
Bug 21190: DBRev 19.12.00.068

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 21190: (follow-up) Save patron id in failure when available
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>
4 years agoBug 21190: Add tests for authentication success and failure
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>
4 years agoBug 21190: Allow browsing the system logs for AUTH events
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>
4 years agoBug 21190: Add authentication logging to checkpw
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>
4 years agoBug 21190: Introduce preferences AuthFailureLog and AuthSuccessLog
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>
4 years agoBug 21190: Remove t/Log.t
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>
4 years agoBug 21190: Add interfaces parameter to POD in C4::Logs
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>