Commit graph

39602 commits

Author SHA1 Message Date
f1c2974d7b Bug 25969: Don't set itemnumber as reserve->itemnumber
When a hold is checked in at the wrong destination we revert the found status
For a title level hold this means we return it to a title level hold, with no itemnumber

When we checkin the item we find the hold, but won't set the itemnumber in the hold until it is confirmed

In the script we were setting the itemnumber param, but then setting it again using the reserve itemnumber.
In all conditions before the itemnumber has been set, we don't need to set it again, especially when we do
so incorrectly

To test:
- Log in at Library A
- Place hold on item at Library A, for pickup at Library A
- Check item in at Library A
- Click "Confirm hold"
- Set library to Library B
- Check item in again (try with both the box on reutrns.pl and the box in the header)
- Click "Confirm hold and transfer"
- get error: Can't call method "biblio" on an undefined value at /kohadevbox/koha/circ/returns.pl line 147
- apply patch
- repeat
- success!
- confirm trappings of holds works as normally otherwise too

Signed-off-by: Daniel Gaghan <daniel.gaghan@pueblolibrary.org>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-18 10:38:09 +02:00
40c5d06a50 Bug 25969: Checking in a found hold at a different branch then confirming the hold causes internal server error
If a record level hold is filled and waiting at Library A, and the item
is checked in at Library B, and an attempt is made to re-fill the hold
with the item, Koha will return an ISE.

Test Plan:
1) Place a hold for Library A, at Library A, for pickup at Library A
2) Check in the item at Library A and fill the hold so it is waiting at Library A
3) Log in as Library B, check in the same barcode
4) Note the request to fill the hold with the item
5) Choose to fill the hold
6) Note you get an internal server error
7) Apply this patch
8) Restart all the things!
9) Repeat steps 1-5
10) No ISE!

Signed-off-by: Daniel Gaghan <daniel.gaghan@pueblolibrary.org>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-18 10:38:09 +02:00
8e397330f6 Bug 26420: Use translated notices for overdue_notices.pl
This script does not pass the patron's preferred lang for notices.

Test plan:
Enable TranslateNotices
Create a patron with a preferred lang for notices != default
Translate ODUE for this language
Setup the overdue notices for this patron's category
Check an item out for this patron (select the correct due date to
trigger the notice)
Run the script overdue_notices.pl
Check the message_queue table and confirm that the notice enqueued is
translated

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-18 10:38:05 +02:00
89716a78e9 Bug 26269: Fix variable name mismatch for cash_register in paycollect
It appears that through various rebases the variable names in the form
and the controller script have become mismatched.  This patch corrects
the situation and clarifies their intended use.

Test plan:
1/ Turn on cash registers in sysprefs
2/ Define at least 2 cash registers in Admin
3/ Create a manual invoice on a patron
4/ Pay off half of your fee, selecting the first register
5/ Pay off the remaining fee, selecting the second register
6/ Query accountlines.register_id for your two payments
8/ Confirm the two accountlines.register_id's do not match (thus the
passed variable was used)

https://bugs.koha-community.org/show_bug.cgi?id=26469

Signed-off-by: Jessie Zairo <jzairo@bywatersolutions.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-18 10:38:04 +02:00
4b3657b3d6 Bug 26470: Store the item before calling the after action hook
This patch makes Koha::Item->store call $self->SUPER::store before
calling the hook, so things like the itemnumber (AUTO_INCREMENT field)
are available to the plugin hook.

It does so by storing the output on a temporary variable, to keep the
current behaviour of just returning the output from SUPER::store.

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t \
           t/db_dependent/Koha/Item.t \
           t/db_dependent/Koha/Items.t
=> FAIL: the hooks tests fail. Item.t hasn't been altered so should pass
3. Apply this patch
4. Repeat 2.
=> SUCCESS: Tests pass! Item.t as well! (i.e. no behaviour change)
5. Sign off :-D

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>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-18 10:38:01 +02:00
99a640fd75 Bug 26470: Regression tests
This patch tweaks the test plugin so it composes an exception based on
the fact that the hook was called with the item and item_id parameters
defined.

It then makes the tests expect a specific exception message with
information about this.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t
=> FAIL: Tests fail!

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>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-18 10:38:01 +02:00
15174e7bd3 Bug 26407: fix query in 'title exists' in search_for_data_inconsistencies.pl
Bug 23871 added check for 'title exists' to `search_for_data_inconsistencies.pl`.
There is a typo in DBIx query to create or : hashref instead of arrayref.

