]> git.koha-community.org Git - koha.git/log
koha.git
17 months agoBug 32627: Calculate expirationdate relative to waitingdate
emlam [Wed, 5 Apr 2023 13:30:30 +0000 (09:30 -0400)]
Bug 32627: Calculate expirationdate relative to waitingdate

Hold::set_waiting should calculate the MaxPickupDelay expiration date
based on waitingdate rather than the current date, to avoid resetting
the expirationdate on a hold that was already waiting.

To test:
1. Place a hold and check in the item so the hold will be set to Waiting
2. Confirm that the expiration date is correct based on the
   ReservesMaxPickupDelay setting
3. Adjust your system clock to one day later
4. Check in the item again and confirm the hold
5. Note that the expiration date has changed
7. Apply patch and restart_all
8. Repeat steps 1-4. Confirm that the expiration date is calculated
   correctly, and does not change when the item is checked in again
9. Reset your system clock to the current date
10. Set ExcludeHolidaysFromMaxPickupDelay to Use the Calendar
11. Add an upcoming holiday to the calendar
12. Repeat steps 1-4. Confirm the expiration date correctly accounts for
    the holiday, and does not change when the item is checked in again

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 21bcb6e85520b2963dde71c21ccb5e169c4c5e28)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33684: Make mandatory date fields required when editing a patron
Jonathan Druart [Tue, 9 May 2023 08:11:19 +0000 (10:11 +0200)]
Bug 33684: Make mandatory date fields required when editing a patron

Date fields in BorrowerMandatoryField are not required by the validation
form when a new patron is added or modified.

This is because the 'required' prop does not exist on the input element
when the flatpickr instance is created.
We should either add it in the DOM directly (tt), but it will require to
do it "manually" for each date fields, or add it when we add it to the
inputs. This patch implements the second option.

Test plan:
1. Add "dateofbirth" to syspref BorrowerMandatoryField.
2. Add patron and leave date of birth input field empty.
3. Save.
=> Form is not submitted and you are asked to fill in a date of birth

Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
https://bugs.koha-community.org/show_bug.cgi?id=33648
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ae3d6f1876c807aed3efb908f538e83bf6376abe)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33403: Fix Letters.t if number pattern with id=1 does not exist
Jonathan Druart [Wed, 10 May 2023 10:34:08 +0000 (12:34 +0200)]
Bug 33403: Fix Letters.t if number pattern with id=1 does not exist

Bad assumption in DB, we should create the data we need

Test plan:
> delete from subscription_numberpatterns;

prove t/db_dependent/Letters.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 49803c311bd6359bf5bae40c9ab3bead75947a60)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 26403: (QA follow-up) Add missing debit and credit types to includes
Katrin Fischer [Wed, 10 May 2023 08:32:26 +0000 (08:32 +0000)]
Bug 26403: (QA follow-up) Add missing debit and credit types to includes

This adds the missing debit and credit types to the includes, namely:
DISCOUNT, PURCHASE, PAYOUT, and VOID.

I sorted them as they appear in the GUI (alphabetically) so it's a little
easier to spot missing ones.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c76533c5a1bc740ded800039ef5843e1345be4e5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 26403: Use accounts include in account management pages
Martin Renvoize [Wed, 10 May 2023 06:37:55 +0000 (07:37 +0100)]
Bug 26403: Use accounts include in account management pages

This patch updates the credit and debit types management pages to use
the proper includes for handling system type translations.  This is how
it should have been done in the first place on the original bugs that
introduced the management of these types but for some reason I think it
got dropped during the QA process leading to confusion around these
system types with their fixed descriptions.

To test:
1. Apply patch
2. Apply the translations
   ./misc/translator/translate install xx-XX
3. In the staff interface, go to Administration > Credit types
   --> They should be translated
4. Go to Administration > Debit types
   --> They should be translated

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bd8d019d3232cdef815deef9ee6095c0298baf03)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 26403: (follow-up) Deleted old SQL files
Caroline Cyr La Rose [Mon, 3 Apr 2023 19:34:11 +0000 (15:34 -0400)]
Bug 26403: (follow-up) Deleted old SQL files

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Followed the test plan. Works as advertised.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0c07407a82f5a1e41f8e5be57475e889da77c3fa)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 26403: Move credit and debit types into translatable YAML files
Caroline Cyr La Rose [Mon, 3 Apr 2023 18:35:04 +0000 (14:35 -0400)]
Bug 26403: Move credit and debit types into translatable YAML files

This patch moves account debit and credit types, as well as the CASH
payment type, into YAML files under
installer/data/en/mandatory. This should make the debit and credit types
translatable (for new installations only).

To test:
1. Apply patch
2. Update po files
   ./misc/translator/translate update xx-XX
3. View the xx-XX-installer.po file
   -->The default account debit and credit types (and cash payment type)
      should be available to be translated
4. Translate the strings
5. Apply the translations
   ./misc/translator/translate install xx-XX
6. Load the new translated YAML files (with a fresh install, or by deleting
   the values in the db and using ./misc/load_yaml.pl to load the files)
7. In the staff interface, go to Administration > Credit types
   --> They should be translated
8. Go to Administration > Debit types
   --> They should be translated

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 002dbcdc7f52769e150f7ed788e37e9c08ffe02b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33512: (follow-up) Check item count before adding add/edit button
Lucas Gass [Mon, 24 Apr 2023 23:53:50 +0000 (23:53 +0000)]
Bug 33512: (follow-up) Check item count before adding add/edit button

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7f1cc03e3e16c4538126d69e43f5d9ff67ecd0b2)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33512: (QA follow-up) Remove 'Click to' from buttons
Katrin Fischer [Sat, 15 Apr 2023 23:14:10 +0000 (23:14 +0000)]
Bug 33512: (QA follow-up) Remove 'Click to' from buttons

This is following recommendations from accessibility
guidelines. It being a link or button already indicates
that you need to click it. We don't need to spell it out.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0eec6e9f244f95bf8d6f1bf105f0d706456bb316)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33512: Change text and add button classes on serial-edit page
Lucas Gass [Wed, 12 Apr 2023 22:28:06 +0000 (22:28 +0000)]
Bug 33512: Change text and add button classes on serial-edit page

To test:
1. Create a subscription
2. Make sure that you choose "Create an item record" when receiving the serial and associate it with a record.
3. Fill out the numbering pattern stuff and save the subscription.
4. Receive and change the status to arrived. Doing so will make the item subfields appear for editing.
5. Add some stuff, like a barcode, and Save.
6. Now, if you have made a mistake, you may want to edit the serial/item. Check the edit box and click 'Edit serials '
7. For your issue that has already arrived click 'Click to add item'. The item record from before appears.
8. Apply patch.
9. Try 6 & 7 again. The existing items should now read 'Click to edit item'

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f04de4636aaf04582a20e7848da0773d0a045c30)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33671: Update POD, remove unneeded check in relationship->guarantor
Marcel de Rooy [Thu, 4 May 2023 07:06:07 +0000 (07:06 +0000)]
Bug 33671: Update POD, remove unneeded check in relationship->guarantor

[1] Update POD for $patron->guarantor_relationships
[2] Remove check from Patron::Relationship->guarantor

Test plan:
Run t/db_dependent/Koha/Patron.t
Run t/db_dependent/Patron/Relationships.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5eaee314c59a4ed8f3d75c7897f931f57f1577b1)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33671: Fix for 30472 - Remove null-guarantors
Marcel de Rooy [Thu, 4 May 2023 06:41:19 +0000 (06:41 +0000)]
Bug 33671: Fix for 30472 - Remove null-guarantors

These guarantors cannot be added. They are of no use.

NOTE FOR QA/RM: I do not think that it is needed to add a new
db rev for this change since it happens seldom. But if you think
that it is, just copy it to atomicupdate/change bugno.

Test plan:
[1] Check your table definition and modify it:
    alter table borrower_relationships modify column `guarantor_id` int(11) NULL;
[2] Add an empty guarantor:
    insert into borrower_relationships (guarantee_id,relationship) values (SOME_PATRON_ID,'father');
[3] Run the dbrev and verify that the inserted record has been removed.
[4] Check table definition with 'show create table borrower_relationships'.
    You should see NOT NULL with guarantor_id.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1dee35d412f9aada8ae58d72a7fa1f4ff88dde7c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 25379: (QA follow-up) Adjust other occurrences and add line break
Nick Clemens [Fri, 28 Apr 2023 16:03:07 +0000 (16:03 +0000)]
Bug 25379: (QA follow-up) Adjust other occurrences and add line break

This updates the other occurrences and adds html_line_break to all
except the edit page - it seems html or raw doesn't affect the value of the textarea,
but moved to raw for consistency

