Commit graph

45503 commits

Author SHA1 Message Date
Katrin Fischer
84d173c198 Bug 30989: (QA follow-up) Use uri filter on staff detail page
This applies the same fix as the first patch but to the staff
interface detail page. With this fix, a tag like +++ can
be clicked and the tagged records will show.

To test:
- Tag some records in the staff interface with something like +++
- Go to the detail page of one of those recods
- Click on the tag
- Verify nothing is found
- Apply patch
- Repeat - all tagged records will show

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6895af827a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-13 20:41:26 +00:00
da66f3119f Bug 30989: Use uri filter where tag links are displayed
TO test:
1. Turn on:  TagsEnabled.
2. Log in to the OPAC and create a tag like "LGBTQ+"
3. Add that record to a list
3. Now try  clicking on that tag from detail, results, and lists page.
4. If you click on the link for the "LGBTQ+" you will get a 'no results found page'.
5. Apply patch
6. Try clicking on each of the tags in detail, results, and lists. They should work now.

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>
(cherry picked from commit 997262f6fe)
2022-07-13 20:41:09 +00:00
08dc55fb12 Bug 30925: Fix category parameter for addbybiblionumber
In bug 28959 category was replaced in favor of public. But
unfortunately a few places were missed.
This fixes the addbybiblionumber templates.

Test plan:
Add a biblio to a list from the search results using the Add to
or Add to list button on OPAC/intranet.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 941e538122)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-13 20:37:16 +00:00
Petro Vashchuk
b90729dafb Bug 29963: Do not prefill empty date fields with today's date
Revert "Bug 29815: Pre-populate 'Date acquired' field when adding/editing items"
commit bd197c6456

Items date fields in MARC framework with dateaccessioned.pl assigned as
plugin automatically prefilled by it with today's date if empty on page
load.

This becomes big problem because it silently changes empty date fields
in single item edit form with today's date. This drastically degrades
UX because user won't noitce that fields were filled.

Also, even when user aware about this problem, user is forced to clean
the field manually each time they edit items with empty fields.

Also in item batch edit tool the probability heavily increases to make
mistake and leave those fields prefilled on mass.

To reproduce problem with single item edit:
1. Edit single item that doesn't have a date set in any of the date
fields where dateaccessioned.pl in MARC framework assigned as plugin,
see that the field got prefilled with today's date.
2. Save the item. See that it overwrote the previously empty date.
3. Apply the patch.
4. Edit single item again, and ensure that the empty date fields don't
get overwriten like it happened previously.

To reproduce problem with bath edit:
1. Edit items in batch for any biblio, see that the date fields where
dateaccessioned.pl in MARC framework assigned as plugin is automatically
 set to current day's date.
2. Apply the patch.
3. Check the fields again, they should be empty after that.

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 926def44c0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-13 20:31:23 +00:00
0557172121 Bug 30938: Convert ColumnSettings to TableSettings
To test:
1. Apply this patch
2. Go to /cgi-bin/koha/acqui/acqui-home.pl
3. The columns button should be restored, make sure you can hide/show columns correctly.
4. Go to Table settings and make sure you can hide columns properly by default.

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>
(cherry picked from commit 9b3e312223)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-13 20:27:33 +00:00
23211c7cd9 Modify DBRev permission
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-13 20:23:34 +00:00
630d14efd5 Bug 30924: DBRev 22.05.02.001
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-13 20:16:58 +00:00
a717327416 Bug 30954: (bug 27344 follow-up) Remove background_jobs_update_elastic_index.inc
includes/background_jobs_update_elastic_index.inc
vs
includes/background_jobs/update_elastic_index.inc

Both exist and have been added by bug 27344.
The first one is not used.

Test plan:
  git grep background_jobs_update_elastic_index.inc
must not return any occurrences (outside of POs)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cfb293a08a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-13 20:05:49 +00:00
3897ec6913 Bug 30973: Serials search fix body id
The serials search page serials/serials-search.pl has HTML body id :
  <body id="ser_serials-home" class="ser">
