]> git.koha-community.org Git - koha.git/log
koha.git
4 years agoBug 15436: (follow-up) Fix separator for a single 440 in staff
Katrin Fischer [Sun, 20 Sep 2020 21:48:32 +0000 (21:48 +0000)]
Bug 15436: (follow-up) Fix separator for a single 440 in staff

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 15436: Use semicolon between series name and volume
Katrin Fischer [Thu, 17 Sep 2020 11:25:15 +0000 (11:25 +0000)]
Bug 15436: Use semicolon between series name and volume

MARC21 dictates that we should be using a ; before $v in 440, 490,
810, 811 and 830.

This patch also introduces some additional changes to unify formatting
between the various options for cataloguing series:

- The separator between multiple series is switched form ; to the
  now commonly used | with a class for easy change of formatting.
- There was some missing logic that prevented the separator to show
  up correctly between traced and untraced series.
- For some series $v was included in the link for others not. Now
  $v always appears as text and only $a is linked, as this is what
  we actually search for.

To test this:
- You should be cataloguing multiple series in different ways, using
  - deprecated 440 (still present in old data)
  - 490, Ind. 1 = empty or 0 = not traced
  - 490, Ind. 1 = 1 = traced in combination with an 8xx field

Example (you should try a different combination!)
440 _ _ $aFirst series
490 _ _ $aSecond series ;$v1
490 1 _ $aThird series ;$v1 (this won't show, it will use 830 for display)
830 _ _ $aThird series ;$v1

Without patch:
Series: First Series; Second series ; 1Third series: 1

With patch:
Series: First series | Second series ; 1 | Third series ; 1

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 5927: (QA follow-up) Move part template below show-series to make both *Utils...
Katrin Fischer [Sat, 12 Sep 2020 21:18:33 +0000 (23:18 +0200)]
Bug 5927: (QA follow-up) Move part template below show-series to make both *Utils.xsl match

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 5927: [Alternate] Show series information in staff and opac results pages
Nick Clemens [Fri, 11 Sep 2020 18:44:13 +0000 (18:44 +0000)]
Bug 5927: [Alternate] Show series information in staff and opac results pages

This moves the series info to a template in the XSLT utils files and adds a
few variables to make it work right.

To test:
1 - Create a catalog records with:
    440 series fields
    490 traced series fields
    490 untraced series fields
2 - View the details pages for these records and note the display and the links formed
3 - Apply patch
4 - Confirm the details pages look the same
5 - Search on staff and opac to return the records
6 - Confirm the results pages form the same series as on details
7 - Confirm the links work the same

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 16728: Add MARC21 777 - Issued with entry to staff and OPAC detail pages
Katrin Fischer [Thu, 17 Sep 2020 12:13:36 +0000 (12:13 +0000)]
Bug 16728: Add MARC21 777 - Issued with entry to staff and OPAC detail pages

This adds the 777 - Issued with entry to the staff and OPAC detail pages.
It's built using the template for 773 with minor adjustments.

To test:
- Apply patch
- Catalog several 777 fields in one or more of your records
  - When using 1st indicator = 1, the note won't display
  - When using 2nd indicator empty, label will be "Issued with:"
  - When using 2nd indicator 8, the label will be drawn from $i if present
  - When $w and UseControlNumber pref is used, the link will be built using $w
  - In all other cases the title form $t will be used for the link
- Verify the display is correct

Examples for 777 can be found in the LOC MARC21 documentation:
http://www.loc.gov/marc/bibliographic/bd777.html

Note: Because the label depends on the 2nd indicator, the label is repeated for every
777 on a record.

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 19616: Compiled CSS
Jonathan Druart [Thu, 8 Oct 2020 14:17:13 +0000 (16:17 +0200)]
Bug 19616: Compiled CSS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 19616: (follow-up) Breaking items according to punctuation
Katrin Fischer [Sun, 13 Sep 2020 17:16:22 +0000 (17:16 +0000)]
Bug 19616: (follow-up) Breaking items according to punctuation

Previously the code assumed that $t indicates a new line in the
listing. But this is not true. The standard tells us that -- or
.-- will indicate a new item.

"In records formulated according to AACR 2, a space-hyphen-hyphen-space
( -- ) is recorded between each item in the contents note unless a
delimiter/subfield code follows in which case there is no ending space.
In pre-AACR 2 records, items are separated by a period-hyphen-hyphen (.--)."

The previous logic did no longer work with $g added. From the LOC
examples:

This would work:
505 2 0 $tBaptisms, 1816-1872 --$tChurch members, 1816-1831 --$tHistory of the Second Presbyterian Church of West Durham /$rby L. H. Fellows.
505 0 0 $tQuatrain II$g(16:35) --$tWater ways$g(1:57) --$tWaves$g(10:49).

This wouldn't:
505 1 0 $gNr. 1.$tRegion Neusiedlersee --$gNr. 2.$tRegion Rosalia/Lithagebirge --$gNr. 3.$tRegion Mettelburgenland --$gNr. 4.$tRegion südliches Burgenland --$gNr. 5.$tRegion Südburgland

With the patches applied, all examples should display nicely now.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 19616: (follow-up) Reindent XSLT code used for 505 display
Katrin Fischer [Sun, 13 Sep 2020 16:31:13 +0000 (16:31 +0000)]
Bug 19616: (follow-up) Reindent XSLT code used for 505 display

Also adds a note at the beginning of the code block.
This causes no functional change, just code clean-up.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 19616: Add MARC21 505$g - Formatted Contents Note / Miscellaneous informatoin
Katrin Fischer [Sun, 13 Sep 2020 16:26:31 +0000 (16:26 +0000)]
Bug 19616: Add MARC21 505$g - Formatted Contents Note / Miscellaneous informatoin

This adds the subfield $g to the display of the 505 field in
staff and OPAC detail pages.

To test:
- Catalog some records using variations of 505
  Examples can be found in the LOC documentation:
  https://www.loc.gov/marc/bibliographic/bd505.html
- Verify that the display in staff and OPAC is still nice
  and now includes $g

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23376: (QA follow-up) Remove authnotrequired
Martin Renvoize [Mon, 5 Oct 2020 15:47:00 +0000 (16:47 +0100)]
Bug 23376: (QA follow-up) Remove authnotrequired

The rebased patchset subsequnetly re-introduced the now deprecated use
of authnotrequired on staff client controllers.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23376: Remove unneeded 'count' parameter
Nick Clemens [Mon, 29 Jul 2019 20:11:10 +0000 (20:11 +0000)]
Bug 23376: Remove unneeded 'count' parameter

Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23376: Move AcqCreateItem logic to template
Nick Clemens [Mon, 29 Jul 2019 20:05:42 +0000 (20:05 +0000)]
Bug 23376: Move AcqCreateItem logic to template

Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23376: Clean up order receipt page code
Nick Clemens [Thu, 25 Jul 2019 19:52:25 +0000 (19:52 +0000)]
Bug 23376: Clean up order receipt page code

This patchset switches from using DB lookups to using an order object for most things on orderreceive.pl

It simplifies the script and makes minimal changes to the template

To test:
1 - Place some orders and receive them
2 - Have orders with or without subscriptions attached
3 - Try with different AcqCreateItems settings
4 - Apply patch
5 - No behaviour should change
6 - Read code to ensure things make sense

Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23852: (QA follow-up) Correct scope of breadcrumb title style
Owen Leonard [Mon, 14 Sep 2020 13:09:24 +0000 (13:09 +0000)]
Bug 23852: (QA follow-up) Correct scope of breadcrumb title style

This patch corrects the scope of the ".title" style intended for titles
displayed in the breadcrumbs bar.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23852: Merge biblio-title.inc and biblio-default-view.inc
Owen Leonard [Mon, 21 Oct 2019 14:13:01 +0000 (14:13 +0000)]
Bug 23852: Merge biblio-title.inc and biblio-default-view.inc

This patch moves the functionality contained in biblio-default-view.inc
into biblio-title.inc. biblio-title.inc can now be called with a "link =
1" parameter in order for the title to be displayed as a link which is
controlled by the IntranetBiblioDefaultView preference.

To test, apply the patch and test the affected pages, especially titles
linked to in breadcrumbs menus

Acquisitions:
 - Add to basket -> From existing record -> Search
   - Title in search results

Catalog:
 - Search for a record
   - Add record to cart
     - Open cart
       - Title in brief display
         - Check that link opens the correct page in the main window
   - View bibliographic record
     - ISBD view
     - MARC view
     - Normal view
      - Local cover image detail page
      - Checkout history
      - Request article
     - Item details
     - From the "Edit" menu -> Attach item
     - Stock rotation rota
     - Place hold

Cataloging:
 - Cataloging search -> Search results

Circulation:
 - Article requests
 - Overdues with fines
 - Overdues
 - Holds queue
 - Holds to pull
 - Hold ratios
 - Holds awaiting pickup
 - Transfers to recevie
 - Renew
 - Batch checkout

Lists:
 - View list contents

Patrons:
 - View patron details
   - Holds history
   - Checkout history

Tools:
 - Rotating collections
   - View collection
     - Add item
 - Tags
   - Click term to see titles tagged with that term

 - Batch record deletion
   - Submit batch

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 26280: Add unique class for each problem in returns.tt
Lucas Gass [Fri, 18 Sep 2020 21:06:03 +0000 (21:06 +0000)]
Bug 26280: Add unique class for each problem in returns.tt

1. Checkin an item with a bad barcode and see the prolem class also has
   a class called 'ret_badbarcode'
2. Checkin an item that triggers a lotforloan updated via
   UpdateNotForLoanStatusOnCheckin, notice the class 'ret_nflupdate'.
3. You should also see an updated_from and updated_to class. This
   should make it easier to target those for audio alerts
4. Checkin an item that triggers an location update and see the class
   'ret_locationupdate'
5. Checkin an item that is not at its permenat location and you should
   see the class 'ret_ispermenant'.
6. Checkin an item that is not checkout and you should see the class
   'ret_notissued'
7. Checkin lost items with BlockReturnOfLostItems set to 'Dont block'
   and see the class 'ret_checkedin'
8. Checkin lost items with BlockReturnOfLostItems set to 'block' and
   see the class 'ret_blocked'
9. Checkin lost items with a fee on the patron's account for that lost
   item and see the class 'ret_feeremains'
10. Checkin item that is withdrawn and see the class 'ret_withdrawn'

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 26485: Simplify itemnumber handling in returns.pl
Jonathan Druart [Fri, 18 Sep 2020 09:00:20 +0000 (11:00 +0200)]
Bug 26485: Simplify itemnumber handling in returns.pl

This is a follow-up for bug 25969. The way we handle itemnumber is too complicated and error prone.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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 26506: (QA follow-up) Add Unit Test
Martin Renvoize [Thu, 1 Oct 2020 13:33:46 +0000 (14:33 +0100)]
Bug 26506: (QA follow-up) Add Unit Test

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26506: Fix Koha::Account::pay if called when no user is logged-in
Matthias Meusburger [Tue, 22 Sep 2020 13:16:23 +0000 (15:16 +0200)]
Bug 26506: Fix Koha::Account::pay if called when no user is logged-in

Currently, Koha::Account::pay will fail if no user is logged-in when it is
called.

In this case, this patch will use undef instead of 0 for $manager_id in order
to comply with the foreign key constraint on manager_id.

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Biblibre and Libriotech have created a OPAC payment plugin that was
having problems because of this bug. Applying the fix in this patch
to a live server solved the problem.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26599: Unused parameter name in POD of ModZebra
Marcel de Rooy [Fri, 2 Oct 2020 06:20:38 +0000 (06:20 +0000)]
Bug 26599: Unused parameter name in POD of ModZebra

This patch removes the $record reference in POD.
Nothing else ;)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26600: Missing module in Elasticsearch/Indexer.pm
Marcel de Rooy [Fri, 2 Oct 2020 06:28:06 +0000 (06:28 +0000)]
Bug 26600: Missing module in Elasticsearch/Indexer.pm

