]> git.koha-community.org Git - koha.git/log
koha.git
2 years agoBug 29144: DBRev 22.06.00.045
Tomas Cohen Arazi [Fri, 16 Sep 2022 13:25:07 +0000 (10:25 -0300)]
Bug 29144: DBRev 22.06.00.045

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29144: (QA follow-up) Make update idempotent
Tomas Cohen Arazi [Fri, 16 Sep 2022 13:21:10 +0000 (10:21 -0300)]
Bug 29144: (QA follow-up) Make update idempotent

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29144: DBIC schema
Tomas Cohen Arazi [Fri, 16 Sep 2022 13:10:49 +0000 (10:10 -0300)]
Bug 29144: DBIC schema

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29144: (follow-up) Fix rebase issue related to bug 31313
Marcel de Rooy [Tue, 16 Aug 2022 14:19:46 +0000 (14:19 +0000)]
Bug 29144: (follow-up) Fix rebase issue related to bug 31313

Fixing display of holding branch name.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29144: Copy and remove branches.opac_info (dbrev)
Marcel de Rooy [Thu, 4 Aug 2022 09:33:13 +0000 (09:33 +0000)]
Bug 29144: Copy and remove branches.opac_info (dbrev)

Test plan:
Run dbrev.
Check api URL: /api/v1/public/libraries (with/without suffix /[branch_code].

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29144: Remove opac_info from a few tests
Marcel de Rooy [Thu, 4 Aug 2022 08:16:47 +0000 (08:16 +0000)]
Bug 29144: Remove opac_info from a few tests

Test plan:
Run t/db_dependent/Circulation/GetHardDueDate.t
Run t/db_dependent/Circulation/OfflineOperation.t
Run t/db_dependent/RotatingCollections.t
Run t/db_dependent/api/v1/libraries.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29144: Adjust libraries form
Marcel de Rooy [Wed, 3 Aug 2022 14:59:49 +0000 (14:59 +0000)]
Bug 29144: Adjust libraries form

Test plan:
[1] Go to Administration / libraries.
[2] Check list view.
[3] Check view on individual library with/without opac info.
[4] Edit individual library with/without opac info.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29144: Show html opac_info on opac-detail page
Marcel de Rooy [Wed, 3 Aug 2022 12:13:20 +0000 (12:13 +0000)]
Bug 29144: Show html opac_info on opac-detail page

Note: This patch disables the API call (which is not really needed),
and still needs attention in a following patch.

Test plan:
Add opac_info for two libraries and a branchurl for one of the two.
Select a biblio with an item having these two libraries as either
home or holding branch.
Toggle OpacLocationBranchToDisplay and check items table on opac
detail. Click on the library name.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29144: Use ->opac_info in opac-library template
Marcel de Rooy [Thu, 4 Aug 2022 06:02:56 +0000 (06:02 +0000)]
Bug 29144: Use ->opac_info in opac-library template

The opac_info call uses find_best_match which does not result in
the All libaries plus specific library response of
AdditionalContents.get.

Test plan:
Revisit individual library page on OPAC.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29144: Add $contents->find_best_match, $library->opac_info
Marcel de Rooy [Tue, 2 Aug 2022 11:54:59 +0000 (11:54 +0000)]
Bug 29144: Add $contents->find_best_match, $library->opac_info

Test plan:
Run t/db_dependent/Koha/AdditionalContents.t
Run t/db_dependent/Koha/Library.t

Note: You may need to set ListOwnershipUponPatronDeletion to
delete to fix a pending issue in patron->delete with lists.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29144: (follow-up) Terminology: rename to OpacLibraryInfo
Marcel de Rooy [Tue, 2 Aug 2022 11:57:18 +0000 (11:57 +0000)]
Bug 29144: (follow-up) Terminology: rename to OpacLibraryInfo

git grep -l OpacBranchInfo | xargs sed -i -e's/OpacBranchInfo/OpacLibraryInfo/g'

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29144: Add OpacBranchInfo as HTML option, show it on opac
Marcel de Rooy [Mon, 1 Aug 2022 13:58:50 +0000 (13:58 +0000)]
Bug 29144: Add OpacBranchInfo as HTML option, show it on opac

Test plan:
Add a few OpacBranchInfo for libraries.
Verify that opac-library shows the correct info per library.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29144: First sort the HTML options
Marcel de Rooy [Mon, 1 Aug 2022 12:30:30 +0000 (12:30 +0000)]
Bug 29144: First sort the HTML options

Test plan:
Check result while adding a new HTML customization entry.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31513: (QA follow-up) Keep price formatting on non-editable text fields
Joonas Kylmälä [Thu, 15 Sep 2022 18:06:53 +0000 (18:06 +0000)]
Bug 31513: (QA follow-up) Keep price formatting on non-editable text fields

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31513: Remove price formatting form data- attributes
Katrin Fischer [Sun, 11 Sep 2022 14:50:56 +0000 (16:50 +0200)]
Bug 31513: Remove price formatting form data- attributes

We cannot use data formatted with a decimal comma for
calculations. So we need to make sure that the data- attributes
passed to the modals are in 'database format' with decimal .

This will fix the NaN errors on the forms, but might also
negatively effect formatting in some spots.
Formatting should be fixed separately as this is for sure the
right first step, but we need to put in more work for displays.

To test:
* Set CurrencyFormat system preference to FR
* Go to any patron account > accounting tab
* Create a credit
* On Transactions tab: Payout amount at bottom = Verify NaN in input
* On Transactions tab: Issue payout on the credit line = Verify NaN in input
* Create a manual debit and pay it
* On Transactions tab: Issue refund = Verify NaN in input
* Apply patch
* Repeat test plan
* Now all input fields should be set with the correct amounts

https://bugs.koha-community.org/show_bug.cgi?id=31486

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 26247: (follow-up) Fix permissions
Tomas Cohen Arazi [Wed, 14 Sep 2022 00:03:20 +0000 (21:03 -0300)]
Bug 26247: (follow-up) Fix permissions

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 26247: DBRev 22.06.00.044
Tomas Cohen Arazi [Tue, 13 Sep 2022 16:33:17 +0000 (13:33 -0300)]
Bug 26247: DBRev 22.06.00.044

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 20058: DBRev 22.06.00.043
Tomas Cohen Arazi [Mon, 12 Sep 2022 20:45:52 +0000 (17:45 -0300)]
Bug 20058: DBRev 22.06.00.043

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31236: Add ability to send custom item fields via SIP using Template Toolkit
Kyle Hall [Mon, 25 Jul 2022 14:56:08 +0000 (10:56 -0400)]
Bug 31236: Add ability to send custom item fields via SIP using Template Toolkit

Koha has been able to send arbitrary item fields via the "item_field" parameter in the config. We have partners that need the ability to created custom item fields from templates, as the item_fields feature cannot accomplish what they need. We need to add a templated custom field feature for items, similar to what we have for patrons.

Test Plan:
1) Apply this patch
2) Choose a SIP login to use, edit that account and add the following
   *inside* the login section:
   <custom_item_field field="IN" template="[% item.itemnumber %]" />