It is the same as serials home page.

This patch replaces with id="ser_serials-search"

Test plan :
1) Go to Serials > Advanced search
2) Look at HTML code
3) Check you see <body id="ser_serials-search" class="ser">

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f176c0b04a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-13 20:02:49 +00:00
a4c66e5254 Bug 30974: Set size for indexing jobs to 1
job's size is the number of records to index, but when finished the progress is always set to 1.

Wich leads to: finished 1/42

Test plan:
Don't apply this patch
Use the batch item modification tool to update more than 1 item
Notice that the new indexing job has a size of the number of items you
modified
When finished, the job detail shows "Finished. 1/X"
Apply this patch, repeat
Notice that now the progress shows 0/1 before the job is done, then 1/1
when finished

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 85dc90c151)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-13 19:59:20 +00:00
aa7c47cfed Bug 30409: (QA follow-up) Avoid uninitialized variable warnings
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 730719c90c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-13 13:50:08 -06:00
Joonas Kylmälä
680269a657 Bug 30409: (QA follow-up) Fix grammar in syspref help text
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2538c846f4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-13 13:49:49 -06:00
Petro Vashchuk
391cb02d45 Bug 30409: barcodedecode() should always trim barcode
Barcode is trimmed of leading/trailing whitespaces in many instances
before the barcodedecode sub was called. This patch instead makes that
barcodedecode sub is going to trim it itself and removes unnecessary,
and repetitive code that was used before barcodedecode was called.

Steps to test:
1. Edit item with any barcode, add a bunch of whitespaces at the start
and at the bottom of it. Save the item. Ensure that this action ruins
the barcode and ensure that the spaces are still there by editing the
same item again.
2. Apply the patch.
3. Edit the same item again in the same fashion. Ensure that now all
whitespaces are getting trimmed and it doesn't affect the barcode in
any negative way.

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

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e2611c919d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-13 19:44:18 +00:00
Johanna Raisa
c535da7219 Bug 30780: Librarians with only "place_holds" permissions can not update holds data via REST API
This patch enables librarians with only "place_holds" permissions to cancel, suspend and resume holds via REST API.

Test plan:
1) Try to cancel or suspend a hold with only "place_holds" permissions
2) See that it is forbidden.
3) Apply the patch
4) Cancel a hold again
5) The cancellation succeeds
6) prove t/db_dependent/api/v1/holds.t

Sponsored-by: Koha-Suomi Oy

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 71a95d3557)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-13 19:39:25 +00:00
74318f7686 Bug 30780: Regression tests
This patch lowers the used permissions on the suspend/resume tests, and
adds tests for fine-grained permissions on cancelling a hold.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ccfedaa5d9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-13 19:39:13 +00:00
35dff9cbb4 Bug 30904: (bug 24387 follow-up) Fix library modification of additional contents
Modifying an existing element of additional content (News) by changing
the library causes a duplication of the entry on the Additional contents
(News) list.  A subsequent attempt of deleting one of the entries results
in deleting both of them.  This is due to the fact that after
the unwanted duplication all the  entries share the same
additional_contents.code.

Test plan
=========

1. Create a piece of news under Tools > News.
2. After having saved it make a modification by changing the library.
   It should result in two rows in the table.
3. Delete one of the lines with Delete button.  Both lines will
   disappear.
4. Apply the patch.
5. Repeat the steps 1 and 2.  Only the one (the modified) entry should be
   present in the table.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d5fdd1217c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-13 19:35:44 +00:00
Emmi Takkinen
a525e77f4c Bug 30798: Change column order on account-fines table column settings
Columns Home library and Checked out from are in wrong order
on table settings. Because of this hiding Home library actually
hides Checkout out from column and vice versa. This patch changes
order of these columns on columns_settings.yml

