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>
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>
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>
* 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
[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>
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>
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>
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>
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>
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>
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>