]> git.koha-community.org Git - koha.git/log
koha.git
4 years agoBug 23828: Unit tests
Nick Clemens [Wed, 16 Sep 2020 11:31:48 +0000 (11:31 +0000)]
Bug 23828: Unit tests

Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Bug 23828: (follow-up) fix unit test merge

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Bug 23828: (QA follow-up) Fix number of tests

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26496: Add op field to Budget Planning
David Cook [Mon, 21 Sep 2020 02:02:27 +0000 (02:02 +0000)]
Bug 26496: Add op field to Budget Planning

Without this patch, it's impossible to save a budget plan.

With this patch, it is possible to save a budget plan.

Test:
1. Apply patch
2. Modify a budget (e.g. http://localhost:8081/cgi-bin/koha/admin/aqbudgetperiods.pl?op=add_form&budget_period_id=1)
3. Unlock the budget if necessary by unticking "Lock budget" and click "Save"
4. Go to a budget (e.g. http://localhost:8081/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=1)
5. Click "Planning" and "Plan by libraries"
6. Click "Auto-fill row" on the first line
7. Click "Save"
8. Note that results are saved and shown on the newly loaded page

To verify this patch is necessary, do the test plan without applying the patch.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.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 23376: If a single item is returned we cannot count
Nick Clemens [Thu, 15 Oct 2020 14:45:00 +0000 (14:45 +0000)]
Bug 23376: If a single item is returned we cannot count

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26515: Don't need to call safe_to_delete
Jonathan Druart [Thu, 15 Oct 2020 13:17:46 +0000 (15:17 +0200)]
Bug 26515: Don't need to call safe_to_delete

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26580: Remove unused C4::Acquisition::DelBasket function
Tomas Cohen Arazi [Wed, 30 Sep 2020 15:03:41 +0000 (12:03 -0300)]
Bug 26580: Remove unused C4::Acquisition::DelBasket function

Bug 26577 removed the only use of it.

To test:
1. Apply this patch
2. Run:
   $ git grep DelBasket
=> SUCCESS: Only finds references to DelBasketGroup
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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 26579: Remove unused C4::Acquisition::DelOrder function
Tomas Cohen Arazi [Wed, 30 Sep 2020 14:47:03 +0000 (11:47 -0300)]
Bug 26579: Remove unused C4::Acquisition::DelOrder function

This patch removes an unused function, its tests, and adjusts other test
files that relied on it by replacing it with $order->cancel calls.

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/Acquisition.t \
           t/db_dependent/Acquisition/GetBasketsInfosByBookseller.t \
           t/db_dependent/Acquisition/close_reopen_basket.t
=> SUCCESS: Tests pass!
2. Apply this patch
3. Repeat (1)
=> SUCCESS: Tests pass!
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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 26577: Make basket.pl and cancelorder.pl use ->cancel
Tomas Cohen Arazi [Wed, 30 Sep 2020 14:14:37 +0000 (11:14 -0300)]
Bug 26577: Make basket.pl and cancelorder.pl use ->cancel

This patch makes the mentioned controller scripts use the new
$order->cancel method instead of DelOrder.

To test:
1. Apply this patches
2. Have a basket with some orders
3. Play with cancelling orders and removing baskets
=> SUCCESS: No behaviour change!
=> SUCCESS: No errors!
4. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26515: (QA follow-up) Preserve original behaviour
Tomas Cohen Arazi [Thu, 15 Oct 2020 12:37:56 +0000 (09:37 -0300)]
Bug 26515: (QA follow-up) Preserve original behaviour

This patch removes the use of $self->items->safe_delete, as we don't
want to change the current behaviour (i.e. delete what can be deleted)
As safe_delete would rollback entirely, there was a behaviour change.

Now items are deleted in a loop that catches any problem and reports it
using the new ->add_message mechanism. The $item object is added to the
message payload so it doesn't need to be queried by the caller for
providing UI feedback.

Tests are augmented accordingly,

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26515: Better feedback on errors
Tomas Cohen Arazi [Fri, 9 Oct 2020 20:01:29 +0000 (17:01 -0300)]
Bug 26515: Better feedback on errors

This patch makes the possible causes of biblio removal failure to be
specified on the passed error message. This way the UI could render
better reports on the situation.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26515: Remove branchcode from mock_userenv
Jonathan Druart [Thu, 8 Oct 2020 10:16:49 +0000 (12:16 +0200)]
Bug 26515: Remove branchcode from mock_userenv

It's the default behaviour of mock_userenv

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26515: (follow-up) Do not count self when checking orders
Tomas Cohen Arazi [Wed, 30 Sep 2020 14:06:34 +0000 (11:06 -0300)]
Bug 26515: (follow-up) Do not count self when checking orders

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26515: Add Koha::Acquisition::Order->cancel
Tomas Cohen Arazi [Wed, 23 Sep 2020 14:36:21 +0000 (11:36 -0300)]
Bug 26515: Add Koha::Acquisition::Order->cancel

This patch introduces an OO replacement for DelOrder. It does the same
thing. It doesn't die when trying to delete items or biblio. It sets an
error message on the order object so the caller knows what happened.

To test:
1. Apply this patches
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Acquisition/Order.t
=> SUCCESS: Tests pass!
3. Read the tests carefully to understand how they cover all use cases.
4- Sign off :-D

Sponsored-by: ByWater Solutions
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26515: Unit tests
Tomas Cohen Arazi [Wed, 23 Sep 2020 14:35:53 +0000 (11:35 -0300)]
Bug 26515: Unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26555: (QA follow-up) Add a 'payload' attribute for carrying useful things
Tomas Cohen Arazi [Thu, 15 Oct 2020 12:35:43 +0000 (09:35 -0300)]
Bug 26555: (QA follow-up) Add a 'payload' attribute for carrying useful things

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26555: Make sure _messages is always initialized
Tomas Cohen Arazi [Wed, 30 Sep 2020 12:42:18 +0000 (09:42 -0300)]
Bug 26555: Make sure _messages is always initialized

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26555: Add ->messages and ->add_message to Koha::Object
Tomas Cohen Arazi [Mon, 28 Sep 2020 13:49:24 +0000 (10:49 -0300)]
Bug 26555: Add ->messages and ->add_message to Koha::Object

This patch adds a way to make Koha::Object-derived classes to carry
messages around. This targets non-fatal errors, or around action flags
for the caller, to avoid complex exception handling on the controllers when
it is not expected to be fatal.

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

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 26555: Add Koha::Object::Message
Tomas Cohen Arazi [Mon, 28 Sep 2020 13:23:50 +0000 (10:23 -0300)]
Bug 26555: Add Koha::Object::Message

This patch introduces a tiny class for encapsulating execution messages in
Koha::Object derived classes.

To test:
1. Apply this patch
2. Run;
   $ kshell
  k$ prove t/Koha/Object/Message.t
=> SUCCESS: Tests pass!
3. Sign off :-D

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 25460: Remove swp file
Jonathan Druart [Thu, 15 Oct 2020 12:00:20 +0000 (14:00 +0200)]
Bug 25460: Remove swp file

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25898: Fix new occurrences
Jonathan Druart [Thu, 15 Oct 2020 11:56:41 +0000 (13:56 +0200)]
Bug 25898: Fix new occurrences

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26534: Compiled CSS
Jonathan Druart [Thu, 15 Oct 2020 10:53:06 +0000 (12:53 +0200)]
Bug 26534: Compiled CSS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 18170: Use GetDescriptionByKohaField
Martin Renvoize [Thu, 1 Oct 2020 13:14:13 +0000 (14:14 +0100)]
Bug 18170: Use GetDescriptionByKohaField

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 18170: Show damaged status in table of checkins
Katrin Fischer [Thu, 24 Sep 2020 21:29:10 +0000 (21:29 +0000)]
Bug 18170: Show damaged status in table of checkins

This copies the display of the damaged status from the holds and
checkouts pages in staff.

To test:
- Apply patch
- Check out some items, some damaged, others not
- Verify the damaged status is displayed below the due date
  in the table of checkouts
- Check the items in from the checkin page
- Verify the damaged status displays in the table of checkins

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.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 25460: DBRev 20.06.00.052
Jonathan Druart [Thu, 15 Oct 2020 10:53:25 +0000 (10:53 +0000)]
Bug 25460: DBRev 20.06.00.052

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25460: (QA follow-up) Remove stray quote from system preference description
Katrin Fischer [Mon, 5 Oct 2020 00:38:47 +0000 (00:38 +0000)]
Bug 25460: (QA follow-up) Remove stray quote from system preference description

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25460: (QA follow-up) Readd ending punctuation to sys pref description
Katrin Fischer [Mon, 5 Oct 2020 00:28:57 +0000 (00:28 +0000)]
Bug 25460: (QA follow-up) Readd ending punctuation to sys pref description

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25460: Add unit test for change to C4::OAI::Sets->UpdateOAISetsBiblio()
Alex Buckley [Thu, 24 Sep 2020 10:54:17 +0000 (10:54 +0000)]
Bug 25460: Add unit test for change to C4::OAI::Sets->UpdateOAISetsBiblio()

Test plan:

1. Run unit test:
sudo koha-shell <instancename>
prove t/db_dependent/OAI/Sets.t

2. All tests should pass

Sponsored-by: Catalyst IT
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
JD amended patch: Put tests inside a subtest, and perltidy

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25460: Update OAI sets when adding/editing/deleting item records
Alex Buckley [Tue, 12 May 2020 02:57:20 +0000 (02:57 +0000)]
Bug 25460: Update OAI sets when adding/editing/deleting item records

Also adds syspref to optionally choose to embed item information in record when adding/editing bibliographic and item records.

Test plan:
1. Enable OAI-PMH and OAI-PMH:AutoUpdateSets sysprefs
2. Create a biblio record with 1 item with CCODE of NFIC
3. In Administration > OAI Sets configuration create a set and define
the mapping:
Field: 952, Subfield: 8, Operator: is equal to,  Value: FIC

4. Run the build_oai_sets.pl script:
 cd misc/migration_tools
 sudo koha-shell <instancename>
 ./build_oai_sets.pl -i

5. Check what items are in the OAI set:
sudo koha-mysql <instancename>
select * from oai_sets_biblios;

6. Observe your bib from step 2 is not in the set
7. [ITEM EDIT] Edit the item to have CCODE of FIC repeat step 5 and observe biblio is still not in OAI set
8. [ITEM ADD] Add a new item with CCODE of FIC and repeat step 5 and observe biblio
still not in OAI set
9. [ITEM DELETE] Delete one of your 2 items and repeat step 5 and observe biblio still
not in OAI set

10. Apply patch, update database and restart plack (instruction below on
the latter 2 actions):

cd installer/data/mysql
sudo koha-shell <instancename>
./updatedatabase.pl
sudo koha-plack --restart <instancename>

11. Enable new syspref OAI-PMH:AutoUpdateSetsEmbedItemData
12. [ITEM ADD] Repeat step 8 and observe biblio is now in the OAI set
13. [ITEM EDIT] Edit both items to have a CCODE of NFIC and repeat step 5 and
observe bib now not in set
14. [ITEM EDIT] Edit one of the items to have CCODE of FIC and repeat step 5
and observe bib now in set
15. [ITEM DELETE] Delete all items off bib and repeat step 5 and observe bib
no longer in set

Sponsored-By: Catalyst IT
Signed-off-by: David Nind <david@davidnind.com>
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 25898: (follow-up) POD
Tomas Cohen Arazi [Wed, 7 Oct 2020 17:33:19 +0000 (14:33 -0300)]
Bug 25898: (follow-up) POD

Our docs shouldn't suggest indirect object notation is accepted or
encouraged.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25898: Prohibit indirect object notation
Julian Maurice [Mon, 29 Jun 2020 17:07:54 +0000 (21:07 +0400)]
Bug 25898: Prohibit indirect object notation

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26534: Use IF ELSE directly on h5 opening tag
Fridolin Somers [Wed, 30 Sep 2020 09:00:58 +0000 (11:00 +0200)]
Bug 26534: Use IF ELSE directly on h5 opening tag

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 26534: Replace 'grade' by 'is-patron' and 'patron-type'
Fridolin Somers [Wed, 30 Sep 2020 08:07:26 +0000 (10:07 +0200)]
Bug 26534: Replace 'grade' by 'is-patron' and 'patron-type'

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 26534: (follow-up) Only center when using patronimages
Martin Renvoize [Fri, 25 Sep 2020 11:48:30 +0000 (12:48 +0100)]
Bug 26534: (follow-up) Only center when using patronimages

I felt the change to always center the user title worked well when
patronimages was enabled, but not so well when it was not (it looked
strange without a background for non-staff users).

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 26534: (QA follow-up) Fix CSS declaration
Martin Renvoize [Fri, 25 Sep 2020 11:31:57 +0000 (12:31 +0100)]
Bug 26534: (QA follow-up) Fix CSS declaration

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 26534: Add Font Awesome icon only for staff patrons
Fridolin Somers [Fri, 25 Sep 2020 07:43:54 +0000 (09:43 +0200)]
Bug 26534: Add Font Awesome icon only for staff patrons

In patron pages it would help to see an icon indicating that this is a staff patron (having permission to access staff interface).
This may avoid wrong patron deletion or permission mistakes.
I propose the shield Font Awesome icon and a grey background

Patch also shows patron name and cardnumber aligned center instead of right.
Patch adds to 'patroninfo' div a class 'staffgrade' or 'normalgrade' to
allow more styling depending on patron beeing staff or not.

Test plan:
Compare display between a patron having staff interface access and one without permissions.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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 26621: Adjust docs/contributors.yaml accordingly
Jonathan Druart [Wed, 7 Oct 2020 12:20:32 +0000 (14:20 +0200)]
Bug 26621: Adjust docs/contributors.yaml accordingly

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 26621: Adjust .mailmap to reduce the number of invalid authors
Jonathan Druart [Tue, 6 Oct 2020 15:56:16 +0000 (17:56 +0200)]
Bug 26621: Adjust .mailmap to reduce the number of invalid authors

This file is a nightmare, really. We should simplify it and order it correctly.
Letting it here for now, I'd like to run the gitstats command on it to double check the output.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
JD: Amended patch: remove dup occurrences for Brendan

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26643: (QA follow-up) Fix typo in message
Katrin Fischer [Sun, 4 Oct 2020 16:54:37 +0000 (16:54 +0000)]
Bug 26643: (QA follow-up) Fix typo in message

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26643: Notify librarian of completed transfers
Martin Renvoize [Fri, 9 Oct 2020 12:08:45 +0000 (13:08 +0100)]
Bug 26643: Notify librarian of completed transfers

It came to light that it's not clear to all users that a checkin results
in the completion of a transfer if one exists for the item being checked
in.  This patch adds such a notification to the error messages loop to
highlight that the item has been recieved from it's sending brnach.

To test
1/ Setup a transfer from branch A to branch B
2/ Check the item in at branch B
3/ Note that a new message appears in the 'Check in message' alert box
saying "Item recieved from branch A"
4/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.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 26617: Update INSTALL file to include koha-testing-docker and Gitlab links
David Cook [Tue, 6 Oct 2020 06:43:11 +0000 (06:43 +0000)]
Bug 26617: Update INSTALL file to include koha-testing-docker and Gitlab links

Test plan:
1. View the INSTALL file in a text editor
2. The INSTALL file should reference koha-testing-docker and KohaDevBox
using Gitlab links

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 26536: Assignment fix
Martin Renvoize [Fri, 2 Oct 2020 15:17:39 +0000 (16:17 +0100)]
Bug 26536: Assignment fix

Whilst working on this bug I found a weird inconsistent variable assignment line

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
JD: Amended commit message: fix bug number
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26536: WRITEOFF not writeoff
Martin Renvoize [Fri, 2 Oct 2020 15:09:54 +0000 (16:09 +0100)]
Bug 26536: WRITEOFF not writeoff

There is inconsistency in variable case between the controller script
and the template. This patch corrects those inconsistencies.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.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 26536: Fix incorrectly scoped variable
Martin Renvoize [Mon, 5 Oct 2020 08:08:24 +0000 (09:08 +0100)]
Bug 26536: Fix incorrectly scoped variable

During work on bug 26076 a variable scope mistake was made when
reverting the logic to use distinct queries for selected accountlines.

This patch restores the script scope of the varaible by removing the
superflous 'my' declaration.

Test plan
1/ Add a set of manual invoices
2/ Select a subset of those manual invoices to 'Writeoff selected'
3/ Confirm that only those selected invoices have been written off.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.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 26595: Remove password from the smtp_server API object
Tomas Cohen Arazi [Wed, 14 Oct 2020 13:04:24 +0000 (10:04 -0300)]
Bug 26595: Remove password from the smtp_server API object

This patch makes the SMTP server objects do not include the password for
API representation. If we need the password itself, we can add a route
to retrieve it with specific permissions.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26595: Embed the whole smtp_server object
Jonathan Druart [Wed, 14 Oct 2020 12:12:44 +0000 (14:12 +0200)]
Bug 26595: Embed the whole smtp_server object

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26595: Add the option to hide the SMTP server column
Tomas Cohen Arazi [Thu, 1 Oct 2020 15:13:48 +0000 (12:13 -0300)]
Bug 26595: Add the option to hide the SMTP server column

This patch adds

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 26595: Add SMTP server column to libraries table
Tomas Cohen Arazi [Thu, 1 Oct 2020 15:10:39 +0000 (12:10 -0300)]
Bug 26595: Add SMTP server column to libraries table

This patch makes the libraries datatable render the assigned SMTP server
on each row. 'Default' will be rendered when the system default is
detected. A link to the SMTP server config will be rendered when a real
SMTP server is assigned.

To test:
1. Apply this patches, reload al the things
2. Visit the libraries table
=> SUCCESS: There's an SMTP server column displaying the right thing
3. Assign an SMTP server to a library
=> SUCCESS: The table displays the server name as a link
=> SUCCESS: The link correctly points to the SMTP server config page
4. Sign off

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 26595: Add smtp_server_info embed option to /libraries
Tomas Cohen Arazi [Thu, 1 Oct 2020 15:07:38 +0000 (12:07 -0300)]
Bug 26595: Add smtp_server_info embed option to /libraries

This patch simply adds the option to embed the return value from
Koha::Library->smtp_server_info on the libraries GET actions.

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 26595: Add Koha::Library->smtp_server_info
Tomas Cohen Arazi [Thu, 1 Oct 2020 15:06:13 +0000 (12:06 -0300)]
Bug 26595: Add Koha::Library->smtp_server_info

This patch adds a method for retrieving brief information about the
linked (or not) SMTP server for embedding on API requests.

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

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 17084: Automatic debian/control updates (master)
Mason James [Wed, 14 Oct 2020 05:51:29 +0000 (18:51 +1300)]
Bug 17084: Automatic debian/control updates (master)

built from c12ede4 on debian 9

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23895: Fix check_sysprefs.t
Jonathan Druart [Wed, 14 Oct 2020 13:52:29 +0000 (15:52 +0200)]
Bug 23895: Fix check_sysprefs.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26647: Add translation context to cancel hold button in OPAC
Timothy Alexis Vass [Fri, 9 Oct 2020 14:54:01 +0000 (14:54 +0000)]
Bug 26647: Add translation context to cancel hold button in OPAC

0) Apply the patch and add a hold on an item.
1) Install Swedish language, sv-SE and change interface language to
   Swedish