3) Restart SIP
4) Run an item information query
5) Note the itemnumber is sent in the IN field!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: fixed tests count

2 years agoBug 20058: (QA follow-up) Simplify test code
Nick Clemens [Fri, 2 Sep 2022 07:00:15 +0000 (07:00 +0000)]
Bug 20058: (QA follow-up) Simplify test code

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 20058: (QA follow-up) Add exec flag to install file
Nick Clemens [Fri, 2 Sep 2022 06:54:00 +0000 (06:54 +0000)]
Bug 20058: (QA follow-up) Add exec flag to install file

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 20058: Add tests
David Gustafsson [Mon, 27 Sep 2021 14:48:25 +0000 (16:48 +0200)]
Bug 20058: Add tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 20058: Add option to send permanent_location as AQ in SIP response
Stefan Berndtsson [Mon, 15 Jan 2018 13:20:06 +0000 (14:20 +0100)]
Bug 20058: Add option to send permanent_location as AQ in SIP response

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28634: Fix notice borrowernumber
Andrew Isherwood [Mon, 28 Jun 2021 10:38:00 +0000 (11:38 +0100)]
Bug 28634: Fix notice borrowernumber

This commit fixes the bug described in this bug.

- When a partner is selected, pass their borrowernumber rather than email to the
receiving script
- Iterate all selected partners, send a notice to each, using the
recipient's borrowernumber in the notice, the recipient's email is
derived from their patron object

TEST PLAN:
1. DO NOT apply the patch.
2. Follow the following setup:

*** Setup start ***
- Create a report using the following SQL in order to verify that
notices are being generated:
SELECT borrowernumber, subject, content, message_transport_type,
to_address, from_address FROM message_queue WHERE letter_code LIKE
'ILL%' ORDER BY message_id DESC

- Create two "partners". These are patrons that belong to a
patron category that has a code that matches the <partner_code> value in
your koha-conf.xml (default is ILLLIBS). Patrons in this category must
have a primary email defined. Patrons defined in this way are offered as
request partners within the ILL interface.

- Go to "Koha administration", search for "ILLModule" syspref, ensure it
is set to "Enable"
- Go to "Koha administration", search for "IllLog" syspref, ensure it is
set to "Log"

BRANCH CONFIG
- Go to "Koha administration" > "Libraries"
- Choose a library and "Edit" it
- Ensure the "Email" field for the library is populated

SENDING REQUEST TO PARTNERS
- Go to the "Manage ILL request" screen for a request, create a request
if one does not exist
- Choose "Place request with partners"
- Select both partners that were defined earlier, then click
"Send email"
- Run the report created earlier
=> TEST: Observe that a notice was created and the borrowernumber is
that of the request creator, not the recipient
*** Setup end ***

3. Apply the patch
a. Go to the "Manage ILL request" screen for a request, create a request
if one does not exist
b. Choose "Place request with partners"
c. Select both partners that were defined earlier, then click
"Send email"
d. Run the report created earlier
=> TEST: Observe that once notice per partner is created, the
borrowernumber column for each notice contains the borrower number of
the recipient, not the request creator

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 26247: (QA follow-up) Merge DB Updates
Martin Renvoize [Mon, 12 Sep 2022 16:09:24 +0000 (17:09 +0100)]
Bug 26247: (QA follow-up) Merge DB Updates

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 26247: Adding 2 Sysprefs for Search Terms
Florian Bontemps [Tue, 28 Jun 2022 13:42:46 +0000 (13:42 +0000)]
Bug 26247: Adding 2 Sysprefs for Search Terms

This patch adds two system preferences options : 'RetainCatalogSearchTerms' and 'RetainPatronsSearchTerms'. If enabled, search terms will be retained between searches made from, respectively, the Search Catalog header and the Checkout or Search Patrons headers. If disabled, the searchbars will clear out between page loads.

Attention, this is an alternate solution from the previous patches, ONLY apply this patch when testing and not the previous ones.Changed the syspref wording as well.

To test:
1 - From the staff client, search some terms using the Check out header search bar.
2 - Confirm search terms are retained.
3 - Do Step 1-2 twice again, this time using the Search patrons and Search the catalog.
4 - Apply patch (again, only this one), update database.
5 - In the system preferences, look for RetainCatalogSearchTerms and set it to 'don't retain'.
6 - Use the checkout head search bar again, confirm that search terms aren't retained after page load.
7 - Do Step 5-6 once again, this time with the RetainPatronsSearchTerms and the Search Patrons and Search the catalog headers.
8 - Search boxes should be cleared.

