Commit graph

4791 commits

Author SHA1 Message Date
2f7d2e327c Bug 23091: Database update
This patch updates the 'refund' circulation rule to be called
'lostreturn' and populates the value with 'refund' where appropriate.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:55:17 +01:00
c0830466c1 Bug 24412: DBRev 20.06.00.061
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:55:17 +01:00
351eb6c26d Bug 24412: (QA follow-up) Change CASCADE DELETE to SET NULL
I don't believe waiting reserves should be removed if a desk is deleted,
we should instead simply unset the desk.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:55:17 +01:00
Nicolas Legrand
47b32572d4 Bug 24412: Attach waiting reserve to desk
When an item is checked in and marked 'Waiting' or already 'Waiting'
and there is a desk attached to the session, the item is marked
waiting at the current desk of the current library.

The information is displayed on the OPAC and on the intranet. The
patron can then know at which desk he can retrieve his document.

Desk Management (Bug 13881) is now useful.

Test plan :

1. apply Bug 24201
2. $KOHA_PATH/installer/data/mysql/updatedatabase.pl
3. Check out some document to someone
4. make another one reserve this document
5. check in the document
6. you can see the document is attach to the current library
7. create some desks and attach one to your session (see Bug 13881 and
Bug 24201)
8. cancel the preceding reserve and redo steps 3 to 5
9. you should see the document is waiting at the current library and
current desk on:
  a. the intranet document request page
  b. the intranet borrower holds tab
  c. the item list where the document is listed on the bibliographic
    details
  d. the borrower's OPAC holds tab.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Bug 24412: (follow-up) QA

Following Josef Moravec QA comments :

- rewrite Koha::Hold->desk according to Object Oriented Koha
Guidelines and use it to fetch desk name in various templates
- remove unused Desks.GetName
- Check for columns existence in db update

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Bug 24412: (follow-up) QA: useless change

Maybe it was a relic of something usefull... anyway
not anymore.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Bug 24412: (follow-up) Fix POD

Koha::Desk and not Koha::Library...

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:55:17 +01:00
Nicolas Legrand
d87090f3bb Bug 24412: kohastructure and atomic update
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:55:17 +01:00
6dd1dbc3a1 Bug 25334: DBRev 20.06.00.060
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-05 15:24:20 +01:00
946edb595b Bug 25334: Add generic 'phone' message transport type
As bug 25333 changed the 'phone' transport type to 'talkingtech', we can
now re-add 'phone' as a transport type again, and allow it to behave and
support the same notices as the email transport type.

Test Plan;
1) Apply this patch
2) Run updatedatabase
3) Restart all the things!
4) Disable TalkingTechItivaPhoneNotificationi if enabled
5) Enable new PhoneNotification system preference
6) Go to a patron's messaging preferences, not you can select the
   'phone' option for all the same notices as the 'email' option
7) Enable the phone option for all the message types
8) Browser to the Notices and slips editor
9) Add a phone notice version for each notice you wish to test
10) Test some notices ( CHECKIN, CHECKOUT, etc )
11) Notices should show in the patron's messages as 'phone' notices

Signed-off-by: Christopher Zorn <Christofer.Zorn@ajaxlibrary.ca>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-05 15:24:20 +01:00
31e38bc371 Bug 26911: (bug 18936 follow-up) Remove invalid data before copying the circ rules
UPDATE: changed queries to not touch * values

To test:
 1 - Checkout 19.11.x and reset_all
 2 - Add a new patron category, itemtype, and branch to your system
 3 - Create issuing rules using thise 3 values, and others
 4 - Delete the new category, itemtype and branch
 5 - Checkout master
 6 - Restart_all
 7 - updatedatabase
 8 - you get errors
 9 - repeat 1-5
10 - apply patch
11 - restart_all
12 - updatedatabase
13 - no errors!

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
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-11-05 15:24:20 +01:00
Katrin Fischer
a27c22bffc Bug 26718: Rename "reading history" to "checkout history"
This changes all occurences of reading history to the more
accurate term 'checokut history' as it was correctly pointed out
that 'reading' doesn't apply to all kind of items available
at the library (audio books, games, etc.)

To test:
- Verify that the term reding history has been replaced by checkout
  history in:
  - System preferences
  - OPAC tab "your checkout history"
  - OPAC tab "your privacy" (switch OpacPrivacy pref first)
  - Staff permission for patron batch anonymization

Signed-off-by: Barbara Johnson  <barbara.johnson@bedfordtx.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:33 +01:00
Tal Rogoff
0ddb841d22 Bug 26783: set OpacRenewalAllowed to "Allow" for new Koha installations
test plan:
1.Drop and recreate database
2.Go through web installer
3.Observe that "OpacRenewalAllowed" is set to "Don't Allow"
4.Apply patch
5.Repeat steps 1 and 2
6.Observe that "OpacRenewalAllowed" is now set to "Allow"

sponsored-by: Catalyst

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>
2020-11-04 12:59:33 +01:00
657df01fec Bug 19482: DBRev 20.06.00.059
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:33 +01:00
dcbc856b60 Bug 19482: (follow-up) Fix update, add tests, restore closing </td>
To test:
1 - View the mappings page, confirm table is correctly structured
2 - prove -v t/db_dependent/Koha/SearchEngine/Elasticsearch/ExportConfig.t t/db_dependent/Koha/SearchEngine/Elasticsearch/Reset.t t/db_dependent/Koha/SearchField.t
3 - Confirm update statement works and table is ordered correctly

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:33 +01:00
14f99da17c Bug 19482: DB changes
Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:33 +01:00
77365090f5 Bug 25333: DBRev 20.06.00.058
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:32 +01:00
ebbee18822 Bug 25333: Change message transport type for Talking Tech from "phone" to "itiva"
From its inception, phone notices via Talking Tech have not behaved like
other notices. Instead of reading notices generated by Koha, the Talking
Tech scripts largely generate their own notices.

We would like to pave the way to having "generic" phone notices that can
be processed by plugins to support arbitrary telephony vendors ( we will
be targeting Twilio initially ).

To that end, it seems sensible to begin by changing the messaage
transport type for Talking Tech from 'phone' to 'itiva' to
highlight its specificity and difference from standard message
transports.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Restart all the things!
4) Test Talking Tech outbound script
5) Note no changes in functionality

Signed-off-by: Christopher Zorn <Christofer.Zorn@ajaxlibrary.ca>

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

JD amended patch: remove uneeded indentation change in sample_notices_message_transports.sql

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:32 +01:00
c7938f5f86 Bug 26638: DBRev 20.06.00.057
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:32 +01:00
Katrin Fischer
76da06b6a3 Bug 26638: Remove unused system preference ArticleRequestsMandatoryFieldsItemsOnly
The preference was probably added because of a typo, as there is a
used system preference ArticleRequestsMandatoryFieldsItemOnly
(Item vs Items).

This patch fixes the situation:

- syspref.sql had the pref name with the typo, this is fixed.
- A database update removes the unused variable and makes sure
  the used one is added.

To test:
- Look at the local use system preferences, verify the false pref is there
- Look at the other ArticleRequests* preferences, verify the other without "s"
  is there
- Apply patch and run database update
- Verify the local use tab one is gone now

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:32 +01:00
Katrin Fischer
d80421ce85 Bug 11460: Remove MARC21 default mapping from itemcallnumber system preference
The mapping in the itemcallnumber system preference is only valid
for MARC21 libraries using DDC classification, but not for libraries
using UNIMARC or other classification.

This patch suggests to remove the default mapping and start new installations
with an empty value.

To test:
- On an emtpy database
- Apply patch
- Run the web installer, selecting either MARC21 or UNIMARC
- Verify that the itemcallnumber system preference is empty
- Verify the description now also include examples for UNIMARC

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-11-04 12:59:32 +01:00
507c9a6447 Bug 26853: DBRev 20.06.00.056
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-03 10:57:34 +01:00
e39b9684d5 Bug 26853: Harmonize import_biblios with biblio and biblioitems
This patch harmonizes the column datatypes of import_biblios
with biblio and biblioitems to prevent database errors which cause
staged MARC uploads to sometimes fail to update 100% correctly.