To test:
1 - Add an HTML note to a patron, make sure to add a line break:
<h1>Testing</h1>
<h2>Newline</h2>
2 - Checkout to patron and return
3 - Confirm note shows correctly
4 - Add patron to a list
5 - Confirm note displays correctly
6 - Edit patron, confirm note field is correct
7 - Batch modify borrower
8 - Confirm note displays correctly in batch list

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5b7879ebf8a571d26d7d0c859f85684044dc3193)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 25379: Add raw filter to circulation note on checkin page
Katrin Fischer [Fri, 17 Mar 2023 21:36:23 +0000 (21:36 +0000)]
Bug 25379: Add raw filter to circulation note on checkin page

This is a consistency patch: we already allow adding HTML tags
to the patron circulation note and the contents display
correctly in the patron account and in the patron search results
in the staff interface. But the HTML tags are printed on the
checkins page.

To test:
* Add a circulation note including HTML tags to a patron
  Example: <h1>This patron is great!</h1>
* Check an item out to this patron
* Verify that the note displays formatted in patron search results
* Verify that the note displays formatted in the patron record
* Return the item
* Verify the note shows the printed tags
* Apply patch
* Check item out again and check it in again
* Verify the note now displays correctly in list of checkins

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 2608e405de72d365ef472bc6e8f86d2051f3cda4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 32917: Fix sample notice for CHANGE_PASSWORD
Katrin Fischer [Sun, 16 Apr 2023 12:19:40 +0000 (12:19 +0000)]
Bug 32917: Fix sample notice for CHANGE_PASSWORD

We've identified 3 issues:
* Name of patron is not showing up in subject line
* Name of patron is now showing in notice text
* Notice is set to be HTML, but has no line breaks and uses no HTML tags

In the database update, these issues don't occur:

$dbh->do( q{
    INSERT IGNORE INTO letter (module, code, name, title, content, message_transport_type) VALUES ('members', 'PASSWORD_CHANGE', 'Notification of password change', 'Library account password change notification',
    "Dear [% borrower.firstname %] [% borrower.surname %],\r\n\r\nWe want to notify you that your password has been changed. If you did not change it yourself (or requested that change), please contact library staff.\r\n\r\nYour library.", 'email');
});

So this patch will make them match up:

* Remove HTML flag
* Update patron. to borrower. in message text
* Remove patron name from subject (it won't work even with the correct variables)

To test:
* Add an email address to your favourite sample user
* Make sure NotifyPasswordChange is set to "Notify"
* Update the sample user's password using the "change password" feature
* Verify a notice is shown in the notices tabs
  Note: you won't see the line break issue there because of bug 30287
* Apply patch
* Recreate your database/run web installer so sample notices are loaded
* Repeat the test, it should generate a nice lookig notice now

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 28738472465a9a78b556e5f462ce8ee39dab1c35)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33253: Turn off autocompletion for 2FA authentication code
Katrin Fischer [Sun, 16 Apr 2023 10:45:06 +0000 (10:45 +0000)]
Bug 33253: Turn off autocompletion for 2FA authentication code

The form for entering your authentication code shoudl not suggest
previous codes.

To test:
* Activate TwoFactorAuthentication
* Go to your patron account in staff
* More > Manage 2-factor authentication
* I used "Google authenticator" on my phone, so:
* Open app on your phone, add new and scan the QR code
* Enter activation code
* Log out of staff interface
* Log back in, you are now also asked for an authentication code
  as second step
* Look up code in app, enter, get logged in
* Log out, log back in - the form now suggests the previous code
  when you click on it
* Apply patch
* Reload things (restart_all on ktd)
* Verify that you no longer get the suggestion

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 2496f6373ab7c3be31480e29050b11c0cdb7a964)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33037: Koha does not display difference between enumchron and serialseq in record...
Janusz Kaczmarek [Wed, 22 Feb 2023 11:59:11 +0000 (12:59 +0100)]
Bug 33037: Koha does not display difference between enumchron and serialseq in record detail view (OPAC and intranet)

Patch 32555 tries to resolve the issue caused by bug 31313.  But the way it is fixed seems to be
at least problematic.  With patch 32555 we will never see the difference between
`serial`.`serialseq` and `items`.`enumchron` which is still intended in opac-detail.tt
(line ~ 1332) and [intranet] catalogue/detail.tt (line ~ 446).  This is because
ITEM_RESULT.serialitem (in opac-detail.tt) and item.itemserial.serial (in catalogue/detail.tt)
refer to non-existing things.  (and therefor the problem described in 32555 no longer emerge).
The original problem is caused by mixing up serialitem with serial in [opac-]detail.pl
and passing serialitem instead of serial to both templates.

To test:
1. Create a serial subscription
   1.1. Go to Serials
   1.2. Click on New subscription
   1.3. Fill out the first form
        - Vendor: leave empty
        - Record: enter a record number
        - Create an item record when receiving this serial
        - When there is an irregular issue: Keep issue number
        - Manual history: leave unchecked
        - Call number: leave empty
        - Library: Centerville
        - Public/nonpublic note: leave empty
        - Patron notification: None
        - Location: None
        - Collection: None
        - Item type: Continuing resources
        - Grace period: leave empty
        - Number of issues to display: leave both empty
   1.4. Click Next (and confirm you are not using a vendor)
   1.5. Fill out the second form
        - First issue publication date: 2023-01-01
        - Frequency: 1/month
        - Subscription length: issues 12
        - Subscription start date: 2023-01-01
        - Subscription end date: 2024-01-01
        - Numbering pattern: Number
        - Locale: leave empty
        - Begins with: 42
        - Inner counter: leave empty
   1.6. Click Test prediction pattern
   1.7. Click Save subscription
2. Click OPAC view: Open in new window.
3. Back in the staff interface tab, receive an issue
   3.1. Click Receive
   3.2. In Status, choose Arrived for No. 42
   3.3. IN ITEM DETAILS BELOW CHANGE h - Serial enumeration / chronology
        from No. 42 to some different string
   3.3. Click Save
4. Check the items in OPAC and Intranet – you will see only the value from the
   item $h subfield (enumchron) instead of desired "enumchron -- serialseq"
   in case of a difference between `serial`.`serialseq` and `items`.`enumchron`.
5. Apply this patch
6. Repeat 4
7. Check the items in OPAC and Intranet – you should now see the desired
   "enumchron -- serialseq" string.
8. Sign off

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c8012d41041969c0ec69afb962ae6795ffa1926b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33672: Don't show item group holds on OPAC if not enabled
Nick Clemens [Thu, 4 May 2023 11:14:29 +0000 (11:14 +0000)]
Bug 33672: Don't show item group holds on OPAC if not enabled

This patch adds a check of the syspref 'EnbaleItemGroupHolds' to the
opac request form

To test:
1 - Enable 'EnableItemGroups' system preference
2 - On staff client, view a record details
3 - Go to 'Item groups' tab, add a enw group
4 - On holdings tab, select one or more items and add to group
5 - View record in OPAC
6 - PLace a hold
7 - Note group option is visible
8 - Apply patch
9 - Refresh, no group option
10 - Enable 'EnableItemGroupHolds' system preference
11 - Refresh opac page, note group option is visible

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit af2792379c33ae82096b70e19810fd5e7fc73662)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 22375: (follow-up) Format even more due dates consistently
Katrin Fischer [Sun, 16 Apr 2023 01:06:53 +0000 (01:06 +0000)]
Bug 22375: (follow-up) Format even more due dates consistently

To test:
Create some checkouts in future and past, make sure to include
some with a time != 23:59.CirculateILL

Verify that the due date is displayed correctly on:
* Catalog detail page > Items tab > Checkout status
* Circulation start page > Renew > Renew one of your checkouts > dialog message
* ILL request page: requires ILL setup and CirculateILL system preference
* Patron acccount in staff > Print > Print summary
* Catalog detail page > Holds > search for patron > due date on checked out items
* Recalls:
  * Activate UseRecalls system preference, set up circulation rules to allow recalls
  * Checkout an item to another user
  * In the OPAC, place a recall on that record with yor use
  * Check "Recall a specific item"
  * Verify due date in item list
  * Place recall on checked out item
  * Patron account in OPAC > Recalls history (due date might have been changed through recall)
* OPAC patron account > Summary > Overdue tab
* Self checkout:
  * Activate WebBasedSelfCheck
  * Go to <opacbaseurl>/cgi-bin/koha/sco/sco-main.pl
  * Log in > Tab checkouts

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
JD amended patch - removed 'fda'
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0d888fc4197d8d70ca3710d448d6a293f34ab4f8)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 22375: Format due date consistantly
Josef Moravec [Wed, 20 Feb 2019 12:41:04 +0000 (12:41 +0000)]
Bug 22375: Format due date consistantly

