Commit graph

49779 commits

Author SHA1 Message Date
51cf4cd1b6
Bug 31185: Unit test
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 30b06a6c00)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-17 13:21:34 +01:00
df0a958808
Bug 33820: (follow-up) Add hint to member-password.tt
This follow-up makes the same change to the "Change password" template.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 756de0f09a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-17 13:20:19 +01:00
b2c7a37906
Bug 33820: Add hints to warn the librarian that they will be logged out if they change their username
This patch adds some JavaScript to the patron entry form which adds a
hint if the logged-in librarian tries to change their own username. It
warns them that they will be logged out.

To test, apply the patch and log into the staff interface.

- Locate and edit your own patron record.
- In the "OPAC/Staff interface login" section, change the value in the
  username field. When focus leaves that form field a hint should
  appear, "You will be logged out if you modify your username."
- Change the username field back to your original username. The hint
  should disappear.
- Confirm that submitting a username change works correctly: You should
  be logged out, and when you log in again your username should be
  updated.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8e611b79f1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-17 13:20:11 +01:00
25230f4cf9
Bug 34051: Cache empty hashref for non-existent authorised values
When fetching authorised value descriptions, we need to handle
scenarios where a value doesn't exist in the cache and doesn't
exist in the database. In this situation, we return an empty
hashref, and this patch makes us cache this empty hashref.

This is important because otherwise the function
Koha::AuthorisedValues->get_description_by_koha_field will
do a database call every time it encounters the same value that
doesn't exist in the authorised values table.

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 a3a0aaec10)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-17 13:18:53 +01:00
d636c81cd6
Bug 34033: (bug 30649 follow-up) Fix update typos
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 96794db659)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-17 13:15:21 +01:00
818ee1c312
Bug 33987: Combine multiple db updates one in BatchCommitRecords
When replacing existing records BatchCommitRecords will the table import_records will be updated three times for three different fields by three different queries. Not only is this inefficient ( especially for large batches ), it seems that this is causing the dreaded "Lock wait timeout exceeded; try restarting transaction" error on some mysql/mariadb configurations.

1) Test plan
2) Download a marc record from Koha
3) Modify the title of that same bib in Koha
4) Stage the downloaded record and overlay the existing record
5) Verify the title has reverted to the original title from the
   downloaded record!

Signed-off-by: Sam Lau <samalau@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ab91409f7f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-17 13:13:05 +01:00
8893e876ec
Bug 32402: Add "Modification date" to OPAC Lists table
This change adds a "Modification date" column to the
OPAC Lists table, so that you can see when a list was last modified.

Test plan:
1. Apply patch
2. Create a public list and a private list
3. Go to http://localhost:8080/cgi-bin/koha/opac-shelves.pl?op=list&public=1
4. Note that "Modification date" appears in the relevant date format
on both the "Your lists" and "Public lists" tabs

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit de49b8cd3a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-17 13:09:48 +01:00
91c4c36b56
Bug 33868: Upgrade the Multiple Select plugin in the staff interface
This patch upgrades the Multiple Select plugin in the staff interface
and adds some minor adjustments to system preferences CSS to accommodate
the change. The listing on the about page is updated with current
information.

To test, apply the patch and clear your browser cache if necessary.

- Go to Administration -> System preferences.
- Test some preferences which use the plugin, e.g.
  - ApplyFrameworkDefaults
  - CoceProviders
  - OpacHiddenItemsExceptions
  - OPACAllowUserToChangeBranch
- Confirm that the menus look correct and work correctly.

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 fa809812be)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-17 12:21:42 +01:00
1ba4c8b129
Bug 33417: Fix translation in toolbar
This commit allows the string to be translated - tested using fr-FR and a dummy string in the .po file

Test plan as above

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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 62b2609e86)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-17 12:20:49 +01:00
11d27b0a4a
Bug 33417: Remove old components
This commit deletes the old toolbar components as they are no longer
necessary

Test plan as above

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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 bd9255d849)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-17 12:20:48 +01:00
9352f0aff1
Bug 33417: Add toolbar imports and options
This commit amends the required files to import the toolbar and add the
correct options

Test plan as above

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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 c10d6c6b00)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-17 12:20:47 +01:00
c7d3cad286
Bug 33417: Create standard toolbar component
This commit introduces a standard Toolbar component that can be used
throughout ERM

