Commit graph

5303 commits

Author SHA1 Message Date
0d7f0b8f22
Bug 30588: (QA follow-up) Typos in sysprefs.sql
The codebase uses disabled and enforced which is imo better too.
So we need to fix this sql file.

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-21 11:36:59 -03:00
c98b623313
Bug 30588: Add missing atomic update
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-21 11:36:58 -03:00
d873d86a89
Bug 30588: Add 'enforced' option to TwoFactorAuthentication
Sponsored-by: Rijksmuseum, Netherlands

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-21 11:36:56 -03:00
ceb74c89e6
Bug 17170: DBRev 22.06.00.067
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-21 11:19:39 -03:00
8726036990
Bug 17170: (QA follow-up) DB changes
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-21 11:15:21 -03:00
47228046ee
Bug 17170: DB Updates
This patch adds the new table, permission, and a syspref to enable the feature

Sponsored-by: Sponsored by: Round Rock Public Library [https://www.roundrocktexas.gov/departments/library/]

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-21 11:15:13 -03:00
254f721320
Bug 29012: Fix existing update to prevent inserting incorrect data
Both updates now rely on 'suspension_chargeperiod' as the source of truth
for existence of a rule. Spot checking some existing production databases this
seems to be acceptable.

This alters the update to only add rules where a 'suspension_chargeperiod' rule exists
and a value for the rule is not already set.

NOTE: While the table has a unique key:
UNIQUE KEY `branchcode` (`branchcode`,`categorycode`,`itemtype`,`rule_name`),

This key doesn't prevent duplicates on NULLs, i.e.:

branchcode  | categorycode  | itemtype  | rule_name                 | rule_value
NULL        | NULL          | BK        | unseen_renewals_allowed   | 1
NULL        | NULL          | BK        | unseen_renewals_allowed   | 2
NULL        | NULL          | BK        | unseen_renewals_allowed   | 3

So we need to both check that any rule is present and that the specific rule is not.
The 'INSERT IGNORE' won't IGNORE existing values except for the most specific rules

Test plan:
 0 - Edit and save existing default rule in DB (sample data does not include suspension_chargeperiod)
 1 - Set some rules for "Default checkout, hold and return policy" for "Standard rule" and some specific libraries
 2 - cp installer/data/mysql/db_revs/220600024.pl installer/data/mysql/atomicupdate/
 3 - SELECT * FROM circulation rules, note the number of rules that exist
 4 - updatedatabase
 5 - Check the DB again, you should now have rules as described in the bug
     i.e. You will have 5 new rules per 'Default checkout, hold and return policy'
 6 - apply 1st patch on bug
 7 - rm installer/data/mysql/atomicupdate/220600024.pl (so we don't add again)
 8 - updatedatabase
 9 - Check DB, the extra rules have been deleted
10 - Apply 2nd patch
11 - cp installer/data/mysql/db_revs/220600024.pl installer/data/mysql/atomicupdate/
12 - rm installer/data/mysql/atomicupdate/bug_31727.pl (so we can confirm update isn't adding rules)
13 - updatedatabase
14 - Confirm no change in rules since step 9
15 - git reset --hard (get deleted update back)
16 - rm installer/data/mysql/atomicupdate/220600024.pl

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-20 09:53:45 -03:00
3efd9e4f96
Bug 31626: DBRev 22.06.00.066
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-18 09:54:08 -03:00
a4409568b3
Bug 31626: (QA follow-up) Make db_rev robust
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-18 09:48:59 -03:00
9bc996be91
Bug 31626: Add letter id to the message queue table
It can be useful to know exactly what template was used to generate a notice. To this end, it would be useful to store the letter id as a foreign key in the message queue table.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Restart all the things!
4) Run an action that will send a notice to a patron
5) Note the letter id is now in the message_queue table for that notice!

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-18 09:41:41 -03:00
6fc1ddd144
Bug 25426: DBRev 22.06.00.065
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-18 09:38:05 -03:00
Katrin Fischer
0313a44ca7
Bug 25426: (QA follow-up) Small fixes to POD and INSERT IGNORE or datatabase update
* Makes sure the system preference is added with INSERT IGNORE
* Some smaller fixes/additions to the POD of get_return_branch_policy

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-18 09:14:57 -03:00
ef0bf75eed
Bug 25426: Allow return policy to be selected via syspref and not just home library
1) Apply this patch
2) Run updatedatabase.pl
3) Verify CircControlReturnsBranch is set to home library by default
4) Set a Return policy for Branch A to "Item returns home" ( homebranch )
5) Set a Return polity for Branch B to "Item returns to issuing library" ( holdingbranch )
6) Set a Return polity for Branch C to "Item floats" ( noreturn )
7) Create an item with homebranch of Branch A, holding branch of branch B
8) Log in as Branch C
9) Set CircControlReturnsBranch to "the library the item is currently held by"
10) Check the item in, note it should be returned to the holding library
11) Set CircControlReturnsBranch to "the library the item is owned by"
12) Check the item in, note it should be returned to the home library
13) Set CircControlReturnsBranch to "the library you are logged in at"
14) Check the item in, note it should float

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-18 09:14:52 -03:00
ab1e0a5d6a
Bug 14783: (follow-up) Fix problematic db_rev
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-18 09:02:44 -03:00
04d187f039
Bug 14783: DBRev 22.06.00.064
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-17 17:33:34 -03:00
3da8a25253
Bug 14783: Update atomicupdate syntax
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-17 15:59:07 -03:00
Björn Nylén
4ef87fe837
Bug 14783: Change pickup location from opac.
This patch allows users to change the  pickup location for their holds
from the opac. A syspref (OPACAllowUserToChangeBranch) controls at what
stage a hold can be changed.