Test plan:
Make some daily an hourly checkouts and confirm the right display
(hourly with hours and minutes, daily only date) of due date on these
places:
1) catalogue -> checkout history
2) circulation -> overdues with fines
3) <already fixed>
4) circulation -> pending on site checkouts
5) patrons circulation history
6) opac -> account summary ->  relatives checkouts

Note: I suspect the moremember-receipt.tt template is not used anymore
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e80d5fc0d0ae7085bd86d8e9c38d16d5de415e48)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33302: (QA follow-up) Rephrase errors to be more user friendly
Katrin Fischer [Thu, 4 May 2023 13:59:03 +0000 (13:59 +0000)]
Bug 33302: (QA follow-up) Rephrase errors to be more user friendly

These error message will show within the patron account. The goal
of this patch is to make them a little more user friendly avoiding
'patron' and 'hold group' terminology :)

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4e599c790fa0a2e5909916b4f3335d2a7b2a20a9)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33302: Send and display errors when a hold cannot be placed on the OPAC
Nick Clemens [Tue, 28 Mar 2023 11:31:42 +0000 (11:31 +0000)]
Bug 33302: Send and display errors when a hold cannot be placed on the OPAC

This patch changes opac-reserve.pl to return the error(s) when placing
a hold as a pipe delimited list which is then translated to a message for the
user

To test:
1 - Find a record with items available on the opac
2 - Click 'place hold' and set things up, but do not confirm
3 - In staff client, do something to make hold invalid:
    - Make item damaged
    - Make library not a pickup location
    - Place other holds for patron up to limit
    - etc.
4 - Confirm hold on OPAC
5 - You are sent to patron's account, hold is not placed
6 - There is little or no message to explain why
7 - Apply patch
8 - Repeat
9 - Now errors are clear

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ee318d20f5506e9b4c955633f0e9eddc9c171f29)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33622: Notice content does not show on default tab if TranslateNotices enabled
Owen Leonard [Tue, 2 May 2023 17:24:08 +0000 (17:24 +0000)]
Bug 33622: Notice content does not show on default tab if TranslateNotices enabled

This patch fixes a conflict between the template-generated markup and
Bootstrap JS which were both competing to show the correct default tab.
It's simpler to rely on JavaScript.

To test, apply the patch and enable the TranslateNotices system
preference if necessary.

- Go to Tools -> Notices & slips
- Go to edit any notice e.g. DUEDGST
- The page should load with the "Default" tab selected by default.
- Enter unique titles and contents under each tab to confirm that the
  data you see under the "Default" or "English (en)" tab is being shown
  in the right place.
- Save your modified notice and edit it again to confirm that the tabs
  correspond correctly to your data.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1e5c55176ef4d70b1535040a576ab13d4561c53f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33206: Unit test
Nick Clemens [Mon, 17 Apr 2023 19:24:18 +0000 (19:24 +0000)]
Bug 33206: Unit test

Signed-off-by: Nick <nick@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 82eb5d7d262a686ad6d3573e3e86a57e051c4f4c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33206: Bad title__sort made of multifield 245
Janusz Kaczmarek [Sat, 11 Mar 2023 16:03:10 +0000 (17:03 +0100)]
Bug 33206: Bad title__sort made of multifield 245

In MARC 21, having title search field defined in mappings.yaml as 245abp
(more than one subfield), the Koha generated title__sort will have not
only $a, but also other subfields cut by ind2 characters, i.e.:

245 04 $a Die Renaissance : $b Architektur, Plastik, Malerei, Illustrationen, Zeichnungen

becomes as title__sort:

Renaissance : itektur, Plastik, Malerei, Illustrationen, Zeichnungen

instead of:

Renaissance : Architektur, Plastik, Malerei, Illustrationen, Zeichnungen

This is because copying an array of pointers in Perl causes you to
point to the same (anonymous) element.  Therefore, the intended
modification only for subfield "a"
(Koha/SearchEngine/Elasticsearch.pm, ~line 1157) causes in fact
modification for all the subfields sharing the same mapping
definition and introduction of the nonfiling_characters_indicator to
all subfields 245 when processing 245abp.  And this is obviously not
what is intended and results (in some cases) with bad sort order
when sorting by titles.

Test plan
=========
1. Have a standard Koha ES installation. In mappings.yaml
   you should have 245abp for title search field.

2. Insert / download / modify a record with 245 $b or $p,
    an article at the beginning of the title, and correctly
    set 2nd indicator. For instance:

245 04 $a Die Renaissance : $b Architektur, Plastik, Malerei, Illustrationen, Zeichnungen

3. In ES, with Kibana or culr, control the content of
   title__sort field for the related document.  It will be:

Renaissance : itektur, Plastik, Malerei, Illustrationen, Zeichnungen

4. Apply the patch, full reindex ES (--rebuild -r -d -a -b)

5. In ES, with Kibana or culr, control the content of
   title__sort field for the related document.  It should
   be now correct, i.e.:

Renaissance : Architektur, Plastik, Malerei, Illustrationen, Zeichnungen

Signed-off-by: Nick <nick@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 1330bd7c8d2ac256c93e38b95a6040c3fda3db92)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33569: Fix sort by relevance in catalog search
Fridolin Somers [Thu, 20 Apr 2023 06:58:48 +0000 (20:58 -1000)]
Bug 33569: Fix sort by relevance in catalog search

When ordering catalog search by relevance from advanced search, this is not visible in sort order combobox in staff interface.

This is because sort by relevance is a special case not using sort
order.
This patch add a new method C4::Context->default_catalog_sort_by to use
in both staff interface and OPAC.

Test plan :
1.0) On staff interface
1.1) Define system preferences defaultSortField = 'relevance' and defaultSortOrder = 'descending'
1.2) Perform a catalog search from main page on any term, ie 'perl'
=> You see in sort combobox 'relevance' selected (with a check icon)
1.3) Perform an advanced search on any term, ie 'perl', with sort by relevance
=> Without patch : you see in sort combobox 'relevance' not selected (no check icon)
=> With patch : you see in sort combobox 'relevance' selected (with a check icon)
2.0) On OPAC
2.1) Define system preferences OPACdefaultSortField = 'relevance' and OPACdefaultSortOrder = 'descending'
2.2) Perform a catalog search from main page on any term, ie 'perl'
=> You see in sort combobox 'relevance' selected
3.0) Run prove t/Context.t

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 3bb7ea2dab03863e827fbb21060ac98a16dcbf4f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33653: Use filter_by_active instead
Tomas Cohen Arazi [Tue, 9 May 2023 13:36:40 +0000 (10:36 -0300)]
Bug 33653: Use filter_by_active instead

This patch makes `filter_by_lates` use the `filter_by_active` method
instead of an ad-hoc query filter. It has the advantage that it
considers standing orders too.

No behavior change, tests should still pass.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7323a56823c0b23faddd964206c8fc58431b769d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33653: Never consider received orders as late
Jonathan Druart [Wed, 3 May 2023 13:18:13 +0000 (15:18 +0200)]
Bug 33653: Never consider received orders as late

We should not list received orders on the late orders page.

Test plan:
* Create a basket
* Create a normal order (not from a subscription, no standing order)
* Leave estimated delivery date empty
* Close the basket
* Create a new invoice and receive the order line
* Go to acq > late orders
* Verify the order is not in the list
* Set filter for 'To' date into the future, i.e. 01/01/2025
=> Without this patch the order shows up
=> With this patch applied the received order does not show up

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 64c4f115cde75c48f71cfd0d7bdb220f48212daf)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33576: (QA follow-up) Polish comment, typo
Marcel de Rooy [Mon, 24 Apr 2023 09:27:43 +0000 (09:27 +0000)]
Bug 33576: (QA follow-up) Polish comment, typo

No test plan.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f7b1c85f736dad33b9e67fce2ac2219716c2b704)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33576: Index records after import transaction is committed
Nick Clemens [Thu, 20 Apr 2023 16:02:09 +0000 (16:02 +0000)]
Bug 33576: Index records after import transaction is committed

This patch simply moves our indexing call after the transaction is committed so
that the job will exist in the DB when called.

To test:
 1 - Have Koha using Elasticsearch
 2 - Stage and import a file of records
 3 - View the job in Admin->Manage jobs
 4 - Note it is not finished
 5 - Check log: /var/log/koha/kohadev/es-indexer-output.log
 6 - Note: [WARN] No job found for id=###
 7 - Apply patch
 8 - Stage and import
 9 - Note no error in log
