]> git.koha-community.org Git - koha.git/log
koha.git
4 years agoBug 22343: (follow-up) Add a hint to the debug form option
Martin Renvoize [Wed, 9 Sep 2020 10:20:56 +0000 (11:20 +0100)]
Bug 22343: (follow-up) Add a hint to the debug form option

This patch appends a small note to the debug form field in the edit/add
smtp server form to hint that debug mode results in additional output in
the logs.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22343: (follow-up) Highlight debug mode enabled
Martin Renvoize [Wed, 9 Sep 2020 10:16:20 +0000 (11:16 +0100)]
Bug 22343: (follow-up) Highlight debug mode enabled

This patch adds a debug class to a row if debug mode is enabled for the
smtp server and adds css rules to highlight the row by setting the test
to bold, red and italic.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22343: (QA follow-up) Fix some comments
Martin Renvoize [Tue, 8 Sep 2020 08:38:45 +0000 (09:38 +0100)]
Bug 22343: (QA follow-up) Fix some comments

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22343: (QA follow-up) Ensure FK names don't conflict
Martin Renvoize [Tue, 8 Sep 2020 08:09:49 +0000 (09:09 +0100)]
Bug 22343: (QA follow-up) Ensure FK names don't conflict

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22343: Allow choosing an SMTP server in branches.pl
Tomas Cohen Arazi [Mon, 24 Aug 2020 13:48:56 +0000 (10:48 -0300)]
Bug 22343: Allow choosing an SMTP server in branches.pl

The missing piece on this patchset is choosing the desired SMTP server
for each library. This patch adds the option on editing the library.

The default one is picked for existing libraries, and you can pick the
one you want.

To test:
1. Apply the patchset
2. Run:
   $ updatedatabase
=> SUCCESS: Things go smooth
3. Notice the new permission for managing SMTP servers
4. Notice the entry in the admin page
5. Add/have a few SMTP servers defined.
6. Edit a library
=> SUCCESS: The 'Default' SMTP server is picked
7. Choose any server and save
=> SUCCESS: Saving doesn't explode
8. Edit the server
=> SUCCESS: Your selection is kept (this can also be checked on the DB,
        the library_smtp_server table)
9. Try (7) with many different options
=> SUCCESS: It works
10. Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22343: Prevent passing password to the UI
Tomas Cohen Arazi [Mon, 10 Aug 2020 15:57:45 +0000 (12:57 -0300)]
Bug 22343: Prevent passing password to the UI

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22343: Adapt runreport.pl
Tomas Cohen Arazi [Mon, 10 Aug 2020 12:48:57 +0000 (09:48 -0300)]
Bug 22343: Adapt runreport.pl

This script gets adapted to use the new Koha::Email syntax and SMTP
transport.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22343: Adapt controller scripts
Tomas Cohen Arazi [Thu, 6 Aug 2020 18:07:10 +0000 (15:07 -0300)]
Bug 22343: Adapt controller scripts

This patch adapts controller scripts that used sendmail. Also the syntax
for Koha::Email has changed and this patch adapts it.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22343: Adapt Koha::Illrequest
Tomas Cohen Arazi [Thu, 6 Aug 2020 18:06:48 +0000 (15:06 -0300)]
Bug 22343: Adapt Koha::Illrequest

This patch makes Koha::Illrequest use the new syntax for Koha::Email and
sending the email.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22343: Make C4::Letters use the new SMTP server config
Tomas Cohen Arazi [Thu, 6 Aug 2020 15:43:17 +0000 (12:43 -0300)]
Bug 22343: Make C4::Letters use the new SMTP server config

This patch makes the different methods in C4::Letters use:
- Koha::SMTP::Servers: to get the effective SMTP server for the library
  or the fallback default if no library in context.
- New Koha::Email->create method for crafting the email envelope for
  sending.

The tests are adapted so they behave the same way, but the trapped (in
the mock) $email object has the right type and its attributes are
accessed correctly.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Letters.t
=> SUCCESS: Tests pass. YAY!
3. Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22343: Revamped Koha::Email class
Tomas Cohen Arazi [Thu, 6 Aug 2020 15:38:45 +0000 (12:38 -0300)]
Bug 22343: Revamped Koha::Email class

This patch completely rewrites the Koha::Email class, inheriting from
Email::Stuffer. The latter suits well the use by Email::Sender, which is
to replace Mail::Sendmail on this patchset.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/Koha/Email.t
=> SUCCESS: Tests pass!
3. Verify all conditional codepaths are covered
4. Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22343: Add CRUD page for SMTP servers
Tomas Cohen Arazi [Wed, 29 Jul 2020 20:35:50 +0000 (17:35 -0300)]
Bug 22343: Add CRUD page for SMTP servers

This patch introduces a way to define SMTP servers either globally or
per-library.

To test:
1. Apply this patch
2. Find the SMTP servers entry in the admin page
3. Play with adding/removing SMTP servers
=> SUCCESS: All works as expected
4. Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22343: API routes for SMTP servers CRUD
Tomas Cohen Arazi [Wed, 29 Jul 2020 19:10:47 +0000 (16:10 -0300)]
Bug 22343: API routes for SMTP servers CRUD

This patch introduces API routes for handling SMTP servers.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22343: Update cpanfile
Tomas Cohen Arazi [Sun, 23 Aug 2020 20:53:35 +0000 (17:53 -0300)]
Bug 22343: Update cpanfile

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22343: Add Koha::Library->smtp_server
Tomas Cohen Arazi [Sun, 23 Aug 2020 20:39:23 +0000 (17:39 -0300)]
Bug 22343: Add Koha::Library->smtp_server

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22343: Add classes for handling SMTP servers
Tomas Cohen Arazi [Tue, 28 Jul 2020 15:35:26 +0000 (12:35 -0300)]
Bug 22343: Add classes for handling SMTP servers