To test:
1) Navigate to columns settings page and modify
account-fines tables column.
=> Note that if you hide  column checked_out_from, column
home_library is hidden on patrons account page.
2) Apply patch and restart plack etc.
=> Column checked_out_from should now be hidden.

Sponsored-by: Koha-Suomi Oy

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c16e366af5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-13 19:30:28 +00:00
b503c186e4 Bug 30914: (24153 follow-up) Fix cleanup_database.pl --transfers --old-reserves
Silly mistake, 'delete if verbose' must be 'delete if confirm'

Test plan:
Try the cleanup_database.pl script to delete transfers and old issues.
Using --transfers --old-reserves and the --confirm flag the entries must be
removed

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a6166405c7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-13 19:26:37 +00:00
98e2e27b74 Bug 30924: DBIC Update
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-13 19:19:46 +00:00
1910ad6b1b Bug 30924: Add missing branchtransfers.reason value for recall cancellation
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
(cherry picked from commit 54372681be)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-13 19:13:33 +00:00
95ba78d7c0 Bug 30924: Fix transferstoreceive.pl explosion on recalls
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
(cherry picked from commit 46387c3845)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-13 19:13:09 +00:00
efcd9f8798 Bug 30399: Make Patron.t pass even if mandatory attributes exist
t/db_dependent/Koha/Patron.t is failing if mandatory attributes already
exist in the DB. We can make it pass easily by deleting all the
attributes before we run the tests.

Test plan:
  prove t/db_dependent/Koha/Patron.t
must return green even if one mandatory patron attribute exists.

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>
(cherry picked from commit 523a2f297d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-13 19:07:43 +00:00
Katrin Fischer
ffbaee5afa Bug 30585: Fix library options on table settings for course_reserves_table
The table on  course-details.pl has columns for both home library and jolding library,
but course_reserves_table in the Table configuration admin area only has a
single toggle for 'library'.

Hiding 'library' hides the home library column. Anything after that is off by one.
Hiding 'staff_note' actually hides the holding library column, 'link' hides
Public note, etc.

To test:
- Add a course and some course reserves
- Go to table configuration and hide 'staff note'
- Look at the list of course reserves for your course
- Verify the wrong column was hidden
- Apply patch
- The configuration area now shows holding_library and home_library
  as separate options.
- Change the settings and verify everything now hides/displays correctly.

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>
(cherry picked from commit 972330bc9e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-12 19:36:13 +00:00
Michal Urban
f5144061ef Bug 30768: Capitalizing "pin" in 2FA setup
Change of text from "pin" to "PIN" in the 2FA setup interface.
This slight changes clarifies that "PIN" is an acronym,
 and increases user comprehension

To test:
1) Log in as an Administrator
2) Enable TwoFactorAuthentication
3) Log in to a user with superlibrarian permissions.
4) On the user profile page, click the "More" dropdown button,
click "Manage Two-Factor
5) Check that "pin" is displayed in lowercase, in both instances.
6) Apply patch.
7) Refresh the page and observe that "pin" has changed to "PIN"
8) Sign off.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ed4250e7a9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-12 19:33:55 +00:00
Séverine QUEUNE
ecefa34ef7 Bug 29312: Remove unnecessary dot
This patch removes an extra point after the number of shown results.

Test plan :
 - don't apply patch
 - run a report that brings you more than 20 results, e.g. SELECT * FROM biblio LIMIT 50
 - see extra ' .' after the number of shown results
 - apply patch
 - run the report again and see the point isn't displayed anymore
 - check the behaviour is still correct when you change the number of rows displayed
 - sign off !

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>
(cherry picked from commit d491b15c55)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-12 19:22:39 +00:00
Shi Yao Wang
d7fc581e62 Bug 27519: Normalize Show/Don't show in system preferences
Replace Display/Don't display (and some other pairs) by Show/Don't show in system preferences.

