Commit graph

45617 commits

Author SHA1 Message Date
d533a92aa8
Bug 23991: Move SearchSuggestion to Koha::Suggestions
The C4::Suggestions::SearchSuggestion subroutine is badly written and
can be replaced by calls to Koha::Suggestions->search.
The hard part in this patch is suggestion.pl, the other occurrences have
been replaced easily.

Test plan:
The idea is to test the whole suggestion workflow.
1. Create a suggestion on OPAC
2. Create a suggestion on the staff interface
3. Edit suggestions
4. Filter suggestions (use the different filters and "organize by"
values)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Bug 23991: Remove SearchSuggestion tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Bug 23991: (QA follow-up) Save some DB queries

This patch makes the suggestion-related pages rely on array size instead
of querying the DB each time they need to. In the case of
suggestion/suggestion.pl it goes from 4 COUNT(*) to 1.

To test, with KTD:
1. Run on the host machine:
    $ docker exec -ti koha_db_1 bash
    $ mysql -ppassword
    > SET GLOBAL general_log_file='/var/log/mysql/mycustom.log';
    > SET GLOBAL log_output = 'FILE';
    > SET GLOBAL general_log = 'ON';
    > \q
    $ tail -f /var/log/mysql/mycustom.log | grep suggestions
2. Visit the different pages changed on this bug
=> SUCCESS: Some queries
3. Apply this patch
4. Repeat 2
=> SUCCESS: Less queries!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Bug 23991: Fix branchcode and budgetid filtering

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Bug 23991: Fix conflict with bug 28941

Well, this patchset fixed the security bug...
Redoing on top of bug 28941

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Bug 23991: (follow-up) Missing semicolon

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Bug 23991: Fix 'all' libraries

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Bug 23991: (follow-up) Add value to filter_archived

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-27 12:30:28 -03:00
147f6e0293
Bug 31053: Add Context module to Koha::Encryption
Test plan:
perl -MKoha::Encryption -e'print Koha::Encryption->new->encrypt_hex("test");'

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-27 11:46:22 -03:00
cccfccca76
Bug 30327: DBRev 22.06.00.008
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 15:30:47 -03:00
8757023b21
Bug 30327: (follow-up) Fix inconsistencies in syspref names and supply defaults
This patch fetches the new sysprefs into variables, providing default title ascending if
they are not set to avoid an undefined concatenation warning

I also make the update idempotent and fix confusion of plural/singular names

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 15:25:18 -03:00
daab31ab38
Bug 30327: Fix tests
Corrected variable name on update to match everywhere else

Added a default value for limit in buildQuery and only append limit if it has content

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 15:25:18 -03:00
de63c2abb1
Bug 30327: Add options for sorting components
This patch adds two new sysprefs:
 ComponentSortField
 ComponentSortOrder

These allow the user to choose how components should be sorted when displaying on the details page
of a record, and the corresponding search for all components

This also updates our search from simple_search_compat to search_compat to allow for sorting options

Note:
Some sorting under ES is unclear - this is a separate issue to be invesitgated
Our Zebra index does not offer 'record number' sorting, I will file a bug for that

To test:
 1 - Enable UseControlNumber (or not)
 2 - Add some components to a record by control number or title depending on above
 3 - Enable  ShowComponentRecords  syspref
 4 - View the record that has components
 5 - Note they are not sorted
 6 - Apply patch, updatedatabase
 7 - reload record
 8 - Note components are sorted by title ascending
 9 - Try different values for ComponentSortField and ComponentSortOrder
10 - Confirm sorting changes with system preferences
11 - Repeat test on staff and opac, with ES and Zebra search engines

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 15:25:18 -03:00
fde9f39ca5
Bug 30994: Typo: item was on loan. couldn't be returned.
This patch updates some language in the inventory template to make it
readable and consistent: Punctuation fixed, capitalization made more
consistent, language corrections ("check in" instead of "return").

To test you can try to apply the patch and trigger the various errors in
the inventory interface, but it's probably enough to visually confirm
the changes in the patch.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 15:23:22 -03:00
efad62f91d
Bug 30991: Fix remaining instances of [% ELSE %]0[% END %] in templates
The construct of [% ELSE %]0[% END %] breaks translations as it is
translated as [% ELSE %][% END %]. Note: No 0 in the ELSE statement.