This patch introduces classes to handle SMTP servers. It is done in a
way that a default server can be set, and then per-library ones can be
set. All should be done with Koha::SMTP::Servers methods, that take care
of overwriting library-specific configs, and handle the defaults
retrieval and setting correctly.

To test:
1. Apply this patches
2. Run:
   $ kshell
   $ perl installer/data/mysql/updatedatabase.pl
=> SUCCESS: Atomic update is ok, smtp_servers table created
3. Run:
  k$ prove t/db_dependent/Koha/SMTP/
=> SUCCESS: Tests pass!
4. Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22343: DBIx::Class schema updates [DO NOT PUSH]
Tomas Cohen Arazi [Tue, 28 Jul 2020 12:53:02 +0000 (09:53 -0300)]
Bug 22343: DBIx::Class schema updates [DO NOT PUSH]

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22343: Add new tables schema file
Tomas Cohen Arazi [Tue, 28 Jul 2020 12:52:32 +0000 (09:52 -0300)]
Bug 22343: Add new tables schema file

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22343: Add parameters => manage_smtp_servers subpermission
Tomas Cohen Arazi [Fri, 21 Aug 2020 13:59:48 +0000 (10:59 -0300)]
Bug 22343: Add parameters => manage_smtp_servers subpermission

This patch introduces a new subpermission for managing SMTP servers, for
granularity.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22343: Add a new table to store SMTP servers configs
Tomas Cohen Arazi [Tue, 28 Jul 2020 12:46:08 +0000 (09:46 -0300)]
Bug 22343: Add a new table to store SMTP servers configs

This patch adds a new table to store SMTP servers configs.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24155: Fix parameter order to fix search_utf8.t
Jonathan Druart [Thu, 1 Oct 2020 13:04:59 +0000 (15:04 +0200)]
Bug 24155: Fix parameter order to fix search_utf8.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25261: DBRev 20.06.00.043
Jonathan Druart [Wed, 30 Sep 2020 14:16:53 +0000 (14:16 +0000)]
Bug 25261: DBRev 20.06.00.043

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25261: Prevent tests to fail if CircConfirmItemParts is on
Jonathan Druart [Thu, 1 Oct 2020 09:35:00 +0000 (11:35 +0200)]
Bug 25261: Prevent tests to fail if CircConfirmItemParts is on

Setting items.materials to NULL at TestBuilder level will (certainly) prevent some
tests to fail if the pref is on

In t/db_dependent/selenium/basic_workflow.t we set 952$3 to an empty
string. The tests will pass even if the pref is turned on.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25261: (QA follow-up) Prevent server error on bad barcode
Martin Renvoize [Thu, 17 Sep 2020 14:01:32 +0000 (15:01 +0100)]
Bug 25261: (QA follow-up) Prevent server error on bad barcode

Prior to this patch if you had CircConfirmParts enabled and you
attempted to checkin a deleted item then you would be met with a server
error.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25261: (QA follow-up) Catch attepts to return via SCO
Martin Renvoize [Thu, 17 Sep 2020 11:59:11 +0000 (12:59 +0100)]
Bug 25261: (QA follow-up) Catch attepts to return via SCO

This patch adds a block to capture attempts to return items with
attached materials when checking in via the self checkout when the
relevant system preference is set.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25261: (QA follow-up) Make issue and returns messages consistent
Martin Renvoize [Thu, 17 Sep 2020 11:21:10 +0000 (12:21 +0100)]
Bug 25261: (QA follow-up) Make issue and returns messages consistent

This patch makes the confirmation dialogue handing and visuality
consistent between issues and returns.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25261: (QA follow-up) Prevent double dialogue
Martin Renvoize [Wed, 16 Sep 2020 12:18:09 +0000 (13:18 +0100)]
Bug 25261: (QA follow-up) Prevent double dialogue

This patch removes the blue information message box if we are using
multi-part confirmations.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25261: (QA follow-up) Terminology: checkin/checkout
Katrin Fischer [Mon, 14 Sep 2020 07:40:10 +0000 (07:40 +0000)]
Bug 25261: (QA follow-up) Terminology: checkin/checkout

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25261: (QA follow-up) Restore previously returned list
Martin Renvoize [Wed, 2 Sep 2020 11:17:56 +0000 (12:17 +0100)]
Bug 25261: (QA follow-up) Restore previously returned list

Test plan
0 - Enable ShowAllCheckins
1 - Check in several regular items
2 - Check in an item with parts
3 - Confirm the checkin in
4 - The list of checkins contains all the previous checkins and the
  multi-part checkin too.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25261: (QA follow-up) Capitalize return of needsconfirm
Martin Renvoize [Wed, 2 Sep 2020 11:00:07 +0000 (12:00 +0100)]
Bug 25261: (QA follow-up) Capitalize return of needsconfirm

This patch capitalizes the 'ADDITIONAL_MATERIALS' key in the
needsconfirm hash return value for CanBookBeIssued to restore
consistency with previous code and ensure SIP Checkout works as
expected.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25261: (QA follow-up) Add handling to SCI
Martin Renvoize [Thu, 13 Aug 2020 16:52:18 +0000 (17:52 +0100)]
Bug 25261: (QA follow-up) Add handling to SCI