Just formally needed. It is already loaded somewhere.
That is: Koha::SearchEngine::Elasticsearch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24598: Remove warning from test
Jonathan Druart [Thu, 8 Oct 2020 10:03:48 +0000 (12:03 +0200)]
Bug 24598: Remove warning from test

t/db_dependent/Koha/Items.t .. 6/12 Use of uninitialized value in string eq at /kohadevbox/koha/C4/Circulation.pm line 1460.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 20582: Turn Koha into a Mojolicious application
Mason James [Thu, 8 Oct 2020 11:31:33 +0000 (00:31 +1300)]
Bug 20582: Turn Koha into a Mojolicious application

fix package builds, by ignoring the following example files...

  etc/koha/apache.conf
  etc/koha/nginx.conf

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26184: Add div element to 'items available' note in OPAC reserve template
Lucas Gass [Fri, 7 Aug 2020 18:17:49 +0000 (18:17 +0000)]
Bug 26184: Add div element to 'items available' note in OPAC reserve template

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 26449: fix web installer typo
Andreas Roussos [Mon, 14 Sep 2020 07:39:44 +0000 (09:39 +0200)]
Bug 26449: fix web installer typo

The onboarding segment of the web installer contains a small typo
in Step 4: "Importantl:" (should be "Important:").

This patch fixes that.