Thanks-to: Fridolin Somers and Nick Clemens for the bases I built on.
Signed-off-by: Florian Bontemps <florian.bontemps@biblibre.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29409: Check for data that violates a constraint to avoid update problems
Nick Clemens [Wed, 3 Nov 2021 16:53:47 +0000 (16:53 +0000)]
Bug 29409: Check for data that violates a constraint to avoid update problems

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29409: Check for existence of constraint before deletion
Nick Clemens [Wed, 3 Nov 2021 16:51:09 +0000 (16:51 +0000)]
Bug 29409: Check for existence of constraint before deletion

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30921: (QA follow-up) Remove unnecessary if
Joonas Kylmälä [Mon, 12 Sep 2022 16:24:31 +0000 (16:24 +0000)]
Bug 30921: (QA follow-up) Remove unnecessary if

The statement is already inside an if block with the same condition.

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30921: Replace C4::XSLT::transformMARCXML4XSLT with RecordProcessor
Martin Renvoize [Tue, 7 Jun 2022 14:24:23 +0000 (15:24 +0100)]
Bug 30921: Replace C4::XSLT::transformMARCXML4XSLT with RecordProcessor

This patch removes the last remaining uses of transformMARCXML4XSLT and
replaced them with the equivilent RecordProcessor usage.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31516: Add error message for viewing enrollments for a non-existent club
Joonas Kylmälä [Fri, 2 Sep 2022 18:51:25 +0000 (18:51 +0000)]
Bug 31516: Add error message for viewing enrollments for a non-existent club

To test:
 1) Go to non-existent club's enrollment page, e.g.
    http://localhost:8081/cgi-bin/koha/clubs/club-enrollments.pl?id=1010101001000
 2) Notice the not fully filled header text and empty table
 3) Apply patch and revisit the page to see the proper error message given

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31486: Redirect to proper page after message deletion
Lucas Gass [Mon, 29 Aug 2022 21:48:01 +0000 (21:48 +0000)]
Bug 31486: Redirect to proper page after message deletion

To test:
1. Go to a patron account and create some messages
2. Try deleting some from both the patron details page and the patron checkout page.
3. Notice that is you are on the patron checkout page and delete a message you are then redirected to the patron details page.
4. Apply patch
5. Try deleting messages from both pages and confirm you are redirected back to that same page and the message is properly deleted.

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31535: Fix warning - uninitialized value for location
Marcel de Rooy [Fri, 9 Sep 2022 07:35:53 +0000 (07:35 +0000)]
Bug 31535: Fix warning - uninitialized value for location

In Koha/Item.pm line 169 (line number has been changed)

Test plan:
You need location to be NULL when storing.
Otherwise follow this reasoning:
  What happens when location is undefined? It is autovivified to
  empty string in the string compare (ne), so not equal to CART
  and PROC. The subcondition is true before and after this patch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31535: Fix warning - uninitialized value in string ne (MARCdetail.pl)
Marcel de Rooy [Thu, 8 Sep 2022 14:13:36 +0000 (14:13 +0000)]
Bug 31535: Fix warning - uninitialized value in string ne (MARCdetail.pl)

Spotted at line 183 (older Koha version).

Test plan:
You need a NULL in the tab column of marc_subfield_structure. Hit this
page and check the logs.
This might convince you easier:
  my $tabloop=0; my $x; print "Empty string - True\n" if ( $x // q{} ) ne $tabloop;
  print "Zero - True\n" if ( $x // '0' ) ne $tabloop;
You should only see: Empty string - True proving that defaulting to '0'
would be a game changer.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31535: Fix warning - uninitialized value $mode in string ne (addbiblio.pl)
Marcel de Rooy [Thu, 8 Sep 2022 14:03:51 +0000 (14:03 +0000)]
Bug 31535: Fix warning - uninitialized value $mode in string ne (addbiblio.pl)

Line number varies across versions. (Should be L887 now.)
Resolves:
    Use of uninitialized value $mode in string ne at /usr/share/koha/cataloguing/addbiblio.pl line 845.

No test plan here. This is trivial. Read the patch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29658: Fix crash on cancelling cancelled order
Marcel de Rooy [Wed, 8 Dec 2021 13:44:38 +0000 (13:44 +0000)]
Bug 29658: Fix crash on cancelling cancelled order

Found this crash in our 20.11 logs:
Cannot insert order: Mandatory parameter biblionumber is missing at /usr/share/koha/acqui/cancelorder.pl line 60.
 at /usr/share/perl/5.28/Carp.pm line 289
        Carp::croak('Cannot insert order: Mandatory parameter biblionumber is missing') called at /usr/share/koha/Koha/Acquisition/Order.pm line 79
        Koha::Acquisition::Order::store('Koha::Acquisition::Order=HASH(0x55f3760e2860)') called at /usr/share/koha/Koha/Acquisition/Order.pm line 189
        Koha::Acquisition::Order::cancel('Koha::Acquisition::Order=HASH(0x55f3760e2860)', 'HASH(0x55f375a17ec0)') called at /usr/share/koha/acqui/cancelorder.pl line 60

Not sure how to reproduce this one as it happened. But might be related to repeated clicking, backspacing etc.

Test plan:
Create a new basket and order.
Open this same basket in two browser tabs.
Cancel the order line (delete catalog record) in tab 1.
Go to second tab, try again.
Without this patch, it will crash. With this patch, an error message.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31439: Use pseudo element for bullet in results.tt
Lucas Gass [Thu, 1 Sep 2022 18:10:50 +0000 (18:10 +0000)]
Bug 31439: Use pseudo element for bullet in results.tt

To test:
1. Apply patch and regenerate CSS. See:
  https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client
2. Go to the staff results page and inscept the result_item_details
   class.
3. It should contain a ::before pseudo element that is the bullet point.
4. This is easier to remove of alter with the following CSS in
   IntraNetUSerCSS:

.result_item_details::before {
content: " " !important;
}

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31530: Remove HTML tags in TT comments in patron-search.inc
Fridolin Somers [Wed, 7 Sep 2022 20:46:18 +0000 (10:46 -1000)]
Bug 31530: Remove HTML tags in TT comments in patron-search.inc

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
To test:
1) Without patch, search for patron-search.inc in misc/translator/po/xx-XX-staff-prog.po
--> There should be strings with pound signs such as "%%] %s [%%# - branch: "
2) Apply patch
3) Update translation files `translate update xx-XX`
4) Search again for patron-search.inc in
misc/translator/po/xx-XX-staff-prog.po
--> The problematic strings are not there anymore
5) In the staff interface, go to Patrons, the search box and search
function should be unchanged

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31250: (QA follow-up) The future will be easier
Marcel de Rooy [Thu, 18 Aug 2022 14:32:46 +0000 (14:32 +0000)]
Bug 31250: (QA follow-up) The future will be easier