This patchset either removes occurances of a lone 0 in template ELSE
statements, or splits it over multiple lines so the 0 is not removed in
the translated templates.

Test plan:
1. Install the en-NZ translation
2. Search the translated templates for '[% ELSE %][% END %]' and confirm
there are are instances of that
3. Apply patch
4. Update your en-NZ translation
5. Repeat step 2 and confirm there are no more instances of [% ELSE %][%
END %] in the translated templates

Note: I removed the [% ELSE %] statement from opac-bottom.inc as that
statement was empty in the en translation so it didn't look to be
needed.

Sponsored-by: Catalyst IT, New Zealand

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 15:20:44 -03:00
78642d03ea
Bug 29282: Compiled CSS
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 11:25:36 -03:00
0c6084b864
Bug 29282: (QA follow-up) Class consistency
This patch updates the field classes introduced in this patchset to
improve class name consistency.  We remove the _field apendment and to
repvent a clash we update the existing 'renewals' class elsewhere to
'renewals-info' to more clearly reflect it's content.

Test plan
1) The patchset should continue to function as described in prior patches
2) Build the CSS for the staff client
3) Check the 'Checkouts' table on various screens and confirm the
   renewals information still displays as it always has in the table.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 11:23:48 -03:00
b10aa7bcb5
Bug 29282: (follow-up) Account for otherholdings table
This patch accounts for the otherholdins table. To test:

1. Turn on SeparateHoldings
2. Find a record where the items are split by SeparateHoldings.
3. Make sure you can hide columns from the table in the Other holdings tab.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 11:23:47 -03:00
018a981b9b
Bug 29282: Add issues and renewals columns to holdings tbale on details page
To test:
 1 - Apply patch, restart all
 2 - View a record with items in the staff client
 3 - Note issues and renewals columns not shown
 4 - Click the gear to edit visible columns
 5 - Issues and renewals are present and hidden
 6 - Click to view columns
 7 - Confirm counts show, or 0 if item has not circulated/been renewed
 8 - Circulate/renew an item
 9 - Verify counts increase
10 - Make columns visible by default in Admin->Table settings
11 - Confirm columns show by default on details page

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 11:23:47 -03:00
04d43d4f21
Bug 30936: (follow-up) Add markup comments
This patch adds comments to the template to highlight the markup
structure.

This patch should have no effect on the page's appearance or
functionality.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 11:22:51 -03:00
1da958f59b
Bug 30936: Reindent authority detail template
This patch updates the authority detail template so that indentation is
consistent.

To test, apply the patch and go to Authorities.

- Locate an authority record and view the detail page.
- Everything should look correct, with working numbered tabs.
- If the AuthDisplayHierarchy preference is enabled, you should see a
  collapsible tree of elements in the authority hierarchy.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 11:22:50 -03:00
8fd6b90f45
Bug 30195: Remove second parameter for GetMarcFromKohaField
It does not longer exist.

Also fix a spelling (emtpy ==> empty)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 11:20:37 -03:00
3fd8a60db1
Bug 30195: Added a missing semicolon to the added subtest and increased test count to 107
https://bugs.koha-community.org/show_bug.cgi?id=30195
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 11:20:37 -03:00
Thomas Klausner
f1e29b18ea
Bug 30195: Search by ISBN if it is provided in suggestion
When a patron enters an ISBN/ISSN when suggesting a new purchase, the
ISBN is used to find duplicates. Title/Author are ignored (as patrons
might misspell them, and the ISBN provides a better way to find
duplicates)

Test Plan:
* in the OPAC, go to /cgi-bin/koha/opac-suggestions.pl
* Click "new purchase suggestion"
* Enter any title
* Enter an ISBN that exists in your library
* Click "Submit your suggestion"
-> A new purchase suggestion has been submitted

* Apply the patch!

* Again start a new purchase suggestion, enter any title and the
  duplicate ISBN, and Submit
* You should see the note "A similar document already exists: ..."

Please note that the title should not be required when entering an ISBN,
but as the list of required fields is managed via OPACSuggestionMandatoryFields
I fear that it's rather complicated to make title an optional required
field if isbn is provided.

I also added a simple non-DB test case to t/db_dependent/Suggestions.t
(in a subtest at the end), but could not actually run it as I haven't
gotten around to set up / try a testing Koha dev env...

