Martin Renvoize [Thu, 7 Nov 2024 12:59:40 +0000 (12:59 +0000)]
Bug 38390: Add subscriptions+count to vendors embed
This patch adds the subscriptions+count option to the embeddable enum
for the /vendors endpoint.
Test plan
1) Inspect the change to t/db_dependant/api/v1/acquisitions_vendors.t
and confirm it's testing for the addition of subscriptions_count.
2) Run the above tests and confirm it passes
Note: For the above tests to pass, you will need to ensure your api
bundle is rebuilt after the patches are applied and restart plack.
`yarn build && restart_all` in ktd
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Matt Blenkinsop [Wed, 31 Jul 2024 13:17:47 +0000 (13:17 +0000)]
Bug 34355: Add unit tests
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, 12 Sep 2023 11:48:32 +0000 (11:48 +0000)]
Bug 34355: Add a plugin hook - before_orderline_create
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 [Thu, 7 Sep 2023 10:47:15 +0000 (10:47 +0000)]
Bug 34355: Add match_field and match_value to allow multiple accounts in the same file directory
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 [Thu, 10 Aug 2023 14:23:18 +0000 (14:23 +0000)]
Bug 34355: Fix form rendering issue
This patch also fixes the referencing of import_record_id_selected
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 [Mon, 24 Jul 2023 13:53:22 +0000 (13:53 +0000)]
Bug 34355: Add cronjob and required methods
This patch adds a cronjob to take a marc file from the Koha file directory system and import it before creating order lines
Test plan:
This test plan involves running a cronjob, not sure how easy this is in the sandboxes
1) In system preferences, click Search and then select the Acquisitions option from the left hand menu
2) Enable MarcOrderingAutomation
3) Paste the following into MarcFieldsToOrder
price: 975$p
quantity: 975$q
budget_code: 975$h
4) Paste the following into MarcItemFieldsToOrder
homebranch: 949$a
holdingbranch: 949$b
itype: 949$y
nonpublic_note: 949$x
public_note: 949$z
loc: 949$c
ccode: 949$8
notforloan: 949$7
uri: 949$u
copyno: 949$t
price: 949$g
replacementprice: 949$v
itemcallnumber: 949$o
quantity: 949$k
budget_code: 949$l
Now save the sysprefs
5) In the administration homepage, under Acquisition parameters there should now be a link called "MARC order accounts"
6) Click on this and click the New account button
7) Choose a vendor and a budget
8) Enter a description
9) Enter the following in download directory - "/var/lib/koha/kohadev/tmp/koha_kohadev_upload"
10) Select any record matching settings you want (not important for the test plan, this uses the same code as the marc file staging that already exists in Koha)
11) Check Yes under Check for embedded item record data
12) Click submit
13) We now need to upload a MARC file into the directory that we put in the account. The easiest way to do this is through the marc staging tool
14) Navigate to Cataloging > Stage MARC records for import
15) Upload the file attached to this bug using the Choose file button
16) Click Upload file.
17) Leave the page without completing the new form that appears, we don't want to stage this file. The file we uploaded is now in the directory ready for the cronjob to process as if it had been transferred via SFTP.
18) In the CLI run, perl misc/cronjobs/marc_ordering_process.pl -v -c
19) The logging should show that the file has been processed for that account
20) Navigate to Acquisitions
21) Search for the Vendor that you put in the MARC ordering account
22) There should be a basket created on the vendor with the name of the file you uploaded (there will also be a reference at the start e.g. ea2323966faef2c59a6056dbd1f7d658_filename.marcxml. This is because we used the marc staging tool to upload the file and that adds a reference to filenames. This will not appear when using files from an SFTP location).
23) Click in the basket
24) There should be three orderlines, complete with accounting details that have been mapped from the file.
One line should have a fund of Fund 1_2, quantity of 4 and a replacement price of 6.75, one should have Secondary fund, 2, 6.40 and one should have Main fund,2, 6.30
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 [Mon, 24 Jul 2023 13:52:41 +0000 (13:52 +0000)]
Bug 34355: Add account creation
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 [Mon, 24 Jul 2023 13:52:18 +0000 (13:52 +0000)]
Bug 34355: Update menus
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 [Wed, 31 Jul 2024 13:02:50 +0000 (13:02 +0000)]
Bug 34355: DB schemas and atomicupdate
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>
Pedro Amorim [Wed, 6 Nov 2024 11:31:03 +0000 (11:31 +0000)]
Bug 38376: Add id to openURL as DOI
Test plan:
1) Enable ILLModule
2) Login on OPAC (if you haven't already)
3) Access the following openURL link:
localhost:8080/cgi-bin/koha/opac-illrequests.pl?atitle=Music%20in%20an%20Emergent%20History%20of%20Psychology.&aulast=Klempe%20SH&backend=Standard&cardnumber=kohaadmin&custom_field=example1&date=2024&id=10.1007%2Fs12124-023-09778-9&genre=article&issn=19363567&issue=1&custom_field2=example2&method=create&opac=1&openurl=1&pages=1-11&spage=1&title=Integrative%20psychological%20%26%20behavioral%20science&volume=58
4) Notice the 'id' is considered a custom field, and is not converted into the DOI native field.
5) Apply patch. Restart plack. Repeat 4. Notice the native field is populated and a custom field entry no longer exists.
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 [Thu, 7 Nov 2024 11:27:42 +0000 (11:27 +0000)]
Bug 38011: (QA follow-up) Improve database update
This patch ensure's we fix errant values in subscriptions prior to
adding the foreign key constraint.
Signed-off-by: Martin Renvoize <martin.renvoize@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 [Thu, 7 Nov 2024 11:51:24 +0000 (11:51 +0000)]
Bug 38011: (QA follow-up) Additional unit tests
Add an additional unit test for the default null on the new constraint.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Matt Blenkinsop [Thu, 26 Sep 2024 13:30:02 +0000 (13:30 +0000)]
Bug 38011: Add a foreign key between vendors and subscriptions
Test plan:
prove t/db_dependent/Koha/Subscription.t
prove t/db_dependent/Koha/Acquisition/Booksellers.t
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Amended-by: Jonathan Druart
Rename $rs
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lukas Koszyk [Thu, 10 Oct 2024 13:35:54 +0000 (13:35 +0000)]
Bug 36026: Use only configured TLS options for database connection
Database connections with TLS require client private keys
and certificates for authentication but MariaDB also supports
authentication by user and password.
This patch allows omitting the TLS options for certificate based
client authentication.
This is not easily testable within a development environment like ktd.
But the patch has been verified by different parties on
production and testing systems installed with Debian packages.
0) Apply patch.
1) Configure the database to support TLS connections.
2) Set "<tls>yes</tls>" in the config section in koha-conf.xml.
3) Run "koha-plack --reload <koha_instance>".
4) Open Koha's staff interface in the browser.
5) Observe an internal server error.
6) Apply patch.
7) Repeat step 3 and 4.
8) Observe the error is gone.
9) Run "prove -v t/db_dependent/Koha/Database.t"
Sponsored-by: Karlsruhe Institute of Technology (KIT) Signed-off-by: Cornelius Amzar <cornelius.amzar@bsz-bw.de> Signed-off-by: Markus John <markus.john@bsz-bw.de> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Thomas Klausner <domm@plix.at> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
[WARN] Use of uninitialized value $op in string eq at /usr/share/koha/intranet/cgi-bin/circ/circulation.pl line 144.
[WARN] Use of uninitialized value $op in string eq at /usr/share/koha/intranet/cgi-bin/circ/returns.pl line 253.
These happen in cases when $op is undef and circulation.pl or returns.pl tries to directly compare it to a string.
To reproduce:
1. Go to "Check Out" and "Check In" circulation pages, or refresh already opened one.
2. Check your logs for "Use of uninitialized value $op" warning.
3. Apply patch.
4. Repeat step 1 and check that no new "Use of uninitialized value $op" error were logged.
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Thomas Klausner <domm@plix.at> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Thu, 31 Aug 2023 15:55:26 +0000 (15:55 +0000)]
Bug 33766: (follow-up) Enable translation for strings
In my test the strings inside a SET directive were not picked up for
translation. This patch adds the t() function around the new strings in
order to allow them to be translated.
To test, apply the patch and test the translation process for any
language, in this example fr-FR:
- Run 'perl translate update fr-FR'
- Open misc/translator/po/fr-FR-messages.po
- Look for the affected strings: "Username", "Cardnumber", and
"Cardnumber or username."
- Update the po file with translations of the strings
- Run 'perl translate install fr-FR'
- View the OPAC in your translated language and test each setting of
OPACLoginLabelTextContent to confirm that the translated strings
appear.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Matt Blenkinsop [Thu, 31 Aug 2023 15:23:49 +0000 (15:23 +0000)]
Bug 33766: (sign-off follow-up) Fix sentence case
"Cardnumber or Username" is now "Cardnumber or username"
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Paul Derscheid [Thu, 17 Aug 2023 14:48:33 +0000 (14:48 +0000)]
Bug 33766: (follow-up) Fix ambiguous "Login" field
This follow-up fixes some problems w/ the unconventional
parts of the first commit. We now use conditionals in
a BLOCK to map the selected value from the preference
to string representations which should now be easily
translatable.
To test:
- Check that the label for
- The masthead inc
- The opac-auth template
- The opac-main template
- The opac-password-recovery template
- The opac-registration-confirmation template
- The opac-reset-password template
- The sco-main template
reflect the changes you made to the syspref
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Paul Derscheid [Thu, 17 Aug 2023 12:31:08 +0000 (12:31 +0000)]
Bug 33766: Fix ambiguous "Login" field
This patch introduces a new syspref 'OPACLoginLabelTextContent' which can be set
to the following values
- Cardnumber
- Username
- Cardnumber or Username
To test:
- Check that the label for
- The masthead inc
- The opac-auth template
- The opac-main template
- The opac-password-recovery template
- The opac-registration-confirmation template
- The opac-reset-password template
- The sco-main template
reflect the changes you made to the syspref
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Mon, 11 Nov 2024 12:53:20 +0000 (12:53 +0000)]
Bug 30699: (follow-up) Update to fix selenium test
Changing an <a> to a <button> breaks test, and changing *all* the
a#updatechild's to <button>s also breaks the test, so the simple
solution is to change the <button> back to <a>.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 37809: (follow-up) Allow embedding item.biblio too
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
It seems to me like a copy and paste error coming from the holds
endpoint.
To test:
1. Use a REST API tool like Postman to ask for some patron's checkouts
2. Add x-koha-emebed: cancellation_requested
=> FAIL: It explodes, cannot embed it
3. Apply this patch
4. Repeat 2
=> SUCCESS: cancellation_requested no longer a valid option
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 37809: Add more embed options to checkouts endpoints
This patch adds more embed options to checkouts endpoints.
To test you really need to try them on a REST tool.
* patron
* item
* library
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
David Nind [Thu, 17 Oct 2024 19:24:33 +0000 (19:24 +0000)]
Bug 23486: (follow-up) Display text for new option
Change display text for creation option from "Patron creation" to
"Creating a patron" - for consistency with other values.
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>
Nick Clemens [Fri, 20 Sep 2024 12:38:42 +0000 (12:38 +0000)]
Bug 23486: Add creation to TrackLasPatronActivity triggers
Some libraries would like to update the last seen when a patron is created to avoid NULL
values and ensure new users are marked as 'active'
To test:
1 - Apply patch
2 - Create a new patron, confirm their lastseen date is null
SELECT lastseen FROM borrowers WHERE cardnumber={their cardnumber}
3 - Update preference 'TrackLastPatronActivity' to include 'Patron creation'
4 - Create a second patron, confirm their lastseen is set
5 - Update preference 'TrackLastPatronActivity' to include 'Checking out an item'
6 - Checkout an item to the second patron
7 - Confirm their lastseen is not updated (We only update once per day)
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>
Owen Leonard [Wed, 10 Jul 2024 16:19:45 +0000 (16:19 +0000)]
Bug 37221: Add preference to turn off OPAC Overdrive features
This patch adds the preference "OPACOverDrive" to control whether
OverDrive features are shown in the OPAC. This allows a library to
disable OverDrive features without having to remove one or more of their
OverDrive credentials.
The patch also adds a check for the OPACOverDrive preference in the
OverDrive search results page. If OverDrive is disabled, navigating to
that page should give a 404.
To test you will need OverDrive credentials to test with.
- Apply the patch and run updatedatabase.
- If you already had data in the OverDriveLibraryID,
OverDriveClientKey, and OverDriveClientSecret system preferences,
the OPACOverDrive preference will be enabled when added. If not it
will be disabled by default.
- Rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface)
- Go to Administration -> System preferences -> Enhanced content ->
OverDrive.
- If necessary, enter valid credentials in the OverDriveLibraryID,
OverDriveClientKey, and OverDriveClientSecret system preferences.
- Set OPACOverDrive to "Don't enable."
- In the OPAC perform a catalog search. Normally, if your credentials
were correct OverDrive search results would automatically appear at
the top of Koha's search results. Now there should be none.
- Enable the OPACOverDrive preference and repeat your search. Now
OverDrive results should appear.
- Confirm that the OverDrive search results page works correctly.
- Test that OverDrive circulation features are working by logging in to
the OPAC as a user who has active OverDrive checkouts.
- Enable the OPACOverDrive and OverDriveCirculation system preferences.
- On the user's summary page there should be a tab for "OverDrive
account."
- The tab should not appear if either OPACOverDrive or
OverDriveCirculation is disabled.
Sponsored-by: Athens County Public Libraries Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Aleisha Amohia [Thu, 16 Nov 2023 21:38:35 +0000 (21:38 +0000)]
Bug 33348: Tests
prove t/Koha/SearchEngine/Elasticsearch/Search.t
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Thomas Klausner <domm@plix.at> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Aleisha Amohia [Mon, 1 May 2023 22:38:57 +0000 (22:38 +0000)]
Bug 33348: (follow-up) Fix if no 008 defined
And copy fix across to Zebra search as well.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Thomas Klausner <domm@plix.at> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Aleisha Amohia [Tue, 28 Mar 2023 02:10:59 +0000 (02:10 +0000)]
Bug 33348: Show authority heading use with Elasticsearch
This patch ensures the ShowHeadingUse system preference and feature works as expected when using Elasticsearch as the searchengine.
To test, follow the test plan at Bug 29990 Comment 9. Ensure the SearchEngine system preference is set to Elasticsearch.
Sponsored-by: Education Services Australia SCIS Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Thomas Klausner <domm@plix.at> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Nick Clemens [Mon, 3 Jan 2022 15:24:01 +0000 (15:24 +0000)]
Bug 28633: Add preferred name field to patrons
This patch adds a new field 'preferred_name' to the patron record.
On storage (creation or update) the preferred_name is set to the firstname if no
value is passed. Patron modifications will set the preferred name to the firstname if
the preferred_name field is hidden
With this patchset preferred_name will always be set - either to the firstname, or a specified value.
PatronAutoComplete/ysearch is updated to use 'preferred_name'
To test:
1 - Apply patches
2 - Update database and restart all, clear browser cache
3 - Load a patron in staff module
4 - Confirm you see and can add a preferred name
5 - Confirm the preferred name and first name now displays on patron details
6 - Remove first name from patron record and confirm it no longer shows
7 - Edit sysprefs BorrowerMandatoryFields and BorrowerUnwantedFields to confirm you can make
new field required or hidden
8 - Sign in as patron to opac
9 - Confirm preferred name shows
10 - Edit account on opac and confirm field is present
11 - Verify DefaultPatronSearchFields contains 'preferredname' if your pref had firstname
12 - Perform checkout and patron search using preferred_name, confirm patron is found
13 - Enable PatronAutoComplete system preference
14 - Type patron's surname into Checkout or patron search but don't hit enter
15 - Confirm patron is displayed with 'preferred_name' in the preview
16 - Set 'preferred_name' in all 'Unwanted' preferences
17 - Confirm editing a patron in staff interface sets both fields when firstname updated
18 - Confirm a patron modification sets both fields when firstname updated
19 - Create a patron / perform self registration and confirm both fields set when preferred_name is hidden
20 - Remove preferred_name from Unwanted prefs and confirm preferred_name is set to firstname if nothing passed
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Thu, 31 Oct 2024 08:41:39 +0000 (09:41 +0100)]
Bug 37238: Add exception for itemsearch
Item search has its own way to share the link, we should not deal with
the state (and the work from bug 33484) on this page.
It will certainly need to be adjusted to work like the other tables, but
it's something for later.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Tue, 2 Jul 2024 22:11:20 +0000 (22:11 +0000)]
Bug 37238: Add column configuration to item search results table
To test:
1. APPLY PATCH
2. Do an item search that will return results.
3. To the right of the table notice thee Columns, Export, Configure buttons
4. Use the Columns button to hide and show various columns, make sure it works right.
5. Use the Export button to try and export the table in various file formats. You should only see visible columns in your export.
6. Go to Admin -> Table settings, make sure you can hide columns properly from there.
Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Pedro Amorim [Tue, 29 Oct 2024 09:24:36 +0000 (09:24 +0000)]
Bug 38284: Add patron check for TrackLastPatronActivityTriggers
If an invalid or empty cardnumber is supplied to patron status request SIP message, SIP dies silently and no 'READ:' exists on the response.
Test plan:
1) Apply tests plan, run tests:
$ prove t/db_dependent/SIP/Message.t
2) Verify tests fail. Apply 2nd patch. Run tests again. Verify they pass.
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, 29 Oct 2024 09:23:31 +0000 (09:23 +0000)]
Bug 38284: Add tests
Sponsored-by: PTFS Europe <https://ptfs-europe.com> 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 [Wed, 23 Oct 2024 12:08:22 +0000 (13:08 +0100)]
Bug 37354: (QA follow-up) Reset periodPicker on rule change
This patch clears the periodPicker values when the applied circulation
rules change. This prevents selection of one booking period against one
set of rules and then a change of item to an itemtype where different
rules should apply but the old selected period remaining and thus 'rule
breaking' being allowed.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Mon, 21 Oct 2024 15:36:49 +0000 (16:36 +0100)]
Bug 37354: Fix circ rule selections
Only expose the bookings calendar picker input if we have enough detail
already defined to pick the corresponding circulation rules.
We currently use the item pickup location for selecting which rules to
apply, this corresponds to hard coding CircControl=ItemHomeLibrary +
ItemHomeOrHolding=holdingbranch for this use case. We can't easily
change this to match those rules dynamically without rethinking the 'Any
item' functionality and displays in the flatpickr. We may revisit this
at some point in the future should that become a requirement.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Sun, 14 Jul 2024 07:57:22 +0000 (08:57 +0100)]
Bug 37354: Add visual hint at usual loan periods
This patch adds a visual hint to the datepicker to highlight dates that
line up with normal loan and renewal lengths.
We use bold to highlight such dates.
Test plan
1) Repeat the test plan for the previous patch
2) Note that once you have selected your first date, that date will
become bold, the date a 'Loan period' after the start date will also
be bold and you'll also have bold dates for the number of 'Renewals
allowed' at each 'Renewal period' beyond the initial 'Loan period'
date.
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Sun, 14 Jul 2024 06:39:33 +0000 (07:39 +0100)]
Bug 37354: Set maxDate based on issuelength + (renewals * renewalperiod)
This patch sets the flatpickr maxDate in the bookings range picker to
the startdate selected + issuelength + renewals * renewalperiod
circulation rules.
Test plan
1) Set an item in a test biblio to 'bookable' from the items tab.
2) Note the itemtype of the above item
3) Add circulation rules for the above item type, in particular the
'Loan period', 'Renewals allowed' and 'Renewal period' options.
4) Go back to your biblio and 'Place booking'. Select a user, pickup
location and item.
5) Open the booking dates flatpickr.
6) Select a start date.
7) Note that the date that is 'Loan period' + 'Renewals allowed' *
'Renewal period' is now greyed out and cannot be selected or any date
beyond it either.
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Andreas Roussos [Tue, 16 Apr 2024 14:13:45 +0000 (14:13 +0000)]
Bug 36603: Copy the ISNI number over automatically
When linking authorities with other authorities in UNIMARC
instances it would be good if Koha automatically copied the
contents of subfield 010$a [aka INTERNATIONAL STANDARD NAME
IDENTIFIER (ISNI)] into the corresponding 5xx$o subfield
(should such an ISNI number exist in the source record).
This patch enables the enhancement outlined above.
For more information, please see the offical IFLA UNIMARC
Authorities Format Manual (online ed., 1.0.0, 2023), pp. 350,
363, 385. This is actually where we got this idea from ;-)
Note #1: it only applies to the Personal Name, Corporate
Body Name, and Family Name authority types.
Note #2: the default MARC Authorities framework that ships
with UNIMARC Koha instances does *not* include a
subfield $o for fields
200 (Authorized Access Point - Personal Name),
210 (Authorized Access Point - Corporate Body Name),
220 (Authorized Access Point - Family Name).
This is per the offical IFLA Manual, and effectively
means we can push the ISNI number to the same array
used for other subfields (@subfield_loop) without
worrying about overwriting any previous value.
Test plan:
0) Have a UNIMARC Koha test instance up and running. Then,
carry out the following steps in the Staff interface.
1) Stage for import the sample MARC authority data attached
to this Bug report (filename: sample-auths.mrc, contains
one Personal, one Corporate Body, and one Family Name).
Go to 'Cataloging > Stage records for import' and upload
the file. Make sure you select 'Authority' in the 'Record
type' dropdown menu. Leave all other settings untouched at
their default values. Click the 'Stage for import' button.
Then, import the staged records into your Catalog. Go
to 'Cataloging > Manage staged records'. Click on the
filename link in the second column. At the bottom of the
page, confirm you can see all three authorities included
in the .mrc you uploaded, then click on the button named
'Import this batch into the catalog'.
2) Enable the authority finder plugin for authority fields
500, 510 and 520. This can be done as follows:
a) Go to 'Administration > Authority types' and click on
'Actions->MARC structure' for the 'NP' (Personal Name)
authority type.
b) Search for tag 500; then click on 'Actions->Subfields'
for that tag.
c) Click 'Edit' next to subfield 'a' (Entry element), then
pick 'NP' from the 'Thesaurus' dropdown menu. Save your
settings and you're good to go! When editing a Personal
Name authority from now on, the 'Tag editor' button next
to subfield 500$a will launch the authority finder.
Repeat b) and c): search for tag 510, edit $a, pick 'CO'.
Repeat b) and c): search for tag 520, edit $a, pick 'FAM'.
3) Go to Koha's 'Authorities' module. At the top search bar,
filter on Personal Name authorities and perform a search.
Pick any one of the results, and edit it. Go to tab '5',
expand field 500 and use the button next to subfield $a
to launch the authority finder. Type '0000' inside the
'Search entire record:' text box, and click on 'Search',
then 'Choose'.
Notice that the ISNI number from the source record did
*not* get copied to subfield 500$o. The same will happen
if you try to Choose an authority for field 510 and 520.
4) Apply this patch.
5) Repeat step 3), this time the ISNI number from the source
record will be copied to 500/510/520 $o automatically!
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 38166: Make core status graph strings translatable
This patch makes several strings translatable. I usually dealth with
this by adding my statuses like `NEW` to the status graph shippped by
the backend I was working with, and solved the translation step inside
of the plugin itself.
But really, the core status graph should be translatable so core
backends (like the to-be FreeForm) and backend authors can rest assured
they only need to care about their custom statuses.
To test:
1. Make sure you have 35570 applied so it is easier to test
2. Enable the ILLModule syspref.
3. Install a language you're familiar with. I pick es-ES for the sake of
this testing steps to be readable:
$ ktd --shell
k$ koha-translate --install es-ES --dev kohadev && restart_all
4. Enable (language sysprefs) and switch to your language (click at the
left bottom on the language name).
5. Create a new ILL request
=> FAIL: Notice some buttons are not in your language
6. Jump to the ILL requests list
=> FAIL: The status displays as 'New request'
7. Apply this patch
8. Generate the translation entries for the core status graph strings:
k$ gulp po:extract
k$ gulp po:update # I had to run it twice to complete, unrelated error
9. Edit the relevant -messages.po file. In my case:
k$ vim misc/translator/po/es-ES-messages.po
Note: it is easier on VScode which shows you the changed lines in colors
on the scroll bar. The idea is to find the new strings that relate to
Koha::ILL::Request and translate them
10. Translate the strings that relate to this patch (at least 'New
request' and some of the buttons in the ILL request detail).
11. Install the new translations:
k$ koha-translate --update es-ES --dev kohadev && restart_all
12. Refresh the ILL requests list
=> SUCCESS: The request status is translated!
13. Manage the ILL request
=> SUCCESS: The buttons you translated, are translated!!
14. Sign off :-D
15. Grant tcohen some cookies next time
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Janusz Kaczmarek [Wed, 29 May 2024 19:40:45 +0000 (19:40 +0000)]
Bug 36991: Add ability to scan call numbers index/search field
Some libraries ask for the ability to scan/browse the call numbers index.
Test plan:
==========
1. Have an installation with items with callnumbers (in ktd with standard
test data set: add some callnumbers to the items).
2. Go to Advanced search > More options; choose Call number in the first
drop list and mark Scan indexes. Enter one of the call numbers you
assigned to the items and perform the search. You should get no
results.
3. Apply the pach; restart all; when using ES:
koha-elasticsearch --rebuild -r -d kohadev
4. Repeat p. 2. You should get a list with at least one call number.
The link should lead you to the record(s) with items with the selected
call number.
This should work for ES and for Zebra, but for Zebra you would need to
replace /etc/koha/zebradb/ccl.properties with the repository version; and
you will get one token results on the list, like for other indexes.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Test plan:
% git grep EmbedItemsInImportBiblio
should not return anything
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Kyle M Hall [Tue, 29 Oct 2024 11:44:10 +0000 (11:44 +0000)]
Bug 28965: (QA follow-up) Fix misc qa issues
* Tidy code
* Fix number of unit tests
* Fix use of delete
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch adds a route for publicly retrieving lists.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 28965: filter_by_public() and filter_by_readable()
This patch adds helper methods for lists resultsets. Tests are added for
their behavior.
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/Virtualshelves.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jake Deery [Thu, 31 Oct 2024 11:49:09 +0000 (11:49 +0000)]
Bug 37577: Add additional fields for ERM packages
This bug adds support for additional fields in the ERM module's
packages, similar to how Bug 35287 added support for additional fields
in the ERM module's licences, and Bug 37576 added support for additional
fields in the ERM module's agreements.
To test (k.t.d):
a) APPLY PATCH
b) Run cypress --spec t/cypress/integration/AdditionalFields_spec.ts
1) Note how the tests pass
c) Add new additional fields for 'erm_packages'
1) Go to /cgi-bin/koha/admin/additional-fields.pl?tablename=erm_packages
2) Create field one called 'text non-repeatable'
3) Create field two called 'text repeatable', check 'repeatable'
4) Create field three called 'av non-repeatable', pick LANG authorised
value
5) Create field four called 'av repeatable', pick LOC authorised value,
check repeatable
d) Create new local package
1) Go to /cgi-bin/koha/erm/eholdings/local/packages/add, notice the new
additional fields section
2) Complete all mandatory fields for a new package
3) Experiment with the four different additional field types – it
may be useful to watch the Cypress-generated test video for
guidance
4) Select some AV options from the AV fields, deselect them, notice
the repeatable one allows for multiple selection, the non-repeatable
one does not
e) Save the package, then view it
1) To view the package, click its name in the table list on
/cgi-bin/koha/erm/eholdings/local/packages
2) notice the additional fields on display
3) also notice that the authorised values are in their human-readable
form, and not their coded form
f) Edit the package, then view it again
1) Go to /cgi-bin/koha/erm/eholdings/local/packages/edit/1
2) Play around again with the fields. Save.
3) Repeat step e, have the edits shown up?
g) Test searchability
1) Go to /cgi-bin/koha/admin/additional-fields.pl?tablename=erm_packages
2) Edit one of the fields and make sure searchable is checked (ensure
you choose a field that has some data in it)
3) Go to /cgi-bin/koha/erm/eholdings/local/packages
4) Notice that the searchable field(s) are now columns in the table
5) Notice that searchable AV fields contain a drop-down
6) Notice that searchable text fields have an input field
7) Perform a search on the additional field
8) Notice that the searching is working as expected
h) SIGN OFF
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 37576: Add additional fields for ERM agreements
This bug adds support for additional fields in the ERM module's
agreements, similar to how Bug 35287 added support for additional fields
in the ERM module's licences.
To test (k.t.d):
a) APPLY PATCH
b) Run cypress --spec t/cypress/integration/AdditionalFields_spec.ts
1) Note how the tests pass
c) Add new additional fields for 'erm_agreements'
1) Go to /cgi-bin/koha/admin/additional-fields.pl?tablename=erm_agreements
2) Create field one called 'text non-repeatable'
3) Create field two called 'text repeatable', check 'repeatable'
4) Create field three called 'av non-repeatable', pick LANG authorised
value
5) Create field four called 'av repeatable', pick LOC authorised value,
check repeatable
d) Create new agreement
1) Go to /cgi-bin/koha/erm/agreements/add, notice the new additional
fields section
2) Complete all mandatory fields for a new licence
3) Experiment with the four different additional field types – it
may be useful to watch the Cypress-generated test video for
guidance
4) Select some AV options from the AV fields, deselect them, notice
the repeatable one allows for multiple selection, the non-repeatable
one does not
e) Save the agreement, then view it
1) To view the licence, click its name in the table list on
/cgi-bin/koha/erm/agreements
2) notice the additional fields on display
3) also notice that the authorised values are in their human-readable
form, and not their coded form
f) Edit the agreement, then view it again
1) Go to /cgi-bin/koha/erm/agreements/edit/1
2) Play around again with the fields. Save.
3) Repeat step e, have the edits shown up?
g) Test searchability
1) Go to /cgi-bin/koha/admin/additional-fields.pl?tablename=erm_agreements
2) Edit one of the fields and make sure searchable is checked (ensure
you choose a field that has some data in it)
3) Go to /cgi-bin/koha/erm/agreements
4) Notice that the searchable field(s) are now columns in the table
5) Notice that searchable AV fields contain a drop-down
6) Notice that searchable text fields have an input field
7) Perform a search on the additional field
8) Notice that the searching is working as expected
h) SIGN OFF
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Thu, 7 Nov 2024 13:16:44 +0000 (14:16 +0100)]
Bug 38391: Redraw the filters row on table redraw
We used to adjust the filters row when the column visibility changed.
It was working, but at the initialization of the table this event if
fired once per columns. On the items table it means 36x.
When a filtering/sorting, the draw event is triggered once, but the
column-visibility.dt is called 36x
Test plan:
Try with and without this patch and compare the delay between the query
is received and the page is redrawn.
You can test with 1000 libraries on the items table.
"Show filters" then filters using the global search.
On Firefox you will notice that the response is received but the table
not redrawn directly.
With this patch it should be redrawn pretty fase.
Another test would be to add the following 2 lines:
+ let i = 0;
table_dt.on("draw", function(){
+ console.log("redraw filters %s".format(i));
if ( add_filters ) {
_dt_add_filters(this, table_dt, filters_options);
}
Open the console and notice that "redraw filters" is logged only once.
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 [Tue, 1 Oct 2024 15:45:07 +0000 (16:45 +0100)]
Bug 17976: Unit tests
Add unit tests for the newly introduced overdue fines relation accessor.
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Tue, 1 Oct 2024 14:55:06 +0000 (15:55 +0100)]
Bug 17976: Add overdue_fines accessor to Koha::Checkout
This patch adds a new filtered relation accessor to the Koha::Checkout
object to return just overdue fine type account lines related to the
checkout.
Whilst this is easy to chain in code, it's not available via TT and so
this accessor is useful for the notices case.
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Tue, 1 Oct 2024 14:53:11 +0000 (15:53 +0100)]
Bug 17976: Update test to include fines
This patch updates the existing test to include checking the alternative
to items.fine syntax.
We could use the account_lines relation, however that would include
other charges linked to the checkout, for example rental charges.
I opt to add a new accessor to give us more options and refine to just
overdue fines.
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Emily Lamancusa [Thu, 24 Oct 2024 15:37:56 +0000 (11:37 -0400)]
Bug 22421: (follow-up) Use checkout accessor to get correct issue_id
In some cases, we may want to update an AccountLine that is linked to a
checkout without knowing whether it is a current or old checkout. In
these cases, use the AccountLines ->checkout accessor to ensure we get
the issue_id correctly, regardless of whether it is a current issue or
and old_issue.
This also applies when generating a new AccountLine based on an existing
AccountLine (for example, adding a credit to refund a previously charged
fine)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Emily Lamancusa [Thu, 24 Oct 2024 15:24:11 +0000 (11:24 -0400)]
Bug 22421: (follow-up): Check issue during add_credit
Additional handling for the case where a credit is added with an
issue_id after the issue is returned.
add_credit will keep the same method signature, where the issue_id
parameter may now refer to a current issue or an old issue. It will then
internally determine whether it is a current or old checkout and handle
it appropriately.
If the caller is updating an account line, or adding a credit to refund
an existing debit, they may not need to know whether it is for a current
checkout or an old checkout. In this case, they can use the account
line's ->checkout accessor to pass in the appropriate issue_id
regardless of whether it is a current or old checkout.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Thu, 8 Feb 2024 14:18:31 +0000 (14:18 +0000)]
Bug 22421: DBIC schema update
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Thu, 6 Jun 2019 12:25:01 +0000 (13:25 +0100)]
Bug 22421: (follow-up) Correct checkout relation
The Koha::Account::Line->checkout relationship accessor needed an update
to respect the new fields and foreign keys introduced here.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Thu, 6 Jun 2019 11:43:51 +0000 (12:43 +0100)]
Bug 22421: Ensure old_issue_id is populated in accountlines
Update C4::Circulation::MarkIssueReturned to handle moving issue_id to
old_issue_id in accountlines.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>