As requested by Jonathan, we need more flexibility ;)
Here it comes.

Test plan:
Run t/CookieManager.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31250: Add catalogue_editor_ cookie to koha-conf deny list
Marcel de Rooy [Thu, 28 Jul 2022 12:52:56 +0000 (12:52 +0000)]
Bug 31250: Add catalogue_editor_ cookie to koha-conf deny list

Test plan:
Add this change to your koha-conf.xml.
Flush, restart.
Test if the cookie is kept now in the interface.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31250: Deny clearing cookies with numeric suffix
Marcel de Rooy [Thu, 28 Jul 2022 12:43:20 +0000 (12:43 +0000)]
Bug 31250: Deny clearing cookies with numeric suffix

This change allows us to add catalogue_editor_ to the deny list
in koha-conf.xml and keep cookies like catalogue_editor_123.

Test plan:
Run t/CookieManager.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
To test:
1 - Sign in to staff client
2 - Search for records and edit one
3 - Switch to advanced editor
4 - View cookies (F12/developer panel/storage tab)
5 - Note cookie like 'catalogue_editor_##' with value 'advanced'
6 - Log out
7 - note cookie value deleted
8 - Log in and search/edit a record
9 - Basic editor loads
10 - Apply patch
11 - Add line to koha-conf as described in second patch
12 - Restart all
13 - Switch to advanced editor
14 - Cookie value updated
15 - Logout
16 - Cookie value remains
17 - Log in and search/edit
18 - Confirm advanced editor loads

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31537: Elasticsearch - index mapping for 003 control-number-identifier is twice...
Caroline Cyr La Rose [Thu, 8 Sep 2022 15:54:19 +0000 (11:54 -0400)]
Bug 31537: Elasticsearch - index mapping for 003 control-number-identifier is twice in mappings.yaml

This patch removes one of the two mappings for the 003 field to the
control-number-identifier index (for MARC21).

To test:
1) Apply patch
2) reindex with mappings reset
3) try to search for cni:code (for example cni:OSt)
--> it should return the desired results
4) try to search for control-number-identifier:code (for example
control-number-identifier:OSt)
--> it should return the desired results
5) Optionally, try the test plan in Bug 11175 to make sure it still
works

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>
2 years agoBug 31542: Home page links correct font-family
Fridolin Somers [Fri, 9 Sep 2022 06:17:23 +0000 (20:17 -1000)]
Bug 31542: Home page links correct font-family

In koha-tmpl/intranet-tmpl/prog/css/mainpage.css the rule of
font-family for big links is not complete :
  font-family: verdana, arial;
It is missing sans-serif in case computer has not those fonts.
On my computer I dont have them so I see a serif font.

We can remove this rule, inherited rule is serif fonts.

Test plan :
1) Use a computer without Arial nor Verdana fonts (basically a Linux)
2) Look at home page big links : Circulation, Patrons ...
   => Without patch they have serif font
   => With patch they have sans-serif font

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31545: ComponentSortField description is incorrect
Caroline Cyr La Rose [Fri, 9 Sep 2022 22:01:18 +0000 (18:01 -0400)]
Bug 31545: ComponentSortField description is incorrect

This patch corrects the description of the ComponentSortField system
preference, as it affects both the staff interface and the OPAC.

To test:
1) Apply patch
2) Go to Administration > Global system preferences
3) Search for ComponentSortField
4) Read the description, make sure there are no errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31455: (QA follow-up) Make table creation O(N)
Joonas Kylmälä [Thu, 1 Sep 2022 19:45:25 +0000 (19:45 +0000)]
Bug 31455: (QA follow-up) Make table creation O(N)

We can insert the indices before the main loop to a hash,
this way we don't have to look up during each loop iteration
the index from an array which in the worst case might take O(N)
thus making the total time complexity O(N^2).

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31455: Make batchMod sort by order scanned
Lucas Gass [Thu, 1 Sep 2022 16:55:14 +0000 (16:55 +0000)]
Bug 31455: Make batchMod sort by order scanned

To test:
1. In batch item deletion and batch item modification add some
   barcodes.
2. Notice they are being sorted by item number, not in the order
   scanned.
3. Appply patch and restart services.
4. Try scanning items again in both batch item deletion and batch item
   modification.
5. The found barcodes should now sort by order scanned.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 27981: (QA follow-up) GetMarcBiblio was removed from codebase
Tomas Cohen Arazi [Mon, 12 Sep 2022 18:28:08 +0000 (15:28 -0300)]
Bug 27981: (QA follow-up) GetMarcBiblio was removed from codebase

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 27981: DBRev 22.06.00.042
Tomas Cohen Arazi [Mon, 12 Sep 2022 18:21:38 +0000 (15:21 -0300)]
Bug 27981: DBRev 22.06.00.042

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 27981: (QA follow-up) Unify JavaScript to false/true from 0/1/""
Andrew Nugged [Sun, 14 Aug 2022 22:58:29 +0000 (01:58 +0300)]
Bug 27981: (QA follow-up) Unify JavaScript to false/true from 0/1/""