To test:
1. Go to http://localhost:8081/cgi-bin/koha/tools/stage-marc-import.pl
2. Upload a file with MARC records with titles longer than 128
characters long
3. Click "Stage for import"
4. Monitor /var/log/koha/kohadev/intranet-error.log for
database errors
5. Note that there are no database errors

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-11-03 09:12:38 +01:00
3df7a02d81 Bug 18050: move aqbudgetperiods table before aqbudgets, to fix sql error
00:02:16.310 koha_1       | DBD::mysql::st execute failed: Can't create table `koha_kohadev`.`aqbudgets` (errno: 150 "Foreign key constraint is incorrectly formed") at /usr/share/perl5/DBIx/RunSQL.pm line 278, <$args{...}> line 1.
00:02:16.310 koha_1       | Something went wrong loading file /kohadevbox/koha/installer/data/mysql/kohastructure.sql ([SQL ERROR]: CREATE TABLE `aqbudgets` ( -- information related to Funds
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2020-10-26 15:55:11 -03:00
7b8bcd9dc3 Bug 18050: DBRev 20.06.00.055
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:42 +01:00
Katrin Fischer
3c8bef50a2 Bug 18050: (QA follow-up) Adjust conditions and make use of message text
- When we run into invalid data, we use Augustin's suggested solution
  and copy the data into a separate table, setting the budget_period_id to
  NULL.
- We amend the output using the new $message.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:42 +01:00
Agustin Moyano
1193dddd8b Bug 18050: (follow-up) Force adding FK constraint
When there are inconsistent budget_period_id in aqbudgets this patch
creates the table _bug_18050_aqbudgets with the original data, then sets
the column to null and warns the user that there is inconsistent data.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:42 +01:00
Katrin Fischer
0ce62b29bf Bug 18050: Add FK constraint on aqbudgets.budget_period_id
This adds a FK constraint on aqbudgets.budget_period_id so that
a fund cannot be added with an invalid aqbudget.budget_period_id.

We should not have funds that belong to no budget. In case we have, the
update will be skipped and a note displayed.

Part1:
- Before applying the patch
- Make sure you have a budget with some funds linked to it
- You will have to change one of the funds to link to an invalid
  budget with SQL:
  UPDATE aqbudgets SET budget_period_id = 999 WHERE budget_id = max(budget_id);
- Apply patch
- Run updatedatabase - verify that you see the hint about 1 existing fund with invalid budget.
- Repair your fund with SQL
  UPDATE aqbudgets SET budget_period_id = ... WHERE budget_id = max(budget_id);
  (... needs to be your existing budget_period_id)
- Run updatedatabase again - verify it runs successfully now.
- If you try to change the budget_period_id to a non-existing now with SQL, you will
  get a database error. The new FK doesn't permit it.
Part 2:
- Start fresh with the web installer, verify there are no errors on
  creating the database tables

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:42 +01:00
22be7246e5 Bug 24972: Remove de-DE installer data
With installer data in YAML format and it's translations,
there are no need for localized installer files.

This patch removes de-DE installer files.

1) Apply the patch
2) Translate to de-DE
   cd misc/translator
   ./translate update de-DE
   ./translate install de-DE
3) Do a clean install using de-DE,
   check no problems during install
4) Verify MARC21 frameworks, they must
   be translated

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

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:42 +01:00
3a5d5367f1 Bug 25596: DBRev 20.06.00.054
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:41 +01:00
e3183de77b Bug 25596: Identify overpayment refunds for translation
This patch ensures we can uniquely identify automatic overpayment refund
credits from the accountlines by introducing a new account credit type
and adding appropriate translations for the new code.

Test plan
1/ You'll need an overpayment refund to start...
1a/ Issue yourself and item and set the date due early enough
to create an overdue fine for at least 2 days worth of overdue fines
1b/ Run the fines.pl script to add the fines
1c/ As a patron, pay off the accruing fine
1d/ Return the item ensuring you backdate it at least a day
1e/ Check that there is an 'Overpayment refund' credit on the patrons
account.
2/ Check that the overpayment string is translatable (i.e. it appears in
the accounts include file)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:41 +01:00
John Fawcett
3bd23a3287 Bug 26613: Fix it-IT unimarc_framework.sql installer file
This is really an installation issue, though at the
time of installation it did not result in any error.

During cataloguing in the items menu the "Type of item or material"
is not constrained by the itemtypes authorised_values (as it is for 942c records).

I have added the itemtypes to the installer sql in unimarc_framework.sql
as well as adding the description of this field for OPAC, which had been left empty.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:41 +01:00
John Fawcett
7c74c6636f Bug 26612: Error during web install for it-IT translation
Patch changes some of the values in the sql statement that inserts 307a
unimarc row into the marc_subfield_structure which created an SQL error
on installation.

The fields changed are:
- isurl now 0 instead of NULL,
- hidden now -5 instead of NULL,
- seealso empty string instead of NULL,
- link empty string instead of NULL.

These field values are now similar to the ones inserted for 306a or 308a.
The value that caused the SQL error was using NULL for hidden (due to
the NOT NULL constraint in the table definition).

I have tested the install with this change and found no issues.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:41 +01:00
4e865d9e72 Bug 26569: DBRev 20.06.00.053
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:41 +01:00
a96f5deef0 Bug 26569: Use gender neutral pronouns in system prefernece explanations
To test:
1 - perform query "select variable,explanation from systempreferences where explanation like '% his %';"
2 - find 6 sysprefs with gendered pronouns used in explanations
3 - apply patch, reset_all
4 - repeat query
5 - no more gendered pronouns!

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:04:18 +01:00
35a3b9e6b9 Bug 25460: Remove swp file
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-15 14:00:20 +02:00
dd05abf911 Bug 25460: DBRev 20.06.00.052
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-15 12:56:31 +02:00
ac1a8adba2 Bug 25460: Update OAI sets when adding/editing/deleting item records
Also adds syspref to optionally choose to embed item information in record when adding/editing bibliographic and item records.

Test plan:
1. Enable OAI-PMH and OAI-PMH:AutoUpdateSets sysprefs
2. Create a biblio record with 1 item with CCODE of NFIC
3. In Administration > OAI Sets configuration create a set and define
the mapping:
Field: 952, Subfield: 8, Operator: is equal to,  Value: FIC

4. Run the build_oai_sets.pl script:
 cd misc/migration_tools
 sudo koha-shell <instancename>
 ./build_oai_sets.pl -i

5. Check what items are in the OAI set:
sudo koha-mysql <instancename>
select * from oai_sets_biblios;

6. Observe your bib from step 2 is not in the set
7. [ITEM EDIT] Edit the item to have CCODE of FIC repeat step 5 and observe biblio is still not in OAI set
8. [ITEM ADD] Add a new item with CCODE of FIC and repeat step 5 and observe biblio
still not in OAI set
9. [ITEM DELETE] Delete one of your 2 items and repeat step 5 and observe biblio still
not in OAI set

10. Apply patch, update database and restart plack (instruction below on
the latter 2 actions):

cd installer/data/mysql
sudo koha-shell <instancename>
./updatedatabase.pl
sudo koha-plack --restart <instancename>

11. Enable new syspref OAI-PMH:AutoUpdateSetsEmbedItemData
12. [ITEM ADD] Repeat step 8 and observe biblio is now in the OAI set
13. [ITEM EDIT] Edit both items to have a CCODE of NFIC and repeat step 5 and
observe bib now not in set
14. [ITEM EDIT] Edit one of the items to have CCODE of FIC and repeat step 5
and observe bib now in set
15. [ITEM DELETE] Delete all items off bib and repeat step 5 and observe bib
no longer in set

Sponsored-By: Catalyst IT

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

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-15 12:56:30 +02:00
Julian Maurice
96cc447045 Bug 25898: Prohibit indirect object notation
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-15 12:56:30 +02:00
76eb46f25f Bug 12556: DBRev 20.06.00.051
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-14 14:50:07 +02:00
Joonas Kylmälä
0e1d291b14 Bug 12556: Add new "in processing" state to holds
This adds new syspref, HoldsNeedProcessingSIP, which controls whether
a hold that is related to item will be filled automatically or not. If
the user has enabled the syspref then instead of fulfilling the hold
automatically the hold will go to "in processing" state.

To test:
 1. Checkout a book to patron A
 2. Place a bib level hold to the book for B
 3. Patron A returns the book via SIP, to simulate this use:
        ./misc/sip_cli_emulator.pl -su koha -sp koha -l CPL -a 127.0.0.1 -p 6001 --item <ItemBarcode> -m checkin
 4. Notice that no notification is generated for Patron B about hold
    and that the hold status in intranet and opac is "In Processing".
 5. Notice that patron A (or other patrons) cannot checkout a book
    that is in processing, because it is considered to be attached to
    the holdee (similarly to the waiting state):
        ./misc/sip_cli_emulator.pl -su koha -sp koha -l CPL -a 127.0.0.1 -p 6001 --patron <PatronABarcode> --item <ItemBarcode> -m checkout

