]> git.koha-community.org Git - koha.git/log
koha.git
4 years agoBug 22417: Try to display pending jobs - only work if worker not started
Jonathan Druart [Thu, 20 Feb 2020 12:26:53 +0000 (13:26 +0100)]
Bug 22417: Try to display pending jobs - only work if worker not started

ie. no subscription yet

This needs to be fixed (if possible), or removed from the patchset

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22417: Handle errors
Jonathan Druart [Thu, 20 Feb 2020 11:23:07 +0000 (12:23 +0100)]
Bug 22417: Handle errors

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22417: Switch to STOMP
Jonathan Druart [Wed, 19 Feb 2020 13:00:03 +0000 (14:00 +0100)]
Bug 22417: Switch to STOMP

apt install rabbitmq-server
service rabbitmq-server start
rabbitmq-plugins enable rabbitmq_stomp
apt install libnet-stomp-perl
cp debian/scripts/koha-functions.sh /usr/share/koha/bin/koha-functions.sh
cp debian/scripts/koha-worker /usr/bin/
koha-worker --start kohadev
tail -f /var/log/rabbitmq/*

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 22417: Remove useless use statement

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22417: Add debian script koha-worker
Jonathan Druart [Wed, 19 Feb 2020 11:03:20 +0000 (12:03 +0100)]
Bug 22417: Add debian script koha-worker

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22417: Fix borrowernumber values
Jonathan Druart [Wed, 19 Feb 2020 10:14:53 +0000 (11:14 +0100)]
Bug 22417: Fix borrowernumber values

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22417: Add the ability to cancel a job
Jonathan Druart [Wed, 27 Feb 2019 13:34:42 +0000 (10:34 -0300)]
Bug 22417: Add the ability to cancel a job

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22417: Adapt the batch_record_modification tool
Jonathan Druart [Tue, 26 Feb 2019 00:46:01 +0000 (21:46 -0300)]
Bug 22417: Adapt the batch_record_modification tool

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22417: Add GUI to watch the progress of jobs
Jonathan Druart [Tue, 26 Feb 2019 00:45:35 +0000 (21:45 -0300)]
Bug 22417: Add GUI to watch the progress of jobs

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22417: Add Koha::BackgroundJob::BatchUpdateAuthority
Jonathan Druart [Tue, 26 Feb 2019 00:43:55 +0000 (21:43 -0300)]
Bug 22417: Add Koha::BackgroundJob::BatchUpdateAuthority

This is not ready yet!

Note that this is too close to Koha::BackgroundJob::BatchUpdateBiblio,
we will want to refactor bit of code.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22417: Add Koha::BackgroundJob::BatchUpdateBiblio
Jonathan Druart [Tue, 26 Feb 2019 00:43:45 +0000 (21:43 -0300)]
Bug 22417: Add Koha::BackgroundJob::BatchUpdateBiblio

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22417: Add Koha::BackgroundJob[s]
Jonathan Druart [Tue, 26 Feb 2019 00:42:43 +0000 (21:42 -0300)]
Bug 22417: Add Koha::BackgroundJob[s]

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22417: DBIX Schema changes
Jonathan Druart [Mon, 25 Feb 2019 16:31:48 +0000 (13:31 -0300)]
Bug 22417: DBIX Schema changes

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22417: UpdateDB entry
Jonathan Druart [Mon, 25 Feb 2019 16:31:15 +0000 (13:31 -0300)]
Bug 22417: UpdateDB entry

TODO:
- Add the FK on borrowernumber

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22343: Remove traces of libmail-sendmail-perl
Jonathan Druart [Mon, 5 Oct 2020 09:20:20 +0000 (11:20 +0200)]
Bug 22343: Remove traces of libmail-sendmail-perl

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22343: (follow-up) Remove traces of Mail::Sendmail - update POD
Jonathan Druart [Mon, 5 Oct 2020 09:19:16 +0000 (11:19 +0200)]
Bug 22343: (follow-up) Remove traces of Mail::Sendmail - update POD

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22343: (follow-up) Remove traces of Mail::Sendmail
Tomas Cohen Arazi [Fri, 2 Oct 2020 19:19:06 +0000 (16:19 -0300)]
Bug 22343: (follow-up) Remove traces of Mail::Sendmail

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22343: (follow-up) Make sure no invalid address is used in tests
Tomas Cohen Arazi [Fri, 2 Oct 2020 19:17:40 +0000 (16:17 -0300)]
Bug 22343: (follow-up) Make sure no invalid address is used in tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22343: Add exec flag on .t files
Jonathan Druart [Fri, 2 Oct 2020 16:05:08 +0000 (18:05 +0200)]
Bug 22343: Add exec flag on .t files

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22343: Compiled CSS
Jonathan Druart [Fri, 2 Oct 2020 13:27:52 +0000 (15:27 +0200)]
Bug 22343: Compiled CSS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26290: Display the correct default values on the admin page
Jonathan Druart [Fri, 2 Oct 2020 10:07:15 +0000 (12:07 +0200)]
Bug 26290: Display the correct default values on the admin page

The "Default configuration" section at the top of the SMTP servers admin page
contains the hardcoded values in Koha::SMTP::Servers->default_setting.

It should be the values from the config (and default to hardcoded values unless defined)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26290: Make Makefile.PL aware of SMTP configs
Tomas Cohen Arazi [Fri, 11 Sep 2020 14:27:17 +0000 (11:27 -0300)]
Bug 26290: Make Makefile.PL aware of SMTP configs

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26290: Make Koha::SMTP::Servers->get_default use koha-conf.xml
Tomas Cohen Arazi [Mon, 24 Aug 2020 19:47:58 +0000 (16:47 -0300)]
Bug 26290: Make Koha::SMTP::Servers->get_default use koha-conf.xml

This patch makes the mentioned method use the configured entry in
koha-conf.xml if present, instead of the hardcoded one, which is kept
for people that carries an old koha-conf.xml

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 26290: Add option forsetting default SMTP parameters in koha-conf.xml
Tomas Cohen Arazi [Mon, 24 Aug 2020 19:19:44 +0000 (16:19 -0300)]
Bug 26290: Add option forsetting default SMTP parameters in koha-conf.xml

This patch adds an entry to koha-conf.xml for setting a default SMTP
server config. 'koha-create' gets option switches for all options.

To test:
1. Use the tweaked script to crete a new instance
2. Notice it contains entries for smtp_server and they respect your
   options.
3. If you don't choose any option, it sets the current default.

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: DBRev 20.06.00.044
Jonathan Druart [Fri, 2 Oct 2020 13:26:41 +0000 (13:26 +0000)]
Bug 22343: DBRev 20.06.00.044

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22343: Fix runreport encoding issues
Jonathan Druart [Fri, 2 Oct 2020 13:22:33 +0000 (15:22 +0200)]
Bug 22343: Fix runreport encoding issues

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22343: Add the 'required' class when needed
Jonathan Druart [Fri, 2 Oct 2020 10:16:55 +0000 (12:16 +0200)]
Bug 22343: Add the 'required' class when needed

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22343: Correctly handle password on editing
Jonathan Druart [Fri, 2 Oct 2020 09:55:01 +0000 (11:55 +0200)]
Bug 22343: Correctly handle password on editing

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22343: Add warning to the about page if KohaAdminEmailAddress is invalid
Jonathan Druart [Fri, 2 Oct 2020 09:21:44 +0000 (11:21 +0200)]
Bug 22343: Add warning to the about page if KohaAdminEmailAddress is invalid

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22343: (QA follow-up) Wrap email creation inside the try/catch block
Tomas Cohen Arazi [Thu, 1 Oct 2020 14:28:59 +0000 (11:28 -0300)]
Bug 22343: (QA follow-up) Wrap email creation inside the try/catch block

At a later development stage, exceptions where added for bad addresses.
This wasn't addressed in the controllers.

This patch makes the basket and list sending controller scripts move
email creation inside the try/catch block to handle those situations. It
also UTF-8 encodes the attached marc.

On broadly testing this I found that if the TT templates that are used
to build the email contains non-latin characters, those get
double-encoded. So this patch also removes an explicit encoding that is
done, which colides with Email::MIME implicit encoding.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
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>