Test plan:
1) Apply patch
2) Navigate to Agreements and click the "Add agreement" button - this
   should work as normal
3) Navigate to Licenses and repeat
4) Navigate to Local packages and repeat
5) Navigate to local titles - there should be two buttons, one to add and
   one to import. These should work as normal

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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 09666ecf4e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-17 12:20:46 +01:00
8f9c879614
Bug 33528: Fix basic_workflow.t
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9f4e9f451b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-17 12:14:44 +01:00
74d8846ff8
Bug 33528: (follow-up) Correct selector for event handler
The event handler for restriction deletion needs to be adjusted
according to the new container ID. Without this change the JavaScript
confirmation message didn't appear and restrictions were deleted without
confirmation.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 78431a983d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-17 12:04:22 +01:00
3df4119807
Bug 33528: Use template wrapper for tabs: Patron details page
This patch updates the checkout and patron details templates so
that they use the new WRAPPER directive to build tabbed navigation.

The markup for the tab navigation and tab panels is moved into its own
include file since the templates were duplicating essentially the same
code.

To fully test you should have patrons with checkouts, fines, holds,
recalls, and article requests.

Apply the patch and go to the checkout page in the staff interface. With
each tab, test as much functionality as you can within that tab.

- Checkouts
- Holds
- Recalls (with UseRecalls enabled)
- Claims (with a LOST value defined in ClaimReturnedLostValue)
- Restrictions
- Article Requests (with ArticleRequests preference enabled)
- Clubs (with at least one club defined)
- Relatives' checkouts (patron must have a guarantee linked to their
  account).

Perform the same tests on the patron details page. Note that the
"Charges" tab is shown on the patron details page but not the checkout
page. This is not a change made by this patch.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 263196d194)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-17 12:04:17 +01:00
bb1167975a
Bug 26700: Remove occurrences in Makefile.PL
As well as other 2 non existing paths

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 97afec9bc3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-17 11:01:46 +01:00
a7841868dd
Bug 26700: Remove unused C4/SIP/t directory
This patch removes the unused C4/SIP/t directory.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a83f798511)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-17 11:01:46 +01:00
26d196f5e1
Bug 33961: DBRev 23.05.01.001
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2d1d69f3bc)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-17 08:21:04 +01:00
82b8c9df97
Bug 33961: Remove built-in offline circ tool
The tool has not been updated and is no longer working with modern
browser.

It should either be rewritten/adjusted or removed. Given that we didn't
get complains its non-functional status, bugs related to this tool
didn't get attention, and the community is lacking resources, I am
suggesting to remove it and redirect users to the koct FF plugin that
is known to be working.

Test plan:
See bug 10240 and use `git grep` to confirm that we are removing all
tracks of this feature.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3248afdc12)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-17 08:18:59 +01:00
6e99fa4ec7
Bug 33897: (QA follow-up) Correct code for tab selection
This patch corrects the code for selecting tabs other than the first
tab.

To test, apply the patch and view the bibliographic detail page for a
serial record and with various settings of the opacSerialDefaultTab
system preference.

If you select "subscriptions tab" the subscriptions tab should be active
by default.

You can also enable html5media and view a record with html5media
information and no holdings. The media tab should be displayed by
default.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5308697ab8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-17 08:17:59 +01:00
3f8a4a4756
Bug 33897: Use template wrapper for tabs: OPAC bibliographic detail page
This patch updates the OPAC bibliographic detail page so that it uses
the new WRAPPER syntax to generate tabs markup.

To test, apply the patch and locate a bibliographic record. View the
detail page. Verify that tabs are working, including all the options:

  - Holdings
  - Other holdings (If OpacSeparateHoldings is enabled)
  - Descriptions (MARC notes)
  - Subscriptions
  - Serial collection (UNIMARC, untested)
  - Components (If ShowComponentRecords is enabled. See Bug 11175 for
    sample record)
  - Comments
  - Editions (OPACFRBRizeEditions)
  - Html5media (If HTML5MediaEnabled is on. See Bug 8377 for sample
    records)
  - Images (If OPACLocalCoverImages is enabled)
  - NovelistSelect
  - Author identifiers (Witgh OPACAuthorIdentifiers enabled, see Bug
    29897)