Test plan :
1) Change title of biblio record XXX in SQL :
   UPDATE biblio SET title = '' WHERE biblionumber=XXX
2) Change title of biblio record YYY in SQL :
   UPDATE biblio SET title = NULL WHERE biblionumber=YYY
3) Run misc/maintenance/search_for_data_inconsistencies.pl
4) Check you see both records

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>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-18 10:37:56 +02:00
4c8b0b9eb6 Bug 20168: Compiled CSS - RTL files
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-18 10:32:15 +02:00
51fd1db1cf Bug 26394: Update .mailmap
The .mailmap file used to generate the stats is different from the one we have in our repo. It's much more complete and should be integrated into Koha.

Test plan:
Confirm that the different mappings are correct

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>
2020-09-11 09:56:56 +02:00
3fb268cd4b Bug 26365: Remove comparison with 0000-00-00 for datecancellationprinted
Using MySQL 8:
t/db_dependent/Koha/Acquisition/Order.t .. 10/11 No method count found for Koha::Acquisition::Orders DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Incorrect DATE value: '0000-00-00' [for Statement "SELECT COUNT( * ) FROM `aqorders` `me` WHERE ( ( ( `datecancellationprinted` IS NULL OR `datecancellationprinted` = ? ) AND `ordernumber` IN ( ?, ?, ? ) ) )" with ParamValues: 0='0000-00-00', 1=23, 2=24, 3=25] at /kohadevbox/koha/Koha/Objects.pm line 597

We must remove the comparison with 0000-00-00

Highlighted by bug 23166.

I wanted to provide a DB rev but we (obviously) cannot:
MySQL [koha_kohadev]> UPDATE aqorders SET datecancellationprinted=NULL WHERE datecancellationprinted="0000-00-00";
ERROR 1292 (22007): Incorrect date value: '0000-00-00' for column 'datecancellationprinted' at row 1

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>
2020-09-11 09:56:56 +02:00
a1644cbf29 Bug 26384: (QA follow-up) Fix two exceptions
AuthUtils.t went back to 644, but should be 755
Adding an exception in the xt test for fix-old-fsf-address.exclude

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-11 09:56:56 +02:00
0ebe27c982 Bug 26384: Add test to catch for missing or extra execution flags
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>
2020-09-11 09:56:56 +02:00
f1f9c6dc74 Bug 26384: Fix executable flags
.pm must not have -x
.t must have -x
.pl must have -x

Test plan:
Apply only the first patch, run the tests and confirm that the failures
make sense
Apply this patch and confirm that the test now returns green

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-11 09:56:56 +02:00
ac304e93d8 Bug 26401: Remove xt/fix-old-fsf-address*
On bug 24545 we fixed all the license statements and added a QA check + a test in our test suite.
We do not longer need this script.

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>
2020-09-11 09:56:56 +02:00
67b30bc201 Bug 26007: (QA follow-up) Fix English yml file
git grep -l -E "link:\s*\"?[0-9]" | xargs sed -i -e "/link:/ s/130/\"Title-uniform\"/"
Only one occurrence without quotes around 130.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-11 09:56:56 +02:00
a259f6f53d Bug 26250: Fix regressions.t when SearchEngine=ES
Prior to this patch it failed with:
t/db_dependent/selenium/regressions.t .. 5/5 Can't call method "leader" on an undefined value at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch.pm line 548.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-10 10:41:32 +02:00
74dd083f8e Bug 23816: Fix selenium tests
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-10 10:07:05 +02:00
59b79b6045 Bug 23816: Fix patron edition
The patron edition was broken, we always got the pattern alert
Password:
Password must contain at least 8 characters, including UPPERCASE, lowercase and numbers

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-10 09:57:53 +02:00
de096ab200 Bug 26157: Correct two occurrences
We don't want to hide the warnings for all tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-09 16:31:07 +02:00
f3c199ac14 Bug 23816: DBRev 20.06.00.037
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-09 15:39:52 +02:00
Katrin Fischer
1a1402d066 Bug 23816: (QA follow-up) Use existing form validation to validate min password length
The pattern check didn't work for me, but I figured we might
want to use the same validation as for the other numeric fields
on the form instead (upper age limit, etc.)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-09 15:39:52 +02:00
Agustin Moyano
52deed335e Bug 23816: (follow-up) Fix many things
This patch:
 * reverts changes on misc/admin/set_password.pl
 * makes category param mandatory for AuthUtils::is_valid_password and AuthUtils::generate_password
 * changes onboarding.pl to set category param in AuthUtils::is_valid_password
 * Completes t/db_dependent/AuthUtils.t and drops t/AuthUtils.t
 * Removes offending <input type="number"/> and replaces it by <input type="text" inputmode="numeric" pattern="[0-9]*"/>