2) Modify sv-SE-opac-bootstrap.po and add this:
   msgctxt "Cancel hold button"
   msgid "Cancel"
   msgstr "Ta bort"
3) Go to the Holds table at /cgi-bin/koha/opac-user.pl#opac-user-holds
4) Confirm that the button is translated as "Ta bort"
5) Sign off

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 12556: DBRev 20.06.00.051
Jonathan Druart [Wed, 14 Oct 2020 12:37:24 +0000 (12:37 +0000)]
Bug 12556: DBRev 20.06.00.051

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 12556: Add missig POD for ->set_processing
Jonathan Druart [Wed, 14 Oct 2020 12:32:48 +0000 (14:32 +0200)]
Bug 12556: Add missig POD for ->set_processing

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 12556: (follow-up) Fix failing test
Joonas Kylmälä [Mon, 12 Oct 2020 10:55:33 +0000 (10:55 +0000)]
Bug 12556: (follow-up) Fix failing test

The method call set_waiting(1) was renamed to be set_transfer()

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 12556: (QA follow-up) Fix QA Script failures
Martin Renvoize [Mon, 12 Oct 2020 10:06:51 +0000 (11:06 +0100)]
Bug 12556: (QA follow-up) Fix QA Script failures

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
JD amended patch, fix:
 FAIL   C4/RotatingCollections.pm
   FAIL   pod
        *** WARNING: line containing nothing but whitespace in paragraph  in file C4/RotatingCollections.pm

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 12556: Add new "in processing" state to holds
Joonas Kylmälä [Wed, 22 Jul 2020 15:45:36 +0000 (18:45 +0300)]
Bug 12556: Add new "in processing" state to holds