10 - Note successful completion of indexing job

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 9af2f3d12cef6a679763117a0c086468868c79f5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33277: (follow-up) Don't use regex, tidy
Nick Clemens [Tue, 9 May 2023 13:51:59 +0000 (13:51 +0000)]
Bug 33277: (follow-up) Don't use regex, tidy

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 09c92afd25f3fd58a159b0252dd73172e8fea1a3)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33277: Adjust source file for zebra mappings
Nick Clemens [Mon, 27 Mar 2023 08:53:24 +0000 (08:53 +0000)]
Bug 33277: Adjust source file for zebra mappings

The previous patches adjusted the mappings directly - moving this
change to the correct build file

Not needed for sign off, but QA can test that nothing changes when rebuilding the files:
xsltproc etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml > etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl

Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 154f12d67bbd4feb1de94af863cb00a8f20c4c6d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33277: (follow-up) Fix notdefined search for Zebra and ES
Nick Clemens [Wed, 22 Mar 2023 00:33:23 +0000 (00:33 +0000)]
Bug 33277: (follow-up) Fix notdefined search for Zebra and ES

Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c78b1a9a667513c6e30f812be79944d14d1f0c95)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33277: Search thesaurus for 'notspecified'
Nick Clemens [Tue, 21 Mar 2023 19:34:50 +0000 (19:34 +0000)]
Bug 33277: Search thesaurus for 'notspecified'

Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7911eb6666f9b1a9ea310e0d62a647a62101c48c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33277: Add comments and missing thesauri
Nick Clemens [Tue, 21 Mar 2023 19:28:10 +0000 (19:28 +0000)]
Bug 33277: Add comments and missing thesauri

Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5d0050d84dfbb9a7c02d8e9b166673e4a5cb875e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33277: Support custom thesaurus authority with no 040 specified
Nick Clemens [Tue, 21 Mar 2023 17:31:31 +0000 (17:31 +0000)]
Bug 33277: Support custom thesaurus authority with no 040 specified

Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit be0241ea69081d0cb78f8051a88f2e53b091be1d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33277: Do not search using thesaurus when linking non 6XX fields
Nick Clemens [Mon, 20 Mar 2023 15:44:17 +0000 (15:44 +0000)]
Bug 33277: Do not search using thesaurus when linking non 6XX fields

This patch sets thesaurus as undefined when linking any field except 6XX

This fixes the case where authrotiy records don't have the thesaurus defined

Consequently - this means that Koha does not support multiple thesaurus records
for authorities outside of subjects

i.e. Using the default linker, and having both an LCSH and Sears record for 'Shakespeare,William'
A 100 entry will find two results and the heading won't be linked. Previously we always linked to the LCSH

To test:
1 - Import the attached auths and biblio (from bug 33159 comment 24)
2 - Set system preferences:
    RequireChoosingExistingAuthority - don't require
    AutoCreateAuthorities - don't generate
    CatalogModuleRelink - Do
    LinkerKeepStale - Don't
    LinkerModule - default
    LinkerRelink - do
3 - Edit the imported bib
4 - Save it
5 - Headings are not linked except 600
6 - Apply patch
7 - Restart all
8 - Edit and save record
9 - Headings are successfully linked

Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d73f56736669afb522f58f5e2856a5fad54bfc64)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33613: Use prop() to evaluate checkbox
Lucas Gass [Tue, 25 Apr 2023 23:11:17 +0000 (23:11 +0000)]
Bug 33613: Use prop() to evaluate checkbox

To test:
1. Have an item with a replacement cost checked out to a patron
2. Set the ClaimReturnedChargeFee sys pref to "Ask if a lost fee should be charged"
3. Make a claim and check the box for charging.
4. Claim happens but no charge occurs.
5. Apply patch and try again.
6. A charge should now occur.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Hinemoea Viault <hinemoea.viault@inlibro.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 ff93ce714b37defe9575601daa25cf7d5e4ee58e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33412: Fix comparison when checking for overlay framework
Nick Clemens [Wed, 5 Apr 2023 12:27:27 +0000 (12:27 +0000)]
Bug 33412: Fix comparison when checking for overlay framework

TO test:
 1 - Cataloging -> Export catalog data
 2 - Export a record fom your catalog
 3 - Cataloging -> Stage record for import
 4 - Import the record, use Record matchign rule: KohaBiblio (999c)
 5 - Stage, view batch
 6 - Record should match the one that was exported
 7 - When replacing record use this framework, choose a different value than current framework of record
 8 - Import this batch
 9 - View and edit record - note framework did not change
10 - Apply patch
11 - Restart all
12 - Repeat 4-8
13 - View and edit record, confirm framework has changed
14 - 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 4ea2f11718ca7ec8d168cdd63edfe66a3ea5a9fb)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33611: Ensure dt_from_string always returns a new object
Nick Clemens [Thu, 27 Apr 2023 13:02:52 +0000 (13:02 +0000)]
Bug 33611: Ensure dt_from_string always returns a new object

This patch alters dt_from_string to pass a cloned object if called
on an existing date time object

This resolves an issue where a holds reserve date was being altered when
the default expiration date was set

To test:
1 - Set DefaultHoldExpiration to Set
2 - Set DefaultHoldExpirationPeriod to 365
3 - Set DefaultHoldExpirationunitOfTimeToDays
4 - Place a hold
5 - Note reserve date is 1 year in the future, same as expiration
6 - Apply patch
7 - Restart all
8 - Place another hold
9 - Note reserve date is set to today

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Hinemoea Viault <hinemoea.viault@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ca784d740d8e5758196c523dbeb205942de7729c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33611: Unit test
Nick Clemens [Thu, 27 Apr 2023 13:02:24 +0000 (13:02 +0000)]
Bug 33611: Unit test

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Hinemoea Viault <hinemoea.viault@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3551ef41a040c6da91e9b54dd7a030a1d6a6d266)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33591: Restore auto-select of checkboxes of src record when merging
Jonathan Druart [Wed, 3 May 2023 14:54:06 +0000 (16:54 +0200)]
Bug 33591: Restore auto-select of checkboxes of src record when merging

When merging bib records the first tab (the source record) should have
all the checkboxes checked 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 b61414697254dee5c2b3539c04cda8133a2b2f50)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33513: Remove whitespace in batch report lists
Didier Gautheron [Thu, 13 Apr 2023 06:03:40 +0000 (08:03 +0200)]
Bug 33513: Remove whitespace in batch report lists

Bug 32368 added whitespaces, remove them.

To test:
 1 - Create a report like:
    SELECT biblionumber FROM biblio
 2 - Run it
 3 - Try the various options from the 'Batch operations' button
 4 - The operations don't find the biblios
 5 - Create a report like:
    SELECT cardnumber FROM borrowers
 6 - Run it
 7 - Test the batch operations
 8 - They fail
 9 - Apply patch
10 - Run each report again and test batch operations
11 - They work!

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 0c1d7fe0fb7dca70cd3dd63a64c92803d35a4bb0)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33586: Fix sequence of fields for memberresultst in table configuration
Katrin Fischer [Fri, 21 Apr 2023 19:46:19 +0000 (19:46 +0000)]
Bug 33586: Fix sequence of fields for memberresultst in table configuration

The sequence of options actually matters, not the name.
Library and category were switched, this patch fixes it and
now it should all hide/show as expected:

* Go to administration > table configuration
* Hide library in memberresultst
* Go to patron search and search
* Verify that category was hidden instead
* Apply patch
* Verify now label and columns for library and category
  match with configuration.

Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.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 2ef95d91424d8c45228a1ffb30ed1388a086ca84)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 28315: Remove duplicate function definition
Philip Orr [Tue, 25 Apr 2023 10:34:09 +0000 (10:34 +0000)]
Bug 28315: Remove duplicate function definition

This patch removes the unnecessary second definition of the JS function PopupMARCFieldDoc from addbiblio.tt.
To test:
1. Apply the patch
2. Check that addbiblio.tt contains only one function definition for PopupMARCFieldDoc
3. Navigate to "Cataloging" -> "Add MARC record"
4. Check that after clicking on the question mark symbol next to any MARC field, the loc description of that MARC field is opened in a new tab

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a2b880e57bb1ccd4b8270ec8bfdcdc86e18a2e48)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 32232: Ignore DST when calculating patron age
David Cook [Mon, 17 Apr 2023 00:34:05 +0000 (00:34 +0000)]
Bug 32232: Ignore DST when calculating patron age

This change calculates patron age using the floating timezone, so that
datetimes missing midnight don't cause fatal errors in the comparison.

Test plan:
0. Apply patch
1. Change <timezone></timezone> in koha-conf.xml to include Canada/Eastern
2. koha-plack --restart kohadev
3. Create a patron, setting the date of birth to one of these three dates
- 1947-04-27
- 1948-04-25
- 1949-04-24
4. Save the patron
5. Patron detail page loads instead of producing fatal error