Test plan: apply the patch and access the web installer, Step 4 of
the onboarding tool should no longer display the typo.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26551: Correct modal markup to prevent long heading from overflowing
Owen Leonard [Mon, 28 Sep 2020 11:46:17 +0000 (11:46 +0000)]
Bug 26551: Correct modal markup to prevent long heading from overflowing

This patch modifies the markup of the MARC framework import and export
modals so that CSS intended only for Bootstrap buttons isn't applied to
content in the modal.

The modal dialog markup was nested inside a ".btn-group" <div>, which
carries with it CSS that prevents text wrapping. Moving the modal markup
out of the button group while keeping it inside the <td> corrects the
problem. Lines have only been shifted and reindented.

To test, apply the patch and go to Administration -> MARC bibliographic
framework.

- In the table of frameworks, from the "Actions" menu, test both
  the "Import" and "Export" links. Both should work as expected.
- Confirm that the text of the heading on the "Import" modal wraps
  correctly.
- Test the same operations for a framework other than the default one.

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 26191: Relocate track_login call in Auth.pm
Marcel de Rooy [Tue, 11 Aug 2020 11:22:22 +0000 (11:22 +0000)]
Bug 26191: Relocate track_login call in Auth.pm

This is a leftover from bug 22543.
Trivial move.

