Commit graph

49016 commits

Author SHA1 Message Date
7d50f85cc6
Bug 29234: Further clean Z3950 Tests
We are deleting all authorised values in Session2.t and assuming they don't exist in Sesson.t

This patch ensures the tests will work regardless of data in DB

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-03 10:49:58 -03:00
b96e61f1ea
Bug 29234: Set datesent for transfers in Z3950 Responder tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-03 10:49:53 -03:00
Andreas Roussos
be81f156b8
Bug 32447: Fix DataTable filtering when hidden columns are in place
The bibliographic record's details page in the Staff interface
includes a 'Holdings' table at the bottom with information for
each item attached to the record. When activating the filters
in this table, there is no input field for the barcode column
but just bold text.

This broke in v22.11.00, the related commit being 018a981b9b
from Bug 29282 where two new hidden columns were added to that
table.

We can fix this by taking advantage of the existing code in
koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc
(introduced by commit dfb7af91af from Bug 23307) which allows
us to create and hook our own custom columnsInit() function in
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
to redraw the DataTable filters upon page load if a column is
marked as 'is_hidden: 1' in admin/columns_settings.yml, or if
a column is added/removed via the "⚙ Columns" button (both
are handled by the DataTables column-visibility.dt event).

Redrawing the filters via the above method also fixes the
issue described in Bug 32448.

Test plan:

1) Confirm the erratic DataTable behaviour outlined above
2) Apply this patch and reload all JS assets (hit CTRL-F5)
3) Confirm that you now see the correct input text field
   for the 'Barcode' column
4) Confirm that you can search for barcodes or in any other
   column successfully
5) Try toggling the visibility of the columns and making as
   many search variations as possible -- it should all now
   work without any glitches!

For extra credit ;-) you can also test the 'Other holdings'
table by setting the SeparateHoldings SysPref to 'Separate'.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 19:19:27 +02:00
Katrin Fischer
6cbbfa27cb
Bug 32447: Clean up table configuraton settings for holdings table
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 19:19:26 +02:00
Katrin Fischer
6cd0a7e282
Bug 25590: Street number is missing from the alternate address in the OPAC
This patch adds the street number field to the alternate address
section in the OPAC, matching the layout of the address in the
staff interface.

To test:

1) Check that you are unable to add a street number to the Alternate
address when logged into the OPAC
2) Apply the patch
3) Check that you can now add and edit the streetnumber field.
4) Check that it also works correctly in patron self-registration.
5) Make the field mandatory and verify this works as expected
   (PatronSelfRegistrationBorrowerMandatoryField and PatronSelfModificationBorrowerMandatoryField)
6) Hide the field from the form
   (PatronSelfRegistrationBorrowerUnwantedField and PatronSelfModificationBorrowerUnwantedField)
7) Change the AddressFormat system preference to German
8) Verify that the street number field moved after the first address line matching
   the first address in the form.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 18:46:55 +02:00
Katrin Fischer
600c6d2282
Bug 32976: Add permission check on Add/Edit controls for patron images
This adds a check on the batch_upload_patron_images permission
to the Add/Edit control for patron images in the patron account
in the staff interface.

To test:
* Enable patronimages system preference
* With your 'superlibrarian' account:
* Add and edit/remove a patron image to an account
* Create a staff user with batch_upload_patron_images permission
* Log in with this user and verify everything works the same
  as before
* Remove the batch_upload_patron_images permission
* Verify the Add/Edit controls are on longer visible to this
  patron

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 18:45:59 +02:00
2d0eca8a0d
Bug 32279: Add GetAuthorizedHeading method export C4::AuthoritiesMarc
C4::AuthoritiesMarc method GetAuthorizedHeading is not exported thus it is called in other modules :
 > git grep GetAuthorizedHeading