Signed-off-by: Marius Mandrescu <marius.mandrescu@inLibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5771e6f463c72e17d42478c9970df1c7fb2286f8)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33696: Fix doubled up home icon in budgets page
Tomas Cohen Arazi [Mon, 8 May 2023 12:34:56 +0000 (09:34 -0300)]
Bug 33696: Fix doubled up home icon in budgets page

To test:
1. Go to the Administration > Budgets page
=> FAIL: Breadcrumbs show two little house icons
2. Apply this patch
3. Reload page
=> SUCCESS: Only one icon
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b1f623218a3c4ebcde2a7d8ababfa3b507b833e7)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33093: (Bug 27546 follow-up) With ES searching within results does not work for...
Janusz Kaczmarek [Tue, 28 Feb 2023 18:18:05 +0000 (19:18 +0100)]
Bug 33093: (Bug 27546 follow-up) With ES searching within results does not work for 'Keyword' and 'Keyword as phrase'

The feature of searching within search results in librarian
interface has some problems with with elastic: 'Keyword' and
'Keyword as phrase' searches give no results.  This is because
elastic is unaware of the search field 'kw' and 'kw' is not
transformed nor removed for limits.

Test plan
=========
1. Have a Koha instance with reasonable number of biblio records
1. Set SearchEngine to Elasticsearch
3. In librarian interface, perform a search that would give
   you a list of results
4. With the new search box 'Search within results', having 'Keyword'
   and 'Keyword as phrase' active, try to perform a search within
   search results with a term that should give you some results
5. You should get no results
6. Apply the patch
7. Repeat steps 3 and 4
8. You should get expected results.  Note the difference between
   'Keyword' and 'Keyword as phrase' in results
9. Sign off

Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Nick <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit eb5cc8d708faf7debcee35ce387329373e0bc40e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33601: Use template wrapper for breadcrumbs: Tools, part 8
Owen Leonard [Mon, 24 Apr 2023 11:22:32 +0000 (11:22 +0000)]
Bug 33601: Use template wrapper for breadcrumbs: Tools, part 8

This patch updates several templates in the tools directory so that they
use the new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Tools ->
  - Tools home page
    - Log viewer
      - Search result
    - Uploads
      - Upload results
- Cataloging ->
  - Upload local cover image
    - Upload result
    - Test uploading an biblio-level image from the bibliographic detail
      page
    - Test uploading an item-level image from the bibliograhpic detail
      page's holdings table

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 2553dcef237877625643d8f1fd74bf1d8f30056d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33600: Use template wrapper for breadcrumbs: Tools, part 7
Owen Leonard [Mon, 24 Apr 2023 11:24:58 +0000 (11:24 +0000)]
Bug 33600: Use template wrapper for breadcrumbs: Tools, part 7

This patch updates several templates in the tools directory so that they
use the new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Tools ->
  - Task scheduler
- Cataloging ->
  - Stage MARC records for import (use a batch of MARC records which
    will match existing records)
    - View batch ->
      - View diff of records with a match
  - Stock rotation (must have StockRotation enabled)
    - New rota
    - Edit rota
    - Manage stages
    - Manage items

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit db488358fe8221414ab09d99846185317d77b7a0)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33643: Add page-section to 'scan index' page in staff interface
Katrin Fischer [Mon, 1 May 2023 13:26:55 +0000 (13:26 +0000)]
Bug 33643: Add page-section to 'scan index' page in staff interface

This adds the white background. As we do on other pages I have
chosen to include the h2 heading within the page-section.

To test:
* Go to advanced search in staff interface
* Activate 'More options'
* Check checkbox for scan indexes
* Switch to author (especially when using Elasticsearch)
* Search for C
* On the result list verify there is no white background/page section
* Apply patch
* Repeat test - background should be present now

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nicolas Giraud <nicolas.giraud@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fc9ca425c80d895168a6a8be48f94f16aeb34fce)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33069: Fix error in MARC download for OPAC lists
Katrin Fischer [Wed, 3 May 2023 21:28:30 +0000 (21:28 +0000)]
Bug 33069: Fix error in MARC download for OPAC lists

There was a code typo causing an error when you tried
to download a list in MARC format:

Not a CODE reference at /kohadevbox/koha/opac/opac-downloadshelf.pl line 93

To test:
* In the OPAC: create a new list, public or private, with some records
* Open the list
* Try to download the list as MARC
* Verify you get an error
* Apply patch
* Verify you now get the expected download file
* Sign off :)

Co-authored-by: Kévin AYRAULT <kevin.ayrault87@gmail.com>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Nasty error before the patch; nice, tasty MARC download after.
Signed-off-by: Hinemoea Viault <hinemoea.viault@inlibro.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 c1c3b496689057688be0d1788d1c74d61aca1bef)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33102: Display fields from biblioitems in OPAC/staff interface cart
Frédéric Demians [Wed, 1 Mar 2023 09:25:04 +0000 (10:25 +0100)]
Bug 33102: Display fields from biblioitems in OPAC/staff interface cart

The OPAC/PRO cart only displays biblio fields coming from 'biblio'
table. Fields from biblioitems table aren't displayed anymore.

TO TEST:

1. Populate a cart in OPAC/staff interface and display it.
2. You can see that Year column is empty (if you don't have copyright
   field). And other fields.
3. Apply the patch.
4. You can see more fields in cart simple/detailed view.

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Tested by having a record with:
- biblio.copyrightdate = NULL
- biblioitems.publicationyear = 2025
Without the patch, no year is shown in the cart. With the patch, 2025 is shown.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2056b5ecec2d1c861b64005451774dae1ff0f654)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33053: Handle invalid biblio_id more robustly
Tomas Cohen Arazi [Thu, 11 May 2023 19:54:26 +0000 (16:54 -0300)]
Bug 33053: Handle invalid biblio_id more robustly

This patch addresses the fact the invalid FK error might differ under
some circumstances. We could try to catch the exception adding another
case, but I think this pattern is cleaner and the authors didn't provide
a fix.

We can discuss it later, as this controller class has several things to
review.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33053: DBIC schema
Tomas Cohen Arazi [Wed, 10 May 2023 17:06:52 +0000 (14:06 -0300)]
Bug 33053: DBIC schema

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33053: DBRev 22.11.05.007
Tomas Cohen Arazi [Fri, 5 May 2023 17:57:37 +0000 (14:57 -0300)]
Bug 33053: DBRev 22.11.05.007

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 98ed8fe352f43a1971ccd4a034885577a843cdf3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33053: (QA follow-up) fix syntax error
Aleisha Amohia [Fri, 28 Apr 2023 04:08:13 +0000 (04:08 +0000)]
Bug 33053: (QA follow-up) fix syntax error

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ba88442f41ebfafb8fd925d4a5dbc4a32d49c3cd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33053: Remove default value for tables item_groups and recalls
Kyle Hall [Thu, 23 Feb 2023 13:31:46 +0000 (08:31 -0500)]
Bug 33053: Remove default value for tables item_groups and recalls

These default biblio_ids of 0 are harmless but incorrect. The default values should be removed.

Test Plan:
1) Apply this patch
2) prove t/db_dependent/Koha/Biblio.t
3) prove t/db_dependent/Koha/Recalls.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ec66ac97f065c63bc61b718e2dca204e03cae5f7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33637: Update tab ids for batch modification form
Nick Clemens [Fri, 28 Apr 2023 15:56:54 +0000 (15:56 +0000)]
Bug 33637: Update tab ids for batch modification form

This patch adjusts the ids in the submit function

To test:
1 - Browse to tools -> Batch patron modification
2 - Enter cardnumbers and submit
3 - No patrons
4 - Enter borrowernumbers and submit
5 - No patrons
6 - Apply patch
7 - Repeat
8 - Success, patrons are listed

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 dea17b85651104196c9f511fc9bc731c68e8a373)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33233: Don't allow disabled attribute to remain when using browser's back button
Lucas Gass [Tue, 11 Apr 2023 20:41:28 +0000 (20:41 +0000)]
Bug 33233: Don't allow disabled attribute to remain when using browser's back button

To test:
1. Go to OPAC advanced search and do a search using only one of the inputs.
2. Once the search is complete use the browser's back button to return to the advanced search.
3. Notice the unused inputs are disabled.
4. Apply patch and try again. Now the inputs should not be disabled.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3811bb4381e34db7da1fd4593560fef519c4fde4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33582: Use template wrapper for breadcrumbs: Tools, part 4
Owen Leonard [Mon, 24 Apr 2023 10:51:50 +0000 (10:51 +0000)]
Bug 33582: Use template wrapper for breadcrumbs: Tools, part 4