Test plan:
Do not apply this patch.
Pick a user that has not yet logged in today.
Only login via the opac and immediately check if borrowers.datelastseen did not change.
Apply this patch, restart, flush etc.
Only login via the opac and verify again rightaway (no further opac actions).
Now datelastseen should have been changed already.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25913: Get the correct return of AddBiblio
Jonathan Druart [Thu, 8 Oct 2020 08:58:48 +0000 (10:58 +0200)]
Bug 25913: Get the correct return of AddBiblio

We need the parenthesis to get the biblionumber and not the
biblioitemnumber, in case there is a discrepancy.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25913: Prevent get_coins to crash if record does not have title
Jonathan Druart [Thu, 30 Jul 2020 08:41:45 +0000 (10:41 +0200)]
Bug 25913: Prevent get_coins to crash if record does not have title

If a bibliographic record does not have a title, get_coins will crash
with
Can't call method "as_string" on an undefined value at /kohadevbox/koha/Koha/Biblio.pm line 645
Koha::Biblio::get_coins('Koha::Biblio=HASH(0x5558f91bb740)') called at /kohadevbox/koha/catalogue/ISBDdetail.pl line 144

We can handle that situation easily by checking the existence of the
title field.

Test plan:
1. Create a record without 245
2. Enable COinSinOpac
4. Go to the ISBD detail view
=> It must not fail with this patch applied

Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25957: Don't push blank field values to ES document
Nick Clemens [Mon, 28 Sep 2020 15:29:51 +0000 (15:29 +0000)]
Bug 25957: Don't push blank field values to ES document