This adds new syspref, HoldsNeedProcessingSIP, which controls whether
a hold that is related to item will be filled automatically or not. If
the user has enabled the syspref then instead of fulfilling the hold
automatically the hold will go to "in processing" state.

To test:
 1. Checkout a book to patron A
 2. Place a bib level hold to the book for B
 3. Patron A returns the book via SIP, to simulate this use:
        ./misc/sip_cli_emulator.pl -su koha -sp koha -l CPL -a 127.0.0.1 -p 6001 --item <ItemBarcode> -m checkin
 4. Notice that no notification is generated for Patron B about hold
    and that the hold status in intranet and opac is "In Processing".
 5. Notice that patron A (or other patrons) cannot checkout a book
    that is in processing, because it is considered to be attached to
    the holdee (similarly to the waiting state):
        ./misc/sip_cli_emulator.pl -su koha -sp koha -l CPL -a 127.0.0.1 -p 6001 --patron <PatronABarcode> --item <ItemBarcode> -m checkout

Signed-off-by: Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se>
Rebased-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 12556: Simplify and correct logic in holds-table.inc template
Joonas Kylmälä [Wed, 22 Jul 2020 15:44:31 +0000 (15:44 +0000)]
Bug 12556: Simplify and correct logic in holds-table.inc template

The states is_waiting and is_found are already implied by
is_at_destination. Also we would never get the 'transfered' html class
since transfer's status is T (this might not have been true in the
past but now is).