Signed-off-by: Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se>
Rebased-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-14 14:50:07 +02:00
119ddb6f12 Bug 19382: DBRev 20.06.00.050
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-14 14:50:07 +02:00
7a7a0a2474 Bug 19382: Add ability to block guarantees based on fees owed by guarantor and other guarantees
Some libraries would like to not only block the circulation of a guarantor based on fines owed by guarantees, but would also like to block circulation for all guarantees as well. Basically, if a family as a whole reaches a certain threshold of fines, the entire family will be blocked from checking out items.

Test Plan:
1) Apply this patch
2) Set NoIssuesChargeGuarantorsWithGuarantees to $14
3) Create a family of four ( 2 guarantors, 2 guarantees ) where the parents guarantee both children
4) Give 3 of the 4 a $5 fine
5) None of them should be able to check out items

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-14 14:50:07 +02:00
a15a7f5d81 Bug 23895: Move installer file into the mandatory directory
Prior to this patch we had a confusing situation, mandatory files were
in both installer/data/mysql and installer/data/mysql/mandatory
To make things clearer this patch move them all into the mandatory
subdir.
However kohastructure.sql stay in the "root" directory.

Test plan:
1. Drop and recreate your DB and use the installer to populate the DB
2. Use the merge request code from misc4dev to test the reset_all alias
3. Still with the merge request from misc4dev checkout master (you can
also try 19.11 and/or 19.05) and reset_all again
=> All the data from the SQL mandatory files must have been correctly
inserted into the DB

https://gitlab.com/koha-community/koha-misc4dev/-/issues/46

Note that this patch also remove the x flag for subtag_registry.sql

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>
2020-10-14 14:50:07 +02:00
Katrin Fischer
1cd2233173 Bug 26018: Fix frameworks errors with subfields in wrong tab
All subfields for a MARC21 field should always be in the same tab.
There were some mistakes found by the "MARC bibliographic framework
test" this fixes.

Before you apply the patch:
- Check the "MARC bibliographic framework test" page
- Ideally you should see the "wrong tab" mistakes
- Reset your db (reset_all) or drop your db and run the web installer
- Verify the page no longer points out any issues

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-14 11:47:57 +02:00
3611a2cd68 Bug 26145: DBRev 20.06.00.049
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-12 11:28:41 +02:00
7bc87ce75e Bug 26145: Refactoring - Move C4::Images to Koha::CoverImages
Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-12 11:28:41 +02:00
b6f5768145 Bug 26145: Refactoring - Rename table biblioimages to cover_images
Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-12 11:28:41 +02:00
ff17013a65 Bug 26145: DB changes - Add biblioimages.imagenumber
Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-12 11:28:41 +02:00
f8093f18d4 Bug 26529: DBRev 20.06.00.048
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-09 13:06:59 +02:00
da218a0d6f Bug 26529: Remove existing blank rules
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-09 13:06:59 +02:00
ab6494fc3d Bug 23420: DBRev 20.06.00.047
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-09 13:06:38 +02:00
12253d5382 Bug 23420: (QA follow-up) Remove AllowPurchaseSuggestionBranchChoice syspref
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-09 12:22:01 +02:00
b7d31ef16d Bug 23420: Add OPACSuggestionUnwantedFields system pref
To test:
-Apply patch
-Check OPACSuggestionUnwantedFields
-Check some fields as unwanted
-Go to the OPAC suggestion page and make sure these correct fields are hidden
-Turn on the system preference AllowPurchaseSuggestionBranchChoice to see the branch choice on the form
-Make sure you can correctly hide this one and still submit the purchase suggestion for without error.
-Go through each option and make sure it hides properly.

Note: You will only see the patron reason field when there are authorised values in the OPAC_SUG category

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-09 12:22:01 +02:00
48f9692edd Bug 13535: DBRev 20.06.00.046
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-08 16:18:19 +02:00
Katrin Fischer
ffd10c34e2 Bug 13535: Add FK constraint on borrowernumber to alert table
When a patron is deleted, we should clean up the data connected
to the patron. This includes subscriptions to 'new issue arrived'
arrive messages from the serials module.

To test:

Part1:
- Before applying the patch
- Add a subscription and select a notice template for patron notification
- Go to the OPAC and subscribe to the email alert
- Log in as any other patron (not yourself) and subscribe with that patron too
- Verfiy on the subscription detail page, that the patrons are subscribed
- Note the borrowernumber of your patrons
- Delete the second patron
- Note borrowernumber and delete patron
- Run: SELECT * from alert; in a report
- Despite the patron being deleted, you will see entries for both
- Apply patch
- Run updatedatabase - verify no error message
- Run updatedatabase again - verify still no error message
- There should no longer be an entry with the deleted borrowernumber,
  but only the entry for your own patron account
Part 2:
- Start fresh with the web installer, verify there are no errors on
  creating the database tables

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-10-08 16:18:18 +02:00
718fedcde8 Bug 22417: Correct DBRev bug number
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-05 15:32:21 +02:00
2e08fa0b18 Bug 15032: DBRev 20.06.00.045
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-05 15:30:08 +02:00
53ba2f3ffb Bug 22417: Add the new permission manage_background_jobs
QA: Please answer the question in admin/background_jobs.pl

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

Signed-off-by: David Cook <dcook@prosentient.com.au>

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-05 15:23:01 +02:00
df1b8db174 Bug 22417: UpdateDB entry
TODO:
- Add the FK on borrowernumber

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

Signed-off-by: David Cook <dcook@prosentient.com.au>

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-05 15:22:33 +02:00
a1cd243d9d Bug 22343: DBRev 20.06.00.044
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-02 15:27:18 +02:00
c9c1458df1 Bug 22343: (QA follow-up) Ensure FK names don't conflict
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-02 10:54:41 +02:00
1854d20b46 Bug 22343: Add parameters => manage_smtp_servers subpermission
This patch introduces a new subpermission for managing SMTP servers, for
granularity.

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>
2020-10-02 10:54:40 +02:00
c94e2b2e32 Bug 22343: Add a new table to store SMTP servers configs
This patch adds a new table to store SMTP servers configs.

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>
2020-10-02 10:54:40 +02:00
e4fa2eafda Bug 25261: DBRev 20.06.00.043
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 11:41:36 +02:00
54454554e9 Bug 25261: (follow-up) Rename CircConfirmParts to CircConfirmItemParts
This clarifies the preference name to make it clear we are talking about
the 'parts' that make up an 'item'. 'Part' is a well known term in
british english libraries and I think perhaps 'Materials' may be
confused with other terms?

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
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>
2020-10-01 10:33:10 +02:00
a6ca5a6e12 Bug 25261: Add system preference
Sponsored-by: Royal College of Music [https://www.rcm.ac.uk/]
Sponsored-by: PTFS Europe [https://ptfs-europe.com/]
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
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>
2020-10-01 10:33:10 +02:00
a51e442557 Bug 25776: DBRev 20.06.00.042
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:32:15 +02:00
Katrin Fischer
50877291b2 Bug 25776: Add a 'last updated' column for notices
This add an 'udated_on' column to the letter table and displays
the information in 'slips and notices'.

To test:
- Apply patch
- Run updatedatabase
  Note: the existing letters will all be set to the
  currnet date).
- Go to Tools > Notices and slips
- Verify there is a new column "Last updated" in the table
  Note: The table will always display the newest change date
  of the different message transport types.
- Edit any notice
- Verify the "Last updated" is shown for any transport type
  with an existing notice definition
- Edit and add a notice
- Verify the dates are correctly stored
- Test the column configuration for the new column works
  correctly

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-10-01 10:32:15 +02:00
90756266e6 Bug 26268: DBRev 20.06.00.041
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:32:15 +02:00
80da74f8d3 Bug 26268: Fix deleteditems query in DB rev
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:32:15 +02:00
Katrin Fischer
9625c409b4 Bug 26268: Remove invalid mappings from MARC frameworks when items.paidfor is removed
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-10-01 10:32:15 +02:00
Katrin Fischer
d93cbf75a4 Bug 26268: Correct mapping for internal note to items.itemnotes_nonpublic
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-10-01 10:32:15 +02:00
1758388045 Bug 26268: (QA follow-up) Conditionally remove
This patch adds conditions to prevent the removal of items.paidfor if it
is populated and also adds the removal fo the marc_subfield_structure
row if it exists.

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-10-01 10:32:15 +02:00
7d2b6a3f35 Bug 26268: (QA follow-up) Split DB update checks
This patch splits the DB update such that the 'paidfor' field is checked
for distinctly in the deleteditems table rather than assuming if it
exists in the items table it will also exist in deleteditems.

We also correct the check as highlights by Julian.

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-10-01 10:32:15 +02:00
f45b3b3f3a Bug 26268: Remove items.paidfor from the database
In bug 19919 we removed all references to setting, unsettling and
referring to the paidfor field but we neglected to actually drop the
field from the database (I think I intended to do this, but was asking
for feedback on the approach before adding the actual db change.. then
completely forgot when it went through SO/QA quickly).

In bug 23463 we inadvertently re-introduced some of the setting code
during a rebase.

In bug 18501 we then moved that inadvertently re-introduced setter into
Koha::Item->store.

We should kill it off once and for all!

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
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-10-01 10:32:15 +02:00
8a6427e9e2 Bug 26454: DBRev 20.06.00.040
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-30 17:30:13 +02:00
Timothy Alexis Vass
debf8f804c Bug 26454: Add system preference to set meta description for the OPAC
Websites should have a meta description tag that shows in search engine results.
The content should also be available to set as a system preference.

To test:
1) Look at opac-main source (in the browser) and see that meta name="description" is missing.
2) Apply patch.
3) Run: perl installer/data/mysql/updatedatabase.pl
4) Go to system preferences > OPAC and add a description to OpacMetaDescription.
5) Look at opac-main source and confirm that meta name="description" now has content equal to the text set in the OpacMetaDescription system preference.
6) Sign off.