To test:
1. Set up holds with diffrent statuses for a patron (pending, waiting,
   in transit, suspended)
2. No pickup locations for any hold should be able to be changed.
3. Turn on and off the different options under
   OPACAllowUserToChangeBranch. Make sure that only the corresponding
   holds can be changed from the opac. Check eg in the staff client that
   pickup location has changed.
4. The available pickup locations should respect any transfer
   restrictions. (Same as the
   holds list for a biblio in staff client)
5. For an in-transit hold: Check in the item at the original pickup
   location.
6. Note that it will be redirected to the new location.

Sponsored-by: Lunds Universitetsbibliotek

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-17 15:26:59 -03:00
Caroline Cyr La Rose
ace48e8911
Bug 21705: Map copyrightdate to both 260/264c by default for new MARC21 installations
This patch adds a mapping from 264 to biblio.copyrightdate.

To test:
1) Apply patch
2) Delete existing frameworks
   -  In the database
      delete from marc_tag_structure;
      delete from marc_subfield_structure;
      delete from biblio_framework;
3) Load default framework
   - In a terminal, run
     ./misc/load_yaml.pl -f installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.yml --load
4) In the staff interface, go to Administration > MARC bibliographic framework
   - Make sure the default framework is there
5) In Administration > Koha to MARC mapping, check the mappings for biblio.copyrightdate
   - biblioitems.publishercode should be mapped to 260 as well as 264
6) Create a bibliographic record with a value in 264
   - In the database, check the biblio entry for this record, the value from 264 should be in copyrightdate
7) Create a bibliographic record with a value un 260
   - In the database, check the biblio entry for this record, the value from 264 should be in copyrightdate

I hope I didn't forget anything! :)