This patch updates several templates in the tools directory so that they
use the new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Tools ->
  - Notices and slips
    - New notice
    - Edit notice
    - Confirm deletion
  - Batch patron modification
  - Overdue notice/status triggers
- Cataloging ->
  - Manage staged records
    - Batch details
  - MARC modification templates
    - Edit actions for a template

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e4849e750b8e6cbfefa3e3f1177dbc6520e1d681)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33645: Make koha-foreach return 0 if it completes successfully
David Cook [Tue, 2 May 2023 00:16:30 +0000 (00:16 +0000)]
Bug 33645: Make koha-foreach return 0 if it completes successfully

This patch adds an "exit 0" to the end of koha-foreach, so that it
returns a successful exit code if it reaches the bottom of the script
without errors.

Test plan:
0) `koha-foreach echo`
1) `echo $?`
2) Note that the exit status is 1
3) Apply patch
4) `./debian/scripts/koha-foreach echo`
5) `echo $?`
6) Note that the exit status is 0

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 e8a187eb7422419592899ea12903f9ff29f96cfd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33615: Date picker icon not visible
Mason James [Thu, 27 Apr 2023 03:24:07 +0000 (15:24 +1200)]
Bug 33615: Date picker icon not visible

to test:

 - apply patch, build package

 - edit item, observe calendar icon is visible

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9ccc5ccce0bac6076badc5f8186d953e04fdcc6c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33631: Fix misaligned labels
Lucas Gass [Thu, 27 Apr 2023 21:08:35 +0000 (21:08 +0000)]
Bug 33631: Fix misaligned labels

If you look at the results_summary on either the results
or detail pages you will notice that the label and
content are slightly misaligned.

To test:
1. On staff results, detail page, or ISBD details notice
   that slight misaligmnet between label and content.
2. Apply patch, yarn_build, clear browser cache
3. Look again, alignment should be fixed

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1a86b2b1b731015aab9cfbad0fd8331d2ef9e2c9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33596: Merge result page is missing page-section
Owen Leonard [Mon, 24 Apr 2023 19:09:00 +0000 (19:09 +0000)]
Bug 33596: Merge result page is missing page-section

This patch adds a "page-section" container around the contents of the
page seen when you complete the process of merging catalog records.

The patch also adds the "merge was successful" message into the standard
message dialog.

Perform a catalog search which will return more than one record.

- Select two records in your search results and click "Edit" -> "Merge
  records."
- Complete the process of merging your selected records.
- On the last page you should see a "merge was successful" message
  styled as the standard information box.
- The "Report" section should be shown inside a "page-section" div.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
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 c2991bd6b0d233c240b9b5177a815ca53b1a08ef)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33196: Generalize pseudonymization system preference description
Katrin Fischer [Fri, 17 Mar 2023 22:42:47 +0000 (22:42 +0000)]
Bug 33196: Generalize pseudonymization system preference description

The Pseudonymization system preference description in
the staff interface is: "Disable/Enable pseudonymization
to comply with GDPR for personal information. Patrons and
transactions will be copied to a separate table for
statistics purpose."

GDPR is a European Union (and, at time of writing, UK) law;
it makes the system preference look irrelevant for
libraries outside this area. However, this is not correct:
pseudonymization may be useful for libraries anywhere.

This generalized the system preference description and
only uses GDPR as an example instead of the only purpose.

It also updates the fields listed to more closely reflect
the labels on the patron form.

To test:
* Search for "Pseudonymization" in the systme preferences
* Verify that the description of the system preference is
  very GDPR
* Apply patch
* Verify the system preference description is improved

https://bugs.koha-community.org/show_bug.cgi?id=33196
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 54cdae763365636e71a231432d5afff637796963)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 31405: Set focus for cursor to setSpec input when adding a new OAI set
Katrin Fischer [Sat, 4 Feb 2023 23:54:22 +0000 (23:54 +0000)]
Bug 31405: Set focus for cursor to setSpec input when adding a new OAI set

Makes sure the focus is in the first form field when adding
a new OAI set: setSpec

To test:
* Go to administration > OAI sets
* Add a new set, verify the focus is still in the search bar on top
* Apply patch
* Repeat and verify the focus is now in the first form field
* Save set
* Edit set and verify the focus is in the search field at the top

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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 5a5034792c5269ef11f2acddd3d6055886cded06)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 32990: Prevent deadlock in _update_batch_record_counts
Marcel de Rooy [Fri, 17 Feb 2023 08:33:41 +0000 (08:33 +0000)]
Bug 32990: Prevent deadlock in _update_batch_record_counts

Resolves:
C4::ImportBatch::_update_batch_record_counts(): DBI Exception: DBD::mysql::st execute failed: Deadlock found when trying to get lock; try restarting transaction at /usr/share/koha/C4/ImportBatch.pm line 392

See also bug 32558.

Test plan:
If you apply 32558 first, run multiple processes that stage a marc import.
Without this patch, you can trigger the deadlock.
With this patch, it works.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9a6d10dc312cd6fe5e33a72af6259ac9b05f6db7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 31410: Set focus for cursor to Server name when adding a new Z39.50/SRU server
Katrin Fischer [Sun, 5 Feb 2023 00:17:01 +0000 (00:17 +0000)]
Bug 31410: Set focus for cursor to Server name when adding a new Z39.50/SRU server

This makes sure that the focus is in the first form field when
adding a new Z39.50 or SRU server.

To test:
* Administration > Z39.50/SRU servers
* Add a new server for each
* Verify the focus is not in the form
* Apply patch
* Verify the focus is now in the first form field
* Edit an existing server
* Verify the focus is not in the form

Not having the focus when editing is to avoid accidental changes.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2504a282b5890168616c1a87206f8762c38a660d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 32931: Fix translatability issues on 'show agreement' view
Jonathan Druart [Wed, 19 Apr 2023 06:53:03 +0000 (08:53 +0200)]
Bug 32931: Fix translatability issues on 'show agreement' view

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 f214582bddeaaa5eb6d692e98408751370fb71bc)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 32931: Fix translatability issues on 'new agreement' form
Katrin Fischer [Sun, 16 Apr 2023 11:29:39 +0000 (11:29 +0000)]
Bug 32931: Fix translatability issues on 'new agreement' form

This fixes the "Yes" and "No" options and "License info" placeholder.

To get to the options:
1. Enable the ERMModule system preference
2. Go to E-resource management
3. Click "Agreements"
4. Click "New agreement"
   --> Field "Is perpetual", options are Yes and No
   --> At the bottom of the form "License info" with "License info"
       within the input field
5. Install (complete) language, verify those are not translated
6. Apply patch
7. Update po files
8. Verify strings exist for this file, translate if necessary
9. Re-install language
10. Verify strings are now translated

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 1278b9f4fdab6b5863b8147aa9e9dc7d08064798)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 30367: (follow-up) Same adjustment for gitlab
Nick Clemens [Wed, 3 May 2023 10:58:22 +0000 (10:58 +0000)]
Bug 30367: (follow-up) Same adjustment for gitlab

This adds the same update for gitlab code. I was unable to trigger the error,
however, I confirm searching for 'PayPal' returns a result after this patch
as well as before.

JD amended patch: fix indentation

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 88000fbccbcfe707ee3d8bf72f549c1ac11be3f3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 30367: Skip processing if we don't get releases
Nick Clemens [Tue, 2 May 2023 16:27:15 +0000 (16:27 +0000)]
Bug 30367: Skip processing if we don't get releases

Some repos don't have releases, and this seems to break things as get returns an empty
response. Calling from_json on this is the error

This simply skips the bad responses to avoid the error:

To test:
1. Have this on your koha-conf.xml file:

 <plugin_repos>
    <repo>
        <name>ByWater Solutions</name>
        <org_name>bywatersolutions</org_name>
        <service>github</service>
    </repo>
    <repo>
        <name>Theke Solutions</name>
        <org_name>thekesolutions</org_name>
        <service>gitlab</service>
    </repo>
    <repo>
        <name>PTFS Europe</name>
        <org_name>ptfs-europe</org_name>
        <service>github</service>
    </repo>
 </plugin_repos>

2. Restart all services:
   $ restart_all
3. Search for the term 'barclaycard'

The search will give an error:

malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "(end of string)") at /usr/share/perl5/JSON.pm line 190
4. Apply patch
5. Repeat
6. No error

Note: The barclaycard plugin won't install even though it is returned as of this note - the plugin needs an update I believe, I don't think it's a Koha issue
Signed-off-by: David Nind <david@davidnind.com>
JD amended patch: fix indentation

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b12aa543e2e2fe1c46eca4a0e07daa369b033793)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33626: Remove invalid params
Nick Clemens [Thu, 27 Apr 2023 11:23:03 +0000 (11:23 +0000)]
Bug 33626: Remove invalid params