Test plan
1/ Enable the feature as per previous patches
2/ Attempt to return an item with materials attached via the SCI
3/ Note that the return is blocked with the message '(The item
cannot be returned at a self service terminal, please see library
staff for assistance)'
4/ Signoff

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25261: (QA follow-up) Catch check in SIP Checkin
Martin Renvoize [Thu, 13 Aug 2020 15:44:28 +0000 (16:44 +0100)]
Bug 25261: (QA follow-up) Catch check in SIP Checkin

Test plan
1/ Enable the feature as per previous patches
2/ Attempt to return an item with materials attached via a SIP unit
3/ Note that the return is blocked with an alert type of '99'
4/ Signoff

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25261: (QA follow-up) Add handling to SCO
Martin Renvoize [Thu, 13 Aug 2020 15:27:50 +0000 (16:27 +0100)]
Bug 25261: (QA follow-up) Add handling to SCO

Test plan
1/ Enable the feature as per previous patches
2/ Attempt to checkout an item with materials attached via the SCO
3/ Note that the checkut is blocked with the message 'Item must be
issued at a circulation desk'
4/ Signoff

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25261: (QA follow-up) Catch check in SIP Checkout
Martin Renvoize [Thu, 13 Aug 2020 15:23:25 +0000 (16:23 +0100)]
Bug 25261: (QA follow-up) Catch check in SIP Checkout

Test plan
1/ Enable the feature as per previous patches
2/ Attempt to checkout an item with materials attached via a SIP unit
3/ Note that the checkut is blocked with the message 'Item must be
issued at a circulation desk'
4/ Signoff

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25261: (QA follow-up) Add confirmation to issues table
Martin Renvoize [Wed, 5 Aug 2020 09:52:48 +0000 (10:52 +0100)]
Bug 25261: (QA follow-up) Add confirmation to issues table

The issues table allows for checkins and was not appropriately
requireing confirmation for the multi-part confirmation added in this
bug.

Test plan
1/ Enable the feature as per previous patches
2/ Checkot an item with attached materials
3/ Navigate to a page that display your users issues table (the checkout
page is a reasonable example)
4/ You should have the option to select items for return in the table
(If not, use the column settings to enable the feature)
5/ Select at least the item with attached materials to return
6/ Upon clicking the return buttton you should find that items without
additional materials are returned as expected, but rows with additional
materials turn yellow and contain a message and additional checkbox for
confirmation in the table.
7/ Ensure the checkbox is selected and click the return button again
8/ This item should have been returned.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25261: (QA follow-up) Non-confirm on return
Martin Renvoize [Fri, 24 Jul 2020 11:05:29 +0000 (12:05 +0100)]
Bug 25261: (QA follow-up) Non-confirm on return

This patch updates the confirmation from an alert to a dismissable modal
which allows for optionally not checking the item in

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25261: (QA follow-up) Simplify tests and conditions
Jonathan Druart [Fri, 24 Jul 2020 08:33:26 +0000 (10:33 +0200)]
Bug 25261: (QA follow-up) Simplify tests and conditions

Use build_sample_item in tests
Simplify tests for the confirmation

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25261: (QA follow-up) Add unit tests
Martin Renvoize [Wed, 6 May 2020 09:33:35 +0000 (10:33 +0100)]
Bug 25261: (QA follow-up) Add unit tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25261: (follow-up) item.material may contain non-numerics
Martin Renvoize [Wed, 6 May 2020 08:25:37 +0000 (09:25 +0100)]
Bug 25261: (follow-up) item.material may contain non-numerics

Whilst QAing bug 13547 it was highlighted to me the at the 952$3 field,
and thus the item.materials field, may contain arbitrary notes about the
material rather than just numeric values. As such we need to check for
the field being defined as aposed to greater than '0'.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25261: (follow-up) Rename CircConfirmParts to CircConfirmItemParts
Martin Renvoize [Wed, 6 May 2020 08:20:32 +0000 (09:20 +0100)]
Bug 25261: (follow-up) Rename CircConfirmParts to CircConfirmItemParts

This clarifies the preference name to make it clear we are talking about
the 'parts' that make up an 'item'. 'Part' is a well known term in
british english libraries and I think perhaps 'Materials' may be
confused with other terms?

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25261: Checkout confirmation depending on syspref
Frédéric Demians [Thu, 30 Apr 2020 10:03:19 +0000 (12:03 +0200)]
Bug 25261: Checkout confirmation depending on syspref

With this follow-up patch, the intended confirmation of checkin based on
CircConfirmParts value is effective.