Caroline

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-17 15:25:59 -03:00
26c011f972
Bug 31569: DBRev 22.06.00.063
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-17 08:23:36 -03:00
0a2d2f7810
Bug 31569: DB update and objects
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-17 08:14:55 -03:00
a980148fad
Bug 27136: DBRev 22.06.00.062
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-12 14:54:23 -03:00
Katrin Fischer
fcad83dfd4
Bug 27136: (QA follow-up) Fix entries for multiple und undetermined language(s)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-12 14:49:07 -03:00
Katrin Fischer
1bcaceca0a
Bug 27136: (QA follow-up) Remove reference to facets, add languages to update description
The new languages will also effect other pages in Koha, like the
language list on the advanced search page.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-12 14:49:06 -03:00
cb09bb0b78
Bug 27136: (follow-up) Make update idempotent
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-12 14:49:06 -03:00
11d90f153e
Bug 27136: Add additional languages for facet display
This patch adds two missing languages, Cree & Afrikaans, as well
as some necessary linguistic definitions for faceting: Multi language,
undetermined, no linguistic content

Signed-off-by: Alexis Ripetti <alexis.ripetti@inLibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-12 14:49:01 -03:00
d71c20a997
Bug 30571: (follow-up) Additional check at upgrade
Bad data occurs. We are removing null hosts here and update
empty syntax or encoding, informing the user.

Test plan:
Remove the NOT NULL condition if needed.
Copy db_revs/220600056.pl to atomicupdate and test dbrev.
You might see something like:
    Upgrade to 22.06.00.056  [11:48:22]: Bug 30571 - Table z3950servers: three cols NOT NULL
        Found bad data in table z3950servers: removed 1 records with host undefined
        Corrected empty syntax or encoding for the following hosts. Please check after upgrade.
        Updated hosts: lx2.loc.gov,lx2.loc.gov

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-12 09:04:06 -03:00
1c83bd0638
Bug 31673: (QA follow-up) Check if FK exists before attempt to remove
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-11 09:08:56 -03:00
0bd87ce064
Bug 31673: (bug 31086 follow-up) Drop and constraint to allow updating column
It seems that we cannot edit the column while it has a constraint.
If we remove it, update the oclumn, then re-add it, the update succeeds

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-11 08:56:32 -03:00
50d90ff07e
Bug 31333: DBRev 22.06.00.061
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-05 16:02:04 -03:00
3b0151d854
Bug 31333: Database changes
Sponsored-by: Catalyst IT, New Zealand

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-04 08:38:57 -03:00
42f203c4fc
Bug 10950: DBRev 22.06.00.060
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-03 15:05:01 -03:00
bfb7cce602
Bug 10950: (QA follow-up) Exec
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-03 15:01:33 -03:00
feede76f33
Bug 10950: (follow-up) fix typo in kohastructure.sql
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-03 15:01:33 -03:00
e2f7db2c2b
Bug 10950: Database update
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-03 15:01:32 -03:00
f6ba40b141
Bug 25936: DBRev 22.06.00.059
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-03 14:30:39 -03:00
bdb2716616
Bug 25936: (QA follow-up) Enable feature for new installs
It feels safer to enable this rightaway for new installs.
Since we always love to "keep current behavior", I do not really
mind to keep it disabled at upgrade time.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-03 14:25:43 -03:00
640814c4cf
Bug 25936: (QA follow-up) Spelling and wording
[1] NotifyPassowrdChange => NotifyPasswordChange
[2] Someone has changed your library user account password.
    Scary? Changed it myself. Reworded it a bit.
[3] is( $THE_notice->status, 'failed', "The notice was sent immediately");
    Note that THE_notice is imo horrible :) Wont touch it though.
    But I think we should reword 'sent' since it just failed.
    And we actually should mock sending mail here. Adding FIXME.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-03 14:25:43 -03:00
00a552d270
Bug 25936: (follow-up) Rename notice and fix indentation
This patch renames the notice from PASSCHANGE to PASSWORD_CHANGE which
is both clearer and more consistent.  It also fixes the indentation
issues mentioned in the atomicupdate.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-03 14:25:42 -03:00
93fdab7dc5
Bug 25936: Add option to send password change notices
This patch add a new security notice to allow sending notification of
password changes to patrons. If enabled, the 'PASSCHANGE' notice will be
sent to respective patrons whenever their password is updated.