To test:
 1 - Load the sample DB or edit a record (using advanced cataloging editor) to have a blank subfield in a field that is indexed as suggestible
 2 - For example 'author' / 100a
     100 _ _ ‡a
 3 - Index that record into Elasticsearch 5.X:
     perl misc/search_tools/rebuild_elasticsearch.pl  -v -bn 115 -b -d
 4 - Note error 'value must have length > 0'
 5 - Edit mappings to set author 100a not suggestible
 6 - perl misc/search_tools/rebuild_elasticsearch.pl  -v -bn 115 -b -d
 7 - Success
 8 - Set field to suggestible again
 9 - Apply patch
10 - perl misc/search_tools/rebuild_elasticsearch.pl  -v -bn 115 -b -d
11 - Success!

Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25957: Unit test
Nick Clemens [Wed, 8 Jul 2020 17:29:45 +0000 (17:29 +0000)]
Bug 25957: Unit test

Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26260: Add missing elastic>cnx_pool to koha-conf-site.xml.in
Jonathan Druart [Thu, 20 Aug 2020 08:10:44 +0000 (10:10 +0200)]
Bug 26260: Add missing elastic>cnx_pool to koha-conf-site.xml.in

Added by bug 22705, but only in etc/koha-conf.xml

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24598: Complete transfer for hold if checked out
Jonathan Druart [Mon, 10 Aug 2020 13:51:17 +0000 (15:51 +0200)]
Bug 24598: Complete transfer for hold if checked out

When an item that has triggered a hold is in transit to a library,
if the item is accidently shelved instead of scanned at the pickup library,
and then checked out to another patron, the holds shows the item still in transit
in the status, but says that it is waiting at the library, and the since date has vanished!

Test plan:
1) Place an item at Library A on hold for Patron 1 of Library B with pickup library at Library B
2) Check in the item at Library A to trigger the hold transfer
3) At Library B, check out the item to Patron 2 (click Yes)
=> The hold is not marked as in transit and is back to priority 1

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24598: Add tests
Jonathan Druart [Mon, 10 Aug 2020 13:51:13 +0000 (15:51 +0200)]
Bug 24598: Add tests

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] 49 to 50 tests.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 20582: Map app.psgi file and bin directory in Makefile.PL
Julian Maurice [Tue, 6 Oct 2020 15:54:09 +0000 (17:54 +0200)]
Bug 20582: Map app.psgi file and bin directory in Makefile.PL

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 20582: Reset CGI::PARAM_UTF8 to 1 before each CGI request
Julian Maurice [Tue, 6 Oct 2020 11:21:29 +0000 (13:21 +0200)]
Bug 20582: Reset CGI::PARAM_UTF8 to 1 before each CGI request

CGI::Compile calls CGI::initialize_globals before each request, which
resets PARAM_UTF8 to 0
We need to set it back to the correct value

This is the same trick used in debian/templates/plack.psgi

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 20582: (QA follow-up) Add POD to satisfy coding guidelines
Martin Renvoize [Fri, 11 Sep 2020 10:29:37 +0000 (11:29 +0100)]
Bug 20582: (QA follow-up) Add POD to satisfy coding guidelines

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 20582: Fix a cache issue in Koha::App::{Opac,Intranet}
Julian Maurice [Fri, 28 Aug 2020 13:39:00 +0000 (17:39 +0400)]
Bug 20582: Fix a cache issue in Koha::App::{Opac,Intranet}