This patch reformats the params passed to scroll_helper as defined here:
https://metacpan.org/pod/Search::Elasticsearch::Client::7_0::Scroll

To test:
1 - perl misc/maintenance/compare_es_to_db.pl
2 - It dies:
[Param] ** Unknown param (scroll_in_qs) in (search) request. , called from sub Search::Elasticsearch::Client::7_0::Direct::scroll_helper at misc/maintenance/compare_es_to_db.pl line 55.
3 - Apply patch
4 - Repeat
5 - It succeeds!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit daa92a937193321c49c97cca5bad8809d7889d21)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33197: DBRev 22.11.05.006
Tomas Cohen Arazi [Fri, 5 May 2023 13:07:10 +0000 (10:07 -0300)]
Bug 33197: DBRev 22.11.05.006

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e38df2d6f7fd363193badff2380ebee63a702193)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33197: Rename GDPR_Policy system preference
Katrin Fischer [Fri, 17 Mar 2023 22:06:40 +0000 (22:06 +0000)]
Bug 33197: Rename GDPR_Policy system preference

GDPR is a European Union (and, at time of writing, UK) law.
The GDPR_Policy system preference is about a patron
giving consent to their personal data being processed in
line with the library's privacy policy.

The name of the preference is vague: there could be
many policies implemented by libraries to comply with
GDPR. It also makes the preference look irrelevant for
libraries outside the areas where GDPR applies, while
it may be useful for libraries anywhere.

This renames GDPR_Policy to PrivacyPolicyConsent and
adjusts the system preference descriptions.

To test:
* Apply the patch
* Run database update
* Search for GDPR_Policy in the system preference
  - you should not find anything.
* Search for DataPrivacyConsent in the system preferences
  - you should find it and be able to activate it
* Verify the feature works as expected
  - If the preference is set to "enforced", you will be
    asked to give consent to the data privacy agreement
    in the OPAC when you log in
* Verify the page is now phrased neutrally using 'privacy policy'

Bonus: Consent date is now formatted according to DateFormat
       system preference.
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 bd75309933a92341a073d06e14bac1c6a6ceb666)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 32412: Do not reload COCE image for biblio
Jonathan Druart [Wed, 3 May 2023 09:16:14 +0000 (11:16 +0200)]
Bug 32412: Do not reload COCE image for biblio

We do not want to fetch again the new image for the biblio record. We
only want to fetch those for the shelf browser.

Note that the third parameter 'covernewwindow' was not used.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.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 13dccaaf055b49473c1cc4a6ac34c0a23eb182a0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 32412: Empty coce container before appending image
Lucas Gass [Tue, 4 Apr 2023 21:50:39 +0000 (21:50 +0000)]
Bug 32412: Empty coce container before appending image

To test:
1. Apply patch and clear browser cache
2. Turn on Coce for the OPAC.
3. OPACShelfBrowser must be on
4. Find a record that returns a cover image and open it's detail page.
5. Use the next/previous navigation links in the OPACShelfBrowser
6. Notice that no extra image is being added to the biblio-cover-slider.
7. Make sure that Coce images still load correctly in on the OPAC detail page, OPAC results page, and in the shelf browser.

Signed-off-by: Andrew Auld <andrew.auld@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 fec0bd18ae1e982232bf5b5d7d000c2bc6984589)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33551: (QA follow-up) Fix TT filters
Katrin Fischer [Wed, 3 May 2023 20:51:49 +0000 (20:51 +0000)]
Bug 33551: (QA follow-up) Fix TT filters

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 74497dbb5a9db2cf9c89a713ffe457370eefa7cf)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33551: Remove span from restriction-types.inc
Jonathan Druart [Wed, 3 May 2023 07:09:25 +0000 (09:09 +0200)]
Bug 33551: Remove span from restriction-types.inc

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 63f2d76457c75de103f8257761ef5287d78796d5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33419: (QA follow-up) Remove changes to basic_workflow.t
Katrin Fischer [Tue, 2 May 2023 22:48:09 +0000 (22:48 +0000)]
Bug 33419: (QA follow-up) Remove changes to basic_workflow.t

These are not needed: 942 and 200 have no subfields for
homebranch and holdingbranch.

The tests pass without these changes.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 81f2ed7e39795ef2e2e2a7cd37af587b3fc72481)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33419: Make home library and current library mandatory by default
Laura Escamilla [Tue, 2 May 2023 18:35:23 +0000 (18:35 +0000)]
Bug 33419: Make home library and current library mandatory by default

Items without a home and current library can cause errors in Koha.
On the bibliographic page, items appear without the "edit" drop-down
or the selection check box. On a bulk delete page, items without
a home library create a red error that says "Cannot delete".

Making the home and current library values mandatory
helps avoid these issues.

Test plan (using koha-testing-docker (KTD)):
1. Reset KTD so that the web installer is used to setup Koha.[1]
2. Setup Koha using the web installer
   -> When setting up the default settings, don't add any of the
      optional data.
3. Once setup and logged in, check the two frameworks (default and ACQ)
    and note that $952$a and $952$b are not mandatory.
4. Apply the patch.
5. Repeat steps 1-2.
6. Once setup and logged in, check the two frameworks (default and ACQ)
   and note that $952$a and $952$b are now mandatory.

[1] How to access the web installer to setup Koha in KTD:
1. Access the database server:
   mysql -uroot -ppassword -hkoha-db-1
2. Drop the koha_kohadev database: drop database koha_kohadev;
3. Create the database: create database koha_kohadev;
4. Add privileges (for a real installation this would be limited):
   grant all on koha_kohadev.* to koha_kohadev;
5. Restart everything (there may be some errors listed):
   flush_memcached and then restart_all
6. Access the web installer: go to 127.0.0.1:8081
7. Use the database user name and password:
   get from /etc/koha/sites/kohadev/koha-conf.xml
   (default: koha_kohadev, password)
8. Continue through the installation process.

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 a6caabfd2b0e2d5ad7c0b55a6273d62ea30807cb)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33329: Correctly handle UNIMARC encoding for biblios
Tomas Cohen Arazi [Fri, 14 Apr 2023 20:21:15 +0000 (17:21 -0300)]
Bug 33329: Correctly handle UNIMARC encoding for biblios

This patch introduces the same treatment we had for bug 32336, this time
for Koha::Objects::Record::Collections.

To test:
1. Apply the regression tests patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/biblios.t
=> FAIL: Tests fail! Encoding is wrong for UNIMARC!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

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 5121f774604a533560c9a8e08ed357e30a5d1ddd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33329: Regression tests
Tomas Cohen Arazi [Thu, 23 Mar 2023 23:46:44 +0000 (20:46 -0300)]
Bug 33329: Regression tests

This patch introduces tests for the bug highlighted on bug 32336, but in
the context of lists of records.

To reproduce:
1. Run:
   $ prove t/db_dependent/api/v1/biblios.t
=> SUCCESS: Tests pass!
2. Apply this patch
3. Repeat 1
=> FAIL: Test fail, encoding is bad!

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 81fc1ebe71dd22eb9ce434ebc36234fcee26644b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 32701: Fix I18N JavaScript libraries on self checkout help page
Katrin Fischer [Sun, 23 Apr 2023 21:16:52 +0000 (21:16 +0000)]
Bug 32701: Fix I18N JavaScript libraries on self checkout help page

The help page was missing the fixes from bug 28488. The missing
libraries are causing a JavaScript error on the page and likely
other issues.

To test:
* Make sure WebBasedSelfCheck is activated and configured
  Note: In ktd you don't need to configure anything, it's already set up.
* In the OPAC, go to:
  /cgi-bin/koha/sco/sco-main.pl
* Click on the link to the help in the top right corner
* Verify you see the error in the console:
  jQuery.Deferred exception: __ is not defined
* Apply patch
* Restart things
* Reload the page
* Veriy the errors are gone

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 289f0e80517713814fb0752b932fe612ba2d0bc4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33649: Fix use of cronlogaction
Magnus Enger [Wed, 3 May 2023 06:51:14 +0000 (08:51 +0200)]
Bug 33649: Fix use of cronlogaction

C4::Log::cronlogaction() takes a hashref as argument, with "info"
and possibly "action" as keys. But there are a couple of places
where it is called with just a string as argument, and that does
not work. Both places need lock_exec to fail to trigger the error.
I have seen this on a production server, but not been able to
reproduce in ktd.