Make remove_control_num var and JS KohaBackend.GetRecord calls to have
only false/true instead of mixed 0,1, and "" in different places.

Signed-off-by: Andrew Nugged <nugged@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 27981: (follow-up) Fix tests
Nick Clemens [Mon, 13 Jun 2022 12:22:37 +0000 (12:22 +0000)]
Bug 27981: (follow-up) Fix tests

Signed-off-by: Andrew Nugged <nugged@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 27981: (follow-up) Correct variable
Nick Clemens [Tue, 3 May 2022 13:44:34 +0000 (13:44 +0000)]
Bug 27981: (follow-up) Correct variable

Signed-off-by: Andrew Nugged <nugged@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 27981: Adjust imported records, svc/import_bibs, records from Z3950
Nick Clemens [Tue, 31 Aug 2021 12:59:56 +0000 (12:59 +0000)]
Bug 27981: Adjust imported records, svc/import_bibs, records from Z3950

Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Andrew Nugged <nugged@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 27981: Add option to automatically set 001 to the biblionumber
Nuño López Ansótegui [Wed, 19 Jun 2013 12:35:41 +0000 (14:35 +0200)]
Bug 27981: Add option to automatically set 001 to the biblionumber

This patch adds a new system preference:
autoControlNumber

The option "biblionumber" will set field 001 to the biblionumber when you create a new record
or edit an existing record and clear the 001 field.

If a value is present in 001 when saving the record it will be preserved.

If set to 'OFF' the 001 field wil not be touched

When duplicating a record the 001 will be removed if autoControlNumber is set

To test:
 1 - Apply patches and updatedatabase
 2 - Create a new record with no 001 field
 3 - Save and view the MAC, confirm there is no 001
 4 - Set the system preference to 'biblionumber'
 5 - Edit the record you created previously
 6 - Note the 001 is prepopulated with the biblionumber
 7 - Delete the field
 8 - Save the record
 9 - View the MARC, the 001 is filled with biblionumber
10 - Edit the record
11 - Set the 001 to a different value "Not the biblionumber"
12 - Save
13 - View the marc and confirm the value you entered is retained
14 - Edit a record with an existing 001 that is not the biblionumber
15 - Save and confirm 001 is not updated

To test duplication:
1 - Edit a record as duplicate when using the advanced editor
2 - Confirm the 001 does not load, but record saves correctly
3 - Edit the record
4 - Switch to 'basic editor'
5 - Save, then view record
6 - Edit as duplicate in basic editor
7 - Confirm the 001 is removed
8 - Confirm the 001 is added on save

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Andrew Nugged <nugged@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 27981: DB update
Nick Clemens [Thu, 24 Jun 2021 06:20:23 +0000 (06:20 +0000)]
Bug 27981: DB update

Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Andrew Nugged <nugged@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30483: DBRev 22.06.00.041
Tomas Cohen Arazi [Mon, 12 Sep 2022 11:39:03 +0000 (08:39 -0300)]
Bug 30483: DBRev 22.06.00.041

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30483: DBIC schema
Tomas Cohen Arazi [Mon, 12 Sep 2022 11:35:37 +0000 (08:35 -0300)]
Bug 30483: DBIC schema

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30483: Make issues.borrowernumber and itemnumber NOT NULL
Marcel de Rooy [Thu, 7 Apr 2022 12:51:42 +0000 (12:51 +0000)]
Bug 30483: Make issues.borrowernumber and itemnumber NOT NULL

Note: This change does NOT apply to old_issues, where constraints
may result in nullifying these columns.

Test plan:
Run dbrev.
Try checkout, checkin.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31403: Enable CircSidebar by default on new installs
Isobel Graham [Thu, 1 Sep 2022 08:10:26 +0000 (09:10 +0100)]
Bug 31403: Enable CircSidebar by default on new installs

This patch updates sysprefs.sql to enable the CircSidebar preference by
default on new installs.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29184: Fix warn about undefined replacecost
Nick Clemens [Wed, 6 Oct 2021 12:48:23 +0000 (12:48 +0000)]
Bug 29184: Fix warn about undefined replacecost

This patch simply sets the cost to 0 if undefined

To test:
1 - Create a new item with no replacement cost set
2 - Check the item out to a patron
3 - Mark the item lost
4 - Note in plack-intranet-error.log:
    [2021/10/06 12:43:26] [WARN] Use of uninitialized value $replacementprice in numeric gt (>) at /kohadevbox/koha/C4/Accounts.pm line 114.
5 - Apply patch
6 - Repeat
7 - No warn

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30462: (QA follow-up) Tab name change
Tomas Cohen Arazi [Thu, 8 Sep 2022 17:46:32 +0000 (10:46 -0700)]
Bug 30462: (QA follow-up) Tab name change

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30462: Fix display of the complete jobs
Jonathan Druart [Mon, 13 Jun 2022 09:34:21 +0000 (11:34 +0200)]
Bug 30462: Fix display of the complete jobs

We want to display the jobs terminated in the last hour, not today.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30462: Remove 'Ended' column for current jobs
Jonathan Druart [Mon, 13 Jun 2022 09:34:08 +0000 (11:34 +0200)]
Bug 30462: Remove 'Ended' column for current jobs

This column will always be empty

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30462: (follow-up) Limit completed to 60 minutes
Martin Renvoize [Fri, 10 Jun 2022 14:35:47 +0000 (15:35 +0100)]
Bug 30462: (follow-up) Limit completed to 60 minutes