Sponsored by: Lunds University Libraries
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised. Newlines are preserved. Double quote is rendered
as &quot;. Nice enhancement!
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-30 16:15:34 +02:00
e708566e72 Bug 26341: Database update for bug 21443 is not idempotent and will destroy settings
If the database update for bug 21443 is run, and the library changes any
of the hourly or daily rental fees following the calendar, a second run
of the database update will overwrite those changes.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-23 22:08:25 +02:00
d45a699975 Bug 19889: (follow-up 2) update DB adjustments
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-23 22:08:21 +02:00
3d06cbb55a Bug 19889: (follow-up) update DB adjustments
Fix fields order

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 11:50:54 +02:00
e7d1ffbad3 Bug 18958: DBRev 20.06.00.039
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-18 11:49:29 +02:00
Katrin Fischer
5cfbe318d8 Bug 18958: (QA follow-up) Add missing comma to kohastructure.sql
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

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 11:49:29 +02:00
0bfe336c7b Bug 18958: Make hold_fill_targets specific to reserves
After looking at Marcel's comments, the problem is in our matching
to hold_fill_targets - rather than adjusting to find filled/waiting holds we
could ensure that hold_fill_targets only refers to the specific hold it
is intended to

This patch is clearer, if slightly less performant than last (we now return all
the reserves and have to find the 'highest')

Test Plan:
 1 - Create and use a patron that can place multiple record level holds per record
 2 - Create a record with X items, each at a different library
 3 - Place X 'Next available' holds on the record for the patron using the 'Holds to place' box
 4 - perl misc/cronjobs/holds/build_holdsqueue.pl
 5 - Check in LibraryA's copy as LibraryA and confirm the hold
 6 - Revisit request.pl for the record, notice the next hold in line is now item-specific
 7 - Checkout the item to the patron, notice the remaining hold is marked waiting
 8 - Attempt to place another hold for your patron, notice that it requires an item-specific hold
 8 - Apply this patch
 9 - Repeat steps 1-5
10 - Revisit request.pl for the record, notice the next hold in line has *not* become item-specific
11 - Checkout the item to the patron, ensure the first hold is filled and the second remains record level
12 - Repeat whole test plan without building holds queue to confirm holds are still treated correctly

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

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

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 11:49:29 +02:00
76cff7e528 Bug 24807: DBRev 20.06.00.038
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-18 11:49:29 +02:00
David Gustafsson
22abdd8af6 Bug 24807: Add database update script
Signed-off-by: Nick Clemens <nick@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 11:21:31 +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
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
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
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
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
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
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
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
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
d8696702ce Bug 23682: Add ability to manually import EDI invoices as an alternative to automatic importing on download
Some library would like to delay the importing of invoices until
a time of their choosing. The invoices should be imported into
the database as they do now, but the invoice processing should
be skipped. Instead, any invoice file with a status of 'new'
should have an 'Import' button to process the invoice.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Enable the new syspref EdifactInvoiceImport
4) Run the edi cronjob to import a new invoice file
5) View EDI messages table at /acqui/edifactmsgs.pl
6) Note the invoice files is not processes, and retains the status of 'new'
7) Use the 'import' button to process the invoice
8) Note the invoice is now marked 'received' and the 'import' button is gone
9) Verify the invoice was actually processes

Signed-off-by: Debi Stears <DDStears@washoecounty.us>

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
8cbf2841ad Bug 24197: DBRev 20.06.00.034
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-03 15:00:48 +02:00
72deefe8cf Bug 24197: (QA follow-up) Shorten syspref name to AddressForFailedEmailNotices
If you define the address we use it, if not we fallback,
it's not really a redirect, and that just makes the name longer.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-03 14:18:23 +02:00
cb272f01f4 Bug 24197: (QA follow-up) Embelished syspref description
As requested, I have embelished the syspref description to more
accurately depict the fallback sequence for email delivery.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-03 14:18:23 +02:00
bed91ac8f7 Bug 24197: Changed use of 'branch' terminology to 'library'
Sponsored-by: Catalyst IT
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-03 14:18:23 +02:00
b48cdd227f Bug 24197: Added new local use syspref which sets the email address that failed overdue notices are set to.
Test plan:
1. Set no email addresses in patron record then checkout
items to the patron making the due date in the past

2. Visit patron's home library page: Administration > Libraries
Set a branch email and in global system preferences observe there is no syspref
named RedirectAddressForFailedOverdueNotices

3. Manually run overdue_notices.pl

4. Check the message_queue database table and observe there is a
print overdue notice and a email notice with to_address of the
branch email address

5. Apply patch

6. Run database update:
cd installer/data/mysql
sudo koha-shell <instance_name>
./updatedb.pl

7. Confirm there is a new system preference named:
RedirectAddressForFailedOverdueNotices

Give it a different email address to that in the branch email.

7. Repeat steps 1,3,4 and observe that the failed overdue notices have been
sent to the email defined in RedirectAddressForFailedOverdueNotices

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-03 14:18:23 +02:00
638786e719 Bug 24663: Remove authnotrequired if set to 0
It defaults to 0 in get_template_and_user

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-03 10:40:35 +02:00
db55279886 Bug 25360: (follow-up) Remove the https FIXME in Auth.pm
The FIXME is no longer valid since we fixed the X-Forwarded headers
for Plack. And since we do not even use using_https anymore in
the templates (see bug 21094).

Test plan:
Run Auth.t
Git grep for using_https

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-03 10:40:35 +02:00
f1658744c6 Bug 21066: Rename publicationdate with published_on
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-02 15:35:08 +02:00
bec601db34 Bug 21066: DBRev 20.06.00.033
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-02 15:35:08 +02:00
62acc69c71 Bug 21066: (QA follow-up) Check for field existence in db rev
Test plan:
Run the upgrade twice.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-02 15:35:05 +02:00
abf63eb93b Bug 21066: Update translated news and notices
Replace timestamp by publicationdate in translations.
Applies to sample notices and sample news.

Test plan:
Run a new install or pick a sql file and run it on cmdline.

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-02 14:49:26 +02:00
883d404a1a Bug 21066: Update English sample notices
Applies to sample notices and sample news.
Replace timestamp by publicationdate.

Also adjust notice in TemplateToolkit.t.

Test plan:
Run dbrev and verify if ISSUESLIP refers to opac_news.publicationdate.
Run t/db_dependent/Letters/TemplateToolkit.t

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-02 14:49:26 +02:00
9205bc1ec3 Bug 21066: Database revision
Change timestamp to publicationdate, add updated_on as 'real' timestamp.

Test plan:
Run install or upgrade. Check table opac_news.

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-02 12:24:33 +02:00
Katrin Fischer
c0adeab58f Bug 25448: Update German (de-DE) framework files
The updated files have been auto-generated based on the
po files and downloaded from
https://translate.koha-community.org/files/

To test:
- Make sure German language is installed, see:
  https://wiki.koha-community.org/wiki/Installation_of_additional_languages_for_OPAC_and_INTRANET_staff_client