This was a workaround I wrote when Koha::Caches->flush_L1_caches was not
flushing all caches correctly. Now it's not needed and it causes
problems, so it must be removed.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 20582: Add very simple configuration file for Apache
Julian Maurice [Fri, 28 Aug 2020 13:37:53 +0000 (17:37 +0400)]
Bug 20582: Add very simple configuration file for Apache

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 20582: Fix PSGI file when behind a reverse proxy
Julian Maurice [Fri, 28 Aug 2020 13:35:14 +0000 (17:35 +0400)]
Bug 20582: Fix PSGI file when behind a reverse proxy

ReverseProxy middleware can modify SERVER_PORT which is used to
determines which app (opac or intranet) to run, so the choice should be
made before ReverseProxy middleware

Signed-off-by: Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 20582: Suppress warning in CGIBinKoha.pm
Julian Maurice [Fri, 24 Apr 2020 08:25:04 +0000 (10:25 +0200)]
Bug 20582: Suppress warning in CGIBinKoha.pm

Signed-off-by: Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 20582: Turn Koha into a Mojolicious application
Julian Maurice [Thu, 12 Apr 2018 18:42:13 +0000 (20:42 +0200)]
Bug 20582: Turn Koha into a Mojolicious application

This patch is a proof-of-concept of Koha as a Mojolicious application

This has several benefits:
- Development setup is easier. No need for apache or nginx. Just run
  `morbo bin/intranet` or `morbo bin/opac` and go to
  http://localhost:3000 (URL rewrites and static files are handled by
  the app)
- apache2/nginx configuration is simpler too (an example of nginx
  configuration is included in the patch)
- starman and plack middlewares can still be used for debug or gzip
  compression for instance (see app.psgi)
- Using Test::Mojo we can test the whole application, as we do with the
  REST API (which is a Mojolicious application too)
- It opens a way for converting CGI scripts into Mojolicious
  controllers and actions (even if that's not possible at the moment
  because of the authentication code)

It uses the same mechanism as Plack::App::CGIBin to deal with CGI
scripts, so it should be equivalent in terms of performance

How to test ?
- Run `morbo bin/intranet`, then go to http://localhost:3000/ and try to
  find bugs. Check the REST API at http://localhost:3000/api/v1
- Run `morbo bin/opac`, then go to http://localhost:3000/ and try to
  find bugs. Check the REST API at http://localhost:3000/api/v1
