Commit graph

3783 commits

Author SHA1 Message Date
9fff494443 Bug 22511: DBRev 18.12.00.063
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-25 11:36:18 +00:00
1e95b94ea0 Bug 22511: (QA follow-up) Fix update database
Test plan:
Run db update (and have some voided accountlines)
--> without patch it fails with error message similar to:
    Can't use string ("Payment") as a HASH ref while "strict refs" in use at
    (eval 1393) line 19.
--> with patch it runs as expected

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-25 11:02:14 +00:00
69bd858712 Bug 22511: (follow-up) Add DB Update
This update takes old VOID accountlines and attempts to restore the
original accounttypes using the offsets and set the status to 'VOID'

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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-25 11:02:14 +00:00
ed6228de83 Bug 22339: DBRev 18.12.00.062
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-25 10:36:36 +00:00
Ere Maijala
0047ede37e Bug 22339: Fix search field mappings of MARC fixed fields
Fixes handling of /0 selector in addition to several fixed field positions. Note that ff7-01-02 is in fact 00-01 in Zebra and that has been replicated here.

Test plan:
1. Before applying a patch, check from Elasticsearch (e.g. localhost:9200/koha_biblios/_search?q=_id:123) what is indexed in Elasticsearch for a record for date-entered-on-file, ff7-00, ff7-01, ff7-02 and lleader.
2. Apply the patch, update database and save the record again.
3. Verify that the contents of the forementioned fields is now correct in Elasticsearch.
4. Verify that tests pass:  prove -v t/Koha/SearchEngine/Elasticsearch.t

Signed-off-by: Björn Nylén <bjorn.nylen@ub.lu.se>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-25 10:32:09 +00:00
41ef010984 Bug 22729: DBRev 18.12.00.061
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-25 10:09:09 +00:00
482664cb80 Bug 22729: (QA follow-up) Ensure no NULL values before setting NOT NULL
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-25 10:06:44 +00:00
49cab949b4 Bug 22729: DB update
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-25 10:06:44 +00:00
3d840153d1 Bug 22564: DBRev 18.12.00.060
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-19 14:51:08 +00:00
7b7a2767c8 Bug 22564: (QA follow-up) Correct copy-paste message
We should be replacing Rep here ;)

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-19 14:48:28 +00:00
d8dfb61a90 Bug 22564: Add database update 'just in case'
With the introduction of the 'status' field it's a clear oportunity to
convert any last remaining instances of 'Rep' to 'L' + 'REPLACED'.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-19 14:48:28 +00:00
Katrin Fischer
6b610497ff Bug 21545: Translate new ACCOUNT_PAYMENT and ACCOUNT_WRITEOFF notices to German
To test:
- Apply patch
- Run the German web installer
- Verify the sample notices installs without error
- Verify it looks 'German' in the GUI :)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-18 12:00:14 +00:00
Katrin Fischer
bc1a21ec65 Bug 21545: Translate 'Stock rotation slip'
Throwing in some capitalization fixes for the English
version of the notice as well.

To test:
- Verify the changes make sense and the SQL is still valid
  and executes

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-18 12:00:14 +00:00
6f1459e2ce Bug 22532: DBRev 18.12.00.059
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-18 10:51:21 +00:00
752eba6cfe Bug 22532: Database update
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-18 10:48:11 +00:00
f8bd40c1a6 Bug 22318: DBRev 18.12.00.058
This includes DBRev 18.12.00.057 for bug 13795

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-18 10:47:21 +00:00
1758c8bc5d Bug 22318: (QA follow-up) Correct name of atomicupdate
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-18 10:47:03 +00:00
d6e1c6ffe6 Bug 22318: Example implementation: OpacNavRight system preference
This patch implements a Koha news system replacement of the OpacNavRight
system preference. The changes to koha-news.tt enable the selection of
"OpacNavRight" as a location for the content. opac-main.pl is modified
to ensure that the user's selected language is passed to the template
for use by the KohaNews plugin.

The database update process takes the contents of Koha's OpacNavRight
system preference and adds it to the Koha news system. The OpacNavRight
system preference is then removed from the database.

When the new entry is added to Koha news, the language is set based on
the top selected language in the "opaclanguages" preference. The entry
is added to "All libraries" without an author, title, or expiration
date.

Note that this patch doesn't change the way OPAC news is displayed. I
think it's best to keep existing markup and code for that since it
handles details like branch selection and RSS.

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

 - In the staff client go to Tools -> News and confirm that there is now
   an entry with the location "OpacNavRight_en" (assuming an "en"
   English interface).
 - Confirm that the previous contents of OpacNavRight were added
   correctly.
 - Go to Administration -> System preferences -> OPAC and verify that
   the OpacNavRight preference has been removed.
 - In the OPAC, confirm that the correct content is displayed in the
   region previously defined in the OpacNavRight system preference.
 - Test that the language and library-specific nature of news items is
   reflected in the behavior of this content area:
   - Define different text based on language and location. Confirm that
     switching translations and logging in to the OPAC both trigger the
     correct display of different content.

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-18 10:47:03 +00:00
cc501af150 Bug 13795: Remove occurences of unused columns in code
These patch removes these two columns from backfill_statstics script
and from columns.def - this file is used to create description in guided
reports