- Run the web installer and choose de-DE
- Select all sample files
- Make sure they all install without any errors

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-01 16:10:50 +02:00
092276f53c Bug 19889: DBRev 20.06.00.032
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-31 16:17:58 +02:00
Agustin Moyano
05e5210194 Bug 19889: Add exclude_from_local_holds_priority columns to item, deleteditems and categories tables
Sponsored-by: Cooperative Information Network (CIN)

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-31 16:10:26 +02:00
Katrin Fischer
ed066caf58 Bug 26015: Terminology: Fix tons more staff clients to staff interfaces
This takes care of more occurences of staff client and changes it to
staff interface, including in code comments.

To test:
- I think in this case careful code review is what we look for.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-31 16:10:25 +02:00
8c92eda719 Bug 22789: DBRev 20.06.00.031
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-31 16:10:25 +02:00
Agustin Moyano
4b43c886a0 Bug 22789: (follow-up) Fix atomic update, GUI and more than one hold
This patch
* sets one check for reserves and another for old_reserves in
atomic update
* Adds a message below the checkbox and adds detail when a hold is non
  priority
* Fixes issue when there are more than one hold, but the first is non
  priority
* Adds test case for this last scenario

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-31 16:10:25 +02:00
Agustin Moyano
2c143ca460 Bug 22789: Add non_priority column to reserves and old_reserves
Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-31 16:10:25 +02:00
e7910c6740 Bug 20057: DBRev 20.06.00.030
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-31 16:10:25 +02:00
Katrin Fischer
5cb1d95b02 Bug 20057: Fix capitalization and rephrase system preference as a sentence
This makes changes to strings involved in this feature:
- Rephrases the system preference description into a sentence
- Rephrases message shown in OPAC on submitting (library has not actively
  approved, so just say that the record has been modified)

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-31 14:41:08 +02:00
David Gustafsson
b12198a53f Bug 20057: System preference for auto approval of patron profile changes
Testplan for this patch:

1. Apply patch.
2. Make sure syspref "AutoApprovePatronProfileSettings" is set to "Disable".
3. Edit patron personal details via opac interface.
4. Expect modifications to require manual approval by staff via link on main page.
5. Set syspref "AutoApprovePatronProfileSettings" to "Enable".
6. Edit patron personal details via OPAC interface again.
7. Expect modifications to have been approved automatically.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
This works, we may want some different text for this situation in the OPAC, it still says the librarian has to approve the change.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-31 14:41:08 +02:00
Katrin Fischer
ef3b7eedc0 Bug 25129: Update German (de-DE) web installer sample files for 20.05
This translates the new notices and CSV profie for late orders,
makes some minor changes to the patron category descriptions
and numbering patterin labelling.

To test:
- Make sure German language is installed, see:
  https://wiki.koha-community.org/wiki/Installation_of_additional_languages_for_OPAC_and_INTRANET_staff_client
- Run the web installer and choose de-DE
- Select all sample files
- Make sure they all install without any errors

Bonus:
- If you can speak German, you can check the translations as well :)

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-26 15:21:41 +02:00
0d64db87d7 Bug 25534: DBRev 20.06.00.029
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-25 15:07:28 +02:00
0a7e3a264e Bug 25534: (QA follow-up) Add sample notices for translators
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-25 15:07:28 +02:00
ab1d71c53d Bug 25534: (QA follow-up) Add default values for new AV category
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Bug 25534: (QA follow-up) Removed doubled insert statements in de-DE/optional/auth_val.sql

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-25 15:07:28 +02:00
57bbb2861f Bug 25534: (QA follow-up) Add AV category
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-25 15:07:28 +02:00
a6042768ac Bug 25534: (QA follow-up) Add sample notice
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-25 15:07:28 +02:00
f840342c0a Bug 25534: Update database
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-25 15:07:27 +02:00
385a4cba44 Bug 25958: DBRev 20.06.00.028
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-25 15:07:27 +02:00
48edb29471 Bug 25958: Allow LongOverdue cron to exclude specified lost values
When lost items are not marked as returned, they are still subject to
the long overdue cron, so an item that has already been marked Lost may
automatically roll to Long Overdue. In some cases, a library may not
want that lost value to change. This becomes especially important with
the introduction of Claims Returned, which uses a variety of lost.

Test Plan:
1) Set up a long overdue item that would be moved to lost by longoverdue.pl
2) Run the cronjob with the new --skip-lost-value option
3) Note the item is not altered
4) Include that value in the new system preference DefaultLongOverdueSkipLostStatuses
5) Run the cronjob *without* the new option
6) Note the item is not altered
7) Run the cronjob again with the new command line option, but set it to
a different value so the item will be affected
8) Note the item is altered as it would have been before this patch was
applied

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-25 12:01:43 +02:00
0bac48e776 Bug 8732: DBRev 20.06.00.027
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-24 12:30:52 +02:00
329582b7f7 Bug 8732: Update statement
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-24 12:10:53 +02:00
Chris Cormack
782688a7cd Bug 8732: Allowing biblio level itemtypes to display instead of MARC ones
This patchset adds a new syspref: BiblioItemtypeInfo

If you set BiblioItemtypeInfo to Koha, you will see the Koha
record level itemtype info. This info is also shown if item-level_itypes
is set to biblio

Display of icons are controlled by
noItemTypeImages/OpacnoItemTypeImages

Material type display is controlled by DisplayIconsXSLT/DisplayOPACIconsXSLT

To test:
 1 - Apply patch
 2 - Update database
 3 - Do an opac search and view results
 4 - Switch pref to 'Koha' and refresh
 5 - Note itemtypes appear
 6 - Click in to a record details
 7 - Note you see itemtype and icon
 8 - Switch the pref
 9 - Note you don't see record level itemtype and icon
10 - Repeat in staff interface

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-08-24 12:10:53 +02:00
Bernardo Gonzalez Kriegel
74a13ab801 Bug 24973: Load custom localization file
It adds a new localization directory that could
host a custom SQL file for each language,
xx-YY/custom.sql

This will be the last file to be loaded at
install time, it can be used to set any difference
from default values.

It can't be deselected at install time.

Moved corresponding files for de-DE, it-IT,
nb-NO and completed es-ES

To test:
1) Apply the patch
2) Install es-ES/de-DE/it-IT/nb-NO translation (any lang)
   ( cd misc/translation; ./translate install es-ES )
3) Do a clean install using es-ES
4) After all files have been loaded check:
    * A new section labeled "Localization data added"
      with one file, custom.sql
    * Inspect the value of FrameworksLoaded syspref,
      last entry must be custom.sql
5) Remove/rename the file or localization dir and
   repeat 3/4, install must proceed normally

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>
2020-08-24 12:10:53 +02:00
37d13fb07d Bug 19036: DBRev 20.06.00.026
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-20 12:31:59 +02:00
Julian Maurice
58edcef03d Bug 19036: Add ability to enable credit number for only some credit types
This feature is disabled by default for all credit types. To enable it
you have to set the syspref AutoCreditNumber to the value of your choice
and then enable the feature for each credit type you want.
System credit types can be modified too (but only this particular field
can be modified)

Also, throw an exception when the feature is enabled and a value for
credit_number has already been set

Updated test plan:
Test plan:
0. Apply patch, run updatedatabase and update_dbix_class_files
1. Go to Admin » Column settings, and uncheck the 'hidden' box for
   column credit_number in table account-fines. It will be easier for
   testing
2. Create a manual credit for a borrower. Verify in Transactions tab
   that this credit has no number generated
3. In Admin » Credit types:
  a. edit the FORGIVEN type and enable credit number generation
  b. create a new type A, check "can be manually added" and "enable
     credit number"
  c. create a new type B, check "can be manually added". Do NOT enable
     credit number
4. Change syspref 'AutoCreditNumber' to 'incremental'
5. Create more manual credits with types CREDIT and B, and verify that
   the numbers are not generated
6. Create more manual credits with types FORGIVEN and A, and verify that
   the numbers generated are 1, 2, 3, ...
7. Change syspref 'AutoCreditNumber' to 'annual'
8. Create more manual credits with types CREDIT and B, and verify that
   the numbers are not generated
9. Create more manual credits with types FORGIVEN and A, and verify that
   the numbers generated are '2020-0001', '2020-0002', ...
10. Change syspref to 'AutoCreditNumber' to 'branchyyyymmincr'
11. Create more manual credits with types CREDIT and B, and verify that
    the numbers are not generated
