]> git.koha-community.org Git - koha.git/log
koha.git
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>
2 years agoBug 31374: Database/Schema update
Lucas Gass [Tue, 16 Aug 2022 20:40:24 +0000 (20:40 +0000)]
Bug 31374: Database/Schema update

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 27081: Handle first column (checkboxes) in column settings for lost items report
Jonathan Druart [Wed, 10 Aug 2022 14:36:28 +0000 (16:36 +0200)]
Bug 27081: Handle first column (checkboxes) in column settings for lost items report

We are adding one column (the one with the checkboxes) at the beginning
of each row if it's possible to export the report to CSV.
However the column settings were not modified. We need to append one
object representing this column.

Test plan:
To test:
* Create a CSV profile of type SQL for exporting lost items
* Make sure you have some lost items
* Run Reports > Items lost
=> You can hide the notes (last column)

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 31404: (QA follow-up) Mostly whitespace fixes
Katrin Fischer [Wed, 7 Sep 2022 12:37:39 +0000 (12:37 +0000)]
Bug 31404: (QA follow-up) Mostly whitespace fixes

* Removed the leading space from the new entries as this could
  lead to another string to translate and they are not needed
* Removed some doubled up whitespaces from the <a> tags and
  a stray -
* Removed title from Article requests since it was the same text
  as the link itself, not adding information

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31404: Sync Circulation sidebar with Circulation home
Isobel Graham [Wed, 31 Aug 2022 15:09:43 +0000 (16:09 +0100)]
Bug 31404: Sync Circulation sidebar with Circulation home

This patch syncs the content of the circulation sidebar navigation with
the content of the circulation homepage

Test plan
1. Enable the `CircSidebar` system preference
2. Compare the sidebar navigation on circulation pages with the content
   of the circulation homepage.

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 31490: Terminology: change 'staff client' to 'staff interface' in marc-overlay...
Caroline Cyr La Rose [Tue, 30 Aug 2022 19:11:27 +0000 (15:11 -0400)]
Bug 31490: Terminology: change 'staff client' to 'staff interface' in marc-overlay-rule

This patch corrects the terminology for staff interface in the record overlay rules administration page.

To test:
1) Apply patch
2) Enable the MARCOverlayRules system preference
3) Go to Administration > Record overlay rules
4) Open the 'Filter' drop-down menu
=> The second option should read 'Staff interface MARC editor'

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31483: Close <ol> tag properly on password reset page
Lucas Gass [Wed, 31 Aug 2022 20:59:31 +0000 (20:59 +0000)]
Bug 31483: Close <ol> tag properly on password reset page

To test:
1) Enable EnableExpiredPasswordReset
2) Find a patron and change their password so you know what it is supposed to be
3) In the database, expire the patron's password, e.g.
UPDATE borrowers SET password_expiration_date = '2022-08-22' where borrowernumber = 21;
4) Go to the OPAC, try to log in with the patron's credentials
5) Click Reset your password
=> Note that the form is in the grey breadcrumbs box, you can compare with any other OPAC page, the grey box should only contain the breadcrumbs

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30042: Remove Date::Calc dependency in batch_anonymize.pl
Tomas Cohen Arazi [Tue, 8 Feb 2022 17:45:11 +0000 (14:45 -0300)]
Bug 30042: Remove Date::Calc dependency in batch_anonymize.pl

This patch makes the script use the Koha::DateUtils tools instead.

To test:
1. Run:
   $ kshell
  k$ perl misc/cronjobs/batch_anonymise.pl --verbose --days 7
=> SUCCESS: You see (the date may vary):
Checkouts and holds before 2022-02-15 will be anonymised.
2. Apply this patch
3. Repeat 1
=> SUCCESS: Same output
4. 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: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28708: fr-CA localization file
Caroline Cyr La Rose [Tue, 16 Aug 2022 20:51:38 +0000 (16:51 -0400)]
Bug 28708: fr-CA localization file

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 29882: remove unrequired package definitions in list-deps script
Mason James [Fri, 14 Jan 2022 07:00:03 +0000 (20:00 +1300)]
Bug 29882: remove unrequired package definitions in list-deps script

to test...

- apply patch, rebuild new package

- install new koha-common pkg successfully

Signed-off-by: Magnus Enger <magnus@libriotech.no>
I did not build packages, just grep'ed the source to check that
these modules are no longer used. Please set back to "Needs
signoff" if this is not considered good enough.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31435: (QA follow-up) Don't pass explicitly default parameter values
Joonas Kylmälä [Wed, 7 Sep 2022 15:49:59 +0000 (18:49 +0300)]
Bug 31435: (QA follow-up) Don't pass explicitly default parameter values

For kohaTable these are the default values.

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31435: (follow-up) Make kohaTable calls consistent
Martin Renvoize [Mon, 5 Sep 2022 12:59:57 +0000 (13:59 +0100)]
Bug 31435: (follow-up) Make kohaTable calls consistent

Our calls to instantiate a kohaTable from JS were inconsistent in how
they pass table_settings where no table_settings exist.