Bonus points for testing these tabs for which I don't have credentials:
- Syndetics TOC
- Syndetics Excerpt
- Syndetics Reviews
- Syndetics AuthorNotes
- LibraryThing for Libraries (with LibraryThingForLibrariesTabbedView
  set to "in tabs.")

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 59c2a77ab7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-17 08:17:58 +01:00
6be23e7251
Bug 33176: Enforce bad values
1. Turn on RequirePaymentType
2. Create a manual invocie on a patron account
3. Go to pay it, 'Payment type:' is marked as required.
4. In the inscept the select input ( #payment_type ) with your browser's dev tools. Removed the required attribute.
5. You are able to make the payment without a payment type.
6. Apply patch and restart_all
7. Try 4-5 again. This time you should get a 500 error and the payment should not go through.
8. Try a paymnet again this time manipulate the DOM and change the value of 'CASH' to something else like 'SOMETHINGELSE'.
9. Try to submit the payment and again you will get a 500 error. The payment should not go through.
10. Turn RequirePaymentType off. Try a payment with a payment type, you shoud be successful.
11. Make sure tests will pass

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 676d263687)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-17 08:15:11 +01:00
68c725afee
Bug 33176: Enforce RequirePaymentType with API
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit df4285adb2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-17 08:15:10 +01:00
98347e1612
Bug 33176: Handle RequirePaymentType
Test plan:

1. Turn on RequirePaymentType
2. Create a manual invocie on a patron account
3. Go to pay it, 'Payment type:' is marked as required.
4. In the inscept the select input ( #payment_type ) with your browser's dev tools. Removed the required attribute.
5. You are able to make the payment without a payment type.
6. Apply patch and restart_all
7. Try 4-5 again. This time you should get a 500 error and the payment should not go through.
8. Turn RequirePaymentType off. Try a payment with a payment type, you shoud be successful.
9. Make sure tests will pass:

prove -v t/db_dependent/Koha/Account.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b15a15df9e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-17 08:15:09 +01:00
ea1ed9e233
Update .mailmap
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cd5212ac2f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-17 08:12:22 +01:00
8ca854d4e3
Bug 33806: Retain specified date when confirming item parts at checkin
This patch simply adds hidden inputs to the item parts confirm form
to ensure specified checkin date is retained

To test:
 1 - Find or add an item with subfield 3 - materials specified
 2 - Enable system preference CircConfirmItemParts
 3 - Go to Circulation->Checkin
 4 - Click the settings button in the input box and enter a checkin date and select the remeber check box
 5 - Check in some items, confirm date retained
 6 - Checkin the item with the materials specified
 7 - Confirm checkin
 8 - Note that checkin date is cleared
 9 - Apply patch
10 - Repeat 3-7
11 - Confirm date is retained

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9bca328d91)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-17 08:12:07 +01:00
7cabedbe0b
Bug 30002: (QA follow-up) Add .perltidyrc to Makefile.PL mapping
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8040370e78)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-12 09:23:54 +01:00
f742b2a84a
Bug 30649: (follow-up) Improve database update
This patch implements the proposed switch to use the standard DB handle
and only require Koha::Encryption if necessary.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f8d2291f2e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-12 09:23:45 +01:00
f73dbd00ad
Bug 33967: Add unit test to ensure SetEnv doesn't compromise $env
This patch includes a unit test which checks the memory address
of the $env hashref in middlewares before and after
Koha::Middleware::Env is applied.

It succeeds when the same $env is maintained before and after
this middleware. It fails if the $env has been overwritten with
a new hashref (as evidenced by the new memory address for the
hash).

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2c7142fe94)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-12 09:22:00 +01:00
b139047381
Bug 33967: Fix SetEnv middleware to preserve $env integrity
This patch fixes the Koha::Middleware::SetEnv, so that it
preserves the referential integrity of the $env hash
reference as it passes through the pre-process and post-process
stages of middleware wrapped around the core Koha Plack application.