Test plan:
1. Run installer/data/mysql/backfull_statistics.pl
--> without this patch, there are associatedborrower and usercode errors
reported
--> with patch, these two columns are not reported

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-18 10:05:51 +00:00
c90329fbe5 Bug 13795: Make database update idempotent
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-18 10:05:51 +00:00
Nicole
074233b9d3 Bug 13795: Delete unused columns from statistics table
The following 2 fields are never used in the statistics table:

associatedborrower
usercode

This patch removes them.

To test:

* check the database and make sure columns are gone

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-18 10:05:51 +00:00
d9cefbdd19 Bug 8701: DBRev 18.12.00.056
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-18 10:00:48 +00:00
Katrin Fischer
e8011caddd Bug 8701: Remove links to OpacHiddenItems.txt in favor of wiki page
Removes the OpacHiddenItems.txt file from Koha as this is not
accessible for most people and replaces it with links to the wiki
page like it's already done from the system preference editor.

For reporting and the initial patch
Thanks-to: Jane Sandberg <sandbej@linnbenton.edu>

To test:
- Changes are invisible from the GUI
- Apply patch and run database update
- SELECT * FROM systempreferences WHERE variable = "OpacHiddenItems";
- Verify the description has the wiki link
- Verify that docs/opac/OpacHiddenItems.txt has been removed

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-18 09:58:36 +00:00
2d54c95e90 Bug 21336: Add borrowers.flgAnonymized in an explicit position
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-18 09:49:57 +00:00
75cdd63608 Bug 22521: DBRev 18.12.00.055
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-17 17:01:10 +00:00
a6ba3bcc0d Bug 22521: (QA follow-up) Corrections to tests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-17 16:49:36 +00:00
7c3ffa816b Bug 22521: Update existing accounttypes
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-17 16:49:36 +00:00
c12433a336 Bug 22521: Increase varchar size for accounttype
accountlines.accounttype is currently a short varchar(5) field for to
store accounttype codes. Koha is moving towards more descriptive codes
which require a larger capacity varchar(16).

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-17 16:49:36 +00:00
ec6b3d1834 Bug 20128: DBRev 18.12.00.054
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-17 12:25:26 +00:00
Katrin Fischer
92b329b223 Bug 20128: Add new permission for new installations
Change was missing from userpermissions.sql

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-17 12:25:26 +00:00
a2b057758d Bug 20128: Add permission for advanced cataloging editor
To test:
1 - Have a borrower with edit_catalogue permission and one with
editcatalogue top level
2 - Confirm they can both access the advanced editor from the
'Cataloguing' home page or from the basic editor
3 - Apply patch
4 - Update database
5 - Confirm borrower with 'edit_catalogue' has 'advanced_editor'
permission
6 - Confirm borrowers can access advanced editor as above
7 - Remove 'advanced_editor' permission from borrower
8 - Ensure they cannot access the advanced editor
9 - Ensure links to 'Edit record' from search results go to basic editor

Signed-off-by: Liz Rea <wizzyrea@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: Nick Clemens <nick@bywatersolutions.com>
2019-04-17 12:25:26 +00:00
313ad660e7 Bug 17171: DBRev 18.12.00.053
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-17 12:25:26 +00:00
cd082782d1 Bug 17171: Add a syspref to allow currently issued items to be issued to a new patron without staff confirmation
Some libraries don't want to force the librarians to manually confirm
each checkout when the item is checked out to another. Instead, they
would prefer to be alerted after the fact.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Enable the new syspref AutoReturnCheckedOutItems
4) Check an item out to a patron
5) Check the same item out to another patron
6) Note you are not prompted to confirm the checkout,
   but are instead alerted that is had been checked out to another patron!

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: BWS Sandboxes <ByWaterSandboxes@gmail.com>

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

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-17 12:25:25 +00:00
21e9b55c2c Bug 22311: DBRev 18.12.00.052
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-17 12:25:25 +00:00
2a59d22b89 Bug 22311: Add a SysPref to allow adding content to the #moresearches div in the opac
The idea of this development would be to match the syspref 'OPACSearchForTitleIn' but
for populating the search headers (#moresearches) on the opac page to allow staff to
easily add links without jQuery.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Update the new OpacMoreSearches system preference to include the following line:
    <li><a href="https://duckduckgo.com/">Duck Duck Go</a></li>
4) Browse to the OPAC
5) Note your new link displays in the "moresearches" area of the OPAC.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-17 12:25:25 +00:00
Bernardo Gonzalez Kriegel
b31d314613 Bug 21899: Update MARC21 frameworks to Update 27 (November 2018)
This bug updates MARC21 english frameworks to Update 27