C4/AuthoritiesMarc.pm:=head2 GetAuthorizedHeading
C4/AuthoritiesMarc.pm:  $heading = &GetAuthorizedHeading({ record => $record, authid => $authid })
C4/AuthoritiesMarc.pm:sub GetAuthorizedHeading {
C4/Breeding.pm:                            $heading = C4::AuthoritiesMarc::GetAuthorizedHeading({ record => $marcrecord });
C4/ImportBatch.pm:            $row->{'authorized_heading'} = C4::AuthoritiesMarc::GetAuthorizedHeading( { authid => $row->{'candidate_match_id'} } );
C4/ImportBatch.pm:    my $authorized_heading = C4::AuthoritiesMarc::GetAuthorizedHeading({ record => $marc_record });

This patch adds it to be exported.
For example for use in Koha plugins.

Test plan :
Check import of authorities from a file is OK

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 18:43:40 +02:00
f19a3bf91a
Bug 33322: (QA follow-up) Add comment to clarify selector context
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 18:41:38 +02:00
2f1dffe1d5
Bug 33322: Refine click handler for suggestion batch operations
The handler for suggestion batch operations looks for clicks on
"button[type='submit']" which is not very specific. With the new staff
interface this ends up including the header search form.

This patch modifies the markup of the batch operations section of
the template and makes the click handler more specific so that only the
right buttons are affected.

To test, apply the patch and go to Suggestions.

- In the header search form, perform a catalog search. You should be
  able to click the submit button to successfully initiate the search.
- Without checking a checkbox associated with any open suggestion, test
  the batch operation buttons at the bottom:
  - Change status
  - Change item type
  - Update manager
  - Delete
  - Archive
  All should trigger a JS alert, "Please select at least one suggestion"
- Test each batch operation with one or more suggestions selected and
  confirm that the operation completes successfully.

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 18:41:37 +02:00
97a100d19d
Bug 32280: Export method ImportBreedingAuth from C4::Breeding
In C4::Breeding method ImportBreedingAuth() should be exported to be used for example by plugins.

No test plan needed i bet.

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Looks like a harmless and useful enhancement.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 18:39:37 +02:00
6ab19f01b8
Bug 29234: (QA follow-up) Fix test that expects wrong defaults
This patch changes the get_items_that_can_fill tests so they explicitly
set a 'datearrived' as the new defaults for fresh transfer objects from
TestBuilder is more sane and has this field undef. Tests *should always*
create their required scenarios explicitly.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 18:35:54 +02:00
a18f65cdcc
Bug 31259: Escape infinite loop when lime cannot wrap enough
It seems the wrapping here works with words, not characters. If a line is too long,
or too far over, we can't trim it enough. We need to escape if successive loops are
not changing the line

To test:
 1 - Using sample data, edit the layout to match picture in comment 9
 2 - Add some borrowers to a batch
 3 - Attempt to export batch and save PDF
 4 - Staff client waits
 5 - ps aux | grep card
 6 - Note the job keeps running
 7 - Kill it
 8 - Apply patch
 9 - Restart_all
10 - Export batch again
11 - Success, you get a badly formatted PDF, rather than nothing
12 - Note the PDF does not show "Yakama Nation Library"
13 - Edit layout, male "Lower left X" 20 instead of 220
14 - Export again and note text field 1 shows correctly

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 13:13:39 +02:00
3db7173dde
Bug 32648: Avoid skipping record or hiding item
It seems that depending on other tests, the item could be hidden from the record, or
the entire record hidden because of the way we count hidden items.

I add a mock for the two HIddenItems prefs and hardcode an xml record
to avoid problematic data from test builder

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 13:13:37 +02:00
320a4b4d74
Bug 32437: (QA follow-up) Add missing methods in schema file
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 13:13:36 +02:00
488e67656f
Bug 18398: (follow-up) Update POD & Unit tests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 13:13:35 +02:00
f7cfe3a705
Bug 18398: Update C4::Message enqueue to use $patron->notice_email_address
This patch updates the enque method in C4::Message to expect a
Koha::Patron object in the parameters and then uses that patron object
to select the correct email address for notices as defined by
AutoEmailPrimaryAddress.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 13:13:33 +02:00
92fbb49af7
Bug 32437: DBRev 22.12.00.016
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 13:13:32 +02:00
82c552e876
Bug 32437: DBIC schema
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 13:13:31 +02:00
88cf3c76e9
Bug 32437: (QA follow-up) Prevent upgrade if wrong PRIMARY KEY key present
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 13:13:30 +02:00
23b34d1be9
Bug 32437: (QA follow-up) Change to replace POD
Making it more visible that this also applies to authority
records.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 13:13:28 +02:00
3bc8259e4f
Bug 32437: Honor overlay setting in staged batch when adding to a basket
This patch uses the replace method added in last patch to ensure
records are overlayed when added to a basket

To test:
 1 - Stage the sample file on this report using the options below
     (If not using sample database simply save a record as marc from the details page, then change the title in the interface and import the saved version)
 2 - Make sure to match using KohaBiblio (999c)
 3 - Set option "Replace existing record" if match found
 4 - Once record is staged go to Acquisitions
 5 - Find a vendor and select/create an open basket
 6 - Add to basket from the staged file
 7 - Add order info and save
 8 - Check the record, title is unchanged -  Sample file should add 'New and improved!'
 9 - Check the staged records batch - note the diff shows that new record should have overwritten
10 - Apply patch
11 - Stage file, match on KohaBiblio, set action if matching record found to 'Ignore incoming record'
12 - Add to basket from the staged file and save
13 - Confirm record not overlayed when not reuqested
14 - Stage file, match on KohaBiblio, set action if mathc record found to  'Replace existing...'
15 - Add to basket from staged file and save
16 - Confirm the record is updated to 'New and improved!'

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 13:13:27 +02:00
ecc92f92ca
Bug 32437: Add replace method to Koha::Import::Record objects
This patch adds a replace routine to Koha::Import::Record - largely
copying and updating code from C4::ImportBatch

To test:
prove t/db_dependent/Koha/Import/Records.t

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 13:13:26 +02:00
f41f272ff0
Bug 32437: Add Objects for ImportAuths
This patch:
1 - Adds an atomic update to add a primary key to import_auths table
2 - Adds objects for Koha::Import::Records::Auths
3 - Adds tests for import auth and biblio objects

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 13:13:25 +02:00
b68a6b3297
Bug 32437: Cleanup script
This patch:
- fixes some indentation
- flips unless-else to if-else for readability
- expands some comments for clarity
- removes unused biblioitemnum variable

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 13:13:23 +02:00
45cea7c7ba
Bug 13976: Sort popularity numerically in Zebra
To test:
1 - Create a new template at Tools->Marc modification template
2 - Add action: Copy 999$c to 942$0
3 - Create a report:
    SELECT biblionuber FROM biblios
4 - Run report, show all, do a batch modification to all records using template above
5 - Search for 'a' (make sure you are using Zebra)
6 - Sort by popularity
7 - Note records are sorted wrong
8 - Apply patch
9 - Restart all
10 - Reload search results
11 - Success! Sorted correctly

Signed-off-by: Anke <anke.bruns@gwdg.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 12:40:00 +02:00
561dac9335
Bug 32373: Show patron restriction date
This is a rebased submission following bug 31095 which removed the use of GetDebarments. This patch now uses $patron->restrictions to find the date and pass it to the template

Test plan:
1) Create a restriction on a patron and navigate to that patron in Checkouts or the patron details page
2) There should be a message with details about the restriction but the creation date of the restriction won't be included in the message
3) Apply patch
4) The message should now say "Restricted since DATE" as in the screenshot attached.
5) Change the 'dateformat' syspref and refresh, the date should change to reflect the syspref

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 12:34:13 +02:00
508ad15cb7
Bug 32954: Standardize action fieldsets in rotating collections, suggestions, tools
As per Bug 32744: Fieldsets with the class "action" should be placed
outside of the fieldset containing the main body of the form. This
report covers a few templates in rotating collections, suggestions, and
tools.