Test plan:
0a. Apply the patch
0b. vi /etc/koha/sites/kohadev/koha-conf.xml
0c. Uncomment "koha_trusted_proxies"
0d. Add "172.0.0.0/8" to the end of the "koha_trusted_proxies"
0e. koha-plack --restart kohadev
1. vi /etc/apache2/sites-enabled/kohadev.conf
2. Add the following to the OPAC virtualhost:
SetEnv OVERRIDE_SYSPREF_LibraryName "The Best, Truly the Best, Koha Library"
RequestHeader add X-Koha-SetEnv "OVERRIDE_SYSPREF_LibraryName The Best\, Truly the Best\, Koha Library"
RequestHeader add X-Forwarded-For "192.168.100.100"
3. service apache2 restart
4. tail -f /var/log/koha/kohadev/plack.log
5. Go to http://localhost:8080/
6. Note that the plack.log lists 192.168.100.100 as the client IP address
7. Note that the title of the OPAC webpage is
"The Best, Truly the Best, Koha Library Library catalog"

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 42823da209)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-12 09:22:00 +01:00
17d655249a
Bug 33855: Clean up forms and page sections on 'manage MARC imports' page
This patch makes minor changes to the structure of the "Manage MARC
imports" page so that sections are more clearly delineated and forms
have the correct structure.

The patch also shortens the new framework field labels and adds hints
for clarification.

To test, apply the patch and go to Cataloging -> Stage MARC records for
import.

- Import a batch of MARC records.
- Go to Cataloging -> Manage staged records.
- View the batch you just imported.
- You should see three sections:
  - A list of information about the batch
  - Options for changing the matching rules
  - Options for setting frameworks during import.
- Test that the form for applying different matching rules still works
  correctly.
  - Import a batch of records which contains matches (by, for example,
    exporting MARC records from Koha and then reimporting the same
    batch)
  - On the manage page for that batch try changing the matching rule
    applied, switching between "Do not look for matching records" and a
    matching rule which will catch the duplicate records.
- Test that your records are imported correctly according to the
  framework settings you select, both for new records and for replaced
  records.

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>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-12 09:21:28 +01:00
4effd3cf55
Bug 33798: Improve consistency of the vendor display view
It was not consistent: indentation, bold, etc.

This patch is suggesting a new style using .page-section and .rows

Is it what we want?

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 4bd6abf9a2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-12 09:21:10 +01:00
3e5c7bc2af
Bug 33798: Add colons after the labels on the edit form
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5be54fc9e6)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-12 09:21:10 +01:00
67343cbd45
Bug 33957: Add normalized_oclc and only fetch when needed
opac-user.tt wants to normalized_oclc number if using syndetics or B&T images

We don't need to fetch it if not, but we need to pass it if so

To test:
1 - Switch all Syndetics prefs to 'Show' or 'Use' except
    SyndeticsClientCode = just enter 'test'
2 - Checkout some items to a patron, ensure the records have:
    - ISBN
    - UPC
    - OCLC number
3 - View opac-user.pl (sign in to opac as the user)
4 - View the network console tab (may need to reload)
5 - Note requests like:
    https://secure.syndetics.com/index.aspx?isbn=1780335792/MC.GIF&client=test&type=xw10&upc=&oclc=
6 - Note that oclc parameter is not filled for record with an oclc number
7 - Apply patch
8 - Reload
9 - Confirm the link now has oclc as expected
10 - Disable syndetics, enable google books or another source
11 - Confirm images display as expected

JD amended patch: tidy

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a59f757fd7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-12 09:18:21 +01:00
50165d8e86
Bug 33901: (bug 30718 follow-up) Predition pattern - don't set end date to today
If the end date is not set we should not set it to today.
On bug 30718 the following change was wrong:
-$enddate = eval { output_pref( { str => $enddate, dateonly => 1, dateformat => 'iso' } ); };
+$enddate = dt_from_string($enddate)->ymd;

output_pref returns undef if str is empty
After the change we returned today's date.

Test plan:
1. Go to Serials > Manage numbering patterns
2. Click Edit next to one of the existing patterns (e.g. Number)
3. Enter information in the Test prediction pattern section
   -  Frequency: choose one (e.g. 1/month)
   -  First issue publication date: enter a date (e.g. 2023-06-01)
   -  Subscription length: issues + enter a number of issues (e.g. 12)
   -  Locale: leave empty
   -  Begins with: enter a number in the X column, e.g. 42