This follow-up reduces the completed jobs list to only those jobs
completed within the last 60 minutes.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30462: Separate Queued and Complete jobs
Martin Renvoize [Tue, 7 Jun 2022 10:08:32 +0000 (11:08 +0100)]
Bug 30462: Separate Queued and Complete jobs

This patch updates the background jobs management page to display
queued and completed jobs in their own tabs on the page.

JD Amended patch:
Fix QA failures:
 FAIL   koha-tmpl/intranet-tmpl/prog/en/modules/admin/background_jobs.tt
   FAIL   forbidden patterns
                forbidden pattern: trailing space char (line 158)
                forbidden pattern: trailing space char (line 256)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30619: DBRev 22.06.00.040
Tomas Cohen Arazi [Thu, 8 Sep 2022 00:50:18 +0000 (17:50 -0700)]
Bug 30619: DBRev 22.06.00.040

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30619: (QA follow-up) Add exec flag to bug_30619.pl
Kyle M Hall [Fri, 19 Aug 2022 15:20:33 +0000 (15:20 +0000)]
Bug 30619: (QA follow-up) Add exec flag to bug_30619.pl

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30619: Add sample email notice
Martin Renvoize [Fri, 1 Jul 2022 09:02:38 +0000 (10:02 +0100)]
Bug 30619: Add sample email notice

This patch adds a default same email type notice for the point of sale
receipt.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30619: Add email receipt to POS
Isobel Graham [Thu, 30 Jun 2022 15:32:26 +0000 (16:32 +0100)]
Bug 30619: Add email receipt to POS

This patch adds the ability to use email receipts with the point of sale
module.

To test:
1) Configure your Koha to enable the point of sale system.
2) Add an email template to the 'Point of sale > RECEIPT' notice.
3) Add some charges on point of sale and pay for them.
3a) You should now see a new 'Email receipt' button next to the 'Print
receipt' option.
3b) Clicking the button will display a modal to enter the anonymous
users email address
3c) Enter an email address and confirm to send the email

Sponsored-by: Martin Renvoize <martin.renvoize@gmail.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31396: Fix incorrect attribute access in opac-detail.pl
Tomas Cohen Arazi [Wed, 7 Sep 2022 15:49:14 +0000 (08:49 -0700)]
Bug 31396: Fix incorrect attribute access in opac-detail.pl

To test:
1. Have an item with a callnumber defined
2. Have OPACShelfBrowser enabled
3. Open the record detailed view in the OPAC
4. Click on 'Browse shelf'
=> FAIL: It explodes
5. Apply this patch
6. Repeat 4
=> SUCCESS: It works!
7. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31351: (QA follow-up) Trivial string fix
Tomas Cohen Arazi [Wed, 7 Sep 2022 21:04:41 +0000 (14:04 -0700)]
Bug 31351: (QA follow-up) Trivial string fix

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31351: (QA follow-up) Extend the encode/decode test
Marcel de Rooy [Wed, 7 Sep 2022 13:51:07 +0000 (13:51 +0000)]
Bug 31351: (QA follow-up) Extend the encode/decode test

Adding some Unicode stuff.
And missing txn couple.

Test plan:
Run t/db_dependent/Koha/BackgroundJob.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31351: (QA follow-up) Adjust tests accordingly
Marcel de Rooy [Wed, 7 Sep 2022 12:29:52 +0000 (12:29 +0000)]
Bug 31351: (QA follow-up) Adjust tests accordingly

Test plan:
Run t/db_dependent/Koha/BackgroundJob.t
Run t/db_dependent/Koha/BackgroundJobs.t
Prove t/db_dependent/Koha/BackgroundJobs

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31351: (QA follow-up) Use $self->json in Background modules
Marcel de Rooy [Wed, 7 Sep 2022 12:05:17 +0000 (12:05 +0000)]
Bug 31351: (QA follow-up) Use $self->json in Background modules

Making the disabling utf8 flag explicit instead of depending on
the default of the CPAN module.

Incorporating the change in background_jobs_worker too.

Test plan:
See next patches when we look at unit tests.
Restart koha-worker.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31351: Koha::BackgroundJob: Let database connection object handle utf8 transcoding
Joonas Kylmälä [Tue, 6 Sep 2022 19:32:11 +0000 (22:32 +0300)]
Bug 31351: Koha::BackgroundJob: Let database connection object handle utf8 transcoding

Our database connections have been set up so that they will
automatically convert perl encoded strings to utf8 encoded strings
when sending data to database tables and decode the utf8 encoded
strings from the tables back to internal perl strings. As we can see
from a call in Koha/BackgroundJob.pm we are encoding the perl internal
string to utf8 and then decoding it back to perl internal string:

my $data_dump = decode_json encode_utf8 $self->data;

We can skip this unnecessary encode<->decode step (as the database
object has done the decoding for us) by simply calling the
JSON->new->decode() method which doesn't perform any string decoding.

Furthermore, the original code was buggy and didn't always remember to
encode the unencoded strings, in Koha::BackgroundJob::process we can
see

my $context = decode_json($self->context);

is missing the encode step. Now after this change encoding before
decoding is not necessary as we are using the methods from the JSON
module that do not perform any transcoding.

Note to those concerned whether the old data in the database is
compatible with this new code:
 Luckily our database connection object seems to be smart and
 didn't utf8 encode the utf8 returned data from the old encode_json()
 calls (probably checks the utf8 flag for the string (Encode::is_utf8($str))).

To test whether this fixes the original bug reported of not being able
to schedule background jobs with koha user having non-ASCII letters in
their surname:
 1) Change your staff users surname/lastname to "ääää"
 2) Log out and back in.
 3) Go to a biblio record detail page and click "Select all" in the
 items table
 4) Click Delete selected items and proceed with the deletion
 5) Notice the batch item deletion job has failed status
 6) Apply patch and repeat but this time the deletion job should finish.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31401: (QA follow-up) Remove Koha.ArePluginsEnabled, it is no longer needed