Signed-off-by: Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 12556: reserves/request.pl: Reuse code from Koha::Hold
Joonas Kylmälä [Wed, 22 Jul 2020 15:44:31 +0000 (15:44 +0000)]
Bug 12556: reserves/request.pl: Reuse code from Koha::Hold

Signed-off-by: Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 12556: Reuse code from Koha::Hold instead of duplicating it
Joonas Kylmälä [Wed, 22 Jul 2020 15:44:31 +0000 (15:44 +0000)]
Bug 12556: Reuse code from Koha::Hold instead of duplicating it

Signed-off-by: Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 12556: Remove unused HTML
Joonas Kylmälä [Wed, 22 Jul 2020 15:44:31 +0000 (15:44 +0000)]
Bug 12556: Remove unused HTML

Koha::Hold::is_at_destination() already checks for found = 'W' so the ELSE
code path which would print "Item waiting to be pulled from [...]"
never gets executed.

Signed-off-by: Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 12556: Refactor hold transfer status setting to its own method
Joonas Kylmälä [Wed, 22 Jul 2020 15:44:31 +0000 (15:44 +0000)]
Bug 12556: Refactor hold transfer status setting to its own method

Signed-off-by: Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 13625: Change messaging preferences descriptions according to RenewalSendNotice
Katrin Fischer [Mon, 21 Sep 2020 05:08:32 +0000 (05:08 +0000)]
Bug 13625: Change messaging preferences descriptions according to RenewalSendNotice