- Run `starman -l :5000 -l :5001` and verify that intranet
  (http://localhost:5000) and opac (http://localhost:5001) work normally
- Read the code (and the comments), it's not very long

Signed-off-by: Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22417: Remove batch_record_modification from the non-plack list
Jonathan Druart [Mon, 5 Oct 2020 15:21:04 +0000 (17:21 +0200)]
Bug 22417: Remove batch_record_modification from the non-plack list

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22417: Add koha-worker to koha-common.install
Jonathan Druart [Mon, 5 Oct 2020 14:20:49 +0000 (16:20 +0200)]
Bug 22417: Add koha-worker to koha-common.install

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22417: Correct DBRev bug number
Jonathan Druart [Mon, 5 Oct 2020 13:32:21 +0000 (15:32 +0200)]
Bug 22417: Correct DBRev bug number

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 15032: DBRev 20.06.00.045
Jonathan Druart [Mon, 5 Oct 2020 13:27:52 +0000 (13:27 +0000)]
Bug 15032: DBRev 20.06.00.045

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22417: Update packaging files
Mason James [Wed, 16 Sep 2020 04:59:34 +0000 (16:59 +1200)]
Bug 22417: Update packaging files

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22417: Process the jobs even if the message broker is not reachable
Jonathan Druart [Wed, 2 Sep 2020 09:59:10 +0000 (11:59 +0200)]
Bug 22417: Process the jobs even if the message broker is not reachable

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22417: Remove list of pending jobs
Jonathan Druart [Wed, 2 Sep 2020 09:56:09 +0000 (11:56 +0200)]
Bug 22417: Remove list of pending jobs

This was not accurate as it was only retrieving jobs for batch_biblio_record_modification

We will need to improve that later if needed

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 rabbitmq status indicator on the about page
Jonathan Druart [Wed, 2 Sep 2020 09:17:15 +0000 (11:17 +0200)]
Bug 22417: Add rabbitmq status indicator on the about page

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 tests
Jonathan Druart [Tue, 1 Sep 2020 09:01:25 +0000 (11:01 +0200)]
Bug 22417: Add tests

Finally!

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22417: Remove $dbh in Koha::BackgroundJob::*
Jonathan Druart [Tue, 1 Sep 2020 08:22:26 +0000 (10:22 +0200)]
Bug 22417: Remove $dbh in Koha::BackgroundJob::*

Also remove unused $job_type var

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 spelling resizeable vs resizable
Jonathan Druart [Mon, 31 Aug 2020 12:23:18 +0000 (14:23 +0200)]
Bug 22417: Fix spelling resizeable vs resizable

For the record, codespell does not raise the problem within ktd with
1.17.1 but appears with 1.14

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 new Net::Stomp dependency
Jonathan Druart [Mon, 31 Aug 2020 11:10:51 +0000 (13:10 +0200)]
Bug 22417: Add new Net::Stomp dependency

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 missing POD and html filters
Jonathan Druart [Mon, 31 Aug 2020 11:08:53 +0000 (13:08 +0200)]
Bug 22417: Add missing POD and html filters

Also remove "authnotrequired => 0,"

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22417: Remove FIXME in the template
Jonathan Druart [Fri, 28 Aug 2020 08:17:47 +0000 (10:17 +0200)]
Bug 22417: Remove FIXME in the template

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: Let owner of a job see the progress
Jonathan Druart [Mon, 3 Aug 2020 08:12:40 +0000 (10:12 +0200)]
Bug 22417: Let owner of a job see the progress

A owner of a job should be able to see the progress of this job.

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: Remove record_type from BatchUpdate*
Jonathan Druart [Wed, 29 Jul 2020 08:34:50 +0000 (10:34 +0200)]
Bug 22417: Remove record_type from BatchUpdate*

We don't need to pass it to the job, they each know which record type
they are dealing with

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: Send message to /queue
Jonathan Druart [Fri, 12 Jun 2020 09:50:37 +0000 (11:50 +0200)]
Bug 22417: Send message to /queue

This cannot be:
  /queue/$namespace/$job_type

I got: '/koha_kohadev/batch_biblio_record_modification' is not a valid queue destination

So keeping the dash in $namespace-$job_type

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 new permission manage_background_jobs
Jonathan Druart [Thu, 11 Jun 2020 10:48:00 +0000 (12:48 +0200)]
Bug 22417: Add the new permission manage_background_jobs

QA: Please answer the question in admin/background_jobs.pl

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: Restore the 'add to list' feature
Jonathan Druart [Thu, 11 Jun 2020 10:40:03 +0000 (12:40 +0200)]
Bug 22417: Restore the 'add to list' feature

This feature has been added recently by bug 18127.

It highlights the need of a post processing hook.

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: Restore the concept of namespace
Jonathan Druart [Thu, 20 Feb 2020 15:39:13 +0000 (16:39 +0100)]
Bug 22417: Restore the concept of namespace

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 the batch authority tool
Jonathan Druart [Thu, 20 Feb 2020 15:03:15 +0000 (16:03 +0100)]
Bug 22417: Fix the batch authority 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>
Bug 22417: Add a note about the existence of the DB row

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: (follow-up) Fix the batch authority tool

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: 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>