4. Click Test pattern
=> Without this patch only one issue is shown, no matter how many you enter in Subscription length
=> With this patch applied the end date is not set to today and the
prediction pattern list is correct

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c9a2cf948d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-12 09:17:45 +01:00
a22ca6877e
Bug 33852: Add one more test
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 144efca99d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-12 08:10:01 +01:00
8a5665d4b7
Bug 33852: Make jobs.t test the only_current parameter
This trivial patch adds a test to the only_current parameter.

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/jobs.t
=> SUCCESS: New tests added, and pass
3. Sign off :-D

Signed-off-by: Sam Lau <samalau@gmail.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 76983f5275)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-12 08:10:01 +01:00
4effe3b3d8
Bug 33937: Remove incorrect export in C4::Members
Bug 17600 re-add those exports, but the module does no longer have the
subroutines. We should remove these export.

Test plan:
git grep is your friend

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e7116af438)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-12 08:07:53 +01:00
82cd05381a
Bug 33880: Remove Version param from GB::Barcode->new
Looking at the code here
     if (Koha/Auth/TwoFactorAuth.pmoSelf->{Version}){        #--- auto version select
        for(->{Version}=1; ->{Version} <= 40; ++->{Version}) {
            last if ({->{Ecc}}->[->{Version}]
                        >=  + ->[->{Version}]);
        }
   }

in https://metacpan.org/release/KWITKNR/GD-Barcode-1.15/source/Barcode/QRcode.pm#L349

It appears the version parameter is not required, and will default to whatever version has the necessary bits for the input words given

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 20d2236681)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-12 08:01:04 +01:00
dea8f81e96
Bug 33899: Add the 23.11 release team
This patch updates the teams.yaml to include the voted in 23.11 release
team and also updates the release date of 22.11 to match the actual
release.

Test plan
1/ Check against https://wiki.koha-community.org/wiki/Release_Teams

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 e70ef6b16b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-12 07:59:29 +01:00
f4f57550bc
Bug 27424: (QA follow-up) Make db update idempotent
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f9002b96cd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-12 07:58:36 +01:00
7c948b540e
Bug 33951: (QA follow-up) Import GetNormalizedOCLCNumber
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b10b840577)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-12 07:58:01 +01:00
9f0a6d53df
Bug 33951: Set normalized_oclc in opac/opac-readingrecord.pl
normalized_oclc is used in the template to build the link to syndetics,
but it's not passed from the controller. Is this patch correct? Is
syndetics broken on this page? Should we remove it or keep it?
Is oclc parameter in the URL unecessary and should be removed?

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8e93668796)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-12 07:58:01 +01:00
Hammat Wele
9cf10160ec
Bug 32341: (follow-up) Making the label not showed twice when the tables are in responsive mode
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b608c05fd4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-12 07:56:40 +01:00
Hammat Wele
19ebcd4eb5
Bug 32341: (follow-up) Add responsivity to Curbside pickups table and changing button style for finestables
To activate Curbside pickups
    1- Enable the CurbsidePickup system preference
        1.1 Go to Administration > Global system preferences
        1.2 Search for CurbsidePickup
        1.3 Change the value for 'Enable'
        1.4 Click on 'Save all circulation preferences'
    2- Configure time slots for at least one library
        2.1 Go to Administration > Curbside pickup
        2.2 Fill out the form for Centerville (or another library)
            Enable: Check
            Pickup interval: 10 (or other)
            Maximum boss per interval: 3 (or other)
            Patron-scheduled pickup: Check
            Enable for waiting holds only: DO NOT check
        2.3 Add a time slot
            In 'New slot', enter
                Monday
                From: 10:00
                To: 12:00
            Click on 'Add'
    3- Make an appointment from the OPAC
        3.1 Go to OPAC
        3.2 Open mobile mode
        3.3 Connect with a user
        3.4 Click on 'Curbside pickups'
        3.5 Choose the library in 'Pick a library'
        3.6 Choose a date in 'Pickup date'
        3.7 Choose a time range in 'Select a time'
        3.8 Click on 'Schedule pickup'
            => Notice The table is not responsive
    4- Apply the patch
    5- Execute 'yarn build --view opac'
    6- Clean your cache or open your navigator on private mode (to load updated css files)
    7- Perform step 3.1, 3.2, 3.3, 3.4,
    8- click on 'Your pickups'
     => Confirm that the CurbsidePickup table are now displayed correctly and is now responsive.
    9- Click on 'Charges'
     => Confirm that the Charges table are now displayed correctly and is now responsive.