This patch replaces empty arrays and empty hashrefs with a consistent
'null' being passed to ake it clear we don't have any settings to pass
yet.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31435: Tie 'Configure' to table_settings
Martin Renvoize [Mon, 22 Aug 2022 07:15:34 +0000 (08:15 +0100)]
Bug 31435: Tie 'Configure' to table_settings

This patch adds a check for table_settings to prevent the display of
'Configure this table' when table settings are not passed to the
datatable wrapper.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Suggested test plan:
* Without patch:
* Go to Administration > SMTP servers
* Verify the configure button shows, but doesn't work
* Apply patch
* Reload the SMTP servers page
* The configure button will no longer show

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31364: Check length of the multiple syspref array instead whether it is null
Joonas Kylmälä [Sun, 4 Sep 2022 11:37:46 +0000 (14:37 +0300)]
Bug 31364: Check length of the multiple syspref array instead whether it is null

The multiple systempreferences are always defined as an empty array at
the minimum, so in order to determine whether we need to remove all
the selections from the systempreference we should check whether the
array is empty and not whether the array doesn't exist.

To test:
 1) Set at least 1 value for OPACHoldsIfAvailableAtPickupExceptions
 2) Remove all the values for OPACHoldsIfAvailableAtPickupExceptions
 and notice you get the message "Nothing to save"
 3) Apply patch and repeat, removing all the values should work now.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31488: Update Max checkout text
Isobel Graham [Thu, 1 Sep 2022 09:44:37 +0000 (10:44 +0100)]
Bug 31488: Update Max checkout text

This changes text from "you have checked out too many items" to
"You have reached the maximum limit of items checked out".

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>
2 years agoBug 31170: (QA follow-up) Fix capitalization in database update
Katrin Fischer [Wed, 7 Sep 2022 13:17:53 +0000 (13:17 +0000)]
Bug 31170: (QA follow-up) Fix capitalization in database update

As this has not been released yet, we can also fix the database
update to not introduce the wrong capitalization in the first
place.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31170: Decapatalized "Overdue Item Fine Description"
Isobel Graham [Thu, 1 Sep 2022 10:45:04 +0000 (11:45 +0100)]
Bug 31170: Decapatalized "Overdue Item Fine Description"

I changed "Overdue Item Fine Description" to "Overdue item fine
description" for both the name and title.

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 27272: Remove GetItemsInfo, GetItemsLocationInfo and GetHostItemsInfo
Jonathan Druart [Fri, 3 Jun 2022 06:39:39 +0000 (08:39 +0200)]
Bug 27272: Remove GetItemsInfo, GetItemsLocationInfo and GetHostItemsInfo

With the different bug reports we removed the calls for those 3
subroutines. We can remove them now.

Test plan:
git grep their names and you should not find any occurrences in the code
base

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30231: (bug 5927 follow-up) See (rejected) forms of series entry visible in searc...
Janusz Kaczmarek [Fri, 4 Mar 2022 21:47:11 +0000 (22:47 +0100)]
Bug 30231: (bug 5927 follow-up) See (rejected) forms of series entry visible in search result (OPAC and intra)

When using zebra with IncludeSeeFromInSearches on, with traced series, the rejected
forms (4XX) of series entries are visible in result lists, both in OPAC and intra
interfaces.

Test plan:
=========
1. Have a MARC 21 installation with zebra, and with IncludeSeeFromInSearches on.
   Have an authority records for series (130, or 100/110/111 with
   title) with rejected forms (4XX fields).  So the auth record should
   contain at least:

   130 _0 $a Series title
   430 _0 $a Some other title under which the series in known

   Use (each) authority record in at least two biblio records (in appropriate
   fields, i.e.  800/810/811/830 or even deprecated 440, if it makes use
   of UNIF_TITLE).
   Don't forget to properly input also 490 (for 8XX). So the biblio record
   shold contain at least:

   245 nn $a Work title.
   490 1_ $a Series title
   830 _0 $a Series entry $9 <koha_id>

   Reindex.
2. Perform a simple biblio search (in OPAC and in intra) with the title
   from auth record.
3. You shold get a list of results.  See the Series information--you
   shold see not only the accepted entry from 1XX in auth but also the
   rejected forms from 4XX.
4. Apply the patch.
5. Repeat 3. You shold see only the entry form of series now.

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 31356: Use hold expiration date instead of adding days to the waiting date
Nick Clemens [Fri, 12 Aug 2022 16:19:49 +0000 (16:19 +0000)]
Bug 31356: Use hold expiration date instead of adding days to the waiting date

The Talking Tech outbound script currently just adds the
ReservesMaxPickUpDelay to the waiting date to calculate the
"expiration date", but it should use the actual hold expiration
date which may differ from this naive calculation based on
various system preference values.