Bibliographic
-------------
 * New fields 251, 341 and 532 with corresponding subfields
 * New subfields 041$p, 041$q and 041$r
 * Renamed subfield 041$j

Authorities
-----------
 * New subfield 055$2

To test:
1) Remove all your frameworks
2) Check mandatory bibliographic and authority files load without problem
3) Check new fields/subfields

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-17 12:25:25 +00:00
6f9341a7f7 Bug 21336: DBRev 18.12.00.051
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-17 12:25:24 +00:00
5e1894c948 Bug 21336: (QA follow-up) Add column_exists in db revision
As requested by Josef on comment70.

Test plan:
Run db revision twice. No warnings.

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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-17 12:25:24 +00:00
71f17b35ee Bug 21336: Do not increase login_attempts after locking
If an account has been locked, there is no use to keep increasing this
number. It is not true too; after the pref number has been reached,
we can not really speak of login attempts anymore. The credentials are
just ignored.

Adding a dbrev to put existing values in line. And a simple test in
Auth.t to confirm that login_attempts stop increasing.

Note: It feels safe to keep the '>=' condition in account_locked. But it
could obviously be changed to '=='. (Added a test for that.)

Note: Adding a mock_preference in Auth.t too for GDPR_Policy. Since not all
tests will pass when the pref is enabled (though disabled by default).

Test plan:
Run dbrev with updatedatabase.pl.
Run t/db_dependent/Koha/Patrons.t
Run t/db_dependent/Auth.t

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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-17 12:25:23 +00:00
37460d924e Bug 21336: Database update for new prefs
This patch adds three new prefs:
- UnsubscribeReflectionDelay
- PatronAnonymizeDelay
- PatronRemovalDelay

Test plan:
Run upgrade.
Check patrons pref page. Look under Privacy.

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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-17 12:25:13 +00:00
3b62cbb17b Bug 21336: Database revision for borrowers.flgAnonymized
This new flag should speak for itself ;)

Test plan:
Run installer or updatedatabase.

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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-17 10:59:30 +00:00
4177d2e329 Bug 22044: DBRev 18.12.00.048
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-17 10:11:04 +00:00
Katrin Fischer
f6e143c73c Bug 22044: Fix sysprefs.sql description to use circ column description
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-17 10:08:57 +00:00
a3a3bf2dda Bug 22044: Correct syspref name
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-17 10:08:57 +00:00
4779cf8450 Bug 22044: Set default and add NoRenewalBeforePrecision preference for new/affected installs
I am not sure the correct answer - for upgraded installs the pref was
set to date, which changed behaviour

For new installs the pref was unset, behaved as if 'exact_time' so we
shouldn't change behaviour?

If the perceived default is date then the code should be changed, or
this shouldn't be a pref at all?

To test:
1 - Have a new system missing this pref
2 - Note when searchign the pref in staff client if appears as 'date'
3 - Check the db to confirm value is 'NULL'
4 - Apply patch and run update
5 - Pref is now set to 'exact_time'

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-17 10:08:57 +00:00
fc6b7e5c3e Bug 14457: DBRev 18.12.00.047
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-16 13:17:34 +00:00
Björn Nylén
a8e95a189f Bug 14457: (QA follow-up) Fix QA script complaints and amend system preference text
Pod coverage for 'NAME'.
Moved sysprefs in order and moved semicolon to last line.
Replaced tab indentation with spaces.
Added "Swedish service for spellchecking" to the syspref description.

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-16 13:17:33 +00:00
Chris Cormack
8465b60a8e Bug 14457: (follow-up) Add syspref for Libris API URL
Added another syspref for the url of the Libris API
Added sysprefs to syspref.sql

Please test the 2 patches together

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-16 13:17:33 +00:00
Eivin Giske Skaaren
37970eead1 Bug 14457: Integrate LIBRIS spellchecking
This patch makes it possible to configure LIBRIS spellchecker as a
"did you mean" feature. When searching for a word or phrase and misspelling
the query will be sent to LIBRIS and if they have a suggestion it will
be shown in the yellow did you mean box in the results page.

The API is not very quick so this type of implementation was chosen to not
disrupt the real-time feeling of the search.

To test:

1. Apply the patch.
2. Go to http://api.libris.kb.se/bibspell/, enter the koha servers IP and click
on the "Generera nyckel" button.
3. Under "Nyckel" you can copy the value that looks like this: E47B44829E265607274B677BC17B8D78,
and enter it into the LibrisKey syspref (cgi-bin/koha/admin/preferences.pl?tab=searching).
4. In cgi-bin/koha/admin/didyoumean.pl check the box for using the LIBRIS API. It is only implemented for OPAC.
5. Perform some searches:
tset - Did you mean should suggest: test
jeg är på smester - suggestion: jag är på semester
dantes inferna - suggestion: dantes inferno

Restored opac-search.pl

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Seems to work, of course I can't tell if it is giving me accurate
suggestions :)

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-16 13:17:33 +00:00
a131ffca08 Bug 22695: DBRev 18.12.00.046
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-16 13:17:33 +00:00