Sponsored-by: Royal College of Music [https://www.rcm.ac.uk/]
Sponsored-by: PTFS Europe [https://ptfs-europe.com/]
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25261: Require confirmation of multiple parts items
Martin Renvoize [Wed, 5 Aug 2015 12:52:09 +0000 (13:52 +0100)]
Bug 25261: Require confirmation of multiple parts items

Test plan
1/ Catalogue an item to contain multiple parts by populating 'Materials
specified (bound volume or other part)'
2/ Enable the new system preference 'CircConfirmParts'
3/ Attempt to checkout the item created in step 1 to a user and note
that confirmation is now required.
4/ Checkout the item
5/ Attempt to checkin the item you have just checked out and note that
confirmation is required.
6/ Signoff

Sponsored-by: Royal College of Music [https://www.rcm.ac.uk/]
Sponsored-by: PTFS Europe [https://ptfs-europe.com/]
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25261: Add system preference
Martin Renvoize [Tue, 28 Apr 2020 12:13:00 +0000 (13:13 +0100)]
Bug 25261: Add system preference

Sponsored-by: Royal College of Music [https://www.rcm.ac.uk/]
Sponsored-by: PTFS Europe [https://ptfs-europe.com/]
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 14648: Take advantage of I18N to deal with plural
Jonathan Druart [Wed, 30 Sep 2020 13:16:25 +0000 (15:16 +0200)]
Bug 14648: Take advantage of I18N to deal with plural

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 14648: (QA follow-up) Terminology items-reserves delete-remove
Katrin Fischer [Thu, 17 Sep 2020 09:34:57 +0000 (09:34 +0000)]
Bug 14648: (QA follow-up) Terminology items-reserves delete-remove

- As we have batch add reserves, we should also have batch remove reserves
- Delete items sounds a bit scary, removed items I think is a little better here

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 14648: (QA follow-up) Add missing filters
Katrin Fischer [Thu, 17 Sep 2020 09:22:39 +0000 (09:22 +0000)]
Bug 14648: (QA follow-up) Add missing filters

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 14648: Batch remove reserve items
Joseph Sikowitz [Fri, 17 Jul 2020 15:34:30 +0000 (11:34 -0400)]
Bug 14648: Batch remove reserve items

Adds "Batch remove items" button to course-reserves.tt. Creates batch_rm_items.pl and batch_rm_items.tt. Allows user to enter a list of
barcode numbers so that they will be removed from all course reserves to which they are attached. A dialog box will provide a warning
before the final deletion is made.

This patch also now moves barcodes that are invalid or not attached to a course reserve to the invalid barcodes output. It also provides
a count of the courses that the deleted items were attached to.

Test Plan
1. Log in as a user with permissions to add and delete course reserves
2. Add the same items to multiple course reserves
3. Go to the main course reserves page (i.e. /cgi-bin/koha/course_reserves/course-reserves.pl)
4. Click the "- Batch remove items" button
5. Enter the barcodes that you added to multiple reserves in step 1
6. Click submit
7. Click Ok if you are ready to delete all of these items
8. Check each course reserve that you added the items to in step 1 to make sure the items you entered were deleted but nothing else
9. Repeat 2-5
10. Add an invalid barcode and a valid barcode that is not attached to a course reserve
11. Repeat 6-7
12. You should see that the items attached to course reserves were removed while the invalid and unattached barcodes were rejected
13. Log out
14. Log in as a user without permission to delete course reserves
15. Go to the main course reserves page (i.e. /cgi-bin/koha/course_reserves/course-reserves.pl)
16. You should not longer see the "- Batch remove items" button

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 19322: Typo in UNIMARC field 140 plugin
Owen Leonard [Mon, 14 Sep 2020 13:33:01 +0000 (13:33 +0000)]
Bug 19322: Typo in UNIMARC field 140 plugin

This patch corrects some incorrect information in the UNIMARC plugin for
tag 140. Literature code "li" should be "mystic literature."

To test you do not need a UNIMARC installation. Apply the patch and go
to Administration -> MARC frameworks and Actions -> MARC structure for
one of your frameworks.

- Edit subfields for a tag, e.g. 245. This is only for testing purposes
  so it doesn't have to be any particular tag.
- Change the options for one of the subfields, e.g. $a. Under "Other
  options (choose one), set "Plugin" to "unimarc_field_140.pl"
- Save changes.
- Open a bibliographic record for editing using the framework you
  modified.
- Click the plugin link next to the subfield you modified, e.c. 245$a.
- This should trigger the "UNIMARC field 140 builder" popup window.
- Find "Literature" and select "Mystic literature." Save.
- In the MARC editor, the field you modified should contain the value
  "li" at position 17-18.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 19327: Typo in UNIMARC field 128a plugin
Owen Leonard [Mon, 14 Sep 2020 13:49:14 +0000 (13:49 +0000)]
Bug 19327: Typo in UNIMARC field 128a plugin

This patch corrects some incorrect information in the UNIMARC plugin for
tag 128$a. The value for "partsong" should be "pt#"

To test you do not need a UNIMARC installation. Apply the patch and go
to Administration -> MARC frameworks and Actions -> MARC structure for
one of your frameworks.

- Edit subfields for a tag, e.g. 245. This is only for testing purposes
  so it doesn't have to be any particular tag.
- Change the options for one of the subfields, e.g. $a. Under "Other
  options (choose one), set "Plugin" to "unimarc_field_128a.pl"
- Save changes.
- Open a bibliographic record for editing using the framework you
  modified.
- Click the plugin link next to the subfield you modified, e.c.
  245$a.
- This should trigger the "UNIMARC field 128a builder" popup window.
- Select "partsong" in the dropdown. Save.
- In the MARC editor, the field you modified should contain the
  value "pt#"
- Trigger the popup window again and click "Save" without making
  changes.
- The value in the MARC editor should be the same.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 21979: Add unit tests
Kyle M Hall [Fri, 25 Sep 2020 13:35:49 +0000 (09:35 -0400)]
Bug 21979: Add unit tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 21979: Add option to SIP2 config to send arbitrary item field in CR instead of...
Kyle M Hall [Fri, 7 Dec 2018 19:32:00 +0000 (14:32 -0500)]
Bug 21979: Add option to SIP2 config to send arbitrary item field in CR instead of collection code

Some libraries need to send a different field as the collection code,
depending on how the library catalogs items. We should allow any arbitrary
item field to be used as the value for the CR field.

Test Plan:
1) Apply this patch
2) Set the new option cr_item_field to 'shelving_location'
3) Restart the SIP server
3) Perform a checkin via SIP
4) Note the CR field contains the shelving location code in the response
5) Perform an item information request
6) Note the CR field contains the shelving location code in the response

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23114: (QA follow-up) Slightly rephrase message when both barcode options are...
Katrin Fischer [Sat, 26 Sep 2020 18:36:12 +0000 (20:36 +0200)]
Bug 23114: (QA follow-up) Slightly rephrase message when both barcode options are used

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23114: Inventory: allow to scan barcodes
Matthias Meusburger [Wed, 26 Jun 2019 12:58:44 +0000 (14:58 +0200)]
Bug 23114: Inventory: allow to scan barcodes