To test:
- Run this on the Koha repo: grep -r "cronlogaction(" *
- Verify that fines.pl and process_message_queue.pl are the only
  scripts that call cronlogaction without a hashref as argument,
  but do it like this: cronlogaction( $message );
- Apply this patch
- Run the grep again and verify that all calls to cronlogaction
  now take a hashref as argument

Signed-off-by: Nick Clemens <nick@bywatersolutions.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 48a2952032bafde7041e7bf10d861e7efeff54fc)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33470: Don't calculate overridden hold limits
Nick Clemens [Sun, 9 Apr 2023 18:25:41 +0000 (18:25 +0000)]
Bug 33470: Don't calculate overridden hold limits

This patch can largely be checked in the code to ensure it makes sense, it
moves a conditional up one level for the two different checks that could prevent holds

To test:
1 - Attempt to place a hold via the REST API with an invalid pickup location
    Set pickup location as no in branches to make this easy
2 - Confirm you get an error
3 - Attempt again with header (bug 27760):
    x-koha-override: any
4 - Hold is placed
5 - Repeat 1-4 above but with an item that cannot be held
6 - Apply patch
7 - Repeat 1-4 above
8 - Results should be the same

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e3c31212df4d1917004a20998f47777ef0aea35d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 32921: Honor SelfCheckTimeout when modal is open
Lucas Gass [Wed, 8 Feb 2023 23:28:59 +0000 (23:28 +0000)]
Bug 32921: Honor SelfCheckTimeout when modal is open

To test:
1. Set the 'SelfCheckTimeout' system preference to something low for testing.
2. Make sure 'SelfCheckReceiptPrompt' is set to 'Show'.
3. Log in to SCO and press finish but leave the modal open.
4. Wait until the 'SelfCheckTimeout' time has expired, nothing happens.
5. Apply patch and try again. You should be logged out when SelfCheckTimeout expires.

Signed-off-by: Marius Mandrescu <marius.mandrescu@inLibro.com>
JD amended patch - fix indentation

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e074ffa6be15c97e6724041b12d930ed70855f1d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 28267: Simplify things
Jonathan Druart [Thu, 4 May 2023 07:05:17 +0000 (09:05 +0200)]
Bug 28267: Simplify things

We don't need:
* a separate Koha::Installer module when we already have
C4::Installer
* the tests as they are actually modifying the DB structure
without rolling back
* An unecessary complicated subroutine, just make is simple

WNC amended patch: Remove change to Koha.pm

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f394bf61cf7e60058afd9856f7ae8dda8afb385b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 28267: Add warnings for database row formats
David Cook [Wed, 18 Jan 2023 03:20:29 +0000 (03:20 +0000)]
Bug 28267: Add warnings for database row formats

This patch adds a warning on about.pl regarding database row formats
other than "DYNAMIC". It points to the Koha community wiki for more
information on how to resolve the problem.

This patch also stops the installer if there are any database tables
with a row format other than "DYNAMIC". It points to the Koha community
wiki for more information on how to resolve the problem.

Test plan:
0a. Apply the patch
0b. koha-plack --restart kohadev
1a. koha-mysql kohadev
1b. ALTER TABLE tags ROW_FORMAT=COMPACT;
2. Go to http://localhost:8081/cgi-bin/koha/about.pl
3. Note that there is a warning about database row formats
4a. koha-mysql kohadev
4b. ALTER TABLE tags ROW_FORMAT=DYNAMIC;
5. Go to http://localhost:8081/cgi-bin/koha/about.pl
6. Note that there is no warning about database row formats

7a. Manually change the version in Koha.pm to a higher version
7b. koha-plack --restart kohadev
8a. koha-mysql kohadev
8b. ALTER TABLE tags ROW_FORMAT=COMPACT;
9. Go to http://localhost:8081/
10. Log into the web installer and click through until you reach
a warning telling you that you have database row formats other
than 'DYNAMIC'
11. Note that you can't progress with the installer until
this problem is resolved
12a. koha-mysql kohadev
12b. ALTER TABLE tags ROW_FORMAT=DYNAMIC;
13. Refresh the page or redo the web installer process
14. Note that you're no longer blocked from running the installer
due to database row format
15. Undo your change to Koha.pm
16. Profit

Note: Due to bug 32665 you'll see an unrelated warning on
step 3

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b76fb9cf466dd4cc4eb4d382c4bfb9fa78a1fce6)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33262: DBRev 22.11.05.005
Tomas Cohen Arazi [Fri, 5 May 2023 12:32:48 +0000 (09:32 -0300)]
Bug 33262: DBRev 22.11.05.005

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0587d3238692429b704f4e79d62635b6aa86f29a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33262: DBIC schema
Tomas Cohen Arazi [Fri, 5 May 2023 12:31:58 +0000 (09:31 -0300)]
Bug 33262: DBIC schema

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7a779bf9e0d2c2732ad6df050f1f64b4bb69386a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33262: Add new field to REST API route for orders
Katrin Fischer [Thu, 4 May 2023 15:06:45 +0000 (15:06 +0000)]
Bug 33262: Add new field to REST API route for orders

Without this patch the API driven list of pending orders
on the order receive page was broken.

With the patch, all should be well now.

prove -v t/db_dependent/api/v1/acquisitions_orders.t

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 4ab67c196debf387f2053c3916f4cdac76901db3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33262: Unit tests
Katrin Fischer [Thu, 4 May 2023 13:08:54 +0000 (13:08 +0000)]
Bug 33262: Unit tests

prove t/db_dependent/Biblio.t

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 177b53d79492f7636c5e9e37a6e1f3c3f8fa8707)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33262: Store the biblionumber of a deleted record in the order line
Katrin Fischer [Thu, 4 May 2023 12:15:36 +0000 (12:15 +0000)]
Bug 33262: Store the biblionumber of a deleted record in the order line

When a bibliographic record is deleted and linked to an order
in the acquisition module, the biblionumber in the order line is
currently deleted as well. This makes it impossible to tell what
was ordered in the first place. This is a big issue for libraries
that need to be able to track how money was spent over long periods
of time.

With this patch the biblionumber of the deleted record will be moved
to a new column deleted_biblionumber in the order line, keeping the FK
on biblionumber.

To test:
* Apply patch, run dataase update
* Create a order/basket in the acquisitions module
* Order several things, you can use existing records from the sample data
* Make sure you order one of the records at least twice
* Take a look at the aqorders table in your database, using a report:

  SELECT biblionumber, deleted_biblionumber, ordernumber from aqorders;

* From the catalog, delete the items on the records and then the records

  Note: There is a warning about attached orders warning about consequences
  for acquisitions. I have chosen to keep it at this point in time, as
  there are still visible side effects of deleting the record, like bug 10758.

* Re-run the report and compare results to the first run. deleted_biblionumber
  should now be filled with the biblionumber of the deleted record.
  biblionumber should be NULL/empty.

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 c8faeac4cd4cfdeab04c25bedb534d3823bbe83c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33262: Add deleted_biblionumber column to aqorders table
Katrin Fischer [Thu, 4 May 2023 13:23:31 +0000 (13:23 +0000)]
Bug 33262: Add deleted_biblionumber column to aqorders table

This adds a new column deleted_biblionumber to the aqorders table.
This will allow us to store the biblionumber of a deleted record,
so we will still be able to tell what has been ordered once the
record is deleted.

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 0cf7687e833986d95ce9fa49bdb33252944fbbea)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 22440: (follow-up) Nothing is forever
Tomas Cohen Arazi [Fri, 5 May 2023 18:53:31 +0000 (15:53 -0300)]
Bug 22440: (follow-up) Nothing is forever

This patch picks (yet) another class for testing purposes. The class
needs to not implement to_api() and to_api_mapping().

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b22f017a1684948e89b033966585468a16ad8341)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 22440: (follow-up) Fix existing tests
Tomas Cohen Arazi [Fri, 5 May 2023 19:22:20 +0000 (16:22 -0300)]
Bug 22440: (follow-up) Fix existing tests

As we are introducing a FK for illrequests.biblio_id, TestBuilder is
generating a linked biblio, and so tests expecting undef are failing.

This fixes it by explicitly setting biblio_id => undef on creating the
request.

The patch also cleans the area a bit, removing a redundant and fragile
test as well.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5e0c6b397d169e6470f85619844f8682c62e5b07)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 22440: DBRev 22.11.05.004
Tomas Cohen Arazi [Fri, 5 May 2023 12:12:47 +0000 (09:12 -0300)]
Bug 22440: DBRev 22.11.05.004

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 95520f0fb5459244ca10462e2c4c4215311cfea2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 22440: DBIC schema
Tomas Cohen Arazi [Fri, 5 May 2023 12:10:31 +0000 (09:10 -0300)]
Bug 22440: DBIC schema

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