Alex Buckley [Wed, 10 Jul 2019 17:28:23 +0000 (17:28 +0000)]
Bug 23295: Automatically restrict (debar) patrons when email/sms notices fail
When the 'RestrictPatronsWithFailedNotices' syspref is enabled then
patrons with email and sms notices which failed sending (have a
message_queue.status field of 'failed') have a restriction (debarment)
applied to them.
Test plan:
1. In the Koha staff client > Tools > Overdue notice/status triggers and
create the 'First' rule for all patron categories as:
Delay: 1
Letter: Overdue Notice
SMS: ticked
Ensure you have an SMS notice for the ODUE letter.
2. In the system preferences make sure you enter dummy data into the
SMSSendUsername, SMSSendPassword and EmailSMSSendDriverFromAddress
sysprefs
2. Find two non-debarred patrons and make sure they have invalid SMS numbers set. The SMS numbers must be INCORRECT, for example "123" as an SMS number. Leaving this field empty will result in the message_transport_type defaulting to 'print' instead of 'sms'.
3. Check one item out to each patron in step 2
4. Jump into the database and run the query:
UPDATE issues SET date_due=<2 days before current date> WHERE
borrowernumber=<borrower1>;
UPDATE issues SET date_due=<2 days before current date> WHERE
borrowernumber=<borrower2>;
5. Go to misc/cronjobs directory and enter the Koha shell:
sudo koha-shell <instancename>
6. Run: ./overdue_notices.pl
7. Exit the shell and jump back into the database and run the query:
SELECT message_transport_type, status FROM message_queue WHERE
borrowernumber=<borrower1> OR borrowernumber=<borrower2>;
8. Confirm both new notice records have the message_transport_type is 'sms' and the status of 'pending'
9. Exit the database and re-enter the Koha shell and run the command:
./process_message_queue.pl
10. Jump back into the database re-run the query from step 7 and confirm
the status is 'failed' for both
11. Also run the query:
SELECT * FROM borrower_debarments WHERE borrowernumber=<borrower1> OR
borrowernumber=<borrower2>;
Notice there is no added debarment to these two patrons
12. Apply patch, restart memcached and plack. In the
installer/data/mysql directory enter the Koha shell and run the command:
./update_database.pl
13. In the Administration > Global System Preferences interface of the
staff client notice there is a new system (set to "Don't" by default)
named 'RestrictPatronsWithFailedNotices'.
Enable it (i.e. select 'Do')
14. Create a new file in the /etc/cron.daily directory named koha-custom and
add the following line to it:
15. In the misc/cronjobs directory enter the Koha shell and run the command:
./restrict_patrons_with_failed_notices.pl
16. The script should output text saying: There are borrowers with
failed SMS or email notices
However because you haven't given the script the argument -c it won't
apply debarments (restrictions) to any of the patrons with the failed
SMS or email notices.
16. Query the borrower_debarments table:
SELECT * FROM borrower_debarments WHERE borrowernumber=<borrower1> OR
borrowernumber=<borrower2>;
Notice they still have no restriction
17. Now in the Koha shell run the command:
./restrict_patrons_with_failed_notices.pl -c
18. Notice the script outputs the text:
There are borrowers with failed SMS or email notices
Applying restriction to patron <borrowernumber>: <borrower firstname>
<borrower surname>;
19. Repeat step 16 and notice both patrons now have 1 restriction each
with the borrower_debarments.type=SUSPENSION and comment=SMSnumber
invalid and expiration=NULL
20. Query the borrowers table:
SELECT debarred, debarredcomment FROM borrowers WHERE
borrowernumber=<borrower1> OR borrowernumber=<borrower2>;
21. Notice the values are:
debarred= 9999-12-31
debarredcomment= SMS number invalid
22. Repeat step 17 and notice the script outputs:
There are borrowers with failed SMS or email notices
Patron <borrowernumber>: <borrower firstname> <borrower surname> is currently restricted due to having an invalid SMS number. No new restriction applied"
23. Repeat step 16 and notice no new debarment has been added to those
borrowers as they have already been restricted from having a failed SMS
notice.
24. In the Koha home directory run the command:
prove t/db_dependent/Koha/Notices.t
This unit test contains the tests for the new subroutines added to
Koha/Notice/Message.pm which are restrict_patron_when_notice_fails() and
get_failed_notices()
25. All tests should pass
26. Sign off
Sponsored-by: Catalyst IT Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Aleisha Amohia [Tue, 18 Jun 2024 03:29:32 +0000 (03:29 +0000)]
Bug 37109: Don't initialise claims fields when duplicating acquisitions orders
These fields don't exist in the aqorders table and don't need to be
set/passed on.
* claims_count (dropped in Bug 24161)
* claimed_date (dropped in Bug 24161)
* placed_on (no evidence of this field existing in aqorders)
* received_on (no evidence of this field existing in aqorders)
To test:
1. Go to Acquisitions
2. Create a vendor if you don't already have one
3. Create a basket if you don't already have one
4. Add an order to the basket and Save
5. Add another order to the basket, choose "From existing orders
(copy)"
6. Continue through the process and confirm you're able to duplicate the
order as normal
7. Confirm tests still pass t/db_dependent/Koha/Acquisition/Order.t
Sponsored-by: Catalyst IT Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Matt Blenkinsop [Fri, 7 Jun 2024 10:23:38 +0000 (10:23 +0000)]
Bug 28575: Add unit tests
prove t/db_dependent/Circulation.t
Sponsored-by: Rapid City Public Library Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Matt Blenkinsop [Tue, 11 Jun 2024 10:43:24 +0000 (10:43 +0000)]
Bug 28575: Add a new check-in message for the new syspref
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Matt Blenkinsop [Fri, 7 Jun 2024 10:23:01 +0000 (10:23 +0000)]
Bug 28575: Stop lost fine refund if fine is older than syspref value
Test plan:
1) Apply patch and reset_all
2) Checkout an item to a patron
3) Mark that item as lost
4) Add a manual invoice for that item's barcode to the patron's account
5) Pay that fine in the Make a payment tab
6) In system preferences, search for NoRefundOnLostFinesPaidAge
7) Set this to -1. I use this value here to avoid needing to go into the database to change the date of the payment we made in step 5. Any fines older than -1 days (i.e. all fines) will be caught by the syspref which is what we want to test)
8) Check in the item
9) The check in message should display "Any lost item fees for this item will remain on the patron's account."
10) Navigate to the Patron's account and confirm that no credit has been added and that the lost fee has therefore not been refunded
11) Run unit test: prove t/db_dependent/Circulation.t
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Matt Blenkinsop [Fri, 7 Jun 2024 10:22:23 +0000 (10:22 +0000)]
Bug 28575: Add new syspref 'NoRefundOnLostFinesPaidAge'
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Nick Clemens [Fri, 27 Sep 2024 18:31:28 +0000 (18:31 +0000)]
Bug 36766: (QA follow-up) Tidy and use die_on_error over return
Tidy and add exec to atomic update
Fix POD
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Alex Buckley [Fri, 17 May 2024 02:17:55 +0000 (02:17 +0000)]
Bug 36766: Only list the file basename as the SFTP put destination
Sponsored-by: Horowhenua Libraries, Toi Ohomai Institute of Technology, Plant and Food Research Limited, Waitaki District Council, South Taranaki District Council New Zealand Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Alex Buckley [Thu, 9 May 2024 18:14:56 +0000 (06:14 +1200)]
Bug 36766: Make SFTP notice more customisable
SFTP_FAILURE and SFTP_SUCCESSFUL notices can be configured from Notices
and slip tool.
Sponsored-by: Horowhenua Libraries, Toi Ohomai Institute of Technology, Plant and Food Research Limited, Waitaki District Council, South Taranaki District Council New Zealand Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Sponsored-by: Horowhenua Libraries, Toi Ohomai Institute of Technology, Plant and Food Research Limited, Waitaki District Council, South Taranaki District Council New Zealand Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 31143: Fix/identify all cases where '0000-00-00' may still remain in the database
This patch identifies date fields in the database (timestamp, datetime, date) that are 0000-00-00 and sets them to NULL
Test plan -
Examples of setting up some 0000-00-00 date fields:
e.g. Borrowers table
update borrowers set dateexpiry="0000-00-00" where borrowernumber=49;
e.g. Items table
update items set datelastseen="0000-00-00" where itemnumber=12;
To identify the cases:
1) Set up some 0000-00-00 date fields
2) Run the misc/maintenance/search_for_data_inconsistencies.pl script
3) Run fix_invalid_dates.pl -v
To fix the cases:
1) Run fix_invalid_dates.pl -c -v
2) Notice the value has changed from 0000-00-00 to NULL
e.g. Borrowers table
select dateexpiry from borrowers where borrowernumber=49;
e.g. Items table
select datelastseen from items where itemnumber=12;
Signed-off-by: Shi Yao Wang <shi-yao.wang@inlibro.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Pedro Amorim [Tue, 6 Aug 2024 09:41:32 +0000 (09:41 +0000)]
Bug 31143: Work around subtracting datetime if date_of_birth undef
To test:
1) Run the following SQL:
update borrowers set dateofbirth = '0000-00-00' where borrowernumber = 45;
2) Access the borrower edit page through staff UI:
http://localhost:8081/cgi-bin/koha/members/memberentry.pl?op=edit_form&destination=circ&borrowernumber=45
3) Notice you get an error
4) Run the script:
perl misc/maintenance/search_for_data_inconsistencies.pl
5) Notice you get an error
6) Apply patch restart plack and repeat -> no errors
This is not perfect but its all I have time for, for now. Follow-ups are welcomed as always.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Shi Yao Wang <shi-yao.wang@inlibro.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Pedro Amorim [Mon, 21 Oct 2024 11:07:15 +0000 (11:07 +0000)]
Bug 36118: (QA follow-up): Make labels translatable
Also move the space+colon from 'Patron notice sent: ' label to ill-request-log.inc template
Adjust status_change.tt 'From' capitalized because for status changed this is now:
$ Status changed: From "New request" to "Requested"
Instead of the previous:
$ Status changed from "New request" to "Requested"
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Pedro Amorim [Mon, 1 Apr 2024 12:24:54 +0000 (12:24 +0000)]
Bug 36118: Update status and send notice core actions logging
1) Enable ILLlog sys pref
2) Enable ILLModule and install 'FreeForm', run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
3) Create a new FreeForm request, visit:
<INTRA_URL>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=FreeForm
4) You need to checkout FreeForm's branch compatible with 24.05:
cd /kohadevbox/koha/Koha/Illbackends/FreeForm
git checkout 24.05.x
koha-plack --restart kohadev
5) Pick a type, insert '42' on cardnumber and pick a library, hit 'Create'
6) On the next screen, click 'Confirm request' and confirm.
7) Click 'ILL request log', notice the entry is there but has no information about who did the logged action.
8) Apply patches. Repeat steps 3) to 6). Notice the logged action now has information about the user who did the action.
9) Extra: Click 'Send notice to patron' and confirm that action is also logged with patron information.
To my knowledge, these are the only 2 actions logged by core Logger.
Backends logging their own actions that want patron information need to add it themselves following this pattern.
Sponsored-by: UKHSA - UK Health Security Agency Sponsored-by: PTFS Europe Ltd Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Pedro Amorim [Mon, 1 Apr 2024 12:20:58 +0000 (12:20 +0000)]
Bug 36118: Move common ILL log parts to single ill-request-log.inc file
Sponsored-by: UKHSA - UK Health Security Agency Sponsored-by: PTFS Europe Ltd Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This moves action logs related methods to its own .inc file in order to be reusable
Sponsored-by: UKHSA - UK Health Security Agency Sponsored-by: PTFS Europe Ltd Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Pedro Amorim [Mon, 19 Feb 2024 16:18:33 +0000 (16:18 +0000)]
Bug 36118: Send patron object to template
Sponsored-by: UKHSA - UK Health Security Agency Sponsored-by: PTFS Europe Ltd Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Magnus Enger [Tue, 15 Oct 2024 11:47:25 +0000 (13:47 +0200)]
Bug 38173: Fix description of koha-dump --exclude-indexes
To test:
- Look at debian/scripts/koha-dump
- The description of --exclude-indexes reads:
"Include Zebra indexes on the backup"
- Apply the patch
- Look at the file again. The description is now:
"Exclude Zebra indexes from the backup"
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Phil Ringnalda [Fri, 18 Oct 2024 03:16:14 +0000 (20:16 -0700)]
Bug 38200: Remove dead code to delete authorities in authorities/authorities.pl
It has probably never been used. There's no sign of any UI to delete from
the authority editor or auth_finder in the last 13 years of templates, and
it was unused when it landed; the patch that actually made the first patch
work, a month later, put deleting authorities in authorities_home.pl, where
it has been ever since.
It certainly hasn't been used since bug 17600 landed in 2021, since it
doesn't 'use C4::AuthoritiesMarc qw( DelAuthority );' and so if you try to
use it you just get an error for your trouble.
Sponsored-by: Chetco Community Public Library Signed-off-by: Yanjun Li <yanjun.li@bywatersolutions.com> Amended-by: Jonathan Druart
tidy
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Magnus Enger [Thu, 5 Sep 2024 06:38:44 +0000 (08:38 +0200)]
Bug 37787: Remove mention of elastic_index from POD
After the introduction of misc/workers/es_indexer_daemon.pl,
misc/workers/background_jobs_worker.pl should not handle the
elastic_index queue. But the latter script still mentions this
queue in the POD. This patch removes that mention.
To test:
- Run perldoc misc/workers/background_jobs_worker.pl
- Verify "elastic_index" is mentioned under --queue
- Apply this patch
- Run perldoc again and verify the mention of "elastic_index"
is gone
Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
To test:
- Copy the koha-worker script to the standard location:
$ sudo cp debian/scripts/koha-worker /usr/sbin/koha-worker
- Check "sudo koha-worker --help" and verify elastic_index is
not mentioned in the list of "current queues"
- See https://wiki.koha-community.org/wiki/Testing_man_pages for
how to check the "man" page. elastic_index should not be
mentioned in the list of "Current queues".
- Both places aboce should have a note about elastic_index not
being active when koha-es-indexer is running.
Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Pedro Amorim [Wed, 2 Oct 2024 10:25:55 +0000 (10:25 +0000)]
Bug 38060: Load bookings table on page load if tab href exists in URL hash
Test plan, k-t-d or sandbox:
1) Start by making an item bookable. Visit a record's detail page:
<staff_url>/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=76
2) Make the first item (39999000003154) bookable by setting 'Bookable': Yes and click 'Update'
3) At the top of the page, you should now see a 'Place booking' button. Click that.
4) Select the patron: type 'koha' and pick 'koha (42)'. (This is borrowernumber 51).
5) Select booking dates, any date interval in the future. Click 'Submit'.
6) Attempt to access this patron's detail page with the bookings tab open:
<staff_url>/cgi-bin/koha/members/moremember.pl?borrowernumber=51#bookings_panel
7) Notice the tab opens, but the table does not render.
8) Attempt the same in the circulation page:
<staff_url>/cgi-bin/koha/circ/circulation.pl?borrowernumber=51#bookings_panel
9) Again, notice the tab opens, but the table does not render.
10) Apply patch. Repeat steps 6) and 8). Notice the table now renders.
Additional testing:
1) Place a hold for this patron and attempt to access the holds tab directly:
/cgi-bin/koha/circ/circulation.pl?borrowernumber=51#holds_panel
2) Notice it opens the tab and renders the table. This was already the case prior to this patch, this patch is only bringing the same behavior to the bookings tab for consistency.
Signed-off-by: Dave Daghita <ddaghita@mckinneytexas.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Nick Clemens [Wed, 23 Oct 2024 12:22:16 +0000 (12:22 +0000)]
Bug 38237: Add logging to erm_run_harvester cronjob
This patch simply adds logging to the cronjob
To test:
1 - Enable CronjobLog
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=CronjobLog
2 - Enable ERMModule
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ERMModule
3 - Home -> E-resource Management -> Data providers -> New data provider
Fill from registry or create your own, but change the URL and put in any required numbers
We don't need a real test, just to run the ob
4 - perl misc/cronjobs/erm_run_harvester.pl --begin-date 2024-01-01 --dry-run --debug
5 - View the logs, no log of the script
6 - Apply patches
7 - Run the job again
8 - Check logs
9 - Success!
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Tue, 22 Oct 2024 08:52:46 +0000 (10:52 +0200)]
Bug 38177: Fix lengthMenu by removing extend
$.extend is doing a deep copy of the objects.
```
var dataTablesDefaults = { "lengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, __('All')]] };
var mine = {lengthMenu: [[1, 2, 5, 10], [1, 2, 5, 10]]};
$.extend(true, {}, dataTablesDefaults, mine);
```
Returns:
```
[
1,
2,
5,
10,
-1
]
```
Which is ugly and not what we want.
We only need to merge the first level. Using the spread operator (...) will do the trick here.
Note that we certainly want to adjust all the other occurrences of
extend for DT's options.
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Pedro Amorim [Mon, 21 Oct 2024 15:09:44 +0000 (15:09 +0000)]
Bug 38177: Fix lengthMenu for components using KohaTable
EBSCO HoldingsIQ doesnt consider a "All" option so neither should we.
At the moment, if we pick 'All', only 100 are listed due to the logic in Providers/EBSCO/build_query_pagination.
The original code hints at trying to do this but its not working.
I think this got lost sometime during KohaTable.vue
This patch should also have the same entry for EHoldingsEBSCOTitlePackagesList but that isnt using KohaTable and for some reason its not picking up on either aLengthMenu or lengthMeny, always shows 'All'.
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Wed, 16 Oct 2024 08:11:24 +0000 (10:11 +0200)]
Bug 38177: Do not use stash to retrieve parameters
The pagination for EBSCO's titles, packages and resources is broken. We
shouldn't rely on $c->stash but use params from the request instead.
Test plan:
1) Setup all the system preferences in ERM:
<staff_url>/cgi-bin/koha/admin/preferences.pl?tab=erm
2) Enable EBSCO in ERMProviders. Set the ERMProviderEbscoApiKey and ERMProviderEbscoCustomerID prefs.
3) Do a search that returns more than 20 records. Click on a page other than 1. Notice the records do not change (Page is the same).
4) Apply patch. Repeat. Notice pagination now works.
Search titles, packages and resources
Use the pagination and modify the number of results per page
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Tue, 22 Oct 2024 08:02:56 +0000 (10:02 +0200)]
Bug 31581: Remove zebra files for NORMARC
Those are leftovers, we should have removed them on bug 18984.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Magnus Enger <magnus@libriotech.no>
Looks good! Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Tue, 24 Sep 2024 12:20:59 +0000 (14:20 +0200)]
Bug 37395: Fix columns visibility on Vue tables
On bug 33066 we reworked a lot of datatables.js to make the JS function
reusable from the Vue component (and especially the KohaTable
component). I guess the regression comes from this change, but I am
surprised that we didn't catch it when testing.
The was a mistake for _dt_visibility, we didn't pass the node. Actually
we cannot pass it as we do not have it yet.
This "node" variable is only used when bKohaColumnsUseNames is passed
(ie. we do not rely on the order of the columns but we need to rely on
their data-colname attributes).
There is then a limitation here: we cannot use bKohaColumnsUseNames from
Vue, but we do not yet.
An ideal fix would be too big for now, especially for an hypothetic use
case.
Test plan:
Confirm that the "Columns" button are now back for the tables of the Vue
apps (ERM, Preservation) and that the settings are taken into account
(hide by default, etc.)
Signed-off-by: Olivier V <olivier.vezina@inLibro.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Katrin Fischer [Fri, 12 Jan 2024 22:52:42 +0000 (22:52 +0000)]
Bug 35769: Fix untranslatable strings in request.tt
This fixes some strings in the JavaScript part of the
template that were missing from the po files.
This is one way to test:
* Apply patch
* Run gulp po:update --lang <language-code>
* Compare strings changed in the patch, with strings
appearing in <language-code>-staff-prog.po
* Translate the strings and remove "fuzzy" line
* In k-t-d, run:
sudo koha-translate --install <language-code> --dev <instance>
* Verify that now the translated version of the template contains
your translated strings
* Verify the translated page works correctly, no errors
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Pedro Amorim [Tue, 22 Oct 2024 10:48:14 +0000 (10:48 +0000)]
Bug 38148: Revert back to get_effective_rule
And update the first conditional logic.
This patch aims to maintain the logic behind the first patch, but restore get_effective_rule.
get_effective_rule_value is using cache and I believe that is the reason why Items.t fail when using that.
Test plan:
1) Search for 'music' on OPAC
2) Notice records have the 'place hold' link
3) Visit circulation rules on Staff:
<staff_url>/cgi-bin/koha/admin/smart-rules.pl
4) On 'Default checkout, hold and return policy' , under 'Hold policy' pick 'From any library'. Hit 'Save'.
5) Repeat 1). Notice the 'place hold' link is gone.
6) Apply patch. restart plack. Repeat 1). Notice the 'place hold' is shown again
Run:
$ prove t/db_dependent/Koha/Items.t
Signed-off-by: andrewa <andrew.auld@ptfs-europe.com> Signed-off-by: Ray Delahunty <r.delahunty@arts.ac.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Aleisha Amohia [Fri, 11 Oct 2024 01:53:11 +0000 (01:53 +0000)]
Bug 38148: Check value of holdallowed circ rule properly
It was noted on Bug 29087 that the value of circulation rules needs to be checked differently, so this follow-up addresses that.
To test:
1. Apply patch and restart services
2. Search for a record on the OPAC. Confirm you can see a link to place a hold.
3. Search for this record on the staff interface and place a hold. Go to Circulation -> Holds to pull and confirm your hold shows in the list.
4. Confirm tests still pass t/db_dependent/Koha/Holds.t
Sponsored-by: Whanganui District Council Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: andrewa <andrew.auld@ptfs-europe.com> Signed-off-by: Ray Delahunty <r.delahunty@arts.ac.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Matt Blenkinsop [Mon, 1 Jul 2024 09:50:45 +0000 (09:50 +0000)]
Bug 27919: (QA follow-up): Add alerts to the UI to show there are return claims
This patch adds info to the UI to show when there is a return claim. It also reconciles the behaviour for allowing the lost status to be changed. Previously the lost status could not be changed if there was a return claim. This is now possible and a message is shown highlighting the fact that there is a return claim as well as the new lost status.
Test plan:
1) Add a return claim to an item.
2) Check the holdings table on the record page and observe that the "Status" column now shows that there is a return claim
3) Click on the barcode for that item in the table to get to the item editing page
4) Observe that the select for the item lost status is not disabled
5) Change the status and save - the form should save correctly and display both the new status as well as a message showing that there is a return claim.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Matt Blenkinsop [Tue, 28 May 2024 13:22:44 +0000 (13:22 +0000)]
Bug 27919: Return claims shouldn't change lost status if already set
This patch prevents a return claim from changing the lost status if it has already been set.
Test plan:
1) In system preferences, set the ClaimReturnedLostValue syspref to any value
2) Checkout an item to a patron
3) Set that item as lost, using a different status to the one you set in step 1
4) Create a return claim on the item
5) Check the item's lost status, it should now have been set to the value you set in step 1
6) Apply patch
7) reset_all
8) Repeat steps 1-5, this time the status should remain at the value you set in step 3 and not be overwritten by the return claim
9) Repeat steps 1,2,4 and 5 - this time the lost status should be set to the value you set in step 1 as we didn't have a pre-existing lost status
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Janusz Kaczmarek [Mon, 30 Sep 2024 09:22:03 +0000 (09:22 +0000)]
Bug 38030: stocknumberAV.pl fails with CSRF protection
The value builder stocknumberAV.pl does not work after applying the CSRF
protection. In console, it generates entries like:
POST
http://localhost:8081/cgi-bin/koha/cataloguing/plugin_launcher.pl
[HTTP/1.1 403 Forbidden 188ms]
Test plan:
==========
1. Modify the MARC bibliographic framework for the default framework by
choosing stocknumberAV.pl as plugin for subfield 952 $i.
2. In Authorized values, add a new category 'INVENTORY'. Add a new
entry there, e.g. 'ABC', with any number in Description (eg. 123).
3. Find any bibliographic record, make sure it uses the default framework.
If not set the framework accordingly.
4. Edit an item linked to this record. Go to the 'i - Inventory number'
subfield. You should see three dots on the right. In the input field
put ABC and click the three dots.
5. Nothing happens. You can check in the browser console--there should
be a message like:
POST http://FQDN:8081/cgi-bin/koha/cataloguing/plugin_launcher.pl
[HTTP/1.1 403 Forbidden 188ms]
6. Apply the patch; restart_all. Refresh the browser window.
7. Repeat p. 4. You should now get the next sequence number next to
the 'ABC' (i.e. ABC 0000000124 or similar).
Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 38065: Auto control number (001) widget in advanced editor does not work under CSRF protection
Auto control number (001) widget in advanced editor does not work under
CSRF protection. A token should be passed to POST ...
control_num_sequences call.
Test plan:
==========
1. Verify that the CONTROL_NUM_SEQUENCE category in authorized values is
present.
3. Add a new authorized value for CONTROL_NUM_SEQUENCE:
b) authorised value: sprLib0001
c) in Description - a short string indicating the type of control
number i.e. "Springfield Library"
4. Create a new bib record using the advanced editor, insert a 001
field, note that the 001 widget is there. Click on "Assign next". There
should be no effect (and you could see [HTTP/1.1 403 Forbidden 706ms] in
the browser console).
5. Apply the patch ; restart_all ; reload the browser.
6. Repeat p. 4. You should get the content of the 001 field generated
by the widget.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 38082: Advanced editor does not save the selected framework
When creating a fresh record in the advanced editor, it does not
save the framework selected from the Settings dropdown.
Test plan:
==========
1. Enable the advanced editor feature (EnableAdvancedCatalogingEditor).
2. Start editing a new record in the advanced editor. Fill in the
mandatory fields, select a framework (other than Default) from the
Settings dropdown, save the record.
3. Select view -- note that the record has been saved with the Default
framework.
4. Apply the patch; restart_all; refresh the browser window.
5. Repeat p. 2.
6. Select view -- you should now see that the record has been saved with
the correct, selected framework.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Thu, 29 Aug 2024 21:54:57 +0000 (21:54 +0000)]
Bug 37505: Remove onloan check when checking out to stats patron
To test:
1. Create a Statistical Patron
2. Set BlockReturnOfLostItems to Block.
3.. Mark an item as lost
4. Check it out to the Statistical Patron. You should see the message "Item was lost, cannot be returned."
5. Set BlockReturnOfWithdrawnItems to Block.
6. Mark an item as withdrawn
7. Check it out to the Statistical Patron. You should see the message "Item was withdrawn, cannot be returned."
8. Turn off BlockReturnOfWithdrawnItems, check out the same item to the Statistical Patron. You should see a message "Item was withdrawn."
9. Place an item on hold.
10. Check it out to the Statistical Patron
11. See the message "Item on hold, please checkin."
12. Make sure ClaimReturnedLostValue is set to a lost value
13. Claim a return, making sure it is not still checked out to the patron
14. Checkit it out to the Statistical Patron.
15. See the message "Item claimed returned, please checkin."
16. Have an item on a regular patron account that has been recalled.
17. Checkit it out to the Statistical Patron.
18. See the message "Item can fill a recall, please checkin."
Signed-off-by: Kelly <kelly@bywatersolutions.com> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Mon, 21 Oct 2024 09:51:45 +0000 (11:51 +0200)]
Bug 38211: frameworkcode must be set before read
It's a stupid global variable, we MUST have this init line BEFORE we
read it!
Test plan:
See the other bugs linked with this one, confirm the test plan for all
of them still pass.
Test plan for this specific bug report:
1. Cataloging - New record -> Audio Cassettes, CDs
2. Fill in the required fields and save
3. Switch to 'Normal', Edit - Edit record
4. Note that 001 and 003 are not visible, and the Settings menu has a checkmark by Audio Cassettes, CDs
5. Click the browser Back button, then Edit - Edit record
6. Note that 001 and 003 are not visible, and the Settings menu has a checkmark by Audio Cassettes, CDs
Bug 38053: Change description of DefaultLongOverduePatronCategories and DefaultLongOverdueSkipPatronCategories system preferences
This patch changes the description of the DefaultLongOverduePatronCategories
and DefaultLongOverdueSkipPatronCategories system preferences
to make it clearer it has to do with the **long overdues** process
and not just the overdues process. It also highlights the
warning by making it bold.
To test:
1. Apply patch
2. Go to Administration > System preferences > Circulation >
Lost item policy
3. Read the description for DefaultLongOverduePatronCategories
and DefaultLongOverdueSkipPatronCategories, make sure it
makes sense, that the grammar and spelling is OK
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 38053: Change section of DefaultLongOverduePatronCategories and DefaultLongOverdueSkipPatronCategories system preferences
This patch moves the DefaultLongOverduePatronCategories and
DefaultLongOverdueSkipPatronCategories system preferences to
the Lost item policy section of the circulation preferences,
to be with the other DefaultLongOverdue system preferences.
To test:
1. Apply patch
2. Go to Administration > System preferences > Circulation > Lost
item policy
--> The two system preferences should be there with the other
ones
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch removes or hides a lot of unecessary fields from the
MARC21 Fast Add framework, notably subfields $6 and $8 which are
used only in advanced cataloging. Fast Add is meant to add an item
fast, while the patron is waiting, in order to check it out to them.
There is no need to enter details, only what is necessary to
identify and check out the item.
To test:
1. Go to Circulation > Fast cataloging
--> Notice all the fields present
2. Fill out mandatory fields (000, 008, 245$a, 942$c)
3. Click 'Save'
--> Notice all the item fields present
4. Apply patch and reset
5. Redo steps 1-3
--> There should be a lot less fields
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Esther <esther@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Fri, 19 Jul 2024 13:29:34 +0000 (13:29 +0000)]
Bug 37412: Style placeholder text in the OPAC
This patch adds a custom style to input placeholder text so that it is
visibly different from the style of text entered in the input.
To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface)
Go to the OPAC and check the appearance of the placeholder text in the
main search bar. Sign off if the vibes are right.
Sponsored-by: Athens County Public Libraries Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Mon, 9 Sep 2024 12:53:05 +0000 (14:53 +0200)]
Bug 37868: Remove C4::Reserves::ToggleSuspend
We can easily replace the calls by ->suspend_hold and ->resume.
Test plan:
No behaviour changes expected.
Confirm that you can still suspend and resume holds (OPAC+staff)
Signed-off-by: Olivier V <olivier.vezina@inLibro.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Alex Buckley [Sun, 12 May 2024 22:02:46 +0000 (22:02 +0000)]
Bug 36725: Add Current publication frequency 310$a to Elasticsearch index mappings
Test plan:
1. Start up KTD with Elasticsearch: ktd --es8 up
2. Apply this patch and restart all services (restart_all)
3. Reset the mappings: Administration > Catalog > Search engine configuration (Elasticsearch) > Reset mappings (at the bottom of the page)
4. Reindex: koha-elasticsearch --rebuild -d -b -a kohadev
5. Alternative to steps 3 and 4: reset_all
6. Add a new record using the default framework and put a term in 310$a, such as 'Annual'.
Sponsored-by: Education Services Australia SCIS Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Thu, 26 Sep 2024 19:36:25 +0000 (19:36 +0000)]
Bug 27123: (follow-up) Add note to warn about removing all messages
This patch adds a note to the batch patron modification form in order to
warn the user about removing multiple messages at once.
To test:
- Apply the patch and go to Tools -> Batch patron modification
- Enter or select multiple patrons and submit them for modification
- On the page previewing the list patrons for modification, scroll down
to the form.
- Find the field for "Message" and confirm that there is a note next to
the checkbox.
Signed-off-by: George Williams <george@nekls.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 27123: Add messages to batch patrons modification
With this patch you can write or delete circulation messages on the
batch patrons modification form
Test plan:
1)Go to Home > Tools > Batch patron modification
2)Write one or more card numbers to access the modification form
3)Notice the input you can interact with
4)Apply patch and repeat 1) & 2)
5)Notice the new input 'Message:' which appeared down the form
6)Write a message and choose a type (opac or intranet)
7)Save & notice the new 'Message' column filled up with what you wrote
before
8)To delete: back on the modification form - check the checkbox beside
the input - save again
Signed-off-by: Valerie Burnett <valerie@bywatersolutions.com> Signed-off-by: George Williams <george@nekls.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Phil Ringnalda [Fri, 7 Jun 2024 20:03:16 +0000 (13:03 -0700)]
Bug 36054: Don't mark MARC21 005 as mandatory in frameworks now that AddBiblio and ModBibilio will set it no matter what
With bug 35993, both AddBiblio and ModBiblio will add a missing 005 or update
an existing 005 to the current timestamp. That makes setting it as mandatory in
bib frameworks pointless: whether you remove it, blank it, or set it, what you
do doesn't matter because it will be set, and set to something different than
what you set.
Test plan:
1. Apply patch, reset_all
2. Administration - MARC bibliographic framework
3. In the Default framework row, Actions - MARC structure
4. In the 005 row, verify the Mandatory column says No
5. 005 row, Actions - View subfields
6. For the @ subfield, verify constraints says Not mandatory
Extra credit: Set EnableAdvancedCatalogingEditor to Enable and in both editors
try to save a record without a 005 or with one set to your choice of value, and
then in the MARC preview verify that no matter what there is always a 005 with
a value other than yours. Bonus for exporting a record, editing it with an
external editor to remove the 005, reimporting it, and verifying that the
imported record has a 005.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 18273: Do not insert authority if there already are duplicates in koha
Test plan:
1) Create an authority with a unique value in a searchable field, for instance a PERSO_NAME authority with 'BZ18273' in the 100$a field.
2) Create a second authority with the same value in the same field.
3) Export this second authority as iso2709 (Save -> MARC (Unicode/UTF-8))
4) Run bulkmarcimport.pl with the following parameters:
perl bulkmarcimport.pl -a --file=/kohadevbox/koha/auth-xxxx.utf8 --match='Heading,100$a' -l /kohadevbox/koha/bulk.log
5) Check in the log file and/or through search that a third authority has been added (despite using the --match option)
6) Apply the patch
7) Delete the 3 authorities and repeat step 1 to 4.
8) Check that a third authority has not been added (--match worked)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch remove the subroutine C4::Members::DeleteExpiredOpacRegistrations.
The code is moved and adjusted to Koha::Patrons.
We now have 2 new methods:
Koha::Patrons->filter_by_expired_opac_registrations
Koha::Patrons->filter_by_safe_to_delete
Test plan:
Run the misc/cronjobs/cleanup_database.pl script with the
--del-exp-selfreg (as well as --verbose and --confirm) and confirm that
it behaves as expected
Note that it improve the output of the verbose mode and now tell if the something
is wrong with the config (syspref not set)
Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch removes the subroutine
C4::Members::DeleteUnverifiedOpacRegistrations and use the
Koha::Objects->filter_by_last_update method that is used for the other
flag in this script.
Test plan:
Confirm that --del-unv-selfreg works the same before and after this
patch applied
Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Thu, 17 Oct 2024 14:46:19 +0000 (14:46 +0000)]
Bug 38197: Remove old version of Bootstrap JS left behind during upgrade
This patch removes an old version of Bootstrap JS which should have been
removed by Bug 35402. The correct Bootstrap JS file is at
koha-tmpl/opac-tmpl/lib/bootstrap/js/bootstrap.bundle.min.js
This patch should have no effect on any OPAC functionality.
Bootstrap-related features should still work: Dropdown menus, modals,
etc.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Phil Ringnalda [Wed, 2 Oct 2024 02:01:39 +0000 (19:01 -0700)]
Bug 38056: Search term after deleting an authority shouldn't be URI encoded
Now that deleting an authority record uses a form, rather than building up a
URL in JavaScript, using the filter | uri on the value (confusingly named
value) which passes along the search terms to reload after deleting results
in a bad search. It should instead use the filter | html.
Test plan:
1. Without the patch, top menu - Authorities
2. The default search, Main heading ($a only), Authority type Default,
Operator contains, Order by Heading A-Z will work fine. You need to a
search which will return more than one of the same thing (not hard in
ktd) - for MARC21 search for a professional
3. You should get five results. For one of them, Actions - Delete - Confirm
that you meant to click it
4. You now have a%20professional in the search box, and search results for
whatever ElasticSearch thinks a% means. It's certainly not professional -
you can change that term to any random string and get the same results
5. Apply patch, top menu - Authorities
6. Repeat steps 2 and 3, but this time after deleting another result,
you will get a professional without the %20 in the search box, and
your results will be the remaining Addison-Wesley professional computing
series authorities
Sponsored-by: Chetco Community Public Library Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Pedro Amorim [Thu, 5 Sep 2024 18:47:20 +0000 (18:47 +0000)]
Bug 37850: Add branchillemail to libraries public REST endpoint
To test, before applying patch:
1) Visit <opac_url>/api/v1/public/libraries
2) Notice illemail is not shown for each library
3) Apply patch. Restart plack
4) Repeat 1). Notice illemail is now shown for each library
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Didier Gautheron [Thu, 14 Mar 2024 13:51:35 +0000 (14:51 +0100)]
Bug 36315: ILSDI GetRecords use AuthorisedValues cache for items.location
Speedup GetRecords by using Koha cache for items.location authorised value.
Test plan
1) Enable ILS-DI http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ILS-DI
2) Download a record http://localhost:8080/cgi-bin/koha/ilsdi.pl?service=GetRecords&id=1
3) Note location_description
4) Apply patch
5) Re download the same record
6) Verify location_description are the same
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Janusz Kaczmarek [Thu, 16 May 2024 13:29:10 +0000 (13:29 +0000)]
Bug 36798: Unit tests
Added unit tests.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Janusz Kaczmarek [Thu, 16 May 2024 11:29:04 +0000 (11:29 +0000)]
Bug 36798: Add ability to search across all ISBNs using the ISBN-search
With the Bug 36574 we added a new ES search field isbn-all which makes it
possible to find records with the content of the subfield 020 $z
(invalid/cancelled ISBN) in general search (by keyword). But still, when
performing a search with ISBN-search these records will not be found.
Since some libraries deliberately want to find records with only 020 $a
with ISBN-search, a system preference would be needed here to be able to
customize the ISBN search.
The same for ISSNs, with one system preference.
Test plan:
==========
(ISBN)
------
1. Have the ktd with with ES enabled.
2. With standard ktd test data, try to perform a ISBN search from Advanced
search for 9780141930848. You should get no results.
In the general search input field (on the main page) try a search
nb:9780141930848 and/or isbn:9780141930848 - you should get no results.
3. Apply the patch, restart_all.
4. Repeat p. 2 -- you should still get no results.
5. Enable SearchCancelledAndInvalidISBNandISSN syspref.
6. Repeat p. 2 -- now you should get one record (having 9780141930848
in 020 $z).
(ISSN)
------
0. Return to main, delete the bug branch, reset_all == start from fresh.
1. Have the ktd with with ES enabled.
2. With standard ktd test data, try to perform a ISSN search from Advanced
search for 1089-6891. You should get no results.
In the general search input field (on the main page) try a search
ns:1089-6891 and/or issn:1089-6891 - you should get no results.
3. Apply the patch, restart_all.
If you have had to apply also the bug 36727, reindex ES with:
koha-elasticsearch --rebuild -r -d kohadev
(there is a modification of mappings.yaml)
4. Repeat p. 2 -- you should still get no results.
5. Enable SearchCancelledAndInvalidISBNandISSN syspref.
6. Repeat p. 2 -- now you should get one record (having 1089-6891
in 022 $y).
Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Janusz Kaczmarek [Tue, 14 May 2024 13:06:05 +0000 (13:06 +0000)]
Bug 36798: Add 'SearchCancelledAndInvalidISBNandISSN' system preference
This patch adds a new system preference SearchCancelledAndInvalidISBNandISSN:
whether to search for cancelled / invalid forms of ISBN/ISSN
when performing ISBN/ISSN search. (By default, with ES, only valid forms,
i.e. 020 $a / 022 $a are considered).
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Johanna Raisa [Tue, 4 Jun 2024 11:44:56 +0000 (14:44 +0300)]
Bug 37023: Update timestamp when filling a hold
This patch updates the timestamp of the hold when it is filled and moved to old_reserves.
Test plan:
1) Apply the patch
2) prove t/db_dependent/Koha/Hold.t
Sponsored-by: Koha-Suomi Oy Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Paul Derscheid [Mon, 23 Sep 2024 10:14:48 +0000 (10:14 +0000)]
Bug 37972: (follow-up) Correct syntax error in opac/opac-user.pl
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Paul Derscheid [Fri, 20 Sep 2024 13:41:26 +0000 (13:41 +0000)]
Bug 37972: Allow selection of tab in patron's summary table by query param
To test:
1) Apply the patch
2) Place a hold on any biblio with the 'koha' patron for example
3) Authenticate in the OPAC with the patron you picked in step 1
4) Open opac-user.pl with the query param 'tab': /cgi-bin/koha/opac-user.pl?tab=opac-user-holds
5) Note that the holds tab in the patron's user summary is automatically selected
6) Sign-off
I'm totally open to renaming the query param, so if you have a suggestion that's more consistent
with the rest of koha, I'm all ears.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Thu, 6 Jun 2024 12:13:38 +0000 (12:13 +0000)]
Bug 36694: (follow-up) Remove some missed instances
This patch removes some missed HCSticky code/mentions as well as the
entry on the About page.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Mon, 20 May 2024 17:12:27 +0000 (17:12 +0000)]
Bug 36694: (follow-up) Remove Sticky JS from member-flags.tt
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Tue, 14 May 2024 16:39:36 +0000 (16:39 +0000)]
Bug 36694: (follow-up): fix pages where toolbar was not sticky
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Fri, 26 Apr 2024 17:43:35 +0000 (17:43 +0000)]
Bug 36694: Remove remaining HC stick assets
To test:
1. Apply patch and regenrate CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface)
2. You'll need to check that the 'sticky' header still sticks on each of
these pages.
3. Do a patron search, the toolbar should stick as you scroll down.
4. In Acquisitions, Add a vendor. The toolbar should stick as you scroll
down.
5. In Acquisitions, Add a basket. The toolbar should stick as you scroll
down.
6. Search for a system pref, or go directly to the OPAC category (
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?tab=opac ).
The toolbar should stick as you scroll down.
7. Do an authorties search. The toolbar should stick as you scroll down.
8. Go to advanced search. Without doing a search the toolbard should
stick as you scroll down.
9. Go to item search. Without doing a search the toolbard should stick
as you scroll down.
10. Do a catlog search. The toolbar should stick as you scroll down.
11. Add a bibliographic record, or edit one. The toolbar should stick
as you scroll down.
12. Find a patron and go to the permissions page. The toolbar should
stick as you scroll down.
13. Try each of the other members pages like memberentry.pl,
moremember.pl, circulation.pl. On each of the pages the toolbar
should stick.
14. Place multiple holds on a record. From reserve/request.pl the
toolbar underneath 'Existing holds' should stick.
15. Edit a HTML customization, new item, and page. The toolbar should
stick.
16. Cataloging > Automatic item modifications by age > Edit rules. The
toolbar should stick.
17. Edit a notice, the toolbar should stick.
18. Tools > Log viewer > Submit. UNder Log entries, the toolbar should
stick.
19. Create some lists and make sure the toolbar sticks.
OPAC:
20. Add many items to an OPAC cart. Make sure the toolbar sticks.
21. Try the OPAC results, the toolbar should stick
22. Add many items to a list, on the OPAC list display the toolbar
should stick.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Fri, 26 Apr 2024 17:37:52 +0000 (17:37 +0000)]
Bug 36694: Remove HC sticky from OPAC pages
Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Fri, 26 Apr 2024 17:01:06 +0000 (17:01 +0000)]
Bug 36694: Remove HC sticky from remaining staff pages
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Fri, 26 Apr 2024 16:27:59 +0000 (16:27 +0000)]
Bug 36694: Remove HC sticky from members/ pages
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Fri, 26 Apr 2024 16:18:13 +0000 (16:18 +0000)]
Bug 36694: Remove HC stikcy from cataloguing/ pages
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Thu, 25 Apr 2024 19:58:59 +0000 (19:58 +0000)]
Bug 36694: Remove HC sticky from catalogue/ pages
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Thu, 25 Apr 2024 19:27:24 +0000 (19:27 +0000)]
Bug 36694: Remove HC sticky from preferences.tt/authorities.tt
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Thu, 25 Apr 2024 19:18:36 +0000 (19:18 +0000)]
Bug 36694: Remove HC sticky from acqui/supplier.tt
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Thu, 25 Apr 2024 16:44:43 +0000 (16:44 +0000)]
Bug 36694: Set sticky element top to -1px
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Wed, 24 Apr 2024 23:18:15 +0000 (23:18 +0000)]
Bug 36694: Add JS observer to detect stuck sticky element
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Wed, 24 Apr 2024 22:45:50 +0000 (22:45 +0000)]
Bug 36694: Remove HC sticky from acqui/basket.tt
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Wed, 24 Apr 2024 22:30:33 +0000 (22:30 +0000)]
Bug 36694: Remove HC sticky from patron search searchbar
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>