Sending out renewal notices depends on the RenewalSendNotice and the
patron having the checkout notice checked in their messaging
preferences.

To test:
- Apply patch
- Take a look at the messaging preferences table on the following pages:
  - OPAC > patron account > your messaging tab
  - Staff interface > patron account > details tab
  - Staff interface > patron account > edit patron
- Toggle the RenewalSendNotice preferences
  - The label on the last notice should switch between "Item checkout"
    and "Item checkout and renewal" depending on the pref setting

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 19353: Fix tests on UNIMARC
Josef Moravec [Wed, 30 Sep 2020 18:09:19 +0000 (18:09 +0000)]
Bug 19353: Fix tests on UNIMARC

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 19353: Use xslt from distribution, not packaged installed one
Josef Moravec [Wed, 30 Sep 2020 17:40:01 +0000 (17:40 +0000)]
Bug 19353: Use xslt from distribution, not packaged installed one

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 19353: Ability to use xsl template on marc21 and marcxml metadataprefixes in...
Josef Moravec [Tue, 7 Nov 2017 11:51:20 +0000 (11:51 +0000)]
Bug 19353: Ability to use xsl template on marc21 and marcxml metadataprefixes in OAI provider

Test plan:
0) apply the patchset
1) setup oai server with oaiconf file defining xsl_file for metadata
format marcxml or marc21
2) play with your oai and confirm that records are transformed as
expected
3) prove t/db_dependent/OAI/Server.t

Signed-off-by: Martin Šťastný <martin.stastny@teamlibrary.cz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 19353: Add test
Josef Moravec [Mon, 4 Dec 2017 02:10:31 +0000 (02:10 +0000)]
Bug 19353: Add test