To test, apply the patch and check the following pages to confirm that
changes to form structure look correct:

- Tools -> Rotating collections. Create a collection if necessary, then
  click "Action" -> "Manage items." Check the form on the manage items
  page.
- Suggestions -> Sidebar filter. Check that different sets of filters
  expand and collapse correctly.
- Tools -> Batch item modification (initial form)
- Tools -> Inventory (initial form)
- Cataloging -> Stage records for import (initial form)
- Tools -> Upload (upload and search forms)

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 12:33:13 +02:00
ab76971ec4
Bug 32771: Standardize structure around action fieldsets in serials
This patch updates serials templates so that fieldsets with the
"action" class are placed outside the form's main fieldset.

To test, apply the patch and rebuild the staff interface CSS. Go to
serials and check the following pages to confirm that changes to
form structure look correct:

- Navigate directly to /cgi-bin/koha/serials/serials-search.pl
  - Check the form on this page.
  - Perform a subscription search. On the search results page, check
    the sidebar form.
- Click "Manage numbering patterns" in the left-hand sidebar menu.
  - Click "New numbering pattern" and check the forms on that page.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 12:30:37 +02:00
Katrin Fischer
6d743dd63e
Bug 31409: Set focus for cursor to Fund code when adding a new fund
This makes sure that the focus is on the first input field
of the form when adding or editing a fund.