This patch allows the user to scan barcodes in the inventory tool
(in addition to upload a barcode file, like in other tools)

Test plan:
 1) Apply the patch.
 2) Check that you can still upload a barcode file.
 3) Check that you can scan/enter barcodes in the new textarea.
 4) Check that if you both upload a barcode file and enter barcodes,
    you will be prompted to choose only one method.
 5) Check that you can then proceed to the next step by either resetting the
    upload file input or emptying the textarea.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24155: (follow-up) Template fixes and updates
Owen Leonard [Fri, 18 Sep 2020 15:28:17 +0000 (15:28 +0000)]
Bug 24155: (follow-up) Template fixes and updates

This patch makes a few minor changes to the OPAC and staff interface
templates:

- In both, the "Apply field weights" checkbox will only appear after the
  "More options" button has been clicked. Otherwise a hidden input sets
  the value to 1.
- In both, the checkbox now appears below the search fields.
- Checkboxes are now wrapped in the <label> tag to ensure the label is
  clickable.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24155: (follow-up) Add span with id to weighted search option
Nick Clemens [Mon, 31 Aug 2020 12:38:02 +0000 (12:38 +0000)]
Bug 24155: (follow-up) Add span with id to weighted search option

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24155: Apply weights if not advanced search
Nick Clemens [Mon, 18 May 2020 17:32:43 +0000 (17:32 +0000)]
Bug 24155: Apply weights if not advanced search

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24155: Make weighting an option on advanced search
Nick Clemens [Wed, 26 Feb 2020 14:30:17 +0000 (14:30 +0000)]
Bug 24155: Make weighting an option on advanced search

Currently we apply weighting to all searches except advanced search. The theory
being that when selecting indexes we don't want to apply weights. When searching
in ES weights are only applied to relevant results so it doesn't matter.

i.e. if weighting author*100 but searching subject, a term matching the subject search in author
is not boosted.

Given this, we should always apply weights, unless the user wishes not to

To test:
1 - Set some weighting
2 - Do some searches
3 - Note your terms and results, try advanced and regular searches specifying indexes or not
4 - Apply patch
5 - Note that opac and staff advanced search have option to apply weights
6 - Compare searches after the patch to see how weighting affects, it should be beneficial or not at all

Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24322: Simplify condition to separate elements
Jonathan Druart [Wed, 30 Sep 2020 12:33:47 +0000 (14:33 +0200)]
Bug 24322: Simplify condition to separate elements

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24322: National Library of Medicine (NLM) call number to XSLT Detail
Olli-Antti Kivilahti [Sun, 13 Sep 2020 21:57:41 +0000 (23:57 +0200)]
Bug 24322: National Library of Medicine (NLM) call number to XSLT Detail

This adds MARC21 060 - National Library of Medicine Call Number
https://www.loc.gov/marc/bibliographic/bd060.html

To test:
- Catalog records using the 060, examples can be found in the
  LOC documentation.
- Verify that the field displays on the detail pages in staff
  and OPAC

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
RRescued this patch by redoing the changes. Only change made
was moving the section up before "Other classification".

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25242: Compiled CSS
Jonathan Druart [Thu, 1 Oct 2020 08:33:08 +0000 (10:33 +0200)]
Bug 25242: Compiled CSS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25242: Improve column wrapping for holdingst
Martin Renvoize [Tue, 1 Sep 2020 16:11:24 +0000 (17:11 +0100)]
Bug 25242: Improve column wrapping for holdingst

This patch attempts to improve the column wrapping for the holdingst
datatable and sets the tabel to fixed width to prevent overlapping
with other content on high zoom levels/low width screen sizes.

Test plan
1/ Build the OPAC CSS from the updated SCSS
2/ Navigate to an item with holdings visible in the OPAC
3/ 'Play' with various window sizes and zoom levels.
4/ The table should not overlap with right navigation content
5/ Signoff

NOTE: This is an alternative patch to those pushed and reverted that
attempted to provide a global fix to overlap issues. This patch
specifically targets just the holdings table in the opac detail view.

Signed-off-by: Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se>
Signed-off-by: Alexis Ripetti <alexis.ripetti@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25771: Allow the user to sort checkouts by the renew column in the OPAC
Owen Leonard [Tue, 16 Jun 2020 13:16:30 +0000 (13:16 +0000)]
Bug 25771: Allow the user to sort checkouts by the renew column in the OPAC

This patch makes it possible for the logged-in OPAC user to sort their
checkouts by the number of renewals they have remaining on their
checkouts.

To test, apply the patch and log in to the OPAC as a user with multiple
checkouts. To fully test the patch's functionality the user's checkouts
should have a varying number of renewals available.

On the "your summary" page, confirm that the "Renew" column is now
sortable and that it sorts correctly by the number of renewals left on
each checked-out item.

Signed-off-by: Henry Bolshaw <bolshawh@parliament.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25776: DBIC schema changes
Jonathan Druart [Wed, 30 Sep 2020 15:33:33 +0000 (17:33 +0200)]
Bug 25776: DBIC schema changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25776: DBRev 20.06.00.042
Jonathan Druart [Wed, 30 Sep 2020 14:16:31 +0000 (14:16 +0000)]
Bug 25776: DBRev 20.06.00.042

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25776: (QA follow-up) Add missing filter
Martin Renvoize [Thu, 17 Sep 2020 08:02:32 +0000 (09:02 +0100)]
Bug 25776: (QA follow-up) Add missing filter

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25776: (follow-up) Fix sorting by change date in notices table
Katrin Fischer [Mon, 31 Aug 2020 21:53:29 +0000 (21:53 +0000)]
Bug 25776: (follow-up) Fix sorting by change date in notices table