Test plan
1) Run the database updates
2) Enable the new feature by setting 'NotifyPasswordChange' to 'Notify'
3) Change a users password
4) Check that the notice appears in the patrons notices

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-03 14:25:38 -03:00
c4b5268da5
Bug 30944: DBRev 22.06.00.058
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-03 13:47:37 -03:00
Aleisha Amohia
ccb4180339
Bug 30944: Fix cancel recalls actions
This patch fixes the 'cancel selected recalls' button on the biblio
details Recalls page, and ensures a correct cancellation reason is
logged when cancelling a recall in transit.

To test:
1) Ensure UseRecalls is enabled and relevant recalls circulation rules
are set
2) Check out Item A to Patron B
3) Log into OPAC as Patron A
4) Search for Item A and place a recall
5) Go back to the staff interface and search for Item A. When viewing
the biblio record, go to the recalls tab.
6) Check the checkbox for your recall, and click the button to cancel
selected recalls.
7) Confirm your recall is successfully removed and you're redirected to
the correct recalls page for this biblio.
8) Go back to the OPAC and place a recall again. This time set the
pickup location to a different library, one that you're not logged in at
9) Back in the staff interface, check in Item A and confirm the recall
and transfer
10) Go to Circulation -> Recalls to pull. Your recall should show here.
Click the button to cancel the recall and revert the transfer
11) Confirm the recall has been cancelled
12) Go to Reports and create a new SQL report with the following SQL:
select * from branchtransfers b join items i on
b.itemnumber=i.itemnumber where i.barcode = <<barcode>>
13) Run the report and paste the barcode of Item A in the field
14) Confirm there are two rows returned - the transfer triggered when
the recall was confirmed, with a reason of 'Recall' and a cancellation
reason of 'RecallCancellation, and the transfer sending the item back
home when the recall was cancelled, with a reason of
'RecallCancellation'.

Sponsored-by: Catalyst IT

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-03 13:44:11 -03:00
18a22f59d3
Bug 29071: DBRev 22.06.00.057
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-03 08:49:22 -03:00
d273baefc4
Bug 30571: DBRev 22.06.00.056
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-03 08:47:47 -03:00
Katrin Fischer
7613c4066d
Bug 29071: (QA follow-up) Fix typo acual in syspref description
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-03 08:42:41 -03:00
0f664db0ca
Bug 29071: Add HoldsQueueSplitNumbering syspref for any libraries that may not have it
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-03 08:42:41 -03:00
e27d9deb56
Bug 29071: Add HoldsSplitQueueNumbering to installer data
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-03 08:42:40 -03:00
Katrin Fischer
9cffbb4f87
Bug 30571: (QA follow-up) Update marc to MARC in docs
... don't say it, I know.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-03 08:29:25 -03:00
31293d711e
Bug 30571: Table z3950servers: Make host, syntax and encoding NOT NULL
This is not a sync issue between structure and db revs.
It just seems a logical move.
Note that the interface for long does not allow these fields to be empty.

Test plan:
Run dbrev.
Add a new Z3950/SRU server. Verify if it works as expected.

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

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-03 08:29:24 -03:00
559d01c147
Bug 26368: DBRev 22.06.00.055
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-03 08:20:41 -03:00
eda13c6f90
Bug 26368: Add OCLC options to marc21_leader.tt
See documentation at:
https://www.oclc.org/bibformats/en/fixedfield/elvl.html

To test:
 1 - Apply patch, updatedatabase
 2 - Edit a record in the basic editor
 3 - Edit the leader using the plugin
 4 - Note the options for '17 - Encoding level'
 5 - Find the system preference 'UseOCLCEncodingLevels'
 6 - Edit the record again
 7 - Note new options I,J,K,M
 8 - Set the value of encodign level to one of the new options and save
 9 - Edit again
10 - Confirm the value is displayed correctly selected
11 - Repeat tests using advanced cataloging editor

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-03 08:04:05 -03:00