Commit graph

4988 commits

Author SHA1 Message Date
bebe7a1c10 Bug 27947: (QA follow-up) Fix shipped notice
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-10-06 10:09:54 +02:00
924bcc5754 Bug 27947: DBRev 21.06.00.029
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-10-06 10:09:25 +02:00
c53a907c66 Bug 27947: (follow-up) Add OPAC cancellation as new reason too
Something that currently comes up now already too:
If the user cancels from the OPAC page, there is no reason in the notice.
We could simply add one now.

Test plan:
Run dbrev to add the OPAC authval.
Create new AR and cancel it from OPAC.
Verify notice created for the user.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-10-06 10:09:25 +02:00
6c76399c42 Bug 27947: (follow-up) Improve atomic update
We do not need to replace the whole notice text, we only need to
replace the reference to article_requests.notes.

Test plan:
Run the dbrev. Verify result for notice AR_CANCELED.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-10-06 10:09:25 +02:00
Agustin Moyano
1b73fac810 Bug 27947: Add authorised values list in article requests cancellation
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-10-06 10:09:25 +02:00
96b1c3fa00 Bug 27945: Don't save rule if not defined
The DB rev added a row with NULL (unlimited), and the UI a row with ''
(unlimited as well) when saved without value.

Better is to not have a row (still unlimited)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-10-05 11:45:20 +02:00
558977ac22 Bug 27945: Add max_daily_article_requests circulation rule
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-10-05 11:45:20 +02:00
7db474beff Bug 27944: DBRev 21.06.00.028
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-10-05 11:45:19 +02:00
504deebdfc Bug 27944: (QA follow-up) Make atomic update idempotent
This patch checks the DB structure to see if the status column
definition contains 'REQUESTED' as a valid ENUM value.

The script is also moved into the new style.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-10-05 10:58:14 +02:00
13b5908c87 Bug 27944: (follow-up) Move existing statuses, rename idempotent
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-10-05 10:58:14 +02:00
8e83e6d743 Bug 27944: (follow-up) Improving consistency between notice names
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-10-05 10:58:14 +02:00
Agustin Moyano
eb0423defe Bug 27944: Add AR_REQUESTED message in sample_notices.yml and modify AR_PENDING
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-10-05 10:58:14 +02:00
Agustin Moyano
2edfeb9e4d Bug 27944: Add new letter in atomicupdate, and modify status column in article_requests table
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-10-05 10:58:14 +02:00
aca4a76326 Bug 24387: Entries with parent are missing a code
We executed the same 2 queries, we want to adjust the code for the
parent and the language specific row.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-10-05 09:17:20 +02:00
fb1c0d483a Bug 29137: DBRev 21.06.00.027
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-10-01 16:28:55 +02:00
f8ecc6b700 Bug 29137: Add new syspref to disable AV creation within the cataloguing module
"I don't like this patch at all!"
"We will see a cataloger revolt if we do not find a way to make this
optional for catalogers."

I imagined a hord of catalogers running behind me and I got scared.

This patch will allow to turn the new feature added by bug 25728 off.

Test plan:
Confirm that the new CreateAVFromCataloguing will permit to turn the
feature off.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-10-01 16:09:55 +02:00
1e9c2afbb3 Bug 28772: DBRev 21.06.00.026
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-09-30 09:49:50 +02:00
6e4f334de9 Bug 28772: Do not hash secrets twice
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-09-30 09:19:05 +02:00
ad9bc3e8c7 Bug 28772: Update existing keys
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-09-30 09:19:05 +02:00
6ee9dcff44 Bug 28826: DBRev 21.06.00.025
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-09-29 12:47:33 +02:00
bc67449a46 Bug 28826: Add FacetOrder system preference
This bug adds a system preference to control ordering of facets and
adds the control to both Zebra and Elasticsearch

To test:
1 - Have a koha that can use both Zebra and ES
2 - Set 'displayFacetCount' to true
3 - Search in ES and Zebra
4 - Note facets in Zebra sorted alphabetically, ES by usage
5 - Apply patch, updatedatabase
6 - Search in ES and Zebra, facets are alphabetically sorted in both
7 - Find new syspref FacetOrder and set to 'by usage'
8 - Search in both engines, facets sorted by usage

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-09-29 11:34:21 +02:00
aa4d179256 Bug 29073: DBRev 21.06.00.024
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-09-28 15:12:44 +02:00
1b6ed8097e Bug 29073: Use 0 and 1 as values for DefaultHoldExpirationdate
DefaultHldexpirationDate is set in the pref screen to 'yes/no'

The code checks if the preference is 'true', 'no' is true

We should instead use 1/0

To test:
0 - Have a fresh devbox
1 - With syspref disabled, place a hold
2 - Note no expiration date set
3 - Enable the preference
4 - Place a hold and note the expiration date is set, good
5 - Disable the pref
6 - Place a hold and note the expiration date is set, bad
7 - Apply patch
8 - Update database
9 - Repeat 1-8, date not set when pref disabled

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-09-28 15:12:44 +02:00
c3b37d4e72 Bug 28534: DBRev 21.06.00.023
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-09-28 15:12:44 +02:00
16859016d3 Bug 28534: Atomic update to fix existing installs
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-09-28 12:31:44 +02:00
d99c977a30 Bug 28534: Fix engine for pending_offline_circulations table
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>