Sponsored-by: Steiermärkische Landesbibliothek
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 11:20:37 -03:00
b6dcd3cbd3
Bug 29129: DBRev 22.06.00.007
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 11:16:23 -03:00
6dbb9c3690
Bug 29129: (QA follow-up) Tidy atomicupdate
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 11:15:12 -03:00
27a81ba75d
Bug 29129: Compiled CSS
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 10:59:28 -03:00
Katrin Fischer
d016a907f3
Bug 29129: (QA follow-up) Rephrasing DisplayClearScreenButton preference
Trying to make it clearer that's either none or 2 buttons.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 10:56:50 -03:00
Katrin Fischer
e9c636bbb5
Bug 29129: (QA follow-up): Fix tiny typo in system preference description
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 10:56:50 -03:00
Katrin Fischer
f85a7a0d82
Bug 29129: (QA follow-up) Add +x to atomicupdate permissions
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 10:56:50 -03:00
4a3b988d5c
Bug 29129: Update DisplayClearScreenButton to allow for a choice between issueslip and issueqslip
To Test:
1. Apply patch, updatedatabase, and restart_all
2. A small change the global scss file means you should regenerate the CSS as well. ( https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface )
3. Set DisplayClearScreenButton to "don't show"
4. Go to the patron checkout screen and see that no button should show to clear the screen and print
5. Set DisplayClearScreenButton to 'ISSUESLIP' and make sure the button now appears and the ISSUESLIP prints
6. Set DisplayClearScreenButton to 'ISSUEQSLIP' and make sure the button now appears and the ISSUEQSLIP prints

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 10:56:50 -03:00
9b55a435d9
Bug 30609: (follow-up) Add markup comments
This patch adds comments to the template to highlight the markup
structure.

This patch should have no effect on the page's appearance or
functionality.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 10:55:26 -03:00
455b3b4a93
Bug 30609: Reindent serial claims template
This patch updates the serial claims template so that the indentation
is consistent. Tabs are replaced with spaces.

To test you must have at least one subscription with late issues.

- Apply the patch and go to Serials -> Claims and select the vendor
  responsible for your late issue.
- On the "Missing issues" page, confirm that everything looks correct.
- All functionality should be the same: Filters, table sorting, CSV
  export, and claim notification.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 10:55:25 -03:00
712ced4612
Bug 29055: Focus on keyword field when subscription biblio search window opens
This patch adds the "autofocus" attribute to the keyword field in the
popup window used to find a bibliographic record to use in a
subscription.

The same is also done for the vendor search popup.

To test, apply the patch and go to Serials -> New subscription.

- Click the "Search for vendor" link. When the "Serial subscription:
  search for vendor" window opens the cursor should automatically be in
  the vendor search field.
- Click the "Search for record" link. When the "Catalog search" window
  opens the cursor focus should automatically be in the keyword field.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 10:54:37 -03:00
347d9d7339
Bug 22659: (follow-up) Add category to redirect
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 10:52:35 -03:00
e88ee0fc5e
Bug 22659: Add save and continue button to additional-contents.tt
To test:
1. Apply patch and restart everything
2. Go to Tools > News and create some new additional content.
3. Notice a Save and continue button
4. Try saving and contining.
5. Make sure if you are using the CodeMirror editor that you are still in the CodeMirror editor
6. Try 2 - 5 again but with the wysiwyg editor, make sure when you save and continue you remain in the wysiwyg editor.
7. If you are saving and contining from News make sure you remain in News, when you are saving and contining from HTML customizations make sure you remain there.
8. Turn on the NewsLog system preference
9. With the NewsLog on make sure your content is being logged correctly when you sabe and continue.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-25 10:52:35 -03:00
9de92e07e6
Bug 30871: Add notes in advanced cataloging editor
This is the same as preevious patch, but for advanced cataloging editor

To test:
1 - Enable EnableAdvancedCatalogingEditor
2 - Create a new record in advanced edtior
3 - Hover over leader6 and 008 type
4 - Confirm notes are useful

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>
2022-06-25 10:49:33 -03:00
9912739231
Bug 30871: Add/expand title text for LDR/06 and 008 Type of material
This patch simply adds title elements or clarifies existing title elements to indicate how default
values are chosen