Some markup was missing to sort the date correctly.

To test:
- Verify date sorting in the notices table works as expected

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25776: Add a 'last updated' column for notices
Katrin Fischer [Thu, 27 Aug 2020 10:38:25 +0000 (10:38 +0000)]
Bug 25776: Add a 'last updated' column for notices

This add an 'udated_on' column to the letter table and displays
the information in 'slips and notices'.

To test:
- Apply patch
- Run updatedatabase
  Note: the existing letters will all be set to the
  currnet date).
- Go to Tools > Notices and slips
- Verify there is a new column "Last updated" in the table
  Note: The table will always display the newest change date
  of the different message transport types.
- Edit any notice
- Verify the "Last updated" is shown for any transport type
  with an existing notice definition
- Edit and add a notice
- Verify the dates are correctly stored
- Test the column configuration for the new column works
  correctly

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26484: Add serials-related reports to serials sidebar menu
Owen Leonard [Fri, 18 Sep 2020 13:14:33 +0000 (13:14 +0000)]
Bug 26484: Add serials-related reports to serials sidebar menu

This patch adds a section to the serials sidebar menu for showing
serials reports.

To test, apply the patch and go to Serials.

- If you are logged in as a user with permission to access reports you
  should see a new "Reports" heading in the sidebar menu and a link to
  the serials statistics wizard.
- Confirm that the link works correctly.
- Log in as a user without reports permission and confirm that the
  section doesn't appear.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26089: Add acquisitions-related reports to acquisitions sidebar menu
Owen Leonard [Wed, 29 Jul 2020 15:18:12 +0000 (15:18 +0000)]
Bug 26089: Add acquisitions-related reports to acquisitions sidebar menu

This patch adds links to two acquisitions-related reports in the sidebar
menu shown on acquisitions pages: Acquisitions statistics wizard and
orders by fund.

To test, apply the patch and go to the Acquisitions page.

- If you are logged in as a user with permission to access reports you
  should see a new "Reports" heading in the sidebar menu and links to
  two reports.
- Confirm that the links work correctly.
- Log in as a user without reports permission and confirm that the
  section doesn't appear.

Signed-off-by: Brandon J <brandon.jimenez@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26207: (follow-up) Hide comparison toolbar if there are no comparisons
Owen Leonard [Mon, 28 Sep 2020 11:09:01 +0000 (11:09 +0000)]
Bug 26207: (follow-up) Hide comparison toolbar if there are no comparisons

This patch adds a check to the JavaScript so that the comparisons
toolbar will be hidden if there are no system preferences in the results
to compare.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26207: (follow-up) Remove whitespace from markup
Owen Leonard [Thu, 20 Aug 2020 12:47:01 +0000 (12:47 +0000)]
Bug 26207: (follow-up) Remove whitespace from markup

Markup indentation around log entries in the template cause extra
whitespace in the diff view. Removing the markup whitespace corrects it.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26207: Compare values of system preference log entries
Owen Leonard [Fri, 14 Aug 2020 12:08:10 +0000 (12:08 +0000)]
Bug 26207: Compare values of system preference log entries

This patch adds the ability to compare the values of system preferences
in the system log. The user can select two entries in the log search
results and view a diff of the two versions.

The feature is designed specifically for CSS and JS preferences like
OpacUserCSS or OpacUserJS where code changes are difficult to track.

To test, apply the patch and go to Tools -> Log viewer. You may need to
add values and make changes to preferences like OpacUserCSS if you don't
already have a history in your logs.

- Perform a search for log entries in the "System prefs" module.
- In the results, each entry for a system preference should have a
  "Compare" checkbox."
- Check one of the checkboxes.
  - The table should now be filtered by the system preference name. This
    facilitates meaningful selections for comparison.
  - You should see a message displayed onscreen, "Showing results
    for...[ preference name]"
  - The "Check none" link in the toolbar above the table should now be
    enabled.
  - If youy click the "Compare selected" link in the toolbar at this
    stage you should get a message, "You must select two entries to
    compare."
  - If you uncheck the checkbox the table should return to an unfiltered
    state.
- Check two checkboxes.
  - The "Compare selected" link in the toolbar should now be enabled.
  - Next to each of the checkboxes you checked should be a "View
    comparison" link.
  - Clicking either of the "View comparison" links or the "Compare
    selected" link should trigger a modal with the diff view of the two
    preferences.
- Try to select a third checkbox. You should get a message, "You can
  select a maximum of two checkboxes." The box should remain unchecked.
- Test that unchecking both checkboxes manually clears the table filter.
- Test that the "Check none" link works to uncheck checked boxes and
  clear the table filter.

Signed-off-by: Brandon J <brandon.jimenez@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26266: Add jQuery validator to opac-password-recovery.tt
Timothy Alexis Vass [Fri, 18 Sep 2020 05:55:22 +0000 (05:55 +0000)]
Bug 26266: Add jQuery validator to opac-password-recovery.tt