To test:
* Go to administration > funds
* Add a new fund to the budget
* Verify the focus is not inside the form
* Apply patch
* Verify the focus is now in the first form field "Fund code"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 12:29:23 +02:00
aaa5bcd16b
Bug 28641: ILLHiddenRequestStatuses does not consider custom statuses
This patch adds the status_alias column to the ILLHiddenRequestStatuses sys pref check.
Because requests will have status_alias NULL by default, we also check for that.

Test plan:
Create multiple ILL requests of different backends and place them in different status (NEW, COMP, REQ, etc)
Create multiple ILLSTATUS entries
Add and remove a mix of both status and status_alias codes in ILLHiddenRequestStatuses and refresh the ILL requests page to confirm the result is according to expectation.

Sponsored-by: PTFS Europe

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 12:28:14 +02:00
b0a570796c
Bug 33146: Add public items lookup route
This patch adds a /public equivilent to the item listing endpoint.

This allows us to search for an item by it's external_id (barcode).

Test plan
1. Apply patch
2. Perform a GET on /api/v1/public/items?external_id=some_barcode
3. Confirm that the above endpoint correctly returns items that should
   be visible in the OPAC

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Bug 33146: (QA follow-up) Do not delete all items in test

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Bug 33146: Allow embedding expanded coded values

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Bug 33146: (QA follow-up) Consistency with /biblios/:biblio_id/items

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Bug 33146: (QA follow-up) Make sure public API enabled for tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 12:26:57 +02:00
bb5d95749b
Bug 33146: Unit tests
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 12:26:57 +02:00
Pasi Kallinen
4642bdc7f8
Bug 33349: Patron Attributes don't have identifying information in intranet
Patron Attributes have no identifying info in the template page, no stable ID to
style or effect with javascript, so when new patron attributes are added or
removed, their order may change, requiring extra work to make sure CSS and
javascript don't change the wrong patron attributes.

Test plan:

0) in intranet:
1) create patron attribute types with different codes:
   "TESTPA", "test2 PA", and "At%tr:X"
2) add those patron attributes to a patron, with some values
3) in a browser, go to a patron information page, and inspect
   the page source where the patron attributes are
4) note how the PA entries have no identifying information usable
   to css or javascript
5) apply patch
6) inspect the page source, note how the patron attributes have
   data-pa_code -value with the following values:
   "TESTPA", "test2PA", and "AttrX"
   (The attribute codes are sanitized to remove possibly problematic
   characters; those shouldn't be used in PA codes anyway)
7) Go to the page where you edit the patron's Additional attributes
   and identifiers, and repeat 6 for that page.

Signed-off-by: Pasi Kallinen <pasi.kallinen@koha-suomi.fi>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 12:25:21 +02:00
2799cac081
Bug 21548: ILLLIBS patron category / partner_code seems extraneous
This patch updates the default partner category used by the partner_code config to be in line with sample data in sample_patrons.yml

Preparation:
Apply patch
Enable ILLModule sys pref
Install an ILL backend (e.g. FreeForm)
Add this change to your koha-conf.xml
Flush, restart.
Search for patron of category inter-library loan and assign a primary e-mail address to it

Test plan:
Create an ILL request and click 'place request with partners'
Verify that the 'select partner libraries' has the correct patron of IL category