Signed-off-by: Martin Šťastný <martin.stastny@teamlibrary.cz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 19382: DBRev 20.06.00.050
Jonathan Druart [Wed, 14 Oct 2020 12:37:24 +0000 (12:37 +0000)]
Bug 19382: DBRev 20.06.00.050

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 19382: Adjust comment in test
Jonathan Druart [Wed, 14 Oct 2020 12:19:27 +0000 (14:19 +0200)]
Bug 19382: Adjust comment in test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 19382: (QA follow-up) Fix typos
Kyle M Hall [Tue, 13 Oct 2020 17:42:58 +0000 (13:42 -0400)]
Bug 19382: (QA follow-up) Fix typos

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 19382: (follow-up) Alternate tests
Martin Renvoize [Thu, 10 Sep 2020 10:04:18 +0000 (11:04 +0100)]
Bug 19382: (follow-up) Alternate tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 19382: (QA follow-up) Throw exception if only_this_guarantor is set for a non...
Kyle M Hall [Thu, 3 Sep 2020 18:25:05 +0000 (14:25 -0400)]
Bug 19382: (QA follow-up) Throw exception if only_this_guarantor is set for a non-guarantor

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 19382: Add blocking of ability to checkout on circulation.pl
Kyle M Hall [Fri, 24 Jul 2020 13:00:12 +0000 (09:00 -0400)]
Bug 19382: Add blocking of ability to checkout on circulation.pl

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 19382: Add ability to block guarantees based on fees owed by guarantor and other...
Kyle M Hall [Fri, 10 Jan 2020 16:59:56 +0000 (11:59 -0500)]
Bug 19382: Add ability to block guarantees based on fees owed by guarantor and other guarantees

Some libraries would like to not only block the circulation of a guarantor based on fines owed by guarantees, but would also like to block circulation for all guarantees as well. Basically, if a family as a whole reaches a certain threshold of fines, the entire family will be blocked from checking out items.

Test Plan:
1) Apply this patch
2) Set NoIssuesChargeGuarantorsWithGuarantees to $14
3) Create a family of four ( 2 guarantors, 2 guarantees ) where the parents guarantee both children
4) Give 3 of the 4 a $5 fine
5) None of them should be able to check out items

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.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 23895: Move installer file into the mandatory directory
Jonathan Druart [Tue, 16 Jun 2020 10:56:56 +0000 (12:56 +0200)]
Bug 23895: Move installer file into the mandatory directory

Prior to this patch we had a confusing situation, mandatory files were
in both installer/data/mysql and installer/data/mysql/mandatory
To make things clearer this patch move them all into the mandatory
subdir.
However kohastructure.sql stay in the "root" directory.

Test plan:
1. Drop and recreate your DB and use the installer to populate the DB
2. Use the merge request code from misc4dev to test the reset_all alias
3. Still with the merge request from misc4dev checkout master (you can
also try 19.11 and/or 19.05) and reset_all again
=> All the data from the SQL mandatory files must have been correctly
inserted into the DB

https://gitlab.com/koha-community/koha-misc4dev/-/issues/46

Note that this patch also remove the x flag for subtag_registry.sql

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 24899: (follow-up) Add markup comments
Owen Leonard [Thu, 25 Jun 2020 11:34:25 +0000 (11:34 +0000)]
Bug 24899: (follow-up) Add markup comments

This patch adds comments to the template to highlight the markup
structure.

This patch should have no effect on the interface or functionality.

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 24899: Reindent record matching rules template
Owen Leonard [Wed, 18 Mar 2020 19:14:40 +0000 (19:14 +0000)]
Bug 24899: Reindent record matching rules template

This patch reindents the template the record matching rules template.
The only non-whitespace changes where lines were combined or split.

The diff using the '-w' flag to ignore whitespace should
highlight only moved lines.

Test that functionality is unaffected: Administration -> Record matching
rules.

Test adding, editing, and deleting record matching rules. Test adding,
editing, and deleting match points and match checks. Confirm that
changes are saved correctly.

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 25354: Clean up JavaScript markup in cataloging plugin scripts
Owen Leonard [Sun, 3 May 2020 01:04:41 +0000 (01:04 +0000)]
Bug 25354: Clean up JavaScript markup in cataloging plugin scripts

This patch makes some minor changes to the JavaScript generated by the
cataloging plugins: <script> "type" attribute removed; single-line
comments converted to multi-line style; obsolete //<![CDATA[ marks
removed.

These changes help the JavaScript conform to current coding guidelines.
The comment style change allows for whitespace in the scripts to be
collapsed by the Template::Toolkit "collapse" filter.

Since the patch makes small cosmetic changes to many files it may be
easiest to test this patch by visually inspecting the changes.