https://bugs.koha-community.org/show_bug.cgi?id=23826

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-09 15:39:52 +02:00
e85b200783 Bug 23816: trivial code simplification
Ease readability

Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>

https://bugs.koha-community.org/show_bug.cgi?id=23826

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-09 15:39:52 +02:00
15d83d4481 Bug 23816: Set default value in tests
We tell TestBuilder to generate the categories with NULL (and rely on
the sysprefs)

Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>

https://bugs.koha-community.org/show_bug.cgi?id=23826

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-09 15:39:52 +02:00
Agustin Moyano
5848da810e Bug 23816: Add minimum password length and require strong password overrides by category
This patch adds the capability to override minPasswordLenth and RequireStrongPassword settings by category

To test:
1. koha-shell kohadev
2. koha-mysql kohadev

3. drop database koha_kohadev;
4. create database koha_kohadev;

5. go to admin page and start webinstaller. There continue the steps until onboarding.
6. reach step 3 of onboarding and create a new administrator patron
CHECH => Password control woks as normal (Minimum length 3 and strong required)

7. finish Koha installation and enter admin with your new administrator
8. set minPasswordLength to 3 and RequireStrongPassword to “Don’t require”
9. Create a new category (CAT2 from now on.. CAT1 is the category you made in onboarding process) and set minimum password length to 8 and require strong password
10. Create two new patrons, one with CAT1(patron1) and one with CAT2 (patron2)
CHECK => In both cases, try different combinations of length and strength. For patron1 the only requirement is to have 3 letters, but for patron2 the minimum length will be 8 and will require strong password.
CHECK => Try changing patron category before saving. Password requirements will change with category change.

11. Edit CAT1 and set minimum password length to 5
12. Go to patron1 details page, and change password.
CHECH => Now password minimum length is 5, but still it doesn’t require strong password

13. Edit CAT1, leave blank minimum password length and set require strong password to yes.
14. Go to patron1 details page, and change password.
CHECH => Password minimum length is back to 3, but now strong password is required

15. Set minimum password length in CAT2 to 12.
16. Go to patron2 details page, and click to fill a random generated password
CHECK => generated password should be 12 characters length

17. Set PatronSelfRegistration to Allow in admin settings
18. Go to OPAC and fill self registration from.
CHECK => Play with patron category. For each change in category, password requirements are modified.
CHECK => Set CAT1 as patron category, set ‘aA1’ as password (or another valid password for CAT1) and before hitting submit button, change to CAT2. Form should enter invalid state, and CAT2 password requirements should be displayed as error in password input.

19. Create a patron for CAT1 and another for CAT2, leaving password blank
CHECK => For CAT1’s patron, generated password length is 8 (minimum length for generated passwords), but for CAT2’s patron should be 12

20. In admin set PatronSelfRegistrationVerifyByEmail to require
21. Fill self registration form again with CAT2 as category
CHECK => Password requirements works as previous case.
22. Leave password blank and click submit

23. select * from message_queue;
24. Copy the link in the message and paste it in OPAC
CHECH => Generated password is 12 characters long. (Copy user id for next steps)

25. In admin set OpacResetPassword to Allow
26. Go back to OPAC, reload and click on “Forgot password?” link
27. Paste user id and click submit
28. Repeat steps 23 and 24
CHECK => Info message says “Your password must contain at least 12 characters, including UPPERCASE, lowercase and numbers.”
CHECK => enter an invalid password and you’ll get the same message in warning.

29. Login OPAC with the last user and your newly created password
30. Go to “Change your password” option
CHECK => Info message says “Your password must contain at least 12 characters, including UPPERCASE, lowercase and numbers.”
CHECK => enter an invalid password and you’ll get the same message in below “New password” input.

31. prove t/db_dependent/AuthUtils.t t/db_dependent/Koha/Patron/Category.t

32. Sign off