12. Create more manual credits with types FORGIVEN and A, and verify
    that the numbers generated are 'BRANCHA2020020001',
    'BRANCHA2020020002', ... (assuming you are connected to library
    BRANCHA, and it's February 2020)
13. Set library to another one, say BRANCHB
14. Create more manual credits with types FORGIVEN and A, and verify
    that the numbers generated are 'BRANCHB2020020001',
    'BRANCHB2020020002', ...
15. Edit the letter ACCOUNT_CREDIT, and add [% account.credit_number %]
    somewhere. Go back to Transactions tab and click on 'Print' for one
    line that has a credit number. Make sure the number is there.
16. prove t/db_dependent/Koha/Account.t

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>
2020-08-20 12:31:59 +02:00
Julian Maurice
9205d4ef45 Bug 19036: Add ability to auto generate a number for account credits
In some areas it's required to sequentially number payment slips /
receipts.

This patch adds a database column accountlines.credit_number and a
system preference AutoCreditNumber to control how this number will be
generated.  The following options are available:

- Do not automatically generate credit numbers.
  This is the current behaviour and the default syspref value.

- Automatically generate credit numbers in the form <year>-0001 (annual)

- Automatically generate credit numbers in the form
  <branchcode>yyyymm0001 (branchyyyymmincr)
  where <branchcode> is the branch where the user (staff member) is
  logged in

- Automatically generate credit numbers in the form 1, 2, 3
  (incremental)

It also adds a column (hidden by default) in the table under
Transactions tab to display this number.

Test plan:
0. Apply patch, run updatedatabase and update_dbix_class_files
1. Go to Admin » Column settings, and uncheck the 'hidden' box for
   column credit_number in table account-fines. It will be easier for
   testing
2. Create a manual credit for a borrower. Verify in Transactions tab
   that this credit has no number generated
3. Change syspref 'AutoCreditNumber' to 'incremental'
4. Create more manual credits, and verify that the numbers generated are
   1, 2, 3, ...
5. Change syspref 'AutoCreditNumber' to 'annual'
6. Create more manual credits, and verify that the numbers generated are
   '2020-0001', '2020-0002', ...
7. Change syspref to 'AutoCreditNumber' to 'branchyyyymmincr'
8. Create more manual credits, and verify that the numbers generated are
   'BRANCHA2020020001', 'BRANCHA2020020002', ... (assuming you are
   connected to library BRANCHA, and it's February 2020)
9. Set library to another one, say BRANCHB
10. Create more manual credits, and verify that the numbers generated are
    'BRANCHB2020020001', 'BRANCHB2020020002', ...
11. Edit the letter ACCOUNT_CREDIT, and add [% account.credit_number %]
    somewhere. Go back to Transactions tab and click on 'Print' for one
    line that has a credit number. Make sure the number is there.
12. prove t/db_dependent/Koha/Account.t

Signed-off-by: Michal Denar <black23@gmail.com>
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>
2020-08-20 12:31:59 +02:00
331d7c0e50 Bug 6725: (follow-up) Make patron duplicate matching flexible
oops...

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-18 18:29:07 +02:00
c528f235bc Bug 6725: DBRev 20.06.00.025
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-18 17:41:49 +02:00
883e86a571 Bug 6725: Make patron duplicate matching flexible
This patch adds a new system preference PatronDuplicateMatchingAddFields
to list the patron's attributes to use for deduplication.
The default value is surname, firstname and dateofbirth to keep existing
behaviour.

Test plan:
0. Apply the patch and execute the update DB entry
1. Create a new patron with surname, firstname
2. Create another patron with the same surname, firstname values
=> Confirm you get the duplicate warning
3. Modify the syspref to edit the list of attributes used to dedup
4. Repeat 1 and 2 with different values and confirm that you get the
behaviours you expect

Note: This is only impacting the add patron form from the UI, not the
import patrons tool.

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-18 17:39:48 +02:00
ded8b7f63f Bug 25867: DBRev 20.06.00.024
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-18 17:39:48 +02:00
Katrin Fischer
7c0cf2c73e Bug 25867: Database update for changing existing frameworks
This updates the descriptions for 952$a und $b in all existing
frameworks, if the English description hasn't been changed since
installing Koha.

To test:
- Look at your item edit form or on the MARC tab
  for the descriptions shown for $a and $b for any framework
- Note the descriptons say '... location'
- Change one or more using the frameworks.
- Run the database update
- Verify only the unchanged ones have been updated

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-18 15:48:37 +02:00
Katrin Fischer
cad0cbee6d Bug 25867: Label "Current location" as "Current library" and "Permanent location" as "Home library"
There is some confusion between the different locations and
libraries appearing in the GUI.

holdingbranch is sometimes labeled as current location
homebranch is sometimes labeled as permanent location

The patch fixes these occurences in various files:
- Item search form, results and export options
- MARC frameworks for en, fr-Fr, nb-NO, and pl-PL
- Holds awaiting pickup report
- Item display on order receive screen (create items on receive)
- OPAC system preference: OPACResultsLibrary
- Staff and OPAC detail pages
- Lost items report
- Rotating collections

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-18 15:48:37 +02:00
6d7ff0d504 Bug 16371: (follow-up) DB changes
We need to keep "opac" is the pref was set before the upgrade

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-13 10:28:26 +02:00
c3b43d3156 Bug 16371: DBRev 20.06.00.023
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-13 10:15:34 +02:00
Emmi Takkinen
d573e4c40c Bug 16371: Add database updates
Sponsored-by: Koha-Suomi Oy

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-13 10:15:33 +02:00
ed3e4540d7 Bug 21946: DBRev 20.06.00.022
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-13 10:13:14 +02:00
0545feb876 Bug 21946: Database updates
Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-13 10:13:14 +02:00
6a55ca6a82 Bug 25871: DBRev 20.06.00.021
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-06 11:37:06 +02:00
2b5f66ddbb Bug 25871: (QA follow-up) Update syspref
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-06 10:42:53 +02:00
773b88e9c2 Bug 26070: DBRev 20.06.00.020
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-30 17:44:27 +02:00
9b9e8fd328 Bug 26070: Remove GoogleIndicTransliteration system preference
The Google Transliterate API was deprecated on May 26, 2011. This patch
removes the feature and associated system preference.

To test, apply the patch and run the database update process.

 - Go to Administration -> System preferences and search for
   'GoogleIndicTransliteration.' There should be no results.
 - Search the Koha codebase for references to
   'GoogleIndicTransliteration.' There should be no current references..

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-30 17:44:27 +02:00
9deaf86754 Bug 22660: DBRev 20.06.00.019
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-30 17:44:27 +02:00
980dd60503 Bug 22660: Add system pref to allow switching of editors in News Tool
This patch adds a system preference called 'NewsToolEditor' which allows for the choice between TinyMCE and CodeMirror in the News Feature.

TEST PLAN:
1. Apply patch and run updatedatabase
2. Go to Tools > News and make a new entry or edit an existing News item.
3. When you initially load you should gte the TinyMCE editor (WYSIWYG)
4. Search for the NewsToolEditor system preference and switch to CodeMirror.
5. Reload your News item and now you should see the CodeMirror editor.
6. Try saving content with both and maki sure it works.
7. Try adding some different HTML tags in CodeMirror mode, saving, and making sure it looks right when you switch back to TinyMCE

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-30 17:44:27 +02:00
50ebed51ee Bug 24157: DBRev 20.06.00.018
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-30 17:30:23 +02:00
4b6d8bb0b6 Bug 24157: New permission - merge_invoices
Add a new permission to merge invoices

Test plan:
- Remove the new permission "merge_invoices" for a given patron,
use it to log in into Koha
- Create 2 invoices, try to merge them
=> There is no way to merge it
- Add the permission
=> Now you can merge the invoices

Sponsored-by: Galway-Mayo Institute of Technology
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-30 17:30:23 +02:00
6b984a0feb Bug 24157: New permission - delete_baskets
Add a new permission to delete acquisition baskets

Test plan:
- Remove the new permission "delete_basket" for a given patron,
use it to log in into Koha
- Create basket, try to delete it
=> There is no way to delete it
- Add the permission
=> Now you can delete the basket

Sponsored-by: Galway-Mayo Institute of Technology

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-30 17:30:23 +02:00
7fb8f36388 Bug 24157: New permission - delete_invoices
Add a new permission to delete invoices

Test plan:
- Remove the new permission "delete_invoices" for a given patron,
use it to log in into Koha
- Create an invoice, try to delete it
=> There is no way to delete it
- Add the permission
=> Now you can delete the invoice

Sponsored-by: Galway-Mayo Institute of Technology

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-30 17:30:23 +02:00
d3c8b8fe54 Bug 24157: New permission - edit_invoices
Add a new permission to edit invoices

Test plan:
- Remove the new permission "edit_invoices" for a given patron,
use it to log in into Koha
- Create an invoice, edit it (click "detail")
=> You can see the detail of the invoice, but cannot edit it. It's a read-only view.
- Add the permission
=> The form is back and you can modify the invoices and save the changes.
Also, you are able to create adjustments.

Sponsored-by: Galway-Mayo Institute of Technology

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-30 17:30:23 +02:00
f10acb07e6 Bug 24157: New permission - reopen_closed_invoices
New permission to reopen a closed invoice.

Test plan:
- Remove the new permission "reopen_closed_invoices" for a given patron,
use it to log in into Koha
- Create an invoice, close it
=> You are not able to reopen the invoice
- Add the permission
=> You are able to reopen the invoice

Sponsored-by: Galway-Mayo Institute of Technology

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-30 17:30:23 +02:00
8f7bf2a6b4 Bug 25709: DBRev 20.06.00.017
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-30 17:30:23 +02:00
5e45076c00 Bug 25709: Rename systempreference to NotesToHide
In an effort to use more inclusive language we have added a new coding guideline:
https://wiki.koha-community.org/wiki/Coding_Guidelines#TERM3:_Inclusive_Language

This patchset renames a syspref to be clearer and follow the guideline

To test:
1 - Apply patch and updatedatabase
2 - git grep NotesBlacklist
3 - Note all remaining occurrences are translations, db updates, and release notes
4 - Add a field (e.g. '520' ) to the NotesToHide systempreference
5 - View a record with a 520 field on the opac
6 - Confirm the field does not show in the 'Title notes' tab

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-29 10:08:43 +02:00
58075331a9 Bug 23092: DBRev 20.06.00.016
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-24 14:11:51 +02:00
4eac229859 Bug 23092: Add 'daterequested' to branchtransfers table
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>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-24 14:09:30 +02:00
0edaab49af Bug 23797: Apply DB changes to kohastructure.sql
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-23 11:33:34 +02:00
bfb89695aa Bug 23797: DBRev 20.06.00.015
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-23 11:33:34 +02:00
81e83d250c Bug 23797: DBRev 20.06.00.014
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-23 11:33:34 +02:00
f8c5b54acf Bug 23797: (follow-up) Increase the size of opac_news.lang
This patch adds a database update to increase the size of the
opac_news.lang column in order to accommodate longer values.

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-23 11:33:34 +02:00
be1d25ba16 Bug 23797: Convert OpacLoginInstructions system preference to news block
This patch builds on Bug 22318 to move the OpacLoginInstructions system
preference into the Koha news system, making it possible to have
language- and library-specific content.

To test you should have some content in the OpacLoginInstructions system
preference. Apply the patch and run the database update process.

 - Go to the OPAC and click the login link.
 - In the login modal, confirm that the content which was previously in
   the OpacLoginInstructions system preference displays correctly
   below the login form.
 - While not logged in to the OPAC, navigate directly to
   /cgi-bin/koha/opac-user.pl. The OpacLoginInstructions content should
   display correctly here as well.
 - In the staff client, go to Tools -> News and verify that the content
   from OpacLoginInstructions is now stored in news items. There
   should be one entry for each of the enabled translations in your
   system, for instance 'OpacLoginInstructions_en',
   'OpacLoginInstructions_fr-FR', 'OpacLoginInstructions_cs-CZ'
 - Go to Administration -> System preferences and confirm that the
   OpacLoginInstructions preference has been removed.
 - To test the correct selection of language-specific content you must
   run the translation update/install process for the languages you're
   updating.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-23 11:33:08 +02:00
f0a0f630bb Bug 23796: DBRev 20.06.00.013
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-23 11:17:27 +02:00
16053574a5 Bug 23796: Convert OpacCustomSearch system preference to news block
This patch moves the OpacCustomSearch system preference into the Koha
news system, making it possible to have language- and library-specific
content.

To test you should have some content in the OpacCustomSearch system
preference. Apply the patch and run the database update process.

 - Go to the OPAC and confirm that the content which was previously in
   the OpacCustomSearch system preference now displays correctly where
   it was before.
 - In the staff client, go to Tools -> News and verify that the content
   from OpacCustomSearch is now stored in news items. There should be
   one entry for each of the enabled translations in your system, for
   instance 'OpacCustomSearch_en', 'OpacCustomSearch_fr-FR',
   'OpacCustomSearch_cs-CZ'
 - Go to Administration -> System preferences and confirm that the
   OpacCustomSearch preference has been removed.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-23 11:17:27 +02:00
8f819ac9b9 Bug 23795: DBRev 20.06.00.012
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-23 11:17:27 +02:00
c9eb2be381 Bug 23795: Convert opaccredits system preference to news block
This patch builds on Bug 22318 to move the opaccredits system
preference into the Koha news system, making it possible to have
language- and library-specific content.

To test you should have some content in the opaccredits system
preference. Apply the patch and run the database update process.

 - Go to the OPAC and confirm that the content which was previously in
   the opaccredits system preference now displays correctly where
   it was before.
 - In the staff client, go to Tools -> News and verify that the content
   from opaccredits is now stored in news items. There should be
   one entry for each of the enabled translations in your system, for
   instance 'opaccredits_en', 'opaccredits_fr-FR',
   'opaccredits_cs-CZ'
 - Go to Administration -> System preferences and confirm that the
   opaccredits preference has been removed.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-23 11:17:27 +02:00
12e83a64ec Bug 5087: DBRev 20.06.00.011
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-23 11:17:27 +02:00
92d0472d63 Bug 5087: (QA follow-up) used_for deserves an index
This patch introduces an index for the used_for column

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-23 10:52:10 +02:00
4780930720 Bug 5087: (QA follow-up) Rename the attribute to fit later API usage
This patch renames the introduced attribute for later usage on the API,
and changes the logic to use it the other way around.

It also adds a KEY for the flag, as it will be used in WHERE statements.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-23 10:52:10 +02:00
Aleisha Amohia
ae3644a594 Bug 5087: Ability to define whether CSV profile shows in OPAC
To test:
1) Update database
2) Update schema
3) In staff side, go to Tools -> CSV profiles
4) Make a CSV profile with profile type = MARC and usage = Export
records
5) Leave 'Show option in OPAC' unchecked and save
6) Go to OPAC and add an item to your cart
7) Click Cart, click Download, confirm that your newly created CSV
profile does not show as an option
8) Go back and edit CSV profile on staff side
9) Check the 'Show option in OPAC' checkbox and save
10) Go back to download cart in OPAC
11) Confirm the CSV profile now shows in the dropdown