It's also simple to test some plugins which are enabled by default (at
least in MARC21): In the basic MARC editor, the leader, 007, and 008. In
the item editor, subfield d - Date acquired.

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 26327: Add exec flag on .t file
Jonathan Druart [Wed, 14 Oct 2020 09:49:29 +0000 (11:49 +0200)]
Bug 26327: Add exec flag on .t file

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26327: (QA follow-up) Fix colspan in boraccount.tt
Tomas Cohen Arazi [Fri, 18 Sep 2020 19:40:01 +0000 (16:40 -0300)]
Bug 26327: (QA follow-up) Fix colspan in boraccount.tt

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26327: (follow-up) Add transacting library to the transactions tab
Tomas Cohen Arazi [Wed, 2 Sep 2020 13:06:46 +0000 (10:06 -0300)]
Bug 26327: (follow-up) Add transacting library to the transactions tab

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26327: Add to columns settings
Tomas Cohen Arazi [Mon, 31 Aug 2020 20:10:50 +0000 (17:10 -0300)]
Bug 26327: Add to columns settings

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.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 26327: Include transacting library in fines
Tomas Cohen Arazi [Mon, 31 Aug 2020 19:35:10 +0000 (16:35 -0300)]
Bug 26327: Include transacting library in fines

This patch introduces a new column on the fines table to display the
checkout library when the fine is tied to a checkout.

To test:
1. Have an overdue item that generated a fee
2. Look at the 'Accounting' tab, 'Make a payment'
=> FAIL: There's no information about the library
3. Apply this patch
4. Restart all
5. Reload and repeat 2
=> SUCCESS: There's a column with the library name!
6. Identify the issue_id for the mentioned checkout and:
   $ koha-mysql kohadev
   > UPDATE old_issues SET branchcode='TOM' WHERE issue_id=11;
  (i.e. set the branchcode to an invalid value, to emulate a deleted
   branch).
7. Reload
=> SUCCESS: It doesn't explode, it doesn't display a library name.
8. Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.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 26327: Add ->library method to Koha::*Checkout
Tomas Cohen Arazi [Mon, 31 Aug 2020 18:25:05 +0000 (15:25 -0300)]
Bug 26327: Add ->library method to Koha::*Checkout

This patch adds a 'library' relationship to the Issue and OldIssue
resultsets, to be used in the Koha::*Checkout classes corresponding
accessors. This way we will be able to eventually embed and filter on
library fields on the API.

The ->library method is then added to the classes-

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.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 26456: (follow-up) Add markup comments
Owen Leonard [Mon, 14 Sep 2020 15:21:55 +0000 (15:21 +0000)]
Bug 26456: (follow-up) Add markup comments

This patch adds comments to the template to highlight the markup
structure.

Also changed: Some form hints have been wrapped in <div class="hint"> to
make it consistent with other pages.

This patch should have no effect on functionality.

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 26456: Reindent MARC subfield structure template
Owen Leonard [Mon, 14 Sep 2020 15:09:26 +0000 (15:09 +0000)]
Bug 26456: Reindent MARC subfield structure template

This patch reindents the MARC subfield structure template.
The only non-whitespace changes where lines were combined or split.

The diff using the '-w' flag to ignore whitespace should
highlight only moved lines.

Test that functionality is unaffected: Administration -> MARC
bibliographic framework -> MARC structure -> Edit subfields..

Test adding, editing, and deleting subfields. Confirm that changes are
saved correctly.

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 26655: Add ARIA Labels to OPAC Lists
Henry Bolshaw [Sat, 10 Oct 2020 00:24:36 +0000 (00:24 +0000)]
Bug 26655: Add ARIA Labels to OPAC Lists

This patch adds ARIA labels to opac-shelves.tt
so that checkboxes for list items are meaningful
to users of screenreaders and other assistive
technology.

Test Plan:
1/ Open an OPAC list
2/ Inspect the checkbox for a list item
3/ Confirm the aria-label is missing
4/ Apply the patch
5/ Refresh the Opac list page
6/ Inspect the checkbox for a list item
7/ Note that there is now an aria-label with a
meaningful description
8/Sign off

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 20804: Add support for "days" to the timeout syspref
Jonathan Druart [Thu, 30 Jul 2020 13:15:46 +0000 (15:15 +0200)]
Bug 20804: Add support for "days" to the timeout syspref

If the timeout syspref did not contain an integer, or was not matching
integer.'d|D', then it "fallback" to 0

We can easily add support for hours and fallback to 600 if the value is
not correct.
It will prevent the session to timeout immediately

Test plan:
0. Do not apply the patches
1. Fill the timeout syspref with "5h"
2. Login
3. Click somewhere
=> Notice that the session timed out
4. Apply the patches, restart_all
5. Login
6. Click somewhere
=> You have 5 hours to enjoy Koha
7. Fill the pref with an incorrect value ("5x" for instance)
8. Logout, login
9. There is a warning in the log, and you have 10 minutes (600 secondes) to enjoy Koha

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 20804: Add tests
Jonathan Druart [Thu, 30 Jul 2020 13:15:36 +0000 (15:15 +0200)]
Bug 20804: Add tests

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 26018: Fix frameworks errors with subfields in wrong tab
Katrin Fischer [Sat, 18 Jul 2020 12:52:06 +0000 (14:52 +0200)]
Bug 26018: Fix frameworks errors with subfields in wrong tab

All subfields for a MARC21 field should always be in the same tab.
There were some mistakes found by the "MARC bibliographic framework
test" this fixes.