I correct a little bug. The "suspend_hold" button did not work anymore. This change resets it to it's original state.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 16008c24c5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-12 07:56:39 +01:00
Hammat Wele
d39115e5fd
Bug 32341: (follow-up) Making the remains OPAC tables responsive
Apply the patch and check for the responsivity of the following tables
1- Go to the OPAC
2- Open mobile mode
3- The following tables are not responsive
- Summary - Clubs
- Summary - Recalls
- Summary - Article requests
- Charges - (relative's)
- Search history - Authority
- Checkout history - All
- Checkout history - Checkouts
- Checkout history - On-site
- Recalls history
- Messaging
- Subscription (serial)
- Course reserves - Courses
- Course reserves - Reserves
- Authority search results
4- Apply the patch
5- Execute 'yarn build --view opac'
6- Clean your cache or open your navigator on private mode (to load updated css files)
7- Perform previous step (1-3)
8- Confirm that the tables are now displayed correctly and is now responsive.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6caeb1f627)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-12 07:56:39 +01:00
9ae2959186
Bug 32341: (follow-up) Alternate button style
This patch applies a different button style and does a couple of clean
up tasks: Removing the redundant sorting-related CSS and moving the
responsive button CSS to _common.scss where other DataTable-related
styles are found.

I think this different button style is more consistent with the OPAC's
design. It also eliminates untranslatable strings from the CSS.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9f277e625e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-12 07:56:39 +01:00
Hammat Wele
135ac49bd4
Bug 32341: (Fix) Changing the placement of the button
This attachment correct the placement of the responsive button. It is now in its own column at the last column and the '+' and '-' are remplaced by 'Expand' and 'Unexpand' to make it more clear.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 68c3ad5fac)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-12 07:56:39 +01:00
Hammat Wele
e3de75585d
Bug 32341: Some OPAC tables are not displayed well in mobile mode
Some OPAC tables are not displayed well in mobile mode, it is absolutely necessary to scroll to the right to read the content properly

This patch fix this problem by making the tables responsive

To test:
      1- Go to the OPAC
      2- Open mobile mode
      3- Go to a bibliographic record detail page in the OPAC (opac-detail.pl?biblionumber=X)
      4- Check the Holdings table
            --> the information is not presented in a table as it is when viewing on a laptop or PC browser screen.
            --> we see very narrow columns
            --> unreadable text
      5- Go to to the page 'Summary' (opac-user.pl)
      6- Check the 'Checked out' table
            --> the information is not presented in a table as it is when viewing on a laptop or PC browser screen.
            --> The columns are overflowing to the right
      7- Check the 'Overdue' table
            --> the information is not presented in a table as it is when viewing on a laptop or PC browser screen.
            --> The columns are overflowing to the right
      8- Go to the page 'Charges' (opac-account.pl)
      9- Click on 'Show all transactions'
            --> the information is not presented in a table as it is when viewing on a laptop or PC browser screen.
            --> The columns are overflowing to the right
      10- Go to the page 'Search history' (opac-search-history.pl)
            --> the information is not presented in a table as it is when viewing on a laptop or PC browser screen.
            --> The columns are overflowing to the right
      11- Apply the patch
      12- Execute 'yarn build --view opac'
      13- Clean your cache or open your navigator on private mode (to load updated css files)
      14- Perform previous step (1-10)
      15- Confirm that the tables are now displayed correctly and is now responsive.

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit eb2e0c2efd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-12 07:56:39 +01:00
761051893e
Bug 30002: Adjust perltidy
Remove the following 3 options that are not available in perltidy
v20190601 that is the version shipped with bullseye
--add-terminal-newline
--valign-exclusion-list
--extended-continuation-indentation

Extend max line length
--maximum-line-length=120

Prevent perltidy to format lists (see bug 30002 comment 10)
--break-at-old-comma-breakpoints

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d46a959a69)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-12 07:55:00 +01:00