Sponsored-by: Catalyst IT
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-23 10:52:10 +02:00
07a7dbbcf4 Bug 20815: DBRev 20.06.00.010
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-23 10:52:10 +02:00
Katrin Fischer
83d9a6e602 Bug 20815: (QA follow-up) Add message to database update / rephrase pref
- Make pref use "checked in" instead of "returned".
- Add message to database update

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-23 10:04:31 +02:00
e453f74cfd Bug 20815: Add ability to choose if lost fee is refunded based on length of time item has been lost
This adds the ability to not refund lost item fees on return if the item
has been lost for more than a given number of days.

Test Plan:
1) Set the new system preference NoRefundOnLostReturnedItemsAge to a number of days
2) Find a lost item that has been lost longer than that NoRefundOnLostReturnedItemsAge days which would have otherwise been refunded
3) Return the item
4) Note no refund on the lost item fee was processed, the fee remains unchanged
5) prove t/db_dependent/Circulation.t

Signed-off-by: Deb Stephenson <DStephen@dubuque.lib.ia.us>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-23 10:04:25 +02:00
Katrin Fischer
dc2c19bd51 Bug 25629: Fix capitalization in sample notices
This fixes the capitalization in sample notices files to
follow coding-guidelines. Only applies to English, translations
remain unchanged.

Additional fixes:
- Overdues slip added the letter code as subject instead of the description
- Opac changed to OPAC for self-registration verification emails

German (de-DE) file was not changed, as there is a pending translation
bug that will take care of these (bug 25129).

To test:
- Verify changes by running the web installer for the changed
  files and verify sample notices install without error