Before you apply the patch:
- Check the "MARC bibliographic framework test" page
- Ideally you should see the "wrong tab" mistakes
- Reset your db (reset_all) or drop your db and run the web installer
- Verify the page no longer points out any issues

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 9118: (QA follow-up) Fix spelling on "To Date :"
Katrin Fischer [Sun, 4 Oct 2020 03:23:24 +0000 (03:23 +0000)]
Bug 9118: (QA follow-up) Fix spelling on "To Date :"

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 9118: Do not show option to create exception on range for unique holiday
Emmi Takkinen [Mon, 5 Oct 2020 08:19:44 +0000 (11:19 +0300)]
Bug 9118: Do not show option to create exception on range for unique holiday

When an unique holiday is edited one can choose
option 'Generate exceptions on a range of dates.'
Exceptions are meant to be used with repeating
holidays and it makes no sense to have option to
be able to create one for an unique holiday.

This patch hides exception on range option when
editing an unique holiday. Also fixes a minor
spelling error.

To test:
1. Create unique holiday and edit it.
2. Note that option to create exception on range is shown.
3. Apply patch.
=> Option is now hidden.

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 26389: Add auto renewal error to opac-user.tt
Lucas Gass [Sat, 5 Sep 2020 05:26:47 +0000 (05:26 +0000)]
Bug 26389: Add auto renewal error to opac-user.tt

Test plan:
1 Check out an auto-renewing item to a patron
2 confirm in circ rules that the rule allows at least one renewal
3 log into OPAC, confirm your summary shows item is scheduled for auto-renewal
4 click Renew All
5 Get note "Please note: Your loan renewal failed because of the following reason(s):" with no following reasons
6 Apply patch
7 Repeat 3-5
8 See appropriate error

Signed-off-by: Fridolin Somers <fridolin.somers@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 26429: Show correct expiration date at the request.pl
Emmi Takkinen [Fri, 25 Sep 2020 10:52:06 +0000 (13:52 +0300)]
Bug 26429: Show correct expiration date at the request.pl

Bug 25789 changed holds tables expriration input class as "datepickerto".
This results to past expiration date to be displayed as tomorrows date.
Class "futuredate" should have been used instead.

To test:

1. Have waiting hold with expiration date in past (e.g 24.9)
2. Observe that waiting reserves table displays correct expiration date
3. At the request.pl page expiration date is however displayed as 26.9
=> Apply patch
4. Confirm that expiration date at the request.pl is now 24.9

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 26538: Display cities list before input text
Fridolin Somers [Fri, 25 Sep 2020 15:08:38 +0000 (17:08 +0200)]
Bug 26538: Display cities list before input text

In patron creation or edition actually the city field is displayed with input text then cities list.
I propose to display cities list first since it is more likely used.

Test plan :
1) Create some cities
2) Open patron creation form
3) Check you see for each city field : cities list, text "or enter", text input
4) Delete all cities
5) Open patron creation form
6) Check you see for each city field : only text input

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 26576: Subfield descriptions on authority detail view are cut off
Owen Leonard [Wed, 30 Sep 2020 15:46:45 +0000 (15:46 +0000)]
Bug 26576: Subfield descriptions on authority detail view are cut off

This patch corrects the authority detail view on the staff interface so
that subfield descriptions are not longer output as truncated strings.

For instance, before this patch the subfield description for 035$a would
be "System control numbe"

After the patch it should be "System control number."

Based on the assumption that the subfield descriptions were truncated at
some point for readability reasons I've also made some style changes
intended to improve the readability of the page.

To test, apply the patch and go to Authorities.

- Search for and view the details for an authority.
- On the authority detail page, confirm that subfield descriptions are
  shown in full.
- Confirm that the style changes look good and make the data more
  readable.

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 26589: Fix t/db_dependent/OAI/Sets.t failing when OAI-PMH:AutoUpdateSets is enabled
Alex Buckley [Tue, 29 Sep 2020 05:53:34 +0000 (05:53 +0000)]
Bug 26589: Fix t/db_dependent/OAI/Sets.t failing when OAI-PMH:AutoUpdateSets is enabled

Test plan:
1. Check the OAI-PMH:AutoUpdateSets syspref is disabled
2. Run t/db_dependent/OAI/Sets.t tests and confirm tests pass
successfully
3. Enabled the OAI-PMH:AutoUpdateSets syspref
4. Repeat step 2 and confirm the tests fail

5. Apply this patch and restart plack: sudo koha-plack --restart
<instance>
6. Repeat step 2 and confirm the tests now pass
7. Disable the OAI-PMH:AutoUpdateSets syspref and repeat step 2 and
confirm tests still pass

Sponsored-By: Catalyst IT
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 26675: (bug 23463 follow-up) Fix typo onloadn vs onloan
Jonathan Druart [Wed, 14 Oct 2020 09:17:46 +0000 (11:17 +0200)]
Bug 26675: (bug 23463 follow-up) Fix typo onloadn vs onloan

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26529: (follow-up) Remove warning
Jonathan Druart [Mon, 12 Oct 2020 12:48:40 +0000 (14:48 +0200)]
Bug 26529: (follow-up) Remove warning

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26145: (follow-up 2) DBIC schema changes
Jonathan Druart [Mon, 12 Oct 2020 12:47:30 +0000 (14:47 +0200)]
Bug 26145: (follow-up 2) DBIC schema changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26145: Add exec flag on .t file
Jonathan Druart [Mon, 12 Oct 2020 10:36:21 +0000 (12:36 +0200)]
Bug 26145: Add exec flag on .t file

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