Bug 28534: (follow-up) Don't adjust original DB update

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-09-28 12:31:42 +02:00
80af49bcf7 Bug 28972: DBRev 21.06.00.022
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-09-20 14:04:48 +02:00
36a37b245d Bug 28972: Make DB rev idempotent
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-09-20 14:04:48 +02:00
7170fe2cc5 Bug 28972: Add missing foreign key constraints to holds queue table
The table tmp_holdsqueue is missing a couple key constraints that should
be there, one for biblio and one for borrowers.

Test Plan:
1) "SHOW CREATE TABLE tmp_holdsqueue;" should show no FKs for biblio or borrowers
2) Apply this patch
3) Run updatedatabase.pl
4) "SHOW CREATE TABLE tmp_holdsqueue;" should now show FKs for biblio or borrowers

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-09-20 14:04:48 +02:00
1fc2e3f7a5 Bug 28774: DBRev 21.06.00.021
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-08-31 10:27:52 +02:00
70d2deb103 Bug 28774: Don't store blank values for rental discount
This patch adds 'can_be_blank => 0' for the rentaldiscount rule to prevent
storing blank values in the database

Additionally, if there is no charge we do not need to check for a discount
and can simply return

To test:
1 - Set rental discount to "" to a rule in circulation rules
2 - Checkout an item that will follow this rule
3 - Check the intranet log:
    [WARN] Argument "" isn't numeric in subtraction (-) at /kohadevbox/koha/C4/Circulation.pm line 3385.
4 - Apply patch and restart all
5 - Update database
6 - Set the rule to "" again
7 - Check the DB, no rule is stored
    SELECT * FROM circulation_rules WHERE rule_name = 'rentaldiscount';
8 - Checkout the item again
9 - No warns in log

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-08-31 10:27:52 +02:00
9a56bf98c1 Bug 28373: DBRev 21.06.00.020
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-08-31 10:27:52 +02:00
192d5bf13b Bug 28373: Add warning if custom stylesheets are defined
This patch adds a check of the current XSLT prefs and warns to check the new pref
if any are not set to default

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-08-31 09:43:14 +02:00
fc20c964b0 Bug 28373: Add PassItemMarcToXSLT system preference
Default stylesheets do not reference item fields for XSLT display, however, we
spend time translating the values in the item fields.

This patch adds a system preference, PassItemMarcToXSLT. and unless enabled we remove
item fields before processing

To test:
1 - Perform some search on the staff client and opac
2 - Use the console (F12) to view the time spent on the network tab
3 - Note performance
4 - Apply patch, updatedatabase, restart_all
5 - Repeat searches
6 - Note that display has not changed
7 - Note performance, results should display slightly faster

Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-08-31 08:49:04 +02:00
1393e48d8e Bug 26302: (follow-up) DBRev 21.06.00.019
oops

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-08-30 18:06:42 +02:00
e52cc698fa Bug 26302: DBRev 21.06.00.019
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-08-30 17:09:31 +02:00
6d85e5c80b Bug 26302: (QA follow-up) Prefix prefs with OPAC
git grep -l "ResultsMaxItems" | xargs sed -i -e "/ResultsMaxItems/ s/ResultsMaxItems/OPACResultsMaxItems/g"

And line:
koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl:    <xsl:variable name="OPACResultsMaxItems" select="number(marc:sysprefs/marc:syspref[@name='resultsMaxItems']+0)"/>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-08-30 17:04:31 +02:00
7b9f0106a3 Bug 26302: Make syspref's names start with uppercase
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-08-30 17:04:31 +02:00
174554bb4d Bug 26302: (QA follow-up) Reset preference values
Mimic current behavior.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-08-30 17:04:31 +02:00
3d7b9c4438 Bug 26302: Add dbrev for two new prefs
Adding two prefs:
    resultsMaxItems
    resultsMaxItemsUnavailable

Test plan:
Check Preferences/OPAC/Appearance.

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: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-08-30 17:04:30 +02:00
2b083cb82a Bug 22690: DBRev 21.06.00.018
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-08-27 15:28:23 +02:00
8e19ecd51e Bug 22690: (QA follow-up) Add relationships to linktracker
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-08-27 11:02:41 +02:00
36ef9a219d Bug 28872: DBRev 21.06.00.017
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-08-19 10:01:19 +02:00
fc48decc31 Bug 28872: Fix QA issues on atomicupdate
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-08-19 10:01:19 +02:00
31c3455f8a Bug 28872: Atomicupdate to correct existing values
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-08-19 10:01:19 +02:00
8b0a44dcb5 Bug 25078: Explicitely return from DB revs to avoid warnings
% perl -wc installer/data/mysql/atomicupdate/skeleton.pl
Useless use of anonymous hash ({}) in void context at installer/data/mysql/atomicupdate/skeleton.pl

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-08-18 12:59:35 +02:00
29b79ce9c7 Bug 25078: Add exec flags
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-08-16 15:18:10 +02:00
42ce8c2996 Bug 25078: Don't process db revs if updatedatabase.pl failed
The updatedatebase stops when something wrong happens, we should not
continue to process the new DB revs (db_revs dir) in that case.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-08-16 11:55:56 +02:00
59439886c3 Bug 25078: Move skeleton file
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-08-16 11:55:56 +02:00
fd829dbdcb Bug 25078: Keep atomic updates in "atomicupdate" dir
The atomicupdate directory will contain all the atomic update files (old
and new version).
That will ease job for the RM and RMaints, no file (except skeletons)
must be in this directory before push.

This patch also fixes an inconsistency we had: the atomic update was run
before the other db revs on the UI but after when the CLI script was
used.

Now we make sure that the CLI does not deal with the atomic update files
when called from the installer (UI)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-08-16 11:55:56 +02:00