Sponsored-by: Northeast Kansas Library - NEKLS

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-09 15:39:52 +02:00
Agustin Moyano
e14b779f38 Bug 23816: Add tests
Sponsored-by: Northeast Kansas Library - NEKLS

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-09 15:39:52 +02:00
Agustin Moyano
84004d0b3e Bug 23816: (follow-up) Define boolean column in shcema
Sponsored-by: Northeast Kansas Library - NEKLS

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-09 15:39:52 +02:00
Agustin Moyano
1be25ee439 Bug 23816: [DO NOT PUSH] Update category schema
Sponsored-by: Northeast Kansas Library - NEKLS

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-09 15:39:52 +02:00
Agustin Moyano
5f7142a890 Bug 23816: Update kohastructure and atomic update
Sponsored-by: Northeast Kansas Library - NEKLS

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-09 15:39:52 +02:00
6ae7a6f421 Bug 26285: Follow E.164 pattern for OPAC too
This patch uses the E.164 pattern for phone numbers
for the OPAC (and not just the staff interface).

To test:
0) Follow the same plan as the staff interface, but
go to /cgi-bin/koha/opac-messaging.pl after logging
into the OPAC

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-09 15:39:52 +02:00
b4d8180d82 Bug 26285: Follow E.164 pattern for validating SMS numbers
Currently, Koha is not correctly validating SMS numbers using
E.164. This causes Australian phone numbers without a country code
to fail validation.

This patch uses the E.164 pattern of 1-3 digits for country code,
prefixed by a + symbol, and followed by up to 12 digits for
the remainder of the phone number.

To test:

0. Don't apply patch yet
1. Set "SMSSendDriver" to "Anything"
2. Go to http://localhost:8081/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=51
3. Type in 0455555555 and note "Please enter a valid phone number." message in browser

6. Apply the patch

7. Go to http://localhost:8081/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=51
8. Type in 0455555555 and note no validation error
9. Type in +61455555555 and note no validation error
10. Type in 123456789012 and note no validation error
11. Type in 1234567890123 and note "Please enter a valid phone number." error
12. Type in +900123456789012 and note no validation error
13. Type in 900123456789012 and note "Please enter a valid phone number." error

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-09 15:39:52 +02:00
c95bb26327 Bug 26007: (QA follow-up) Remove message on marc_subfields_structure
Why? Since the combo has been disabled since a few releases. If you
want to change this mapping, you should do it on Koha to MARC mappings.
This change is no longer per framework, but over all frameworks.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-09 15:39:52 +02:00
a937895fda Bug 26007: (QA follow-up) Replace wrong link values from sql installer files
Field 943$a has link value "130". This does not work; 130 is not a search
index. It should be Title-uniform.
Note: Only used on a search link in the intranet MARC detail page.

In some cases "130" should be replaced by "Title-uniform", but sometimes
130 without quotes had to be replaced. Performed by two sed statements
on git grep results.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-09 15:39:51 +02:00
10d8f8ba93 Bug 26007: (QA follow-up) Add index name to the q parameter
The link constructed in MARC-detail is not consistent. It adds
an index name but does not show in the query in the search box.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-09 15:39:51 +02:00
Katrin Fischer
54941f8dc5 Bug 26007: Add/fix warning for changes to the Koha to MARC mappings
There are 2 pages where one can change the Koha to MARC mappings in Koha:

- When editing the configuration for a MARC subfield
- On administration > Koha 2 MARC mappings

This patch adds a warning that the batchRebuildBiblioTables script
must be run if the mapping is changed.

To test:
- Go to Administration > MARC bibliographic frameworks >
  Any framework > MARC structure > Any field > Edit subfield
- ÃThe hint about the batchRebuildBiblioTables will be on "Link"
  instead of "Koha Link". This is wrong as the link doesn't care
  about the mappings.
- Go to Administration > Koha to MARC mappings
- Verify there is no hint
- Apply patch
- Verify both pages now show an appropriate message

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
This commit message is not completely accurate. See the follow-ups.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-09 15:39:51 +02:00
763cc4eb2e Bug 26388: Do not show 'Renew all' or 'Renew selected' if no renewable items
Additionally, only include renewable items in 'Renew all'

To test:
1 - Check out some items to a patron, ideally:
    Some not renewable because set for auto renewal
    Some not renewable because of holds
    Some renewable
 2 - Confirm 'Renew selected' and 'Renew all' show on the opac
 3 - Click 'Renew all'
 4 - You get errors about the non-renewable items?
 5 - Check in all renewable items
 6 - Confirm you still see renew buttons
 7 - Apply patch
 8 - Refresh and you shoudl not see renew buttons
 9 - Check out a renewable item
10 - Click 'Renew all'
11 - Renewable item is renewed with no error
12 - Try again with 'Renew selected'
13 - Confirm it works as expected

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-09 15:39:51 +02:00
bdb64657f9 Bug 16314: Show upload link for upload plugin in basic MARC editor
This patch updates the basic MARC editor to provide a plugin name
variable to the template, allowing us to make a check on the name and
conditionally show an upload link if the "upload.pl" cataloging plugin
is selected.