Test plan:
1- Go to administration > system preferences
2- View any system preference with Display/Don't display pair of options
(e.g. OPACAcquisitionDetails)
3- Apply the patch
4- Refresh the page and notice it is now a Show/Don't show pair instead
5- Loop the steps with other system preferences until satisfied

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

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>
(cherry picked from commit ed81d6bac6)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-12 19:20:35 +00:00
f99bad2f36 Bug 30807: Migrate to patron-title in pay and paycollect
This patch updates the member-flags template to use the patron-title.inc
include wherever patron names are referenced.

Test plan
1) Navigate to a patron and click through to their accounts tab
2) Note how the patron name displays in the title, breadcrumb and
   headings
3) Click through to make a payment
4) Note how the patron name displays in the title, breadcrumb and
   headings
5) Apply the patch and reload the page
6) Confirm the patron name still appears in each location and is
   consistently formatted and linked as you would expect

Note: This patch also removes a superflous hidden title form element
that was simply passed to and from the controller but not actually used
in any way.

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>
(cherry picked from commit c3fd42b550)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-12 19:16:23 +00:00
bc143d2b87 Bug 30806: Migrate to patron-title in member-flags
This patch updates the member-flags template to use the patron-title.inc
include wherever patron names are referenced.

Test plan
1) Navigate to a patron and click through to edit their permissions
2) Note how the patron name displays in the title, breadcrump and
   headings
3) Apply the patch and reload the page
4) Confirm the patron name still appears in each location and is
   consistently formatted and linked as you would expect

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>
(cherry picked from commit 8b460db131)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-12 19:09:25 +00:00
ce7871c3ac Bug 30789: Improve performance of AddBiblio
AddBiblio calls TransformMarcRecordToKoha. We are only interested in getting biblio and biblioitems info, so we can pass 'no_items' to save some field lookups

Benchmarking saw a ~75% increase in the performance of this call

To test:
1 - Stage and import some records
2 - Confirm it works the same before and after patch
3 - Add a biblio via cataloguing, confirm it works

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 24c4b408ff)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-12 17:34:41 +00:00
72732a736d Bug 30677: Cleanup
This patch cleans up the regular expression to remove the superflous
double check and use standard delimiters

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 667722daa3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-12 17:11:49 +00:00
191f53996a Bug 30677: Use lookahead in regex for biblioitem replacement
This patch takes Andrew's suggested fix using a lookahead regex to
correct our biblio vs biblioitem table name replacements.

Please use the preceeding unit test patch proposed by Jonathan to test.

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>
(cherry picked from commit be3bd8af8b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-12 17:11:34 +00:00
9fa5cf04ae Bug 30677: Add tests
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>
(cherry picked from commit de4fcc91f0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-12 17:11:18 +00:00
245cd510ab Bug 30738: Log warnings for background MARC import
This change logs warnings from the CGI background MARC import.

Test plan:
0) Apply patch
1) Export a record with an item
2) Update the 952$f subfield to "Circulation" (any value over 10 chars)
3) Import the record and try to add the item
4) The import will stay stuck with "Importing" status and 0% job
progress
5) Check the /var/log/koha/kohadev/intranet-error.log file
and notice there's an error with the following text:
"Data too long for column 'coded_location_qualifier' at row 1"

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9d8d9321e8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-12 16:40:33 +00:00
9fd8f5408d Bug 30923: Remove EXPERIMENTAL mark on RESTOAuth2ClientCredentials
The feature is not experimental at all.