- Verify subjects and notice descriptions are correct
- Run tests in t/db_dependent/Letters*

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-07-22 10:17:53 +02:00
f623494598 Bug 23391: DBRev 20.06.00.009
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-20 17:45:30 +02:00
Magnus Enger
884b3e71d8 Bug 23391: Hide finished ILL requests
Currently, the main table of ILL requests will display all ILL
requests in the database, regardless of their status. For libraries
with active ILL this quickly leads to a lot of requests being displayed,
and the main page of the ILL module taking a long time to load. This
patch proposes to fix this by introducing the ILLHiddenRequestStatuses
syspref, which can take a pipe-separated list of ILL statuses that
will be hidden from view in the ILL module. This means that the
only way to find a hidden request will be through a report.

To test:
- Apply the patch and make sure the atomic database update is run
- Make sure you have a few ILL requests, with at least two different
  statuses
- Check that all requests are still displayed in the main table of
  ILL requests
- Add one of the statuses* you have in your database to the
  ILLHiddenRequestStatuses syspref, reload the ILL module frontpage
  and verify that requests with the given status are not displayed
- Change the syspref to another status and verify requests with
  that status are now hidden
- Change the syspref to hold both statuses, separated by the pipe
  symbol (e.g.: A|B). Verify that no requests with the given
  statuses are now displayed
- Run the ILL REST API tests, e.g.:
  $ sudo koha-shell -c "prove t/db_dependent/api/v1/illrequests.t" kohadev

* = The ILLHiddenRequestStatuses syspref should hold status codes, like
"REQ" and "NEW", not their human readable counterparts.

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-20 17:25:40 +02:00
92040cf563 Bug 23148: DBRev 20.06.00.008
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-20 17:25:35 +02:00
Julian Maurice
d4975885b0 Bug 23148: Fix bridge image paths in de-DE installer files
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-20 16:16:37 +02:00
46372b4bbd Bug 23148: (follow-up) Correct image paths in sample data and tests
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-20 16:16:37 +02:00
1625519b9e Bug 23148: Replace Bridge icons with transparent PNG files
This patch adds SVG versions of the Bridge item type icon set to
misc/interface_customization/itemtypeimg/bridge. It adds some
new icons, and updates some existing icons. All GIF versions of the
icons are replaced with transparent PNG files.

Icon changes:

- English text has been removed from all icons
- New icon for "Periodical," to differentiate from "Journal"
- New icon, "Controller" for video games
- New icon for "Laserdisk" to differentiate from "DVD"
- New icon for "Kit" to differentiate from "Archive"
- New icon, "Reference books."
- Updated "badges" on "Juvenile book" and "Reserve book" to try to
  express the information without English-specific letters.

Before applying the patch, update some item types or collection codes
with Bridge icons. Apply the patch and run the database update process.

 - Open the advanced search page in the staff client and confirm that
   your item type or collection code icons were updated correctly.
 - Go to Administration -> Item types and edit an item type.
   - Check the "bridge" tab and confirm that the icon options look
     correct.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-20 16:16:37 +02:00
2fb5f3624e Bug 22844: DBRev 20.06.00.007
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-20 16:16:32 +02:00
4469b4e52d Bug 22844: Add the new DB column borrower_attribute_types.mandatory
Signed-off-by: David Nind <david@davidnind.com>

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

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-20 16:08:22 +02:00
ccaf885397 Bug 24151: DBRev 20.06.00.006
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-20 16:08:13 +02:00
aa0b8cb96a Bug 24151: Add items.homebranch to the list
Signed-off-by: Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-20 15:17:42 +02:00
25930f79dc Bug 24151: Add new column borrower_attribute_types.keep_for_pseudonymization
Sponsored-by: Association KohaLa - https://koha-fr.org/

Signed-off-by: Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-20 15:17:42 +02:00
563f9faa4f Bug 24151: DB changes - pseudonymized_borrower_attributes
Add a new DB table pseudonymized_borrower_attributes

Sponsored-by: Association KohaLa - https://koha-fr.org/

Signed-off-by: Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-20 15:17:42 +02:00
4dbb6ec80a Bug 24151: DB changes
1 new table:
 * pseudonymized_transactions

3 new sysprefs:
 * Pseudonymization
 * PseudonymizationPatronFields
 * PseudonymizationTransactionFields

Sponsored-by: Association KohaLa - https://koha-fr.org/

Signed-off-by: Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-20 15:17:42 +02:00
312dd03223 Bug 24379: DBRev 20.06.00.005
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-20 14:05:21 +02:00
7bb31cffae Bug 24379: Make login_attempts not nullable
While the column defaults to 0 in Koha::Object->store we set to NULL if NULLABLE

When trying to reset a patrons password we check that the account is not administratively locked:
login_attempts != -1

This query does not return rows where login_attempts IS NULL. It will return accounts where login_attempts = 0

Let's default to 0 like we intend

To test:
1 - Create a new patron
2 - Note their login_attempts is NULL
    SELECT login_attempts FROM borrowers ORDER BY borrowernumber DESC LIMIT 1
3 - Enable  OpacResetPassword
4 - Attempt to reset password before logging in, you cannot
5 - Apply patch, updatedatabase, restart_all, update schema
6 - Create another patron
7 - Their login attempts should be 0
8 - Attempt to reset password, it works!

Bug 24379: Fix the test

First we create a patron using TestBuilder to get a hashref of valid
info. Then we delete it and create a new patron using Koha::Patron->new
Once stored, we should call discard_changes to make the calculated
values available in the currenct object.

Bug 24379: Don't drop default of 0 for login attempts

When moving the column we drop the default, this means that DBs upgraded form earlier versions
get the wrong values set

To test:
1 - Checkout 16.11.x
2 - Reset all
3 - Checkout master
4 - updatedatabase
5 - SHOW CREATE TABLE borrowers;
6 - Note the column login_attempts defaults to NULL
7 - Apply patch(es)
8 - Repeat
9 - Now it defaults ot 0 (and has NOT NULL if applied all)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-20 12:49:19 +02:00
4b0c2e56e4
Bug 25851: DBRev 20.06.00.004
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-07-16 15:17:11 +01:00
Slava Shishkin
5c581265ab Bug 25695: merge of similar code blocks after circulation_rules update
In onboarding.pl we have second block with adding just one more
rule parameter (maxissueqty) which can be merged to first one
after all parameters now stored in circulation_rules table.

Also this eliminates the need of adding forgotten "warn $@" after
the second eval block.

Mentored-by: Andrew Nugged <nugged@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-09 11:50:42 +02:00
c1e1c233ca Bug 25851: (bug 18928 follow-up) Remove holdallowed rule is value is an empty string
On the interface, if "Hold policy" is "Not set", the rule does not exist
in the table. We should reflect that during the update DB process.

Test plan:
1. Set "Hold policy" to "Not set"
2. Confirm that you can place holds
3. Confirm that the rule does not exist in the DB table
4. Set the value to an empty string (manually)
5. Confirm that you cannot longer place holds
6. Go to the circulation rules page and confirm that the value of "Hold
policy" is "Not set"
7. Execute the update DB entry
8. Confirm that you can place holds
9. Confirm that the rule does not exist in the DB table

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-09 11:42:24 +02:00
Julian Maurice
b168f4a2e9 Bug 21395: Make perlcritic happy
This patch adds a .perlcriticrc (copied from qa-test-tools) and fixes
almost all perlcrictic violations according to this .perlcriticrc
The remaining violations are silenced out by appending a '## no critic'
to the offending lines. They can still be seen by using the --force
option of perlcritic
This patch also modify t/00-testcritic.t to check all Perl files using
the new .perlcriticrc.
I'm not sure if this test script is still useful as it is now equivalent
to `perlcritic --quiet .` and it looks like it is much slower
(approximatively 5 times slower on my machine)

Test plan:
1. Run `perlcritic --quiet .` from the root directory. It should output
   nothing
2. Run `perlcritic --quiet --force .`. It should output 7 errors (6
   StringyEval, 1 BarewordFileHandles)
3. Run `TEST_QA=1 prove t/00-testcritic.t`
4. Read the patch. Check that all changes make sense and do not
   introduce undesired behaviour

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-06-29 12:37:02 +02:00
Julian Maurice
6886cf93ec Bug 25858: Use bitwise OR for setting a bit in borrowers.flag
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Thanks-to: Didier Gautheron <didier.gautheron@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-06-29 12:37:01 +02:00
e38634ceb8 Bug 25858: (bug 25858 follow-up) Don't attempt to set flag if already set
Signed-off-by: Didier Gautheron <didier.gautheron@biblibre.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-06-29 12:36:51 +02:00
f8098e0eed Bug 24156: DBRev 20.06.00.003
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-06-25 10:55:41 +02:00
259e7d3003 Bug 24156: DB changes
Add a new table tables_settings to store default_display_length and
default_sort_order.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-06-25 10:51:59 +02:00