Test Plan:
1) Create a holiday for tomorrow
2) Set ReservesMaxPickUpDelay to 5
3) Set "Days mode" to "Same week day"
4) Enable ExcludeHolidaysFromMaxPickUpDelay
5) Enable TalkingTechItivaPhoneNotification
6) Create a hold and fill the hold so it is waiting
7) Enable "Hold filled" phone notices for that patron
8) Create a 'phone' version of the HOLD notice
9) Run ./misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl --type RESERVE -w 0
10) Note the output has the expiration date ( 15th colume ) 5 days from now which is *not* the hold's expiration date
11) Apply this patch
12) Repeat the command from step 9
13) Note the expiration date column now matches the holds actual expiration date!

Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31428: 'Configure this table' -> 'Configure'
Martin Renvoize [Mon, 22 Aug 2022 07:18:46 +0000 (08:18 +0100)]
Bug 31428: 'Configure this table' -> 'Configure'

I agree, the shorter wording should be used.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31177: Fix misplaced import in C4::ILSDI::Services
Tomas Cohen Arazi [Mon, 18 Jul 2022 15:47:49 +0000 (12:47 -0300)]
Bug 31177: Fix misplaced import in C4::ILSDI::Services

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 31499: Add libhttp-tiny-perl 0.076 dependency for ES7
Mason James [Wed, 31 Aug 2022 16:38:17 +0000 (04:38 +1200)]
Bug 31499: Add libhttp-tiny-perl 0.076 dependency for ES7

no testing info provided

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29697: (QA follow-up) Remove useless warning
Tomas Cohen Arazi [Wed, 31 Aug 2022 15:34:39 +0000 (12:34 -0300)]
Bug 29697: (QA follow-up) Remove useless warning

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29697: (QA follow-up) Make tests less fragile
Tomas Cohen Arazi [Wed, 31 Aug 2022 15:31:46 +0000 (12:31 -0300)]
Bug 29697: (QA follow-up) Make tests less fragile

This patch makes the tests less fragile to existing data. It does so by
making sure that when checking if the item would be hidden by
OpacHiddenItems and lost status, the item is not skipped, and thus the
notforloan value, as retrieved from the search engine is picked for the
notforloan_count calculation.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30335: Fix DBRev permissions
Tomas Cohen Arazi [Wed, 31 Aug 2022 13:18:23 +0000 (10:18 -0300)]
Bug 30335: Fix DBRev permissions

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30016: Remove GetOpenIssue subroutine
Nick Clemens [Thu, 3 Feb 2022 13:14:33 +0000 (13:14 +0000)]
Bug 30016: Remove GetOpenIssue subroutine

This patch adjusts the code that uses GetOpenIssue to use/find a Koha::Checkout object
instead

To test:
1 - Add a course to course reserves
2 - Create an item with barcode TESTKOC
3 - Add the item to a course
4 - Checkout the item
5 - View course details on stff and opac and confirm item shows as checked out and due date displays
6 - prove t/db_dependent/Circulation/issue.t t/db_dependent/Circulation.t t/db_dependent/CourseReserves.t
7 - Browse to Circulation->Upload offline circulation
8 - Upload a file to return the item: https://wiki.koha-community.org/wiki/Koha_offline_circulation_file_format
9 - Confirm item is returned

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 31315: (QA follow-up) Show itemtype description instead of database code
Joonas Kylmälä [Sun, 28 Aug 2022 15:26:28 +0000 (15:26 +0000)]
Bug 31315: (QA follow-up) Show itemtype description instead of database code

This restores the previous definition for itype that displayed the
description instead of itemtype.

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31315: Remove GetHostItemsInfo and GetItemsInfo from moredetail
Jonathan Druart [Fri, 3 Jun 2022 06:16:20 +0000 (08:16 +0200)]
Bug 31315: Remove GetHostItemsInfo and GetItemsInfo from moredetail

Bug 27272 is going to remove C4::Items::GetItemsInfo in favour of Koha::Items->search.

Here we are going to deal with catalogue/moredetail

Test plan:
List items on the modified view and confirm that all the info is
displayed correctly

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 30847: Remove unused variable
Joonas Kylmälä [Sun, 28 Aug 2022 14:21:06 +0000 (14:21 +0000)]
Bug 30847: Remove unused variable

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30847: Consolidate code to check if patron can place holds and exit if they cannot
Nick Clemens [Wed, 25 May 2022 14:58:36 +0000 (14:58 +0000)]
Bug 30847: Consolidate code to check if patron can place holds and exit if they cannot

This will save us fetching more info if we are denying the holds

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30847: Don't get biblio/item info when placing holds
Nick Clemens [Wed, 25 May 2022 14:44:50 +0000 (14:44 +0000)]
Bug 30847: Don't get biblio/item info when placing holds

The only bit we get form the hash is the rank and title
We can simply fetch the biblio once to calculate
no need to fetch all the info as we don't display or use it

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30847: Don't declare undef variable for assignment
Nick Clemens [Wed, 25 May 2022 14:34:55 +0000 (14:34 +0000)]
Bug 30847: Don't declare undef variable for assignment

New holds have found set to undef - we can do this directly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>