To test:
1. Search for the RESTOAuth2ClientCredentials syspref
=> FAIL: It says it is an experimental feature
2. Apply this patch and reload
3. Repeat 1
=> SUCCESS: No longer marked as experimental
4. Sign off :-D

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 556a910021)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-12 16:36:14 +00:00
3c88fdea95 Bug 30877: use List::MoreUtils::uniq from recalls_to_pull.pl
Test plan:
Confirm that "Recalls to pull" is still working correctly

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3a1807e56d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-12 16:24:46 +00:00
4d6abdfeac Bug 30539: (bug 24161 follow-up) Fix typo in DBrev
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>
(cherry picked from commit dc7a191db3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-12 16:20:35 +00:00
7c872c1968 Bug 30057: Move virtualshelf-related exceptions to a separate library
This patch moves the not-generic virtualshelf-related exceptions to
their own file. Callers are adjusted as required.

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/Virtualshelves.t
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass
4. Check virtualshelves work as expected
5. Sign off :-D

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

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7704f51d51)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-12 16:15:12 +00:00
Katrin Fischer
df93605b2e Bug 30891: (QA follow-up) Add check to patron details page
Adds a similar check to the patron details shown when selecting
the details tab in the patron account in the staff interface.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3f784ea613)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-12 16:06:42 +00:00
4c75d1613b Bug 30891: SMS provider shows on staff side even if SMS::Send driver is not set to "Email"
It appears that in my original submission ( Bug 9021 ),
I hid the SMS provider selector unless the SMS::Send
driver was set to "Email", but only on the OPAC,
not on the staff interface!

Test Plan:
1) Set SMSSendDriver to anything except "Email"
2) Note the SMS Provider pulldown shows in the patron editor
3) Apply this patch
4) Reload the page, SMS Provider id should now be gone
5) Set SMSSendDriver to "Email"
6) Reload the page, SMS Provider should now be shown

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit febacd36e1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-12 16:06:15 +00:00
Christophe TORIN
a5f31c6e2e Bug 29607: Store the discount amount correctly when importing and order from a file
This bug fixes how the discount amount for an order is stored, when an order is added to a basket using "From staged MARC records".

Test plan:
1. Export a record (without the items) (Tools > Catalog > Export data).
2. Delete the record from the catalog (including any items).
3. Stage the record for import (Tools > Catalog > Stage MARC records for import).
4. Create a new vendor with a discount of 25%. (Or select and existing vendor that has a discount). (Acquisitions > New vendor)
5. Create a new basket for the vendor. (Acquisitions > Manage orders > search for vendors > New > Basket).
6. Add to the basket using "From a staged file":
   . select "Add orders" next to the staged file
   . select the record to add to the order
   . enter a price
   . leave the discount field blank
   . select a fund
   . select "Save"
   ==> The order is created!
7. Modify the order - note that the discount is showing on the form as .25% instead of 25%, also note that the discount amount is calculated correctly.
8. Check what is recorded in the database:
   . koha-mysql kohadev
   . select * from aqorders;
   ==> discount field for the basket item shows as 0.2500
9. Change the discount to 25%. Run step 8 again - discount amount will be correctly shown as 25.0000
10. Apply the patch.
11. Repeat steps 1-9 - discount amount is shown and calculated correctly.
12. Test modifying the discount amount - should be calculated and shown correctly.
13. Sign off!

See additional comments in the bug description.

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>
(cherry picked from commit f72b8cbd3e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-12 16:00:49 +00:00
f3603ab9dc Bug 29871: Remove marcflavour param in Koha::Biblio->get_marc_notes
Test plan :
Display a biblio record with some MARC notes in details page and basket,
OPAC and staff
Run prove t/db_dependent/Koha/Biblio.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b74ce12b85)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-12 15:54:27 +00:00
Florian Bontemps
df5b68916b Bug 30026: Quick fix for SmsAlert Hint
Just modifying the hint provided in patrons' messaging preferences to
allow either + or 00 for international formats.
No test plan needed.

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

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 26e8642f3f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-12 15:45:09 +00:00
Florian Bontemps
ca6c8c4dfb Bug 30026: SMSAlert regex fixed for international
When registering a phone number for SMS alerts, the number goes through
a regex filter to make sure the number is valid. One of the formats used
in Europe is 00 AAA XXXXXXXXX (A = country indicator) and it is not
supported.

This patch adjusts the regex to either accept 00 AAA XXXXXXXXX or
+AAAXXXXXXXXX in this case. (Note : +AAA and 00AAA are mutually exclusive).

