Bug 36482: Make embedding work for GET /libraries/:library_id
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 36482: Allow embedding desks and cash_registers on libraries endpoints
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 36481: Add GET /libraries/:library_id/cash_registers
This patch adds the mentioned route. For the task it:
* Adds Koha::Cash::Register->to_api_mapping with trivial mappings
* Adds a cash_register object definition on the API spec
* Adds a controller to handle requests
* Adds tests for the new endpoint
To test:
1. Apply this patch
2. Run:
$ ktd --shell
k$ qa
=> SUCCESS: All green! Tests pass!
3. Play with Postman!
4. Sign off :-D
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch adds the mentioned endpoint. For it, it does:
* Add Koha::Desk->to_api_mapping
* Add desk.yaml with the correct data structure for desks
* Add the route to the spec
* Add tests
Note: Lucas and I had doubts about the right return value for when the feature is disabled.
I opted for returning 404 with a message telling the feature is disabled. This can be discussed.
To test:
1. Apply this patches
2. Run:
$ ktd
k$ qa
=> SUCCESS: All green, all tests pass!
3. Play with this using Postman.
4. Sign off :-D
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
We add an accessor for the related desks. Tests are added.
To test:
1. Apply this patch
2. Run:
$ ktd --shell
k$ prove t/db_dependent/Koha/Library.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Mon, 25 Mar 2024 15:42:18 +0000 (16:42 +0100)]
Bug 35353: Add REST API endpoint to retrieve old holds
Same as checkout but for holds, we need to provide a way to retrieve old
holds for a patron.
Test plan:
Create some holds for a patron, cancel and fulfill some, then use the
REST API endpoint with the new 'old' flag set to 1
/api/v1/patrons/42/holds?old=1
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Wed, 20 Dec 2023 10:23:52 +0000 (11:23 +0100)]
Bug 35353: DBIC specific
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Thu, 14 Mar 2024 14:01:39 +0000 (15:01 +0100)]
Bug 35558: Do not retrieve the local image if none exists - OPAC
Test plan:
1 - Enable system preferences:
LocalCoverImages
OPACLocalCoverImages
2 - open browser tools network page
3 - Perform an intranet search
4 - Note a request for each bib like:
http://localhost:8081/cgi-bin/koha/catalogue/image.pl?thumbnail=1&biblionumber=35
5 - Repeat on opac, same requests
6 - Apply patches
7 - Restart all
8 - Repeat searches, note no fetches
9 - Add local cover images to several biblios in the results
10 - Repeat searches
11 - Note the fetches are only for those records with images
12 - Confirm images still load correctly
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Wed, 13 Dec 2023 10:10:24 +0000 (11:10 +0100)]
Bug 35558: Do not retrieve the local image if none exists
On the search results we are fetching the thumbnails of the local cover
images using catalogue/image.pl
Which means 1 GET per results on the page.
This patch suggests to have this information beforehand in order to
reduce the number of hits and network traffic?
However the page load will be slightly slower ofc.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Laura Escamilla [Wed, 27 Mar 2024 19:55:26 +0000 (19:55 +0000)]
Bug 36443: Add a fax field / column to the batch patron modification tool
To test:
1. Create or modify an existing patron account so that they have a
value in their fax number field.
2. Go to Tools > Batch patron modification
1. Add the patron card number, or borrower number into the
modification tool and click on continue. There is no option for
modifying fax numbers, nor are fax numbers visible in the
modification table.
3. Apply the patch and restart_all
4. Repeat step 2
1. A column for ‘Fax’ is now visible after ‘Other phone’
2. Test the ‘Fax’ field by clearing out the field with the checkbox.
‘Checking the box right next to the label will disable the entry
and delete the values of that field on all selected patrons.’
3. Test the ‘Fax’ field by updating the value with a new number
5. Sign off and have a wonderful day :)
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Aleisha Amohia [Mon, 8 Jan 2024 23:04:25 +0000 (23:04 +0000)]
Bug 35728: Add ability to NOT redirect to result when search returns only one record
This enhancement adds a new system preference RedirectToSoleResult. By default it is enabled, which matches current behaviour - to redirect to the detail page if it is the only search result.
To test:
1) Apply the patch, install database updates, restart services.
2) Go to Koha Administration -> Global system preferences. The RedirectToSoleResult system preference is in the Searching tab. Confirm it is enabled (set to "Redirect") by default.
3) Conduct a catalogue search on the staff interface that you know will return a single result. Confirm you are redirected to the detail page.
4) Do the same search on the OPAC. Confirm you are redirected to the detail page.
5) Go back to the system preferences and disable the RedirectToSoleResult system preference by setting it to "Don't redirect"
6) Do the searches again on the staff interface and OPAC. Confirm you are NOT redirected to the detail page, and the search results page shows as expected.
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>
Aleisha Amohia [Mon, 8 Jan 2024 23:03:48 +0000 (23:03 +0000)]
Bug 35728: Add RedirectToSoleResult system preference
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>
Lucas Gass [Mon, 22 Apr 2024 14:22:24 +0000 (14:22 +0000)]
Bug 33703: Add Maskito to about.tt
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Mon, 4 Mar 2024 18:39:35 +0000 (18:39 +0000)]
Bug 33703: Add Maskito support for OPAC
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Mon, 4 Mar 2024 18:19:30 +0000 (18:19 +0000)]
Bug 33703: Add Maskito to dateaccessioned.pl
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Mon, 4 Mar 2024 18:05:40 +0000 (18:05 +0000)]
Bug 33703: Don't use Maskito when picking a range
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Wed, 31 Jan 2024 00:51:04 +0000 (00:51 +0000)]
Bug 33703: Add time support
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Tue, 30 Jan 2024 00:44:27 +0000 (00:44 +0000)]
Bug 33703: Add Masikto core/kit for date masking
To test:
1. Apply patch
2. Restart all, clear browser cache
3. In the staff interface start testing some flatpickr instances with direct inputs.
4. Try entering your dates without delimiters, '/' or '-', or '.'.
5. Make sure the dates are well formed.
6. Test with each of dateformat's Koha supports. ( system preference 'dateformat').
7. Add/edit an item with the dateaccessioned.pl plugin loaded, making the dates are well formed.
8. Make an item bookable by going to the item tab of a record and setting at least 1 item to "Bookable:".
9. Now "Place booking", which should trigger a modal.
10. In the "Period" date picker, which is a range, the dates should NOT be formatted.
11. Log in to the OPAC and try some date pickers ( self reg/borrower mod/ect )
Some places to test:
-Patron record date of birth
-Patron record registration date
-Patron record expiry date
-Checkouts, manually set a due date
-Patron category, enrollment period
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
* Adds the missing entry in permissions.inc
* Moves the configuration entry above 'Record overlay rules'
* Adds the 'Record sources' link to the left navigation column, in the
right position.
* Makes the <title> element be constructed the same way the 'cities'
page is.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Matt Blenkinsop [Tue, 27 Feb 2024 09:30:58 +0000 (09:30 +0000)]
Bug 35919: Add superlibrarian permission to Permissions.t
Permissions.t was failing when running a jenkins build to another branch with this bug applied. Permissions.t was missing the permission for record sources and is now added in this patch
Test plan:
1) prove t/Koha/Auth/Permissions.t
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch adds Cypress tests for the `record sources` CRUD as required
by QA.
I tried to cover all the UI interactions and behaviours.
To test:
1. Have all the patches applied
2. Run:
$ ktd --shell
k$ cypress run --spec t/cypress/integration/Admin/RecordSources_spec.ts
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch introduces a Vue.js based record sources managing page. To
test it:
1. Apply this patch
2. Build the Vue.js stuff:
$ ktd --shell
k$ yarn js:build
k$ restart_all
3. On the staff interface, go to Administration > Record sources
4. Play with the interface and the offered actions
=> SUCCESS: Things go well
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch introduces endpoints for managing record sources. This is
done on top of Koha::RecordSource(s) following the current coding style.
To test:
1. Apply this patch
2. Run:
$ ktd --shell
k$ prove t/db_dependent/api/v1/record_sources.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
* A new table: `record_sources`.
* A new user permission: `manage_record_sources`.
* A FK on record_sources.recour_source_id on the biblio_metadata tables
Record sources will contain a name and (for now) a flag telling if
records from the specific source can be manually edited.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Fri, 17 Nov 2023 11:18:27 +0000 (11:18 +0000)]
Bug 35348: Remove cookie consents link from opac consents
The cookies details modal is now visible for all users from a footer
link, we no longer need it under the 'Consents' tab for logged in users.
Test plan
1) Enable CookieConsent and add a placholder tracker cookie to
CookieConsentedJS preference
2) Log into the OPAC
3) Note that the 'Consents' link no longer appears in the users page.
4) Enable 'PrivacyPolicyConsent'
5) Note that the 'Consents' link now appears but on navigating to it
there is no link for Cookie consents.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Fri, 17 Nov 2023 11:08:08 +0000 (11:08 +0000)]
Bug 35348: Ensure users can access cookie details in staff client
We remove the check on JSConsents content so that when cookie consent is
enabled we retain the option for users to get more information about
what cookies are being used.
Test plan
1) Enable CookieConsents
2) Do not add any tracking cookies for the staff client into
CookieConsentedJS preference
3) Note that 'My consents' appears in the user menu
4) Clicking 'My consents' opens the 'Cookie consent' modal displaying
information about the cookies used.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Thu, 16 Nov 2023 17:24:27 +0000 (17:24 +0000)]
Bug 35348: Add cookies link to opac footer
This patch adds a link that opens the cookies info dialogue to the opac
footer when the CookieConsent feature is enabled.
Test plan
1) Enable CookieConsent
2) On the OPAC you should now see a 'Cookies' link at the bottom of the
page.
3) Clicking the link should open the "Cookie consent" modal where you
can see the details of the cookies you have accepted and change your
choices.
4) Bonus points: Enable 'OpacProblemReports' and note it aligns left of
'Cookies' in the same footer bar.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Mon, 11 Mar 2024 23:34:55 +0000 (23:34 +0000)]
Bug 16122: Add unit test
To test:
1. Apply patch, updatedatabase & schema, restart all Services
2. Go to Administration > Table setting. Find the holdings table ( Catalog > holdings_table ) and turn the local use column on.
3. Go to an item record and notice the column 'Local uses'
4. Turn the system preference RecordLocalUseOnReturn Off.
5. Check in an item that is not checkout out. No local use should be recorded for the item.
6. Turn RecordLocalUseOnReturn on and check in an item that is not checked out. Local use on that item should increment by 1.
7. Create a statistical patron and check an item out to them. Local use should increment by 1.
8. Go to /api/v1/items?external_id={barcode} and make sure the numbers for localuse look correct.
To test maintainence script:
1. Without the patch, have RecordLocalUseOnReturn on.
2. Check in some items to record localuse in the stats table. Keep note of those stats.
3. Apply the patches, updatedatabase.
4. Run the maintenance script, perl update_localuse_from_statistics.pl
5. Now check that items.localuse is congruent with what is in the stats table
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Wed, 3 May 2023 23:24:53 +0000 (23:24 +0000)]
Bug 16122: Add maintenance script to update items.localuse from stats
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Mon, 22 Apr 2024 15:31:17 +0000 (15:31 +0000)]
Bug 16122: Add display and Table settings
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Mon, 11 Mar 2024 23:26:17 +0000 (23:26 +0000)]
Bug 16122: Increment items.localuse
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Fri, 7 Apr 2023 16:51:01 +0000 (16:51 +0000)]
Bug 16122: API and Schema updates
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Fri, 7 Apr 2023 16:30:36 +0000 (16:30 +0000)]
Bug 16122: Add localuse column to items and deleteditems
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Tue, 5 Mar 2024 17:00:41 +0000 (17:00 +0000)]
Bug 36206: (follow-up) Change file permission
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Fri, 1 Mar 2024 08:08:08 +0000 (08:08 +0000)]
Bug 36206: Add 'Run administration tool' to plugin actions
This patch adds the new 'Run administration tool' option to the plugin
actions dropdown menu for plugins with such a function.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Fri, 1 Mar 2024 08:02:47 +0000 (08:02 +0000)]
Bug 36206: Expose administration page to users with plugins_admin permission
This patch updates the intranet home page logic such that the
administration button appears for those users with just the 'admin'
subpermission of plugins to allow them to access such plugins.
We also update the display logic found inside the admin-home page so
that user see plugin management appropriately.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Thu, 29 Feb 2024 18:08:41 +0000 (18:08 +0000)]
Bug 36206: Add 'admin' plugins option
This patch adds an admin plugins class to the plugins system and
displays such plugins under the 'Plugins' section in the Administration
page.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Julian Maurice [Fri, 27 Jul 2012 10:30:41 +0000 (12:30 +0200)]
Bug 13706: New script dedup_authorities.pl
This script allow to deduplicate authorities automatically.
Script is in misc/maintenance/
It works this way:
1) authorities are fetched from the database. You can limit fetched
results by authtypecode, or directly by specifying WHERE clause
2) for each authority:
2.1) build a Zebra query using the 'search_form' for the heading
2.2) run the query, retrieve the results
2.3) among duplicates, choose the one we want to keep (use
--choose-method option).
2.5) use C4::Authorities::merge to merge authorities
3) delete the merged authorities
Use --help for more informations on options
To be done:
1 - Move to module and cover with tests
2 - Add option to only merge unused authorities
3 - Expand 'ppn' option to be 'control-number' option and allow specifying field
4 - More?
1 & 2 I will attempt - 3 & 4 may be future enhancements
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>
Bug 36295: Space out content blocks in batch record modification
This patch adds a float clearing class to a line break in the batch record modification template to fix a spacing issue in Chrome.
To test apply the patch and go to Cataloging -> Batch record modification
There should be space between the two sections.
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Tue, 9 Apr 2024 12:02:40 +0000 (12:02 +0000)]
Bug 36295: Space out content blocks in batch record deletion
This patch adds a float-clearing line break to the batch record deletion
template so that the "Record type" section has visual separation from
the record number submission tabs.
To test, apply the patch and go to Cataloging -> Batch record deletion.
There should be padding between the two sections.
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 36659: Show correct tab after conducting an Authorities search
To test:
1. In the staff interface, go to Authorities
2. Do a search for each tab, i.e. 'Main heading' and 'Entire record'
3. Notice every search has the 'Main heading ($a only)' tab selected when the results page loads.
4. Apply patch and restart services
5. Repeat step 2 and confirm the appropriate tab is selected by default after each search.
Sponsored-by: Education Services Australia SCIS 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>
Bug 30123: Set desk default to logged-in-desk-id on sety library page
This patch refactors the javascript that runs on the set library page. If the logged in user branch code is the same as the seleceted library, default the desk selection to the current logged in desk id. Otherwise set the default desk selection to the first option for the current branch.
Test plan:
1. Turn on UseCirculationDesks
2. Create a few desks with unique names for a few different libraries
3. Set your library and desk
4. Reload set-library.pl and notice that the desk always defaults to the last option for the library selected
5. Apply patch and restart_all
6. Reload set-library.pl and notice that the desk selection defaults to your current logged in desk
7. Try changing the library selection to libraries with and without desks
8. Notice that the desk selection defaults to the first option available for the selected library
9. Notice that the desk selection defaults to the --- no desk for libraries without desks
10. Notice the desk selection defaults to the currenty logged in desk if you select the library you are currently logged into
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Wed, 7 Feb 2024 15:21:04 +0000 (15:21 +0000)]
Bug 35977: Set holddatefrom default to today
This patch sets the holddatefrom date to today by default on the opac.
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Mon, 15 Apr 2024 14:21:03 +0000 (14:21 +0000)]
Bug 16567: Correct RSS feed validity errors
This patch corrects a few markup errors in the XML feeds to make the
feeds validate correctly. The template has been largely re-indented to
improve readability and eliminate tab characters.
To test, apply the patch and perform a search in the OPAC.
- Open the RSS link appearing after the "Your search returned..."
header.
- Depending on how your browser handles XML documents you may need to
view source on the page to see the actual XML markup.
- Copy the source and paste it into the W3C feed validator:
https://validator.w3.org/feed/#validate_by_input
- The feed should be found to be valid.
- In my tests you'll get a "Recommendation" about "Self reference
doesn't match document location." I think this recommendation
doesn't apply.
Perform the same test with the other two available formats: Atom and
OpenSearch:
- Change the end of the RSS feed url from '&format=rss' to
'&format=atom' and validate the result.
- The same "self reference" recommendation will come up, and again I
think we can ignore it.
- There is another recommendation about "Two entries with the same
value for atom:updated." The updated time is set to the same time
as the feed itself (the time when the feed was generated. Maybe
this is incorrect. If so we need a follow-up that exposes a
different value to the template. biblio.datecreated maybe?
- Change the end of the feed url from '&format=atom' to
'&format=OpenSearchDescription' and validate that result.
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
David Gustafsson [Fri, 23 Feb 2024 18:41:26 +0000 (19:41 +0100)]
Bug 36160: Use $builder->build_object for patron objects in Circulation.t
1) Set TrackLastPatronActivityTriggers to at least "Checking out an item"
2) Run tests in t/db_dependent/Circulation.t and verify that
failes with "Invalid value passed, borrowers.updated_on..."
3) Apply patch
4) Run Circulatoint.t tests again and verify that no longer
produces this error
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 27893: (follow-up) Check orderstatus in orders->cancel
Removed the results[0] test too in addbiblio, since there
can be warnings without effectively cancelled order lines.
Also reworded the warn (cancelled, not deleted).
Test plan:
Run t/db_dependent/Koha/Acquisition/Orders.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 33568 introduced a lot of new simple accessors without providing unit tests for them.
Test plan:
All tests modified by this patch should pass
Note that one bug was found! Logic issue in lost/not lost
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>
Martin Renvoize [Fri, 26 Apr 2024 06:48:52 +0000 (07:48 +0100)]
Bug 35362: (follow-up) Fix preview close on guarantor add
When adding a guarantor you are given a patron search modal. If you then
preview a search result, the preview modal could not be closed. It's a
simple update for 'close' to 'close_window' in the jQuery selector.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 35979: Check pref before inserting holds_queue background jobs
Test plan:
Confirm that modrequest does no longer insert when pref is off :)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Fri, 12 Apr 2024 12:02:46 +0000 (12:02 +0000)]
Bug 36592: Fix default display lenght and default sort
To test:
1. Go to Admin > Table settings
2. Find a table that includes Default display length or Default sort
order.
3. Try to save a new value.
4. When the page reloads the new values have not been saved.
5. APPLY PATCH
6. Try 1 -3 again, this time the value should save correctly.
7. Go to Admin > Table settings and make sure the accordians still work
and the in page links in each section still work.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Mon, 22 Apr 2024 12:33:33 +0000 (14:33 +0200)]
Bug 36649: Correctly embed biblio when retrieving items when adding to a train
I didn't find when this regression has been introduced but the third
parameter here is the headers, not parameters, we should not repeat
"headers".
Test plan:
1. Add a new processing that contains columns from the database, for example biblio.title and biblio.author.
2. Create a new train.
3. Add items to the waiting list.
4. Click on "Add last x items to the train" button.
5. Choose the train you created on number 2.
6. Choose the processing you added on number 1.
7. Try to click the Submit button.
=> Without the patch nothing happens and there is a JS error in the
console: Uncaught TypeError: item.biblio is undefined
=> With this patch applied the item is correctly added to the train and
the attribute is properly populated.
Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Nick Clemens [Fri, 26 May 2023 19:00:13 +0000 (19:00 +0000)]
Bug 32695: Fix search strings for 775, 780, 785 and 787
In the past due to some misunderstanding of the MARC standard
we built the search links for these fields using $a and $t with
the title index. But we actually need to search $t as title
and $a as author.
This patch fixes the templates for the MARC 7xx fields:
* 775
* 780
* 785
* 787
To test:
* Ensure systme preference 'UseControlNumber' is set to don't
* Create a record with the linking fields above
* Look at the OPAC and staff interface detail views
* Verify the content of your fields shows and the links combine a+t as a title search
* Apply patch
* Verify you have nicely formatted links now
Lucas Gass [Fri, 19 Apr 2024 17:22:15 +0000 (17:22 +0000)]
Bug 36652: Pass copy_form template variable
To test:
1. Go to Tools > Notices and slips
2. Pick any notice and try to copy it to another library using the 'Copy notice' column.
3. You are redirected to a blank screen and if you go back to the Notices and slips page the notice has not been copied.
4. APPLY PATCH
5. Try steps 1 - 3 again, but this time you should be correctly directed.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Test plan:
Verify that you can delete an authority from detail page again.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Nick Clemens [Fri, 19 Apr 2024 12:29:31 +0000 (12:29 +0000)]
Bug 30318: Don't reset messaging preferences when form is empty
In testing, the messaging preferences are set in the form when EnhancedMessagingPreferences is enabled.
Switching categories silently updates the preferences unless you have made changes, in which case the
user is warned and can confirm if they want to reset or not. The code only applies to patron creatoin, and
does not seem to be taken into account during OPAC self-registration.
It seems the silent defaulting when saving can be removed in favor of the current updates/warns in the actual
form.
To test:
1 - Set some messaging preferences for at least two categories
2 - Enter a new patron
3 - Confirm switching categories correctly defaults the messaging preferences
4 - Edit the preferences and switch to another category with defaults
5 - Confirm the warning appears, and preferences are set if confirmed and ignored if not
6 - Set to a category with defaults, uncheck all, and save
7 - Ooof, patron is defaulted
8 - Apply patch
9 - Repeat 1-5 and confirm nothing has changed
10 - Set to a category with defaults, uncheck all, save
11 - Confirm patron is saved with no preferences
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> 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@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 36111: 856$h should not appear as a link in detailed record
Test plan:
1. Add 856$h to MARC editor
1.1. Go to Administration > MARC bibliographic frameworks
1.2. Next to Default framework, click Actions > MARC structure
1.3. Search for field 856
1.4. Click Actions > Edit subfields
1.5. Click h
1.6. Check the Editor box
1.7. Click Save changes
2. Catalog a new record with a random URL in 856$h
2.1. Go to Cataloging
2.2. Click New record
2.3. Fill out the mandatory fields (000, 003, 005, 008, 040$c,
245$a, 942$c)
2.4. Go to tab 8 and enter a value in 856$h
2.5. Click Save (No need to add an item)
3. Search for the title in the staff interface (a large enough
search to have more than one result)
--> Notice it says "Online resources: Click here to access online"
3.1. Try to click the link
--> Blank page
4. Access the detailed record in the staff interface
--> Notice it says "Online resources: Click here to access online"
4.1. Try to click the link
--> Blank page
5. Search for the title in the opac (a large enough search to have
more than one result)
--> Notice it says "Online resources: Click here to access online"
5.1. Try to click the link
--> Blank page
6. Access the detailed record in the opac
--> Notice it says "Online resources: Click here to access online"
6.1. Try to click the link
--> Blank page
7. Edit the item and add a text in field 856$y
8. Access the detailed record in the staff interface
--> Notice it says what you put in 856$y field
9. Apply the patch
10. Replay steps 3 through 6, but this time, the "Online resources"
field should not be present.
11. Replay steps 7 through 8, but this time, what you put in 856$y
field should not be present.
12. Edit the item and add a url in field 856$u
13. Replay steps 3 through 6, but this time, clicking on the link
should take you to the URL specified in the 856$u field.
14. Replay steps 7 through 8, but this time, what you put in 856$y
field should be present and
clicking on the link should take you to the URL specified in the 856$u field.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> 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 [Fri, 8 Mar 2024 11:49:26 +0000 (11:49 +0000)]
Bug 36282: Chomp whitespace around opac i18n strings
Same logic as bug 26816 but to OPAC
Test plan:
1) Apply test plan patch only
2) Visit opac home:
<opac_url>/cgi-bin/koha/opac-main.pl
3) Notice there's a space between 'Translated string' and ':', even though the markup does not contain a whitespace
4) Apply 2nd patch
5) Notice the white space is gone
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Pedro Amorim [Mon, 25 Mar 2024 13:23:36 +0000 (13:23 +0000)]
Bug 36416: Fix cud-check_out
1) Install FreeForm and enable ILLModule, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
2) Checkout to branch b_36243
cd /kohadevbox/koha/Koha/Illbackends/FreeForm
git checkout b_36243
3) Enable CirculateILL sys pref
4) Create a new ILL request, visit:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=FreeForm
5) Set "type" = Book and enter '42' on the cardnumber input, click "Create"
6) On the top toolbar, click "Confirm" and confirm the following screen.
7) You now have a new option "Check out" on the toolbar. Click on it. Notice it explodes.
8) Apply patch. Repeat.
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>
Error happens also when one tries to open patrons checkouts from detail page.
Koha doesn't die but table just keeps loading. Solution is to add C4::Reserves
before CheckReserves when it's called from Circulation.pm.
To test:
1. Apply this patch.
2. Try to check out and check in item.
=> Confirm both operations are succesfull.
3. Attempt to open patrons checkouts from patron detail and checkout page.
=> Table should load
Also prove t/db_dependent/Circulation.t.
Sponsored-by: Koha-Suomi Oy Signed-off-by: BabaJaga <babajagawgoglach@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Thu, 28 Apr 2022 13:13:17 +0000 (15:13 +0200)]
Bug 30645: Add tests
to highlight the problem
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 [Thu, 21 Dec 2023 16:06:41 +0000 (16:06 +0000)]
Bug 30645: Add REST/Plugin/Query tests
prove t/Koha/REST/Plugin/Query.t
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>
And it'll also add the number of required 'join' attributes to the query
attributes to match it.
Test plan (with Joubu's test patch applied), run:
prove t/db_dependent/selenium/patrons_search.t
Or
Test plan, k-t-d:
1) Create 2 patron attributes, visit:
/cgi-bin/koha/admin/patron-attr-types.pl
2) Name the first attribute 'test1' and the second attribute 'test2'
3) On both, tick the 'Searchable' and 'Search by default' checkboxes
4) Edit a koha borrower, example visit:
/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=51
5) Put '123' on the test1 attribute, and 'abc' on the test2 attribute
6) Visit the main patrons page:
/cgi-bin/koha/members/members-home.pl
7) On the first left side filter input called 'Search', type '123' and search. Notice you get the patron result
8) Repeat step 7, but type 'abc' instead of '123'. Notice you get the patron result
9) Now do the same search but type '123 abc'. Notice you do not get the patron result.
10) Apply patch. Repeat test plan. Notice you get the patron result in step 9).
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>
Martin Renvoize [Tue, 23 Apr 2024 15:43:12 +0000 (16:43 +0100)]
Bug 32132: (RM follow-up) Merge supplimentary db update
This patch merges the logic from the supplimentary database update that
was requested into the original DB update revision making the update
more reliable.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Thomas Klausner [Fri, 29 Mar 2024 09:20:37 +0000 (09:20 +0000)]
Bug 35345: Add --where option to rebuild_elasticsearch.pl
Sometimes we need to only re-index a subset of our bibliographic data or authorities. Currently this is only possible by enumerating all id (-bn or -ai), which does not work well when indexing eg 100.000 items of a 2.000.000 DB. Re-indexing everything is also overkill.
This patch adds an `--where` flag to misc/search_tools/rebuild_elasticsearch.pl which can take arbitrary SQL (that of course has to match the respective tables) and adds it as an additional param to the resultset to index
To test, start koha-testing-docker with ElasticSearch enabled, for example via `ktd --es7 up
Before applying the patch, rebuild_elasticsearch will index all data:
Biblios:
$ misc/search_tools/rebuild_elasticsearch.pl -b -v
[12387] Checking state of biblios index
[12387] Indexing biblios
[12387] Committing final records...
[12387] Total 435 records indexed
(there might be a waring regarding a broken biblio, which can be ignored)
Auth:
$ misc/search_tools/rebuild_elasticsearch.pl -a -v
[12546] Checking state of authorities index
[12546] Indexing authorities
[12546] 1000 records processed
[12546] Committing final records...
[12546] Total 1706 records indexed
Now apply the patch
Biblio, limit by range of biblioid:
$ misc/search_tools/rebuild_elasticsearch.pl -b -v --where "biblionumber between 100 and 150"
[12765] Checking state of biblios index
[12765] Indexing biblios
[12765] Committing final records...
[12765] Total 50 records indexed
Note that only 50 records where indexed (instead of the whole set of 435 records)
Auth, limit by authtypecode:
$ misc/search_tools/rebuild_elasticsearch.pl -a -v --where "authtypecode = 'GEOGR_NAME'"
[12848] Checking state of authorities index
[12848] Indexing authorities
[12848] Committing final records...
[12848] Total 142 records indexed
Again, only 142 have been indexed.
Sponsored-by: Steiermärkische Landesbibliothek Sponsored-by: HKS3 / koha-support.eu 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 [Fri, 30 Jun 2023 19:48:04 +0000 (19:48 +0000)]
Bug 29825: (follow-up) Some style fixes and modal correction
This patch makes a few coding style changes to the new JavaScript and
updates the Bootstrap modal markup to be in line with current standards.
The previous patches lacked a trigger for the preview modal, so I added
that. Since the content of the modal uses spaces for formatting I added
monospace formatting to the modal body.
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
George Veranis [Fri, 2 Sep 2022 20:30:45 +0000 (22:30 +0200)]
Bug 29825: Preview of authority record on edit mode as MARC formatted view
This bug adds a new functionality on Edit mode of a new or existing authority.
Add a new button 'MARC Preview' in order librarian have the ability to preview
the record on MARC plain structure mode and have all fields and subfields
that entered before save/update the record.
To test:
1. Open or add an authority
2. The preview button isn't on toolbar
3. Apply the patch
4. Do step 1
5. The preview button exists
6. Do some changes or not to the authority record
7. Click to Preview MARC button and a modal window will appear with all fields
indicators and subfields that filled in the form of cataloguing.
Mentored by: Andreas Roussos
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Pedro Amorim [Thu, 15 Feb 2024 14:36:04 +0000 (13:36 -0100)]
Bug 32693: About script: Process only the tab being queried
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, 15 Feb 2024 14:33:37 +0000 (13:33 -0100)]
Bug 32693: Preparation: About script: versions
versions is being used in both 'team' and 'about' tabs, needs to be
moved
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, 15 Feb 2024 14:32:33 +0000 (13:32 -0100)]
Bug 32693: Preparation: About script: Move template params
These template params are only used in the default first 'about' tab but were being added further down in the script
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>