Run tests and ensure they pass:
prove t/db_dependent/Illrequest/Config.t
prove t/Koha/Config.t

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 12:14:51 +02:00
b6f9241d66
Bug 33168: Prevent debhelper from renaming history.txt to changelog
This change prevents debhelper from renaming history.txt to changelog,
since that renaming was breaking the Timeline feature in Koha.

Another option would've been to rename history.txt to something else
but that filename is already embedded in Koha and the Koha release
tools, so this seems the safer option.

Test plan:
0. Apply patch
1. Build Debian package
2. Confirm that /usr/share/doc/koha-common/history.txt is created
and /usr/share/doc/koha-common/changelog.gz is not created

Signed-off-by: Mason James <mtj@kohaaloha.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 12:14:16 +02:00
Magnus Enger
5c65913eac
Bug 29449: Show userid on "Personal details" tab
To reproduce:
- Login to the OPAC
- Go to the "Personal details" tab
- Verify the Username/userid of the logged in user is not
  shown anywhere

To test:
- Apply this patch
- Reload the "Personal details" tab
- Verify that "Username:" and the userid is now shown below the
  "Library card number"
- Try adding "userid" to PatronSelfModificationBorrowerUnwantedField
  and verify the field is hidden as expected
- Log out
- Go to "Don't have an account? Register here."
- Verify "Username:" is *not* shown
- Sign off

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 12:12:51 +02:00
84a2d06b48
Bug 33346: Add missing class and id to link
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 12:11:06 +02:00
9d4c4b1cd7
Bug 33346: Add Help link to Koha manual in ERM module
The 'Help' is missing in the ERM module, this patch is adding it.

Test plan:
Confirm that the Help link is displayed on the different pages of the
ERM module and that it leads to the correct page of the manual.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 12:11:06 +02:00
c15f1d65b7
Bug 32794: (follow-up) Replace code by new function (template)
Test plan:
Same as first patch.
Bonus:
Remove protocol from $u. Set first ind1 to 7.
Put mailto in $2. Check link.
Change $2 to tel. Check link.
Change $2 to https. Check link.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 12:09:36 +02:00
db2a8a416a
Bug 32794: (follow-up) Consolidate shared code into one function (:template)
Few extra lines for the $2 exception as noted on Bugzilla.

Note: We should probably check why the utils xslt on opac and intranet
have so much differences currently.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 12:09:36 +02:00
353a0a85a3
Bug 32794: Expand tests for access method in XLST files
This patch expands the checks for 856u to check for mailto, and adds a few conditiona
checks of the first indicator to cover more methods

Reference: https://www.oclc.org/bibformats/en/8xx/856.html

To test:
1 - Edit a record and add a few 856 fields:
    856 0 0 $umailto:test@example.org
    856 0 0 $utest@example.org
    856 2 0 $utelnet://pucc.princeton.edu
    856 2 0 $upucc.princeton.edu
    856 3 0 $u8885555555
2 - View staff details and results and opac details and results
3 - Note all links have been prepended with http://
4 - Apply patch
5 - Refresh all views, ensure links are correctly formed

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 12:09:36 +02:00
557a0285ca
Bug 26433: Add Control number to SRU field configuration
This simply adds a row to the config page for configuring a mapping for Control
number, without this patch you cannot configure the feild, and the default is 'any'

I used the first record here for testing:
http://lx2.loc.gov:210/NAF?operation=searchRetrieve&version=1.1&query=query=bath.personalName=%22butler%20octavia%22&maximumRecords=20&recordSchema=marcxml

Enter SRU server using settings here:
https://www.loc.gov/z3950/lcserver.html#serv
       host: lx2.loc.gov
       port: 210
         db: NAF
     userid:
   password:
 servername: LOC SRU
    checked: NULL
       rank: NULL
     syntax: USMARC
    timeout: 0
 servertype: sru
   encoding: utf8
 recordtype: authority