Kyle Hall [Fri, 2 Sep 2022 14:27:39 +0000 (10:27 -0400)]
Bug 31401: (QA follow-up) Remove Koha.ArePluginsEnabled, it is no longer needed

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31401: Update administration sidebar to match entries on administration start...
Katrin Fischer [Thu, 18 Aug 2022 21:26:54 +0000 (21:26 +0000)]
Bug 31401: Update administration sidebar to match entries on administration start page

This makes sure that all entries on the administration start page
have a matching entry in the administration sidebar that shows
on the left side if you are on any of the administration sub pages.

Changes made:
* Rename 'Classification sources' to 'Classification configuration'
* Make Plugins entry show and appear in correct spot
  This relied on the variable plugins_enabled that wasn't available
  in all the different templates. I therefore moved it to Auth.pm
  and cleaned up the code for the admin start page.
* Move 'MARC overlay rules' and rename to 'Record overlay rules'

To test:
* Make sure plugins are enabled and visible on admin start page
* Compare admin start page and sidebar
  * Sequence should be the same
  * All entries should appear on both pages
  * Naming should be the same

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 26626: (follow-up) Be consistent with icon and accesskeys
Nick Clemens [Fri, 19 Aug 2022 09:59:24 +0000 (09:59 +0000)]
Bug 26626: (follow-up) Be consistent with icon and accesskeys

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 26626: (follow-up) Update icon selection
Owen Leonard [Wed, 4 Aug 2021 17:06:07 +0000 (17:06 +0000)]
Bug 26626: (follow-up) Update icon selection

This patch changes the "Ignore" button to use an X icon and the "Cancel"
button to use a "Trash" icon.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 26626: Add 'Ignore' option to confirmed holds modal
Nick Clemens [Mon, 2 Aug 2021 12:26:29 +0000 (12:26 +0000)]
Bug 26626: Add 'Ignore' option to confirmed holds modal

This patch adds 'Ignore' to the 'Hold already waiting' modal

To test:
To recreate:
 1 - Place a hold for pickup at library A
 2 - Checkin the item at Library A
 3 - Note the modal has 'Ignore' option
 4 - Click it, nothing happens
 5 - Check in the item again, same modal
 6 - Click 'Confirm'
 7 - Check in the item again
 8 - Now 'Ignore' is replaced by 'Cancel'
 9 - Click 'Confirm' to dismiss modal
10 - Apply patch
11 - Check the item in again
12 - Note 'Ignore' button before 'Cancel' button with '-' icon
13 - Go to biblio holds page
14 - Revert waiting status
15 - Check item in again
16 - Note ignore now has '-' (minus) icon

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31023: Quote authtypecode in FindDuplicateAuthorities
Nick Clemens [Tue, 12 Jul 2022 13:46:55 +0000 (13:46 +0000)]
Bug 31023: Quote authtypecode in FindDuplicateAuthorities

To test:
0 - Have Koha using Elasticsearch
1 - Set  QueryRegexEscapeOptions to 'unescape escaped'
2 - Attempt to add a new 'GENRE/FORM' authority record
3 - On save you get a 500 error
Unable to understand your search query, please rephrase and try again.
 at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch/Search.pm line 102
4 - Apply patch, restart all
5 - Attempt to add a new 'GENRE/FORM' authority record
6 - Success!

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>
2 years agoBug 31023: Unit tests
Nick Clemens [Tue, 12 Jul 2022 13:46:27 +0000 (13:46 +0000)]
Bug 31023: Unit tests

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>
2 years agoBug 28290: (follow-up) Unit test
Nick Clemens [Fri, 2 Sep 2022 06:39:39 +0000 (06:39 +0000)]
Bug 28290: (follow-up) Unit test

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28290: Don't send subfields to 'as_string' if none to send
Nick Clemens [Tue, 4 May 2021 18:29:05 +0000 (18:29 +0000)]
Bug 28290: Don't send subfields to 'as_string' if none to send

This fixes an error where we send a blank string to
Marc::Field->as_string

The subroutine fails as the regex is marked as incomplete as there is
nothing between the brackets

Also fixes a missing hidden input for 'item_action' when no items are
staged during import

 1 - Define a new matching rule with no subfields
    Match-threshold: 1000
    Record type: bibliographic record
    Search-index: Other-control-number
    Score: 1000
    Tag: 035
    Subfields:
    Offset:
    Length:
 2 - Attempt to stage a record with an 035 using this rule (i will
     attach example to bug)
 3 - Staging fails
 4 - Stage again with no matching rule
 5 - Manage the staged record, try to apply the matching rule
 6 - It fails, 500 error
 7 - Apply patch
 8 - Restart all the things
 9 - Apply rule again, it works!
10 - Stage the record again using the rule for matching
11 - It stages and matches!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29608: Made so doesn't require full permission
Isobel Graham [Thu, 1 Sep 2022 11:37:06 +0000 (12:37 +0100)]
Bug 29608: Made so doesn't require full permission

Made so the numbering sequence does not need to require full
permission.

1. Edit number patterns a confirm you don't need full permission

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>
2 years agoBug 27191: Set focus on first input when adding a new patron category
Katrin Fischer [Thu, 18 Aug 2022 20:15:30 +0000 (20:15 +0000)]
Bug 27191: Set focus on first input when adding a new patron category

When adding a new patron category, the focus/cursor should be
in the first input field of the form: Category code

To test:
* Add a new patron category in administration > patron categories
  - cursur is in no field
* Apply patch
* Add another new patron category
  - cursor is now in the first input field of the form: Category code

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 27193: Set focus on first input when adding a new patron attribute
Katrin Fischer [Thu, 18 Aug 2022 19:47:20 +0000 (19:47 +0000)]
Bug 27193: Set focus on first input when adding a new patron attribute

