Test plan (ktd):
1) reset_all
2) Run first part of the 241200017.pl atomicupdate manually
koha-mysql kohadev
ALTER TABLE illrequests DROP FOREIGN KEY illrequests_bnfk;
3) Create an ILL request linked to a borrower that doesn't exist (simulate old data):
INSERT INTO illrequests (`backend`, `borrowernumber`,`branchcode` ) VALUES ('Standard', '99999', 'CPL');
4) Run the 2nd part of the atomicupdate manually:
ALTER TABLE illrequests ADD CONSTRAINT illrequests_bnfk FOREIGN KEY(`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE;
5) Notice you get the error:
ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (., CONSTRAINT FOREIGN KEY () REFERENCES () ON DELETE SET NULL ON UPDATE CASCADE)
6) Run the added query in the patch:
UPDATE illrequests SET borrowernumber = NULL WHERE borrowernumber NOT IN (SELECT borrowernumber FROM borrowers);
7) Repeat step 4)
8) Notice there's no errors
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 94d5c37db8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
- Rename LanguageToReportOnMerge system preference to LanguageToUseOnMerge
- Use "use" instead of "report" in system preference description
- Mark this feature as UNIMARC-only.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Hanna Leiker <tech.hanna@salinapublic.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch changes the sample MEMBERSHIP_EXPIRY email notice to Template
Toolkit syntax.
To test:
1. Apply patch and reset_all
2. Go to Tools > Notices and slips
3. Check the MEMBERSHIP_EXPIRY email notice, make sure everything looks good (TT syntax, grammar and spelling OK)
4. Add a value in MembershipExpiryDaysNotice
5. Change a patron's account so that it expires in the number of days in MembershipExpiryDaysNotice
6. Add an email address in the patron's account
7. Run /misc/cronjobs/membership_expiry.pl -c
8. Go to the patron's notices and check that the text of the notice was generated correctly and that the grammar and spelling are OK
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This is required to allow for long primary keys from the
account_debit_types table.
Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
The SQL file doesn't load properly due to a missing comma - this patch fixes that
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This fixes the holds queue and associated tests.
I also updated the sql file to fix an issue and the LocalHoldsPriority tests to fix a typo.
I'm working on final unit tests for the holds queue for all the options for QA but I wanted to get the queue changes ready for sign-off.
UPDATED TEST PLAN
This patch adds new options to the LocalHoldsPriority system preference to allow for the following options:
'None' the equivalent to 'Don't' pre-patch
'GiveLibrary' the equivalent to 'Do' pre-patch
'GiveLibraryAndGroup' Allows for checking the library first, then hold groups
'GiveGroup' Allows to prioritize within a group without prioritizing any library first.
The included patches will update the preference in existing installations to maintain current behavior.
To Test:
BEFORE APPLYING THE PATCH
/Tip/
I kept the following tabs open:
-The holds screen (for suspending, checking order, etc)
-Check in screen (can ignore holds to keep them all in place)
-Holds to Pull with "All" for Libraries
-System Preferences
/Setup Groups and confirm current behavior/
1. Set the following system preferences:
-" LocalHoldsPriority " system preference to "Give"
-"LocalHoldsPriorityPatronControl" to "home library"
-"LocalHoldsPriorityItemControl" to "home library"
-"RealTimeHoldsQueue" to "Enable"
2. Create 2 Library Groups
- Set them to be hold groups
- I called mine group 1 & group 2
3. Add 2 libraries each to each group.
- Group 1
- Centerville
- Fairfield
- Group 2
- Fairview
- Franklin
4. Find a patron for each branch in the groups
- Centerville - Changed 23529000035676 (Henry)
- Fairfield - Changed 23529000050113 (Jordan)
- Fairview - Changed 23529001000463 (Edna)
- Franklin - 23529000121682 (Nicole)
5. Find a record with at least 2 items
6. If needed change the home and holding libraries so you have at least one item for each hold group
- Centerville - 39999000000252
- Fairview - Changed 39999000000238
7. Place 2 record level holds for the record.
- One for 23529000035676 (Henry) for pickup at Centerville (Priority 1)
- One for 23529001000463 (Edna) for pickup at Fairview (Priority 2)
8. Check in 39999000000238. The hold popup should be for the second hold (Henry), not the first (Edna.) Ignore the hold
9. Edit the record then save to trigger real time queue update
10. On the Holds Queue (submit after each set of changes):
- Centerville should be for Henry
- Fairview should be for Edna
/apply patch and confirm behavior still works/
10. Apply patch
11. Rebuild the database then restart_all (in sandboxes it's an action, in ktd " dbic && updatedatabase && restart_all ")
12. Confirm that " LocalHoldsPriority " is set to "Give Library"
13. Repeat steps 8-10, behavior should be the same.
/ check library then library group setting/
14. Change " LocalHoldsPriority " to "Give library then library group"
15. Set the following record level holds for the record in the following order:
*You can add Jordan and Nicole's, then rearrange the order.
- Pickup at Fairfield - 23529000050113 (Jordan)
- Pickup at Franklin - 23529000121682 (Nicole)
- Pickup at Centerville - 23529000035676 (Henry)
- Pickup at Fairview - 23529001000463 (Edna)
17. Check in 39999000000252 - should try and fill to Centerville - 23529000035676 (Henry)
17. Check in 39999000000238 - should try and fill to Fairview - 23529001000463 (Edna)
18. On the Hold Queue:
- Centerville should be for Henry
- Fairview should be for Edna
19. Suspend the hold for 23529001000463 (Edna)
20. Check in 39999000000238 should try and fill to 23529000121682 (Nicole) (ignore the hold)
21. On the Holds Queue:
- Centerville should be for Henry
- Fairview should be for Nicole
/ check library group setting /
22. Reset the holds to match step 15.
23. Change " LocalHoldsPriority " to "Give group"
24. Check in 39999000000252 - should try and fill to Fairfield (Jordan) (ignore the hold)
25. Check in 39999000000238 - should try and fill to Franklin (Nicole) (ignore the hold)
26. On the Holds Queue:
- Centerville should be for Jordan
- Fairview should be for Nicole
/check no priority /
27. Change " LocalHoldsPriority " to "Don't give"
28. Reset the holds to match step 15.
29. Check in 39999000000238 - Should fill to Fairfield (Jordan) (ignore the hold)
30. Check in 39999000000252 - Should fill to Fairfield hold (Jordan) (ignore the hold)
31. On the Holds Queue:
- Centerville should be for Jordan
- Fairview should be for Nicole
/Also check/
Item level holds behave as expected
Different combinations of LocalHoldsPriorityItemControl and LocalHoldsPriorityPatronControl
Sponsored by: Cape Libraries Automated Materials Sharing
Sponsored by: Northeast Kansas Library System (NEKLS)
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This update moves the atomic update to the correct place, updates permissions, and fixes an error in the original patch.
Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch adds a DB rev to update the system preference in existing installations.
# Please enter the commit message for your changes. Lines starting
Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch adds new options to the LocalHoldsPriority system preference to allow for the following options:
'None' the equivalent to 'Don't' pre-patch
'GiveLibrary' the equivalent to 'Do' pre-patch
'GiveLibraryAndGroup' Allows for checking the library first, then hold groups
'GiveGroup' Allows to prioritize within a group without prioritizing any library first.
The included patches will update the preference in existing installations to maintain current behavior.
To Test:
BEFORE APPLYING THE PATCH
/Setup Groups and confirm current behavior/
1. Set the " LocalHoldsPriority " system preference to "Give", "LocalHoldsPriorityPatronControl" to "home library" and "LocalHoldsPriorityItemControl" to "home library"
2. Create 2 Library hold Groups
- I called mine group 1 & group 2
3. Add 2 libraries each to each group.
- Group 1
- Centerville
- Fairfield
- Group 2
- Fairview
- Franklin
4. Find a patron for each branch in the groups
- Centerville - 23529000035676 (Henry)
- Fairfield - Changed 23529000050113
- Fairview - Changed 23529001000463 (Edna)
- Franklin - 23529000121682
5. Find a record with at least 2 items
6. If needed change the home and holding libraries so you have at least one item for each hold group
- Centerville - 39999000000252
- Fairview - Changed 39999000000238
7. Place 2 record level holds for the record.
- One for 23529000035676 for pickup at Centerville (Priority 1)
- One for 23529001000463 for pickup at fairview (Priority 2)
8. Check in 39999000000238. The hold popup should be for the second hold, not the first.
/apply patch and confirm behavior still works/
9. Apply patch
10. Rebuild the database then restart_all (in sandboxes it's an action, in ktd " dbic && updatedatabase && restart_all ")
11. Confirm that " LocalHoldsPriority " is set to "Give Library"
12. Repeat steps 7-8, behavior should be the same.
/ check library then library group setting/
13. Change " LocalHoldsPriority " to "Give library then library group"
14. Set the following record level holds for the record:
- Pickup at Fairfield - 23529000050113
- Pickup at Franklin - 23529000121682
- Pickup at Centerville - 23529000035676 (Henry)
- Pickup at Fairview - 23529001000463 (Edna)
15. Check in 39999000000252 - should try and fill to Centerville - 23529000035676 (Henry)
16. Check in 39999000000238 - should try and fill to Fairview - 23529001000463 (Edna)
17. Cancel the hold for 23529001000463
18. Check in 39999000000238 should try and fill to 23529000121682
/ check library group setting /
19. Reset the holds to match step 14.
20. Check in 39999000000252 - should try and fill to Fairfield
21. Check in 39999000000238 - should try and fill to Franklin
/check no priority /
22. Reset the holds to match step 14.
23. Check in 39999000000238 - Should fill the Fairfield hold
24. Check in 39999000000252 - Should fill the Franklin hold
/Also check/
Item level holds behave as expected
Different combinations of LocalHoldsPriorityItemControl and LocalHoldsPriorityPatronControl
Sponsored by: Cape Libraries Automated Materials Sharing
Sponsored by: Northeast Kansas Library System (NEKLS)
Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch adds a new preference 'CardnumberLog' which allows libraries
to track cardnumebr changes for patrons.
While these changes are currently captured in the BorrowersLog, some libraries
would like to keep cardnumber chanegs specifically, and for a longer period than
other borrower modifications.
To test:
1 - Apply patches, update database
2 - Ensure BorrowersLog and CardnumberLog are enabled
3 - Edit a borrower, not thier cardnuber
4 - Confirm in Modification Log only one entry is recorded
5 - Edit again, changing cardnumber only
6 - Confirm 2 modifications are recorded, a MODIFY and a MODIFY_CARDNUMBER
7 - Disable BorrowersLog
8 - Edit patron changing something other than cardnumber
9 - Confirm no log generated
10 - Edit borrowers cardnumber
11 - Confirm one MODIFY_CARDNUMBER recorded
12 - Disable CardnumberLog
13 - Edit patrons cardnumber and other fields
14 - Confirm no logs generated
Signed-off-by: Philip Orr <philip.orr@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
* Rephrases the system preference description a bit
* Adds IGNORE to the database statement
* Update output message of database statement to include pref name
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch updates the atomic update to fix an error when the database was updated and the permissions for the atomic update file.
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Some libraries are getting dates of birth from the
self-registration form that make patrons impossible
ages, e.g. year of birth 1900.
To Test:
1) Navigate to the oPac
2) Ensure you are not logged in
3) Below the log in, see 'Create an Account'
4) Click the link and complete the relevant fields
5) Add an unrealistic d.o.b e.g 1900
6) Complete the verification and click 'Submit'
7) Your acount has been created
8) Apply the patch
9) Navigate to the staff site
10) Navigate to Administration > SystemPreferences
11) Navigate to OPAC preferences
12) Identify PatronSelfRegistrationAgeRestriction
13) Add a maximum age in numberals e.g. 100
14) Repeat steps 1 - 6
15) An error message that you have exceeded max age will appear.
16) Alter your date of birth to make your age below that of the max age you set
17) Complete the verification
18) Your account should be created as normal
Sponsored-by: Cheshire
Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Changes "The following items" to "These items" (and singular equivalents).
Removes "currently", as it is unnecessary.
End result:
- These items are overdue
- This item is overdue
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This is part of our guideline and we should enforce it.
This patch also add "is_boolean => 0" for int(1) that are not boolean
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
To test:
1. APPLY PATCH
2. updatedatabase
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit addresses all Hackfest QA related feedback:
1) Update of all strings that required update, including UI messages and
sys pref description
2) Moved the history check information from staffnotes to its own
pipe-separated illrequestattribute 'historycheck_requests'
3) Fix display of ILL request information on the history check screen
(Staff), including proper label naming (e.g. branchcode -> library),
show status description instead of code, uppercase labels.
4) Updated OPAC display to match Staff UI's display of matching history
requests
5) Removed ISSN criteria for matching requests check
6) Update tests accordingly
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
It appears the atomic update had wrong permissions:
prove xt/find-misplaced-executables.t
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>