To test:
1 - Setup SRU server using settings above
2 - In the server config click 'Modify' under 'SRU search fields mapping'
3 - Note you don't have an option for 'Control number'
4 - Go to Authorities
5 - New from Z39.50/SRU
6 - Search 'Control number' field with: PS3552.U827
7 - You get the record noted above as all fields are searched
8 - Search 'Control number' field with: 79056654
9 - You get the record noted above as all fields are searched
10 - Apply patch
11 - In the server config click 'Modify' under 'SRU search fields mapping'
12 - Note you now have a config for 'Control number'
13 - Enter 'bath.lccn'
14 - Save
15 - Repeat search from #6 - no result
16 - Repeat search from #8 - correct result as only lccn fields are search
17 - Modify server config ans set 'Control number' to 'bath.lcCallNumber'
18 - Repeat search from #6 - correct results as call number field is now search
19 - Repeast search from #8 - no result

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 12:06:51 +02:00
b0767f5eb6
Bug 33159: Simplify ES handling and fix zebra handling
Before this patch we used two indexes for the thesaurus values, we can
simply index both needed fields into a single index and just form the
search correctly.

This patch also ensures we pass the 'thesaurus' vlaue for the heading
directly to the query builder - for zebra it goes through, and for ES
we convert it to the expected code.

This patch also moves the necessary mappings out of the user definable
mappings and hardcodes them. There is precedent for this with
'match-heading', it ensures matching works as expected

To test:
1 - Follow previous test plan in Zebra and ES

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 11:56:53 +02:00
297a07f5f8
Bug 33159: Correctly form thesaurus term for non-subject headings
Bug 30280 fixed things for subject heading, but didn't take into account
that all non-subject headings are considered LCSH - this means we can't
really handle different thesauri for controlled headings outside of
subjects - maybe a topic for a new bug, but we should fix matching for
them now

To test:
 1 - Set sysprefs:
    RequireChoosingExistingAuthority - don't require
    AutoCreateAuthorities - generate
    CatalogModuleRelink - Do
    AutoLinkBiblio - Do
    LinkerModule - first match
 2 - Find a record with an author attached to an authority, I used
  biblionumber 3 "Introduction to Attic Greek"
 3 - Edit in advanced editor
 4 - Delete the $9 link
 5 - Save the record
 6 - It generates a new number
 7 - Repeat 4-5, it does it again
 8 - Apply patch and restart all
 9 - Repeat 4-5
10 - It links to the original authority

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 11:56:52 +02:00
ee60af86c6
Bug 33159: Unit tests
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 11:56:51 +02:00
be8a3ee830
Bug 29234: Transit on checking
Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 11:56:50 +02:00
80f5b33511
Bug 29234: Unit test
This patch adds a test that a pending stock rotation transfer is initiated on
checkin, as well as updating the defaults for creating transfer objects

To test:
prove -v t/db_dependent/Circulation.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 11:56:49 +02:00
075ef09f48
Bug 32336: (QA follow-up) Use $metadata->schema
When we worked on Koha::Biblio::Metadata, we agreed
biblio_metadata.schema would be the sourceof truth when it comes to the
record schema.

This patch acknowledges that, while retaining the fallback to the
syspref.

To test:
1. Apply this patch
2. Run:
   $ prove t/db_dependent/api/v1/biblios.t
=> SUCCESS: Tests pass, behavior is unchanged.
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 11:56:48 +02:00
Julian Maurice
1a02ba56f1
Bug 32336: Fix encoding of MARCXML output for REST API (UNIMARC)
Test plan:
1. Be sure to test on a UNIMARC instance
2. Enable system preferences RESTPublicAPI and RESTPublicAnonymousRequests
3. Create a biblio with some diacritics
4. Restart koha and do not interact with OPAC or the staff interface
   (this may change $MARC::File::XML::RecordFormat)
5. Query the public API to retrieve the created biblio in MARCXML. For
   instance with cURL:

   curl -H 'Accept: application/marcxml+xml' \
    http://koha.local/api/v1/public/biblios/<biblionumber>

   You should see encoding issues.
6. Apply the patch and restart Koha.
7. Repeat step 5.
   You should see no encoding issues.
8. You should also test /api/v1/biblios/<biblionumber> (this one
   requires authentication, so cURL might not be the most practical
   tool; use your favorite tool for this)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 11:56:47 +02:00
Julian Maurice
8bfb09b68b
Bug 32336: Add unit test for UNIMARC encoding problems in REST API
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 11:56:46 +02:00