When adding a new patron attribute, the focus/cursor should be
in the first input field of the form: Patron attribute type code

To test:
* Add a new patron attribute - cursur is in no field
* Apply patch
* Add another new patron attribute - cursor is now in
  the first input field: Patron attribute type code

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 27436: Set focus on first input when adding a new SQL report
Katrin Fischer [Thu, 18 Aug 2022 20:06:41 +0000 (22:06 +0200)]
Bug 27436: Set focus on first input when adding a new SQL report

When adding a new SQL report, the focus/cursor should be
in the first input field of the form: Report name

To test:
* Add a new SQL report in reports > new from SQL
  - cursur is in no field
* Apply patch
* Add another new SQL report
  - cursor is now in the first input field of the form: Report name

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31398: Set focus on first input when adding a new authority type
Katrin Fischer [Thu, 18 Aug 2022 20:33:42 +0000 (20:33 +0000)]
Bug 31398: Set focus on first input when adding a new authority type

When adding a new authority type the focus should be on the
first field of the input form: Authority type

* Add a new authority type from administration > authority types
* Verify the focus is not on any of the form fields/inputs
* Apply patch
* Add another new authority type
* Verify the focus/cursor is now in the Authority type field

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31399: Set focus on first input when adding a new classification source, filing...
Katrin Fischer [Thu, 18 Aug 2022 20:48:44 +0000 (20:48 +0000)]
Bug 31399: Set focus on first input when adding a new classification source, filing rule, or splitting rule

This makes sure the cursor/focus is always in the first form
field when adding an entry on the classification configuration page.

* Got to administration > classification sources
* Verify for each of the three "New ..." buttons on top that
  the entry form has no focus on any field
* Apply patch
* Repeat testing the new forms and the focus now should always
  be in the first input field of the entry form

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31400: Set focus on first input when adding a new matching rule
Katrin Fischer [Thu, 18 Aug 2022 20:56:02 +0000 (20:56 +0000)]
Bug 31400: Set focus on first input when adding a new matching rule

When adding a new matching rule the cursor/focus should be in
the first input field of the form: Matching rule code

* Add a new matching rule form administration > matching rules
* Verify the cursor is in the search form on top of the page
* Apply patch
* Add another new matching rule
* Verify the cursor is now in the first input field of the form

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31397: Set focus in first input when adding a new bibliographic framework
Katrin Fischer [Thu, 18 Aug 2022 20:24:57 +0000 (20:24 +0000)]
Bug 31397: Set focus in first input when adding a new bibliographic framework

When adding a new bibliographic framework, the focus/cursor should be
in the first input field of the form: Framework code

To test:
* Add a new bibliographic framework from adminsitration > bibliographic
  MARC frameworks
  - cursur is in no field
* Apply patch
* Add another new framework
  - cursor is now in the first input field of the form: Framework code

https://bugs.koha-community.org/show_bug.cgi?id=27191

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 27802: Set cursor focus in first input when adding a cash register
Alex Buckley [Mon, 15 Aug 2022 11:01:39 +0000 (11:01 +0000)]
Bug 27802: Set cursor focus in first input when adding a cash register

Test plan:
1. Visit Administration > Accounting > Cash registers and notice the
cursor is not focussed in the first input field (Name)

2. Apply patch

3. Refresh the new cash registers page and confirm your cursor is
focussed in the first input field (name)

Sponsored-by: Catalyst IT, New Zealand
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31374: DBIC schema
Tomas Cohen Arazi [Wed, 7 Sep 2022 20:40:39 +0000 (13:40 -0700)]
Bug 31374: DBIC schema

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31374: DBRev 22.06.00.039
Tomas Cohen Arazi [Wed, 7 Sep 2022 20:36:52 +0000 (13:36 -0700)]
Bug 31374: DBRev 22.06.00.039

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31374: (QA follow-up) Fix typo collumn in database update
Katrin Fischer [Sat, 27 Aug 2022 14:40:13 +0000 (14:40 +0000)]
Bug 31374: (QA follow-up) Fix typo collumn in database update

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31374: (follow-up) change private note to staff_note and reorder columns
Lucas Gass [Mon, 22 Aug 2022 22:21:22 +0000 (22:21 +0000)]
Bug 31374: (follow-up) change private note to staff_note and reorder columns

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31374: Update Suggestion.pm
Lucas Gass [Fri, 19 Aug 2022 16:18:44 +0000 (16:18 +0000)]
Bug 31374: Update Suggestion.pm

To test:
1. Apply patch and restart services
2. Go to Acquistions -> Suggestions -> New Purchase suggestion
3. Notice the new 'Non-public notes:' textarea
4. Make sure you 'Set a patron' so we can later look at the suggestion from the OPAC
5. Make a new suggestion and make sure you add some Non-public notes
6. Back on the 'Suggestions management' page you should see a new column for 'Non-public note'
7. Go to table settings and make sure you can properly hide the column
8. Change the status and make sure it shows up on the table with all statuses (pending, accepted, rejected, etc )
9. Check the API by going to (/api/v1/suggestions). Your suggestion should show up and 'privatenote' should include your non-public note.
10. Log in to the OPAC as the patron we set the suggestion to earlier. You should not see anything related to the non-public note displaying from the OPAC

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>
2 years agoBug 31374: Update API spec
Lucas Gass [Tue, 16 Aug 2022 20:55:54 +0000 (20:55 +0000)]
Bug 31374: Update API spec

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>
2 years agoBug 31374: Add privatenote column to table settings
Lucas Gass [Tue, 16 Aug 2022 20:51:20 +0000 (20:51 +0000)]
Bug 31374: Add privatenote column to table settings

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>
2 years agoBug 31374: Add non-public note to template
Lucas Gass [Tue, 16 Aug 2022 20:46:46 +0000 (20:46 +0000)]
Bug 31374: Add non-public note to template

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>