To test:
0) Activate password reset in system preferences.
1) Initiate a password recovery.
2) Try to submit with an invalid password.
3) Confirm that validation occurs.
4) Try to submit with mismatching passwords.
5) Confirm that validation occurs.
6) Sign off.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26268: DBIC schema changes
Jonathan Druart [Wed, 30 Sep 2020 15:32:01 +0000 (17:32 +0200)]
Bug 26268: DBIC schema changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26268: DBRev 20.06.00.041
Jonathan Druart [Wed, 30 Sep 2020 14:16:31 +0000 (14:16 +0000)]
Bug 26268: DBRev 20.06.00.041

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26268: Fix deleteditems query in DB rev
Jonathan Druart [Tue, 29 Sep 2020 15:05:54 +0000 (17:05 +0200)]
Bug 26268: Fix deleteditems query in DB rev

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26268: Remove invalid mappings from MARC frameworks when items.paidfor is removed
Katrin Fischer [Fri, 25 Sep 2020 20:09:33 +0000 (20:09 +0000)]
Bug 26268: Remove invalid mappings from MARC frameworks when items.paidfor is removed

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26268: Correct mapping for internal note to items.itemnotes_nonpublic
Katrin Fischer [Sat, 26 Sep 2020 21:44:02 +0000 (23:44 +0200)]
Bug 26268: Correct mapping for internal note to items.itemnotes_nonpublic

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26268: (QA follow-up) Conditionally remove
Martin Renvoize [Fri, 11 Sep 2020 11:51:47 +0000 (12:51 +0100)]
Bug 26268: (QA follow-up) Conditionally remove

This patch adds conditions to prevent the removal of items.paidfor if it
is populated and also adds the removal fo the marc_subfield_structure
row if it exists.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26268: (QA follow-up) Split DB update checks
Martin Renvoize [Fri, 4 Sep 2020 16:04:53 +0000 (17:04 +0100)]
Bug 26268: (QA follow-up) Split DB update checks

This patch splits the DB update such that the 'paidfor' field is checked
for distinctly in the deleteditems table rather than assuming if it
exists in the items table it will also exist in deleteditems.

We also correct the check as highlights by Julian.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26268: Remove final references to paidfor db field
Martin Renvoize [Fri, 21 Aug 2020 10:29:10 +0000 (11:29 +0100)]
Bug 26268: Remove final references to paidfor db field

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26268: Remove items.paidfor from the database
Martin Renvoize [Fri, 21 Aug 2020 10:25:12 +0000 (11:25 +0100)]
Bug 26268: Remove items.paidfor from the database

In bug 19919 we removed all references to setting, unsettling and
referring to the paidfor field but we neglected to actually drop the
field from the database (I think I intended to do this, but was asking
for feedback on the approach before adding the actual db change.. then
completely forgot when it went through SO/QA quickly).

In bug 23463 we inadvertently re-introduced some of the setting code
during a rebase.

In bug 18501 we then moved that inadvertently re-introduced setter into
Koha::Item->store.

We should kill it off once and for all!

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26299: Use same SMS number help text in OPAC as staff interface
Nick Clemens [Thu, 3 Sep 2020 13:25:45 +0000 (13:25 +0000)]
Bug 26299: Use same SMS number help text in OPAC as staff interface

The SMS number help text in the OPAC follows a North American phone
number style. It should be more generic. To that end, this patch
makes the OPAC use the same help text for SMS numbers as
the staff interface

To test:
1) Apply the patch
2) Set "SMSSendDriver" to "Anything" in global system preferences
3) Go to the following link and note the help text by SMS number
http://localhost:8081/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=51
4) Go to http://localhost:8080/cgi-bin/koha/opac-messaging.pl
5) Note that the help text in both interfaces uses the same wording

Signed-off-by: Alexis Ripetti <alexis.ripetti@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26325: Add primary_key_exists check to C4::Installer
Nick Clemens [Mon, 31 Aug 2020 16:43:53 +0000 (16:43 +0000)]
Bug 26325: Add primary_key_exists check to C4::Installer

To test:
1 - prove -v t/db_dependent/Installer.t

Signed-off-by: Brandon J <brandon.jimenez@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26338: Compiled CSS
Jonathan Druart [Thu, 1 Oct 2020 08:32:10 +0000 (10:32 +0200)]
Bug 26338: Compiled CSS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26338: Show tool plugins run in tools home
Fridolin Somers [Tue, 1 Sep 2020 13:43:19 +0000 (15:43 +0200)]
Bug 26338: Show tool plugins run in tools home

In tools home there is a link to the table showing tool plugins.
Would be great to be able to run a tool plugin directly from tools home.

Also adds the behavior than if there is no tool plugin, "Tool plugins"
section is not displayed in tools home.
No need of a link that goes to an empty table ;)

Test plan :
1) Enable plugins, dont install any
2) Go to "Tools" module : /cgi-bin/koha/tools/tools-home.pl
3) Check you dont see "Tool plugins"
4) Install a tool plugin like Carrousel https://inlibro.com/instructions-carrousel/
5) Refresh /cgi-bin/koha/tools/tools-home.pl
6) Check you see "Tool plugins" and a link to Carrousel
7) Click on link to Carrousel => You see plugin run
8) Disable Carrousel plugin
9) Refresh /cgi-bin/koha/tools/tools-home.pl
10) Check you dont see "Tool plugins"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26425: Update history.txt
Jonathan Druart [Fri, 11 Sep 2020 07:36:21 +0000 (09:36 +0200)]
Bug 26425: Update history.txt

With the modifications brought by
https://gitlab.com/koha-community/release-tools/-/issues/18

After the manual changes we can run the script with the 3 commits from
the issue #18 of release-tools.

* Add missing whitespace to align the dates
* Add all the releases (from the tag list) after 3.00.00

There is no change in the developers  numbering, neither in the wording.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26425: Manual changes
Jonathan Druart [Fri, 11 Sep 2020 07:33:27 +0000 (09:33 +0200)]
Bug 26425: Manual changes