To test:
1 - Create new record in default editor
2 - Open leader helper, hover over "6-Type of record" and the dropdown
3 - Confirm notes make sense
4 - Open 008 helper
5 - Hover over 'Type of Material' and dropdown
6 - Confirm notes make sense

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>
2022-06-25 10:49:27 -03:00
5e5481ea44
Bug 21978: DBRev 22.06.00.006
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-24 12:31:39 -03:00
db001f05c6
Bug 21978: Schema Update
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-24 12:30:29 -03:00
1e3ec982e4
Bug 21978: Add middle_name to sysprefs.sql
And add middle_name at the exact same places for installations with the
default value.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-24 12:29:23 -03:00
b409b5eb8d
Bug 21978: (follow-up) Stop using C4 methods in atomicupdate
We should really only use C4::Context methods where absolutely
necessary.. in this case is was simple to replace the get_preference and
set_preference calls with SQL

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-24 12:29:19 -03:00
5a4253aa8e
Bug 21978: (follow-up) Stop passing holdfor_cardnumber
We not longer need to pass holdfor_cardnumber distinctly, we can just
refer to holdfor_patron.cardnumber instead.  This patch does that ;P

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-24 12:29:14 -03:00
9a40eb5820
Bug 21978: Use patron-title for holdfor handling in results
This patch update the catalogue search results page to use the
patron-title include to display patron titles for the 'Holds for' line
in results and dropdown list.

Test plan
1) Load patron account
2) Press search to hold
3) Perform a search which brings back 2+ items (e.g. 'street')
4) Note that on the search results it says:  Place hold for 'firstname
   (othername) surname (cardnumber)'
5) Press the Place hold button and note that the dropdown includes
   "Place hold for 'firstname (othername) surname'" and "Forget
   'firstname (othername) surname'"
6) Click through to an item from the results, press the 'Place hold'
   button and note the dropdown includes "Place hold for 'firstname
   (othername) surname'"

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-24 12:29:07 -03:00
a14dfafa2e
Bug 21978: Use patron-title.inc in request.tt
This patch updates all manual accurences of the patron title display
to use the patron-title.inc include (so we get middlename handling)
in request.tt.

We also add the option to hide the cardnumber from the include and set
the link_to to 'members_pay' to retain the current display format on
this page.

Test plan
You'll need to trigger the following cases to test all cases:
1) Too many holds
2) Account expired
3) Has restrictions
4) Outstanding fines
5) Already has hold on item
6) No holds allowed
7) Too many holds for this record
8) Already in possession
9) Already has a hold
10) Already has a recall
11) Pickup library doesn't many patron home library

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-24 12:29:01 -03:00
a89c710978
Bug 21978: Add middle_name into hold request autocomplete
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-24 12:28:53 -03:00
d5608b8ff0
Bug 21978: Add support for middle name
This patch adds the new 'Middle name' field to the patron record.

To test:
1) Apply patches
2) Update database, restart all and clear the browser cache
3) Load a patron in the staff module
4) Confirm you can see and edit the new 'Middle name' field
5) Confirm the new middle name data displays on patron details
6) Confirm the new middle name data displays on patron search results
7) Confirm the new middle name data displays everywhere patron names are
   displayed.
8) Confirm the new middle name data displays on the OPAC
9) Confirm the 'Middle name' field appears in the OPAC borrower
   modification screens
10) Edit sysprefs `BorrowerMandatoryFields`, `BorrowerUnwantedFields`,
    `SelfModificationBorrowerUnwantedField`, `PatronSelfModificationMandatoryField`,
    `PatronSelfRegistrationBorrowerMandatoryField` and
    `PatronSelfRegistrationBorrowerUnwantedField` to confirm you can make
    the new field required or hidden.
11) Verify that DefaultPatronSearchFields contains the new field if you
    already had 'firstname' in the field list
12) Enable PatronAutoComplete system preference
13) Type patrons surname into checkout or patron search but don't hit
    return
14) Confirm the patrons middle name is displayed in the preview
15) Go to tools > patron lists and attempt to add a patron to a list
16) Patrons middle name should appear in the autocomplete here too

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-24 12:24:11 -03:00
8993c39b7a
Bug 21978: Add middle_name to api specification
This patch adds middle_name to the accaeptable fields in API requests
and responses.