To test:
1) You need to have installed a SMSAlert plugin. Make sure the
   SMSSendDriver syspref is also set up with your SMS plugin of choice.
2) Pick a patron and edit its profile.
3) In the messaging preferences fieldset, under SMS number, enter any
   number with the format 00 AAA XXXXXXXXX (ie : 00111123456789).
   Try to save the modification : you should have an error message.
4) Try instead a number with the format +AAAXXXXXXXXX (ie :
   111123456789), that one should be accepted.
5) Save your modification then check that the number has been changed.
6) Apply patch.
7) Repeat step 3 to 5.
8) Observe the error is gone.
9) Try it once more with the format +00 AAA XXXXXXXXX (+00111123456789),
   that format should not be accepted: this is intentional.
10) Sign off.

    Thanks-to: Didier Gautheron <didier.gautheron@biblibre.com>

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

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3dc883a1cc)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-12 15:44:46 +00:00
2fd707ef98 Bug 30713: Patron entry should limit date of birth selection to dates in the past
This patch adds to the configuration of the date of birth field in the
patron entry form so that the calendar widget prohibits the selection of
a date in the future.

To test, apply the patch and open a patron record for editing. Try to
select a birth date in the future using the calendar widget. You should
be limited to a selection of today or before.

Confirm that clicking the "Yesterday" and "Today" shortcuts in the
calendar widget works correctly.

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>
(cherry picked from commit 4d16ca1069)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-12 15:41:18 +00:00
c520925a31 Bug 30864: Add validation to password_expiry_days
When creating a patron category or editing an existing one, there is no validation for the "Password expiration" field.

If letters or other characters are entered, there is no error message and if not a number whatever is entered is not saved.

To test:
1. Go to Administration > Patrons and circulation > Patron categories.
2. Add a new patron category (or edit an existing category).
3. For the "Password expiration" field, enter letters or characters such as L$%.
=> Note that you are prompted to "Please enter only digits"

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 79396ae625)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-12 15:35:48 +00:00
Marion Durand
3202674642 Bug 29260: 210a is reported to Autor (meeting/conference) when upgrading an authority through Z3950
When upgrading an authority with Z39.50, the field 2XX is sent into the
research grid.

The field 210a is sent into the search field "Author
(meeting/conference)". Or a collective authority is more often a
corporation than and meeting so librarian has to copy and paste this
data. (In unimarc field 210a is used both for corporation and meeting.)

This patch makes 210a field be sent into the search field "Author
(corporate)" instead of the "Author (meeting/conference)" one.

1- Find an authority with collectivity type (with a field 210a).
2- Click on "Edit" then on "Edit record"
3- Click on "Replace record via Z39.50/SRU search"
4- See that the field 210 is reported in the search grid in "Author
(meeting/conference)" field
5- Apply the patch
6- Go throug step 1 to 3 again
7- See that the field 210 is now reported in the search grid in "Author
(corporate)" field

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7306f945ce)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-12 15:32:30 +00:00
5b6166ed35 Bug 30778: Remove ModAuthInBatch
1 - git grep ModAuthInBatch
2 - Confirm none of these occurences are calls
3 - Apply patch
4 - git grep ModAuthInBatch
5 - No occurences

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>
(cherry picked from commit d07e692823)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-12 15:28:15 +00:00
d9a939c220 Bug 30778: Remove ModBiblioInBatch
To test:
1 - git grep ModBiblioInBatch
2 - Confirm these occurences are not calls
3 - Apply patch
4 - git grep ModBiblioInBatch
5 - No occurences

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>
(cherry picked from commit 46fabf9bb5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-12 15:27:42 +00:00
0c69a97394 Update release notes for 22.05.02 release
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-06-29 20:47:56 +00:00
6b5f9752e5 Increment version for the 22.05.02 release
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-06-29 20:29:48 +00:00