Patches will be squashed when pushed.
Here the changes are done manually, we add the missing 0 for the
releases after 3.00.00 (with alpha, beta, etc)
And we remove all the laters, that will added automatically by the
release script

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26432: Remove unused ModZebrations
Marcel de Rooy [Fri, 11 Sep 2020 08:55:28 +0000 (08:55 +0000)]
Bug 26432: Remove unused ModZebrations

Test plan:
Git grep on ModZebrations

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26454: DBRev 20.06.00.040
Jonathan Druart [Wed, 30 Sep 2020 14:16:31 +0000 (14:16 +0000)]
Bug 26454: DBRev 20.06.00.040

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26454: Add system preference to set meta description for the OPAC
Timothy Alexis Vass [Wed, 16 Sep 2020 06:35:15 +0000 (08:35 +0200)]
Bug 26454: Add system preference to set meta description for the OPAC

Websites should have a meta description tag that shows in search engine results.
The content should also be available to set as a system preference.

To test:
1) Look at opac-main source (in the browser) and see that meta name="description" is missing.
2) Apply patch.
3) Run: perl installer/data/mysql/updatedatabase.pl
4) Go to system preferences > OPAC and add a description to OpacMetaDescription.
5) Look at opac-main source and confirm that meta name="description" now has content equal to the text set in the OpacMetaDescription system preference.
6) Sign off.

Sponsored by: Lunds University Libraries
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised. Newlines are preserved. Double quote is rendered
as &quot;. Nice enhancement!
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26462: Don't delete existing data for tests
Nick Clemens [Tue, 15 Sep 2020 10:11:33 +0000 (10:11 +0000)]
Bug 26462: Don't delete existing data for tests

These tests generate their own items, patrons, and circ rules. Existing
system data will not affect the results of the tests. We do not need
to delete information.

You may be able to notice the difference in speed of tests depending on your system. It should
be faster after applying

To test:
1 - Before applying patch:
    prove -v t/db_dependent/Holds.t
2 - It passes
3 - Apply patch
4 - prove -v t/db_dependent/Holds.t
5 - It passes

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26458: Get item details using only itemnumber
Owen Leonard [Mon, 14 Sep 2020 16:56:21 +0000 (16:56 +0000)]
Bug 26458: Get item details using only itemnumber

This patch modifies moredetail.pl so that it can accept an itemnumber as
a single parameter.

To test, apply the patch and view a bibliographic record in the
catalog which has one or more items.

 - In the table showing holdings, click the barcode to view the item
   detail page for that item.
 - In the location bar, modify the URL so that it uses only the
   itemnumber parameter, e.g.

   /cgi-bin/koha/catalogue/moredetail.pl?itemnumber=1234

   The page should load correctly, showing information about just that
   item.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26473: Get items for editing using only itemnumber
Owen Leonard [Wed, 16 Sep 2020 15:19:41 +0000 (15:19 +0000)]
Bug 26473: Get items for editing using only itemnumber

This patch modifies additem.pl so that it can accept an itemnumber as
a single parameter.

To test, apply the patch edit items on a bibliographic record which has
one or more items.

- In the location bar, modify the URL so that it uses only the
  itemnumber parameter, e.g.

  /cgi-bin/koha/cataloguing/additem.pl?itemnumber=12345

  The page should load the correct record's items.

- If you add the "op" parameter it should load the item for editing in
  the form:

  /cgi-bin/koha/cataloguing/additem.pl?itemnumber=12345&op=edititem

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26501: Add datatables to article-requests form
Marcel de Rooy [Mon, 21 Sep 2020 11:29:18 +0000 (11:29 +0000)]
Bug 26501: Add datatables to article-requests form

Actually two tables: one for pending and processing.
Variable active_table has been renamed to active_tab.
To prevent a flickering form we hide stuff until ready.

Test plan:
[1] Submit a few article requests.
[2] Verify that Process, Complete and Cancel still work via Actions.
[3] Test again with multiselect and top Actions menu.
[4] Test Search and Sort on the datatable.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26524: Save some processor cycles
Jonathan Druart [Tue, 29 Sep 2020 14:06:19 +0000 (16:06 +0200)]
Bug 26524: Save some processor cycles

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26524: Add Koha::Acquisition::Basket->orders
Tomas Cohen Arazi [Wed, 23 Sep 2020 18:56:41 +0000 (15:56 -0300)]
Bug 26524: Add Koha::Acquisition::Basket->orders

This patch adds a handy accessor for a basket's orders. It can be used
to embed orders on an API call or be used in controller scripts to
replace C4::* methods.

To test:
1. Apply this patches
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Acquisition/Basket.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26524: Unit tests
Tomas Cohen Arazi [Wed, 23 Sep 2020 18:56:32 +0000 (15:56 -0300)]
Bug 26524: Unit tests

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26530: Use patron card number as checkbox label during patron merge
Owen Leonard [Fri, 11 Sep 2020 16:32:29 +0000 (16:32 +0000)]
Bug 26530: Use patron card number as checkbox label during patron merge

This patch makes a minor change the the merge patrons template so that
on the patron selection stage the user can click the card number to
select the radio button.

To test, apply the patch and perform a patron search in the patrons
module.

- In patron search results, select two patrons to merge.
- Click the "Merge selected patrons" button.
- On the page showing the two patrons to merge, click each of the card
  numbers to confirm that it selects the correct radio button.

Signed-off-by: Jennifer <jennifer.marlatt@coronaca.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25320: (follow-up) Remove obsolete include file
Owen Leonard [Tue, 29 Sep 2020 11:17:34 +0000 (11:17 +0000)]
Bug 25320: (follow-up) Remove obsolete include file

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