To test, apply the patch and rebuild the staff client CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

 - Go do Administration -> MARC bibliographic framework -> MARC
   structure -> 856 -> Edit subfields.
 - Edit the "u" subfield and select "upload.pl" as the plugin under
   "Other options."
 - Go to Cataloging and create or edit a MARC record.
 - Under tab 8 look for the 856 tag, subfield u. There should be an
   "Upload" link corresponding to the form field.
 - Click the upload link to confirm that it triggers a popup window with
   the upload form.
 - Confirm that other similar plugin links (for instance 100$a, 600$a)
   display the old "tag editor" icon.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-09 15:39:51 +02:00
11da7051c2 Bug 24663: Fix one missing occurrence
pushed in the meanwhile

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-09 15:39:51 +02:00
f99976028c Bug 20168: Fix selenium tests
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-09 15:39:13 +02:00
886d570e26 Bug 20168: DBRev 20.06.00.036
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-09 14:34:06 +02:00
eb7a8db2c0 Bug 20168: Compiled CSS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-09 14:34:06 +02:00
94c6868118 Bug 20168: Remove li tags from OPACSearchForTitleIn for new installs
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-09 14:33:45 +02:00
221a40282c Bug 20168: Consider opaclayoutstylesheet empty if 'opac.css'
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-09 14:23:41 +02:00
00b1bf3c2c Bug 20168: (follow-up) Add automatic creation of RTL CSS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-09 14:13:09 +02:00
9cb89b4639 Bug 20168: Update of the OPAC bootstrap template to bootstrap v4
This patch updates the version of Bootstrap in the OPAC from 2.3.1 to
4.5.0. The Bootstrap JavaScript files have been replaced with custom
builds of the 4.5.0 JavaScript source files. The Bootstrap CSS is now
built into the OPAC CSS by loading the required Bootstrap 4.5.0 SCSS
files in node_modules.

OPAC SCSS now starts with Bootstrap customizations:

/* Bootstrap variable customizations */
$headings-color: #727272;
...

Followed by loading the necessary Bootstrap SCSS files:

/* Bootstrap imports */
@import "../../../../../node_modules/bootstrap/scss/functions";
@import "../../../../../node_modules/bootstrap/scss/variables";
...

Followed by our CSS. The build process for generating compiled CSS now
creates a file which bundles Bootstrap CSS and ours. Removed from the
Koha source: Bootstrap CSS files, Bootstrap "glyphicons" images.

The upgrade to Bootstrap 4 involved a lot of markup changes to conform
with new Bootstrap classes, especially in classes related to the grid.
Besides duplicating the grid we used before, this upgrade adds some new
features made possible by Bootstrap 4.5's use of flexbox as a layout
tool. This includes custom ordering of columns based on class names:
https://getbootstrap.com/docs/4.5/layout/grid/#order-classes.

Other areas where the most changes have been made: Navigation menus,
breadcrumb menus, buttons, dropdowns.

Bootstrap's JavaScript file is now "bootstrap.bundle.min.js" to reflect
the fact that a required JavaScript asset is now distributed separately
in Bootstrap 4. The "bundle" version includes Popper.js.

Unrelated changes: Indentation corrections, removal of invalid
"//<![CDATA[" markers, removal of invalid script type attributes.

To test, apply the patch and run 'yarn install' to install Bootstrap as
an npm module. Run 'yarn build --view opac' to regenerate the OPAC CSS.

Test as many aspect of the OPAC as possible, viewing pages at various
browser widths to confirm that everything adjusts well. Test with
various OPAC interface system preferences enabled and disabled.

Test self checkout and self checkin.

Known issues: RTL support has not been updated.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-09 14:13:03 +02:00
83ebab049d Bug 23682: DBRev 20.06.00.035
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-03 15:00:48 +02:00
e8a08cdfa7 Bug 23682: Fix use Koha::Plugins::Handler statements
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-03 15:00:48 +02:00
85405a2143 Bug 23682: Dedup plugin calls my moving to a single call in process_invoice()
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-03 15:00:48 +02:00
Katrin Fischer
2804d786c4 Bug 23682: INSERT IGORE systen preference in database update
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-03 15:00:48 +02:00
5d05feac31 Bug 23682: (QA follow-up) Fix typo in syspref description
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-03 15:00:48 +02:00