Test plan
1) Search for a user using the API
2) Confirm the API responds with a 200

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-24 12:24:10 -03:00
f4951cc05e
Bug 21978: Add middle_name field to the database
This patch adds a new field, middle_name, to the borrowers,
deletedborrowers and borrower_modifications tables.

It also updates the DefaultPatronSearchFields preference to include the
new field if the preference is still set to it's default settings from
install.

Sponsored-by: Cheshire Libraries

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-24 12:23:59 -03:00
75fe055dcc
Bug 29454: (follow-up) Cover more test cases
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-24 11:55:43 -03:00
338ca787be
Bug 29454: Add unit test for Koha::Template::Plugin::ItemTypes
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-24 11:55:43 -03:00
3df28469c5
Bug 29454: Use Koha Cache Memory Lite to stash itemtype descriptions for template plugin
Returns empty string if given item type is undefined or unknown

To test:
1 - Add 1000 items to a record, of varying item types
2 - Bring up the details page
3 - Note time to load
4 - Apply patch
5 - Reload page and compare to previous
6 - Confirm information is correct
7 - Confirm some performance benefit

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-24 11:55:34 -03:00
bc0264bae4 Bug 31005: Don't inlcude attributes only required for other categories
To test:
 1 - Create a new patron attribute - check boxes to make it mandatory and visible etc.
 2 - Limit it to 'Patron' or other category
 3 - Edit a patron not in that category
 4 - Attempt to save
 5 - 500 Error
 6 - Missing mandatory extended attribute (type=MAND)
 7 - Apply patch
 8 - Attempt aedit again
 9 - It succeeds!
10 - Edit a patron in the category with MAND required
11 - on the edit page, right click teh attribute - click 'delete node'
12 - Submit the form
13 - 500 error, but this time that's good, the attribute check works

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>
2022-06-24 11:36:19 -03:00
39c3943076 Bug 31005: Unit test
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>
2022-06-24 11:36:19 -03:00
1eee121bed Bug 29325: (QA follow-up) Tidy up
tools/manage-marc-import.pl: sub commit_batch does no longer need $schema
tools/manage-marc-import.pl: sub revert_batch: calling BatchRevertRecords which has no interval and callback
misc/commit_file.pl: sub print_progress_and_commit does no longer commit, renamed
misc/commit_file.pl: sub print_progress does no longer have a schema parameter
misc/commit_file.pl: sub revert_batch reported deleted items as added

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-24 11:36:19 -03:00
1f62cbc618 Bug 29325: Fix commit_file.pl
This patch fixes the broken commit_file.pl script.

It doesn't deal with commiting the import from the UI.

To test:
1. Pick a file for staging:
   $ kshell
  k$ misc/stage_file.pl --file TestDataImportKoha.mrc
=> SUCCESS: All good
2. Commit!
  k$ misc/commit_file.pl --batch-number 1
=> FAIL: You see
DBIx::Class::Storage::DBI::_exec_txn_begin(): DBI Exception: DBD::mysql::db begin_work failed: Already in a transaction at /kohadevbox/koha/C4/Biblio.pm line 303
3. Apply this patch
4. Repeat 2
=> SUCCESS: Commit succeeds
5. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Bug 29325: (QA follow-up) Remove unexisting parameters of BatchRevertRecords

There is no interval and callback as in BatchCommitRecords.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Bug 29325: Call progress callback one last time to confirm comppletion

Previously after finishing the loop we were still in a transaction that never completed - we should report progress when done
one final time to commit the last records

To test:
1 - Stage a file with > 100 records
2 - Commit file
3 - Confirm batch is imported and no records left as staged

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Bug 29325: Fix import from staff client

same test as before, but via the staff client

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Bug 29325: Handle the transaction in BatchCommitRecords

Requiring the callback to commit was breaking reversion, and likely elsewhere

Let's simplify and say that the routine iteself will handle the txn and commit

TO test:
1 - Stage a file
2 - Import a file
3 - Revert a file
4 - Test staff client and command line

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-24 11:36:19 -03:00
Mark Tompsett
df3c578ae1
Bug 20395: (follow-up) Change format to use price filter
See comment #1.

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-24 11:35:14 -03:00