]> git.koha-community.org Git - koha.git/log
koha.git
4 years agoBug 15142: (follow-up) remove from Zebra UNIMARC config files
Fridolin Somers [Tue, 26 Nov 2019 08:44:08 +0000 (09:44 +0100)]
Bug 15142: (follow-up) remove from Zebra UNIMARC config files

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit dcc238f05b916b0225e937730f51d780ea18b29e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 15142: Remove titles facet for UNIMARC
Fridolin Somers [Fri, 22 Nov 2019 14:16:51 +0000 (15:16 +0100)]
Bug 15142: Remove titles facet for UNIMARC

There is a facet using 500$a, 501$a and 503$a and Subject index.
In UNIMARC 500$a, 501$a and 503$a are not indexed as Subject.
I propose to remove this facet for UNIMARC, looks like it does not make
sens.

Test plan:
1) Install UNIMARC database
2) Edit some records to have 500$a
3) Perform a search to find those records
4) Check you dont see the titles facet

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 0c50804f4b2d82329e0bfb591b2add048594691a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23377: (QA follow-up) Use OVERRIDE_SYSPREF
Marcel de Rooy [Fri, 10 Jan 2020 10:49:45 +0000 (10:49 +0000)]
Bug 23377: (QA follow-up) Use OVERRIDE_SYSPREF

SYSPREF_OVERRIDE unfortunately is not supported ;)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit a8659229be16dc8d8b2beaae370528afd373192e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23377: use ENV syspref override instead of complete disable
Ian Walls [Wed, 31 Jul 2019 16:32:23 +0000 (16:32 +0000)]
Bug 23377: use ENV syspref override instead of complete disable

In an attempt to save time, bulkmarcimport temporarily sets CataloguingLog
and AuthoritiesLog to 0.  It does this by disabling syspref caching and saving
the changes to the database (then replacing the original values at completion).

Unfortunately, this disables other key sysprefs from being cached, and results in
a 50% increase in processing time for the script.

This patch instead utilizes the ENV variable override feature of sysprefs, which
preempts the cache in C4::Context->preference().

To test:
1. Perform a bulkmarcimport with a reasonable number of biblios (~1000 will do)
2. Note the time taken to complete
3. Apply patch
4. Revert the biblio load performed
5. Perform another bulkmarcimport with the same biblios and commandline options
6. Note the time taken to complete
7. Compare times.  The time from step 6 should be about 33% less than the time from step 2
8. Check Cataloguing and Authorities Logs to verify imported records were not logged
9. Profit!

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 91befb973d9b646b15c78ba535348fa2cf139639)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23274: Mock simple_search_compat to cover both search engines
Nick Clemens [Tue, 26 Nov 2019 12:57:17 +0000 (12:57 +0000)]
Bug 23274: Mock simple_search_compat to cover both search engines

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 4c715fa0dbb0a92454b1e3012af8884ad4e12300)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24323: Advanced editor - Display an error message if the record did not save
Cori Lynn Arnold [Tue, 31 Dec 2019 17:10:14 +0000 (17:10 +0000)]
Bug 24323: Advanced editor - Display an error message if the record did not save

Invalid 008 with helper silently fails to save.

This patch adds a "else if" to fall through if the error message isn't
one of the previously defined ones ("syntax" and "invalid") and presents
the human with a generic message that "Something went wrong, cannot
save."

Prior to testing:
a/Verify that Advanced Editor is enabled
b/Download the errorrecord.mrc from bug

To test:
1/Apply patch
2/Go to Cataloging->Advanced Editor
3/Click "Import Record" button and navigate to the record saved from
step b/
4/Add an 003 field (as required by the default cataloging config)
5/Hit "Save to catalog"
6/Verify that a message is passed to the user that the file was unable
to be saved

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit ae4c86e87e26a06611519510c386723e3a904371)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24371: Fix "Show all items" avaibility link (use $raw filter) - intra
Jonathan Druart [Fri, 10 Jan 2020 08:56:12 +0000 (09:56 +0100)]
Bug 24371: Fix "Show all items" avaibility link (use $raw filter) - intra

Same fix for the intranet side

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit ff78c70ccb540dfe5d2b2a263f3701bd8aa52cc3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24371: Fix "Show all items" avaibility link (use $raw filter) - opac
Lucas Gass [Tue, 7 Jan 2020 18:54:49 +0000 (18:54 +0000)]
Bug 24371: Fix "Show all items" avaibility link (use $raw filter) - opac

TO TEST:
1. Make an OPAC search with plenty of results.
2. Use the search facets to limit the search in some way, item type, author, etc.
3. Click on 'Limit to currently available items', everything is still fine.
4. Attempt to return to 'Show all items', there will be no search results.
5. Apply patch
6. Ateempt steps 1-4 again.
7. Should work this time.

Signed-off-by: Rhonda Kuiper <rkuiper@roundrocktexas.gov>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 756a95098d858d63cc0971c950f02278bbe242fe)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 14759: Add test
Jonathan Druart [Thu, 9 Jan 2020 15:17:12 +0000 (16:17 +0100)]
Bug 14759: Add test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit ad92c140587657a2cb2fb2fbd4c7ebce8dd15eb3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 14759: Replace Text::Unaccent with Unicode::Normalize
Martin Renvoize [Wed, 8 Jan 2020 09:13:18 +0000 (09:13 +0000)]
Bug 14759: Replace Text::Unaccent with Unicode::Normalize

As shown in the comments on the bug, it appears that Unicode::Normalize
is the most reliable way to strip accents from strings for this use
case.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 27de0d61792d46e4fbf8bd8dba2d1d6f0a48c091)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 10352: Get add operations too
Nick Clemens [Fri, 13 Dec 2019 17:08:58 +0000 (17:08 +0000)]
Bug 10352: Get add operations too

When an add for biblio or item is recorded there is no space in the info field

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 428fc6fcc1dc029bed3d85acac1570e964c66c9a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 10352: (follow-up) Show the biblionumber for items in modification logs
Nick Clemens [Mon, 25 Nov 2019 12:09:45 +0000 (12:09 +0000)]
Bug 10352: (follow-up) Show the biblionumber for items in modification logs

This patch adds a link to the the biblio that shows the biblionumber of the item. It makes things a little more obvious

To test:
1 - Find a biblio with an item where an itemnumber on another biblio is equal to that biblionumber
   i.e. In the sample data:
        biblionumber 59 with item with itemnumber 127
        item with itemnumber  59 on biblionumber 23
2 - Edit both items however you wish
3 - On biblionumber 59 click the modification log
4 - You should see "Item 127"
5 - Click "Submit" on the form - this searches as itemnumber
6 - You should see "Item 59"
7 - Apply patch
8 - On biblionumber 59 click the modification log
9 - You should see "Item 127 from Biblio 59"
10 - Click "Submit" on the form - this searches as itemnumber
11 - You should see "Item 59 from Biblio 23"

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit ec9e2cbd1e54880d1671e3ce2f9b6e30d4aefbfe)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 10352: Use a new object_type parameter instead of the module's name
Jonathan Druart [Mon, 25 Nov 2019 10:28:40 +0000 (11:28 +0100)]
Bug 10352: Use a new object_type parameter instead of the module's name

To dissociate a search on biblio and item, we pass a new "object_type"
parameter to viewlog.pl. If equals 'biblio' we will assume that "object"
contains a biblionumber

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 346ff47491d3fe0e8768c7fa334e0d8fe4a55e1f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 10352: Display the correct modification logs for bibliographic records
Jonathan Druart [Mon, 13 May 2019 15:36:14 +0000 (10:36 -0500)]
Bug 10352: Display the correct modification logs for bibliographic records

The 'Modification log" link in the cataloguing module returns confusing
results. The 'object' parameter is the biblionumber, but the all log
from itemnumber=biblionumber will be displayed as well.
Since bug 11473 we have the action_logs.info column that is prefixed by
'item ' or 'biblio ' to disociated an item modification from a biblio
modif.
This patch suggests a quick and dirty approach, use this column to make
sure we are searching for the correct logs.
/!\ As bug 11473 did not update the existing rows, we will no longer display
the logs created prior to this change.

Test plan:
Make sure you have at least 2 bibliographic records with some items
Make sure you have the biblionumbers of those records that match
existing itemnumbers
Edit them (no matter what you change)
Go to the bibliographic detail page (staff) and click "Modification log"
You should see the correct changes.

Signed-off-by: hc <hc@interleaf.ie>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 536053d468d87a94544eb013cb7d4d9effae9445)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24313: Always display XSLT errors in logs
Jonathan Druart [Fri, 27 Dec 2019 13:55:36 +0000 (14:55 +0100)]
Bug 24313: Always display XSLT errors in logs

From
  commit 295ae33800a322facfdf56795f4c02b2fd53432b
  Bug 20272: Replace error numbers by codes in XSLT_Handler

"""
    Make XSLT_Handler a little bit less noisy by defaulting print_warns to
    false unless $ENV{DEBUG} is set. (See also bug 19018).
"""

I think we should warn the errors in the logs. They are not debug messages here, we should not rely on DEBUG.
If too noisy we should fix the original issues, not hide all the errors (which make the XSLT debugging super hard)

Test plan:
Break a XSLT, reload the page and confirm that there are useful errors in the Koha log file

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit ec79582374c829049ebac891644fb9f6e30a9614)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24123: Fix import of UTF-8 encoded MARC21 MARCXML using bulkmarcimport (elastic...
Jonathan Druart [Tue, 10 Dec 2019 14:24:36 +0000 (15:24 +0100)]
Bug 24123: Fix import of UTF-8 encoded MARC21 MARCXML using bulkmarcimport (elastic only)

If elastic is used as search engine, the bulkmarcimport.pl will not
handle correctly UTF-8 encoded MARCXML

Koha::SearchEngine::Search->new uses a require statement to load the correct Search module.
This is done l.257 of bulkmarcimport.pl:
  257 my $searcher = Koha::SearchEngine::Search->new

Koha::SearchEngine::Elasticsearch::Search will `use MARC::File::XML`, and so resets the arguments set before:
  216     $MARC::File::XML::_load_args{BinaryEncoding} = 'utf-8';

  220     $MARC::File::XML::_load_args{RecordFormat} = $recordformat;

An easy (but dirty) fix could be to move the declaration of my $searcher before in the script.
The tricky (but correct) fix would be to remove the long standing "ugly hack follows" comment.

This patch is the easy, and dirty, fix

Test plan:
Use the command line tool to import MARXCML records that contains unicode characters into Koha

Something like `misc/migration_tools/bulkmarcimport.pl -biblios -file record.marcxml -m=MARCXML`

Without this patch you will notice that unicode characters will not be displayed correctly

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit b11946bc377ec2c6474f9dc2192fda8188c86888)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24277: Fix date received editing when receiving an order
Jonathan Druart [Mon, 23 Dec 2019 15:19:47 +0000 (16:19 +0100)]
Bug 24277: Fix date received editing when receiving an order

Bug 8417 added the ability to edit the date received, but a merge
conflict was wrongly resolved during a rebase of
  commit 20d9ed618fbe3cdcb9c04444a1f8a584b0364069
  Bug 13321: Rename variables

Test plan:
Create an order
Receive it
Set a date (different from today)
=> The date you picked should have been set in DB for the order

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 028a77abce1aa0c9dc9f1bab8fc3069df811c2a1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24277: Regression tests
Tomas Cohen Arazi [Wed, 8 Jan 2020 13:55:40 +0000 (10:55 -0300)]
Bug 24277: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 76f7c46613687b712fa2342049557f2a769db8bf)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24329: DBRev 19.05.07.002
Lucas Gass [Wed, 5 Feb 2020 20:54:14 +0000 (20:54 +0000)]
Bug 24329: DBRev 19.05.07.002

4 years agoBug 24329: Add a test
Jonathan Druart [Sun, 5 Jan 2020 22:08:28 +0000 (23:08 +0100)]
Bug 24329: Add a test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 127f11b56dce3b37cf211df524d591ca0dd24dc5)

4 years agoBug 24329: Prevent update of timestamp on action_logs updates
Martin Renvoize [Thu, 2 Jan 2020 13:03:07 +0000 (13:03 +0000)]
Bug 24329: Prevent update of timestamp on action_logs updates

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit cff5d117316e0b30e27280b7860ff7cdddb73c3f)

4 years agoBug 24329: Correction to updatedatabase
Martin Renvoize [Thu, 2 Jan 2020 12:56:19 +0000 (12:56 +0000)]
Bug 24329: Correction to updatedatabase

Ensure timestamp is not overwriteen during upgrade when applying updates
for bug 3820

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 4ac096c1a5607cc0d3b5bfacfff69e5010fdaba6)

4 years agoBug 24016: (QA follow-up) Format code to adhere to perltidy format
Joonas Kylmälä [Tue, 17 Dec 2019 13:59:55 +0000 (13:59 +0000)]
Bug 24016: (QA follow-up) Format code to adhere to perltidy format

Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 3bfbf2589788474f0d37acc5d6df2d1fc7cc0005)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24016: manager_id in Koha::Patron::Message->store should not depend on userenv...
Lari Taskula [Tue, 12 Nov 2019 12:18:27 +0000 (12:18 +0000)]
Bug 24016: manager_id in Koha::Patron::Message->store should not depend on userenv alone

Koha::Patron::Message->store has this

    my $userenv = C4::Context->userenv;
    $self->manager_id( $userenv ? $userenv->{number} : undef);

This breaks in REST API when userenv is not set.

Let API user pass manager_id without relying on C4::Context->userenv.

To test:
1. prove t/db_dependent/Koha/Patron/Messages.t
2. Observe success

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 49eac22b1f977b439e5d3f8f313dee3164719b60)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24016: Add a failing test for overwrite-able manager_id in Koha::Patron::Message
Lari Taskula [Tue, 12 Nov 2019 12:24:30 +0000 (12:24 +0000)]
Bug 24016: Add a failing test for overwrite-able manager_id in Koha::Patron::Message

To test:
1. prove t/db_dependent/Koha/Patron/Messages.t
2. Observe failure

t/db_dependent/Koha/Patron/Messages.t .. 2/12
   Failed test 'Manager id should be overwrite-able even if defined in userenv'
   at t/db_dependent/Koha/Patron/Messages.t line 90.
          got: '1100'
     expected: '1101'
 Looks like you failed 1 test of 12.
t/db_dependent/Koha/Patron/Messages.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/12 subtests

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit c74820c2273393825c73b90769424544579a1aae)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23233: DBRev 19.05.07.001
Lucas Gass [Fri, 31 Jan 2020 20:57:19 +0000 (20:57 +0000)]
Bug 23233: DBRev 19.05.07.001

4 years agoBug 23233: (RM follow-up) Rename syspref in test
Martin Renvoize [Tue, 17 Dec 2019 09:07:44 +0000 (09:07 +0000)]
Bug 23233: (RM follow-up) Rename syspref in test

The AllowItemsOnHoldCheckout system preference was renamed to
AllowItemsOnHoldCheckoutSIP to clarify it's use, but one case was missed
in the test suit.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 0b7f70c2d5712460aef44ba35838d5a88cf25598)

4 years agoBug 23233: (follow-up) Correct test description
Joonas Kylmälä [Tue, 22 Oct 2019 11:20:39 +0000 (11:20 +0000)]
Bug 23233: (follow-up) Correct test description

AllowItemsOnHoldCheckout is not checked anymore but instead only
whether the tmp_holdsqueue is empty or not.

Signed-off-by: Lari Taskula <lari.taskula@hypernova.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 567da67606f82a720ea4ec074f7fe47a4b9d8ddf)

4 years agoBug 23233: (follow-up) Add description to atomic upgrade
Joonas Kylmälä [Tue, 22 Oct 2019 11:04:48 +0000 (11:04 +0000)]
Bug 23233: (follow-up) Add description to atomic upgrade

Signed-off-by: Lari Taskula <lari.taskula@hypernova.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 23b7cc37626a90ee596e24f5439f1739ee739727)

4 years agoBug 23233: (follow-up) Remove accidentally left comment
Joonas Kylmälä [Tue, 22 Oct 2019 11:00:51 +0000 (11:00 +0000)]
Bug 23233: (follow-up) Remove accidentally left comment

The line

t::lib::Mocks::mock_preference( 'AllowItemsOnHoldCheckout', 0 );

was removed from below this comment line but the comment explaining
what it does was forgotten.

Signed-off-by: Lari Taskula <lari.taskula@hypernova.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 723fb3ac415551d3c9049500c6e2efe9d44f4096)

4 years agoBug 23233: Remove use of AllowItemsOnHoldCheckout from C4::Items::GetItemsInfo
Kyle M Hall [Mon, 1 Jul 2019 12:56:09 +0000 (08:56 -0400)]
Bug 23233: Remove use of AllowItemsOnHoldCheckout from C4::Items::GetItemsInfo

Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit aa5418dca6ae20e70e92ecf662a1f5b83c86cd3e)

4 years agoBug 23233: Remove use of AllowItemsOnHoldCheckout from Koha::Item::has_pending_hold...
Kyle M Hall [Mon, 1 Jul 2019 11:19:33 +0000 (07:19 -0400)]
Bug 23233: Remove use of AllowItemsOnHoldCheckout from Koha::Item::has_pending_hold, it can cause false data to be returned

Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit dc769fd06577e54695cee11a0de917d6fb4c8569)

4 years agoBug 23233: AllowItemsOnHoldCheckout is misnamed and does not indicate it is for SIP...
Kyle M Hall [Fri, 28 Jun 2019 18:07:39 +0000 (14:07 -0400)]
Bug 23233: AllowItemsOnHoldCheckout is misnamed and does not indicate it is for SIP-based checkouts only

The system preference AllowItemsOnHoldCheckout only affects SIP based checkouts. I believe we should rename it AllowItemsOnHoldCheckoutSIP so it matches AllowItemsOnHoldCheckoutSCO. We should also update the description as well.

As far as I know AllowItemsOnHoldCheckout has never affected anything except SIP traffic. That does not preclude the addition of another AllowItemsOnHoldCheckout syspref that would affect the staff interface, but that would be an enhancement and is outside the scope of this bug report.

Test Plan:
1) Test AllowItemsOnHoldCheckout via SIP
2) Apply this patch
3) Test AllowItemsOnHoldCheckoutSIP via SIP
4) Note there is no difference!
5) Note the syspref description has been update to mention SIP

Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 5476e77021e8abd0c733780bb825938a7608ff76)

4 years agoUpdate release notes for 19.05.07 release v19.05.07
Lucas Gass [Wed, 22 Jan 2020 21:43:53 +0000 (21:43 +0000)]
Update release notes for 19.05.07 release

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoIncrement version for 19.05.07 release
Lucas Gass [Wed, 22 Jan 2020 21:39:17 +0000 (21:39 +0000)]
Increment version for 19.05.07 release

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoTranslation updates for Koha 19.05.07
Koha translators [Wed, 22 Jan 2020 21:30:57 +0000 (18:30 -0300)]
Translation updates for Koha 19.05.07

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24264: (follow-up) fix bad test
Lucas Gass [Fri, 17 Jan 2020 16:58:47 +0000 (16:58 +0000)]
Bug 24264: (follow-up) fix bad test

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23382: (follow-up) Fix typo
Lucas Gass [Fri, 17 Jan 2020 15:09:04 +0000 (15:09 +0000)]
Bug 23382: (follow-up) Fix typo

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23382: (RM follow-up) Days of the week discrepancies
Martin Renvoize [Mon, 28 Oct 2019 12:18:04 +0000 (12:18 +0000)]
Bug 23382: (RM follow-up) Days of the week discrepancies

DateTime and C4::Calander have different notions of 'days of the week'.

DateTime days go from 1..7 (Mon..Sun) whilst C4::Calendar expects 0..6
(Sun..Sat).  This patch adapts the holday setting in the tests to ensure
we work when testing Saturdays and Sundays.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1823316503331bcfffbf1e96528f53b66a8893b7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23382: Use floating time zone to prevent tests to fail because of DST
Jonathan Druart [Fri, 25 Oct 2019 13:28:49 +0000 (15:28 +0200)]
Bug 23382: Use floating time zone to prevent tests to fail because of DST

Today Friday Oct 25th, DST next Sunday => Date math are wrong, 96 hours
diff becomes 95.
To avoid that we use the floating timezone

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d4af82d411613f4d12d5e3e31de399aa43355cb4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23382: (follow-up) Ensure closed day is inside charge window
Martin Renvoize [Fri, 25 Oct 2019 10:29:58 +0000 (11:29 +0100)]
Bug 23382: (follow-up) Ensure closed day is inside charge window

We're testing with an hourly loan of 96 hours to catch a closed day.
However, our closed day was hard coded to be a Wednesday so if you ran
the tests on a Friday the 96 hour loan would not catch a Wednesday.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a5bf7b1e558ea38998d4661f074e99d028178c96)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23382: hours_between should match the logic of days_between
Martin Renvoize [Wed, 16 Oct 2019 12:10:43 +0000 (13:10 +0100)]
Bug 23382: hours_between should match the logic of days_between

The loops for subtraction holiday dates in hours_between and
days_between differed and as such their handling of start and end
boundaries for days also differed.  This patch makes them handle the
boundary days consistently.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a693c7243c23f888e2fad38a4fff9f37ff4a9301)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23382: Truncate dates to minutes for comparison.
Martin Renvoize [Wed, 16 Oct 2019 12:08:23 +0000 (13:08 +0100)]
Bug 23382: Truncate dates to minutes for comparison.

It's somewhat of a mess in C4::Circulation as to when dates are
truncated and when they are not and as such Koha::Charges::Fees could
not reliably assume that the dates passed in were consistent with each
other. As such, we take the approach of always truncating to the
greatest minute smaller than the passed in dates so we are comparing
like for like.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit bbdee010aa192ec0df436a79730343df2b855ff4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23382: (follow-up) Further improve test coverage
Martin Renvoize [Wed, 16 Oct 2019 10:44:11 +0000 (11:44 +0100)]
Bug 23382: (follow-up) Further improve test coverage

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8f3093c9a09c9c88b6885ac79b8273cf212f6f65)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23382: (follow-up) Ensure tests pass on Wednesdays
Martin Renvoize [Wed, 2 Oct 2019 10:20:27 +0000 (11:20 +0100)]
Bug 23382: (follow-up) Ensure tests pass on Wednesdays

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 080958231e02c7e1139aea33cbe20baa184d4c4b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23382: (follow-up) Clarify variable names
Martin Renvoize [Thu, 19 Sep 2019 13:48:45 +0000 (14:48 +0100)]
Bug 23382: (follow-up) Clarify variable names

This patch updates the variable name '$branch' to '$branchcode' in a
number of places to make it clearer what the variable contains.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit af9333292799695b5322a5cf1598e12f08f0a66c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23382: Fix logic in C4::Circulation::CanBookBeIssued
Martin Renvoize [Fri, 16 Aug 2019 07:32:55 +0000 (08:32 +0100)]
Bug 23382: Fix logic in C4::Circulation::CanBookBeIssued

It looks like over progressive rebases of bug 20912 a clause was lost
within CanBookBeIssued such that a fatal error may be triggered if an
item with no corresponding itemtype was passed into the routine.

Additionally the we were passing a Koha::Library object to CalcDateDue
rather than a branchcode which resulted in a different duedate being
used in 'CanBookBeIssued' when compared to 'AddIssue'.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f8e2c489cb668aab9e7484c2dd67c1c05f37b2a5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23382: Add hourly tests for Circulation
Martin Renvoize [Thu, 15 Aug 2019 13:57:08 +0000 (14:57 +0100)]
Bug 23382: Add hourly tests for Circulation

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9063d05662ead802ebb8bbb53730834e6ea5e458)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23382: Add tests for hourly calculations
Martin Renvoize [Tue, 6 Aug 2019 14:23:39 +0000 (15:23 +0100)]
Bug 23382: Add tests for hourly calculations

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 34e5391d9080f6e9c7bef48878ab888510aca7d0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23382: Improve test coverage
Martin Renvoize [Tue, 6 Aug 2019 13:38:28 +0000 (14:38 +0100)]
Bug 23382: Improve test coverage

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 28055d334741f8045423f9ac54106050e6b40d01)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24264: Use raw field when limiting by authtype
Nick Clemens [Wed, 18 Dec 2019 14:12:16 +0000 (14:12 +0000)]
Bug 24264: Use raw field when limiting by authtype

To test:
1 - Have a genre form record in your authorities file
2 - Search authorities for 'Default'
3 - The result is returned
4 - Set the dropdown to 'Genre/Form' and search matchign term
5 - No results
6 - Apply patch
7 - Restart all the things
8 - Repeat search for 'Genre/Form' and search matching term
9 - Record is returned

Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24054: Typo in ClaimReturnedWarningThreshold system preference
Bernardo Gonzalez Kriegel [Sun, 29 Dec 2019 10:40:37 +0000 (07:40 -0300)]
Bug 24054: Typo in ClaimReturnedWarningThreshold system preference

Fixed type: cliams -> claims

To test:
1) Apply the patch
2) Go to System preferences > Circulation preferences > ClaimReturnedWarningThreshold
3) Check the text is fixed.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit b84aee8a0f636eddf0ac7bb2bdebce0b1c520407)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24104: Item search - Prevent "Edit" dropdown button to overflow
Jonathan Druart [Mon, 25 Nov 2019 15:48:15 +0000 (16:48 +0100)]
Bug 24104: Item search - Prevent "Edit" dropdown button to overflow

Making it displays on the left fixes the problem.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 49a175e4adae35bd0376de8535a668608368546a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24328: Fix bibliographic frameworks install (linkid)
Jonathan Druart [Thu, 2 Jan 2020 12:12:58 +0000 (13:12 +0100)]
Bug 24328: Fix bibliographic frameworks install (linkid)

With strict mode enabled (tested with MariaDB 10.4.11)

ERROR 1366 (22007) at line 8029: Incorrect integer value: '' for column
`koha_kohadev`.`auth_subfield_structure`.`linkid` at row 769

Test plan:
Insert the .sql files from this patch and confirm that you can now
insert them correctly

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 618336fd14303315e2bb30cc3bf1296b45ff4af5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24314: Update de-DE MARC21 frameworks for updates 28+29 (May and November 2019)
Katrin Fischer [Sun, 29 Dec 2019 03:36:35 +0000 (03:36 +0000)]
Bug 24314: Update de-DE MARC21 frameworks for updates 28+29 (May and November 2019)

This updates the MARC framework files in the de-DE (German) installer
to the latest MARC standard. The files also include some translation
changes and fixes.

Files have been generated using the po files on translate.koha-community.org.

To test:
- Run the de-DE installer on a fresh database
- Verify that all files are installed without errors
- Verify that the frameworks are correctly in place

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
MARC21 files load without problems, no qa errors.
Loaded into 'en' install (delete fw then load) all frameworks look good.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 58b722ddf63f2b768c287a135ed966df1d118292)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24312: Update MARC21 frameworks to Updates 28+29 (May and November 2019)
Bernardo Gonzalez Kriegel [Fri, 27 Dec 2019 13:09:22 +0000 (10:09 -0300)]
Bug 24312: Update MARC21 frameworks to Updates 28+29 (May and November 2019)

MARC21 format changes

Bibliographic
-------------
Update 28 (May 2019)

New subfield f in 540
New subfield g in 506,540
New subfield q in 506,540
New subfield 2 in 540
New subfield 2 in 100,110,111,130,240,
                  700,710,711,730,758
                  800,810,811,830
New subfield 7 in 856
New code b in 007/01 Sound Recording

Update 29 (November 2019)

New field 688
New subfield i in 041
New subfield t in 041
New subfield g in 751
Renamed subfield g in 041

Authority
---------
Update 28 (May 2019)

New subfield 0 and 1 in 024
Renamed subfield 2 in 024
New subfield 7 in 856

Update 29 (November 2019)
No changes

To test:
1) Remove all your frameworks
2) Check mandatory bibliographic and authority files load without problem
3) Check new fields/subfields

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit b975b6d47131e0b282bca87e9c049d928adfddba)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 10469: Display more when editing subfields in frameworks
Owen Leonard [Fri, 13 Dec 2019 23:42:28 +0000 (23:42 +0000)]
Bug 10469: Display more when editing subfields in frameworks

This patch removes the accordion feature from the MARC subfields
structure editor. The form is not long, and I think in this case the
accordion makes the process more difficult to navigate.

To test, apply the patch and go to Administration -> MARC frameworks ->
Framework structure -> Subfield structure -> Edit. Choose a tag with
multiple subfields to best test the changes.

The whole form should apppear, and tabs functionality should work
correctly. Test that making changes under multiple tabs works correctly.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit a7fecfd8274a72ac268dd8b4e631b6976f06a4d2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24173: Advanced Editor: Show subtitle & published date on the search page
Cori Lynn Arnold [Wed, 18 Dec 2019 18:18:59 +0000 (18:18 +0000)]
Bug 24173: Advanced Editor: Show subtitle & published date on the search page

To test:

Prior to patch:
1/Verify that EnableAdvancedCatalogingEditor syspref is set to "enable"
2/Go to Cataloging
3/Click on "Advanced Editor" button
4/In left hand box put "specious" under Keywords and hit "enter"
5/verify that "Library of Congress" (or some other server) Z39.50 is checked
6/Verify that there are no headings for "Subtitle" and "Published"

Apply Patch
1/Go to Administration->Koha to MARC mapping
2/Add or verify that there are entries for "biblio.subtitle" and
"biblio.copyrightdate"
3/Go to Cataloging
4/Click on "Advanced Editor" button
5/In left hand box put "specious" under Keywords and hit "enter"
6/verify that "Library of Congress" (or some other server) Z39.50 is checked
7/Verify that there are headings for "Subtitle" and "Published" and the
data matches with the fields from Koha to MARC mapping when you click on
"View MARC" link for that record.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit a1035fad409d1226dd556de217012467f2690407)

4 years agoBug 24212: Increase size of OPAC 'send list' dialog box for IE
Aleisha Amohia [Wed, 11 Dec 2019 05:07:31 +0000 (05:07 +0000)]
Bug 24212: Increase size of OPAC 'send list' dialog box for IE

To test:
1) Create a list and view it in the OPAC (ensure you are using Internet
    Explorer as a browser)
2) Click Send list
3) Notice the dialog box cuts off the content in the window
4) Close the popup, apply the patch
5) Click Send list again
6) Confirm the dialog box shows the entire window
7) Confirm the box is resizable and has scrollbars

Sponsored-by: Toi Ohomai Institute of Technology
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit a112e379f9b5068379e0a7437e7235b00461fdf4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24063: Add Sami language characters to Zebra
Pasi Kallinen [Tue, 19 Nov 2019 09:26:01 +0000 (11:26 +0200)]
Bug 24063: Add Sami language characters to Zebra

Some Sami languages need few more characters to be mapped, or
are otherwise very hard to search for.

Test plan:

1) Catalogue a new record with title "Ǩoǯeŋa"
2) Make sure zebra indexed that record, then try to search for
   it with the text "kozena"
3) Apply patch
4) Redo 2, now the record should be found.

Signed-off-by: Pasi Kallinen <pasi.kallinen@koha-suomi.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 2ef69633d1c03138af2d0e90ef446fe00ceb6c89)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23956: Compiled CSS
Lucas Gass [Wed, 15 Jan 2020 21:26:38 +0000 (21:26 +0000)]
Bug 23956: Compiled CSS

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23956: Replace famfamfam calendar icon in staff client with CSS data-url
Owen Leonard [Sun, 3 Nov 2019 22:31:39 +0000 (22:31 +0000)]
Bug 23956: Replace famfamfam calendar icon in staff client with CSS data-url

This patch modifies the staff client CSS so that the backround image for
datepicker input fields is defined as a data-url rather than a reference
to an image file.

To test, apply the patch and regenerate the staff client CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

 - In the staff client, view any form which includes a datepicker-styled
   input. For instance, patron entry: date of birth, expiry; Aquisitions
   -> Late orders -> Filter results.
 - Confirm that the calendar icon looks correct.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit c859cfdd231fb315280fcf8aa162fca3ba02d8b9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23889: Compiled CSS
Lucas Gass [Wed, 15 Jan 2020 21:13:18 +0000 (21:13 +0000)]
Bug 23889: Compiled CSS

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23889: Use same css class on the basic editor view
Jonathan Druart [Mon, 16 Dec 2019 14:11:27 +0000 (15:11 +0100)]
Bug 23889: Use same css class on the basic editor view

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit aeb73c273b495c9276659413cfd4f951d59b1dea)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23889: Improve style of menu header in advanced cataloging editor
Owen Leonard [Thu, 24 Oct 2019 14:15:41 +0000 (14:15 +0000)]
Bug 23889: Improve style of menu header in advanced cataloging editor

This patch updates the style of dropdown menu headers to make it apply
more globally and changes the advanced cataloging editor template so
that the correct class is applied to the menu header.

To test, apply the patch and rebuild the staff client CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

Test the interfaces where these kinds of menu headers can be found:

 - Catalog search results: The "Sort" menu (Popularity, Author, etc.
   headings).

 - Saved report results: Run a report which returns a column of
   biblionumbers or itemnumbers. Check the "Batch operations" menu
   (Bibliographic records or item records headings).

 - Advanced cataloging editor: The settings menu (Change framework
   header).

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 1fa36b1d94e0ae03e8913cdfc66edf91e99ec066)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24267: (QA follow-up) Remove two calls, add transaction
Marcel de Rooy [Fri, 20 Dec 2019 07:14:32 +0000 (07:14 +0000)]
Bug 24267: (QA follow-up) Remove two calls, add transaction

Call to GetAuthorizedHeading is already done just before calling ImportBreedingAuth.
Call to GuessAuthTypeCode is not used.
Adding transaction to test (check your database, kidclamp ;)

Test plan:
Add new authority via Z3950 in the interface.
Run t/db_dependent/Breeding.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit a73cb7ec6f2cb5bb52fb1acd605e3385002e7ea2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24267: Unit tests
Nick Clemens [Thu, 19 Dec 2019 17:37:23 +0000 (17:37 +0000)]
Bug 24267: Unit tests

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 1d457f370cd4a7d8b614549f69d850d48b07caf9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24267: Improve ImportBreedingAuth
Nick Clemens [Wed, 18 Dec 2019 18:27:33 +0000 (18:27 +0000)]
Bug 24267: Improve ImportBreedingAuth

git grep ImportBreedingAuth - there is only one call to this routine
from SearchZ3950Auth

We pass it a MARC record, '2' for overwrite_auth

We then check for this record in the DB and get the breeding id,
however, when overwrite_auth is 2 we always add the auth to the batch
and return the new breeding id.

We don't actually use any of the other parameters returned here either

To recreate:
1 - Browse to Authorities
2 - Select New form Z3950
3 - Perform a search that returns results
4 - SELECT COUNT(*) FROM import_auths
5 - Repeat the search
6 - SELECT COUNT(*) FROM import_auths
7 - There are 20 more records
8 - SELECT * FROM import_auths - note the repeated rows

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit dcb7e9cb50c18a113472d5cd8405ba082bce6ec2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24282: Compiled CSS
Lucas Gass [Wed, 15 Jan 2020 18:35:20 +0000 (18:35 +0000)]
Bug 24282: Compiled CSS

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24282: SCSS conversion broke style in search results item status
Fridolin Somers [Fri, 20 Dec 2019 07:40:37 +0000 (08:40 +0100)]
Bug 24282: SCSS conversion broke style in search results item status

Before SCSS conversion, there was a style for search results item status :
  #searchresults span.status {
Conversion to SCSS added ul :
  #searchresults ul span.status {
Now style does not apply anymore.
You can see that items on loan are not red anymore.

To test, apply the patch and regenerate your CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
Clear your browser cache if necessary.

All rules using #searchresults in 17.11 :
    font-size : 90%;
    list-style: url(../img/item-bullet.gif);
    padding : .2em 0;
        clear : left;
}

    clear : left;
    color : #900;
    display : block;
}

    clear : left;
    display : block;
}

    display : block;
}

    float : left;
    margin : 3px 5px 3px -5px;
}

    vertical-align : top;
}

Apply patch update intranet CSS file and check you see the same rules.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 1f1ad0ddf980610e9cf6766b9e056334b904a63b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24244: Send null instead of empty string if branch not set
Nick Clemens [Fri, 13 Dec 2019 19:58:52 +0000 (19:58 +0000)]
Bug 24244: Send null instead of empty string if branch not set

Fix NewSuggestion if branchcode is passed with an empty string.
Error was "Broken FK constraint"

Test plan:
Create a new suggestion, select "any" for the library.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 374b627ff7db3445c280e40ee08724726166db00)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24244: Add test
Jonathan Druart [Sun, 15 Dec 2019 11:43:25 +0000 (12:43 +0100)]
Bug 24244: Add test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 802211213ad0bb43b4b21ad4687b0fe711392328)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24166: Do not hang when displaying checkout list if barcode is not set
Jonathan Druart [Wed, 18 Dec 2019 10:09:51 +0000 (11:09 +0100)]
Bug 24166: Do not hang when displaying checkout list if barcode is not set

If a barcode is not set, there is a JS error in the log:
  TypeError: oObj.barcode is null
We should not call escapeHtml() on it if not barcode is set for a given
item.

Test plan:
Check an item out
Remove its barcode
Load the checkout list
=> Without this patch you get the "loading" popup and the table is never
displayed
=> With this patch applied you see the checkout list

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit d2e1034084c9310498607e1d5e4156c40d7b2245)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoRevert "Bug 24232: Regression tests"
Lucas Gass [Tue, 14 Jan 2020 20:53:26 +0000 (20:53 +0000)]
Revert "Bug 24232: Regression tests"

This reverts commit 7be05a35debeaca73ddc1b3fe810d6213dd57d93.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoRevert "Bug 24232: Fix required permissions in DELETE /biblios/:biblio_id"
Lucas Gass [Tue, 14 Jan 2020 20:53:03 +0000 (20:53 +0000)]
Revert "Bug 24232: Fix required permissions in DELETE /biblios/:biblio_id"

This reverts commit 9c03f710221a4d17ee6e861fc0f3b3507716d249.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoRevert "Bug 21232: Add a client-side check on biblionumber when creating a subscription"
Lucas Gass [Tue, 14 Jan 2020 20:52:49 +0000 (20:52 +0000)]
Revert "Bug 21232: Add a client-side check on biblionumber when creating a subscription"

This reverts commit 9f312ebc91834dcf9a0355c2bf5704047786e35a.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoRevert "Bug 24358: (bug 21232) Make the alert string translatable"
Lucas Gass [Tue, 14 Jan 2020 20:52:34 +0000 (20:52 +0000)]
Revert "Bug 24358: (bug 21232) Make the alert string translatable"

This reverts commit 4a059f220cdddec4f992101d38a8264714b701dd.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24337: Checkout note cannot be marked seen if more than 20 exist
Owen Leonard [Fri, 3 Jan 2020 20:02:26 +0000 (20:02 +0000)]
Bug 24337: Checkout note cannot be marked seen if more than 20 exist

This patch modifies the event handler on the individual "Mark seen" /
"Mark unseen" buttons in the table of checkout notes. For an event to be
successfully attached to a hidden element it must be given a context.

To test you should have multiple checkout notes to work with, both seen
and unseen. Apply the patch and go to "Checkout notes pending" from the
staff client home page.

 - Navigate to the second "page" of data in the DataTable.
 - Test the functionality of the "Mark seen" and "Mark unseen" buttons.
   They should work correctly.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 57e69a7b2082e10e926a363c7ad14ccd435bb47c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24335: Cannot mark checkout notes seen/not seen in bulk
Owen Leonard [Fri, 3 Jan 2020 18:43:15 +0000 (18:43 +0000)]
Bug 24335: Cannot mark checkout notes seen/not seen in bulk

This patch changes the way checkbox events are handled on the checkout
notes page so that checking a checkbox enables the batch operation
controls.

Note: The addition of a "markseen" class is a preventative measure to
avoid future problems where using the "btn-small" class might not be
specific enough.

To test you should have multiple checkout notes to work with, both seen
and unseen. Apply the patch and go to "Checkout notes pending" from the
staff client home page.

 - Check any checkbox. The "Mark seen" and "Mark not seen" should go
   from disabled to enabled.
   - Test that the buttons work correctly.
 - Click the "Select all" and "Clear all" controls and confirm that the
   buttons are enabled and disabled correctly.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 2eeeaec8d5b0a92b8e0fba3ae1341d261c42d9c2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24308: Suggestions table on suggestions.pl should have separate columns for dates
Lucas Gass [Thu, 26 Dec 2019 17:12:25 +0000 (17:12 +0000)]
Bug 24308: Suggestions table on suggestions.pl should have separate columns for dates

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 5dee8697e47979e3fac686c3609a69376a0b8511)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24121: Item types icons in intra search results are requesting icons from opac...
Pedro Amorim [Wed, 11 Dec 2019 11:28:34 +0000 (10:28 -0100)]
Bug 24121: Item types icons in intra search results are requesting icons from opac images path

When searching in INTRA you'll notice the item type icons not showing.

To test:
1) Set syspref item-level_itypes to biblio
2) Confirm that there is a biblioitems.itemtype mapping to a MARC field
3) Verify that item type icons are set for all the types
4) Perform a search where biblios with said MARC field is filled with a type value
5) Verify that where the icon should appear, it's showing the browser icon for image not found
6) Apply patch.
7) Repeat step 4.
8) Observe the icons are now displayed correctly

Sponsored-by: Governo Regional dos Açores
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 433d578418759946db723e33ce719b27464af5c1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24274: Remove field 01e from sql installer files
Marcel de Rooy [Thu, 19 Dec 2019 09:47:44 +0000 (09:47 +0000)]
Bug 24274: Remove field 01e from sql installer files

Field 01e comes from an older utility (RLIN) and does not belong here.
Note: It is the only non-numeric field tag in Koha. And it seems to be
an violation of the MARC standard.

Test plan:
Run a new install and check the bibliographic frameworks.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit d9fa531d9fe2745cc0b9fd64cf0cfe5436bb96d6)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24281: Fix the list of types of visual materials
Maryse Simard [Fri, 20 Dec 2019 14:03:39 +0000 (09:03 -0500)]
Bug 24281: Fix the list of types of visual materials

In the MARC21 XSLT files for results in both staff and OPAC, the
type of visual material for code "g" is "legal article" instead
of "game". This patch change the value to "game".

To test:
0. Set up:
    - have a MARC21 database
    - use default XSLT file for display of results :
        OPACXSLTResultsDisplay : default
        XSLTResultsDisplay : defaul
    - If needed, catalog a game. In the 008 tag editor :
        Type of Material : VM - Visual Materials
        33 - Type of visual material : g - Game
1. On both staff and OPAC, make a search which returns results
including visual materials of type game (the title catalogued
in previous step).
2. Note that in the list of results, the label "Type of visual
material" is followed by "legal article".
3. Apply patch.
4. Repeat step 1.
5. Note "legal article" has been replaced by "game".

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 17f0c7e0f0a1a6be705296f9dcada82604790f9d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24283: (bug 21446 follow-up) close strong and add missing parens
Nick Clemens [Fri, 20 Dec 2019 11:29:39 +0000 (11:29 +0000)]
Bug 24283: (bug 21446 follow-up) close strong and add missing parens

To Test:
1) Create a course in course reserves, make it inactive
2) Add an item to it, changing item type and location
3) Make the course enabled
4) Note that the normal item type is no longer bold and has both opening and closing parentheses; Note that the normal location is also not bold and has both opening and closing parentheses.
5) Disable the course
6) Note that the normal item type is in bold with an opening parentheses but no closing parentheses; Note that the normal location is in bold with both opening and closing parentheses.
7) Apply patch
8) Note view is fixed

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit c0c8128e6854c230677d67ea5c4bed0dcd212b5f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 18688: Warnings about UTF-8 charset when creating a new language
Bernardo Gonzalez Kriegel [Mon, 9 Dec 2019 23:41:45 +0000 (20:41 -0300)]
Bug 18688: Warnings about UTF-8 charset when creating a new language

This patch removes some warnings when creating new languages,
those related with uft8 and two not related.

Tipical messages are:
>Warning: Can't determine original templates' charset, defaulting to UTF-8
>Warning: Charset Out defaulting to UTF-8
>...
>Removing empty file /../xx-YY-marc-NORMARC.po
>I UTF-8 O UTF-8 at /../kohaclone/misc/translator/tmpl_process3.pl line 365.
>Use of uninitialized value $pref_name in concatenation (.) or string at /.../misc/translator/LangInstaller.pm line 197.
>Created /../misc/translator/po/xx-YY-messages.po.

First four are 'normal' messages
The fifth one correspond to an unquoted preference string
The sixth one is a normal output message from msgint command
We will hide them unless verbose '-v' option is selected,
and fix the error.

To test:
1) Go to misc/translator
2) Create new language files
  $ perl translate create xx-YY
3) Check warnings and messages
4) Apply the patch
5) Remove created files, and create them again
   Ther must be no messages
6) Repeat 5) with verbose option '-v', check
   old messages

7) BONUS: without the patch update a language,
   for example de-DE:
   $ perl translate update de-DE
   Note (git status) a new file, po/de-DE-messages.po~
   This is a backup file from msgmerge command
   With the patch this backup is removed.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit bfa74fa8fc158ecacc9faced059c8a5781f98f96)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 11500: Use dateformat syspref and datepicker on additems.pl (and other item catal...
Owen Leonard [Fri, 22 Nov 2019 14:42:56 +0000 (14:42 +0000)]
Bug 11500: Use dateformat syspref and datepicker on additems.pl (and other item cataloguing pages)

This patch modifies the cataloging plugin dateaccessioned.pl so that it
triggers the addition of a datepicker widget to fields it is linked
with. Despite its name the plugin can be used on any item field which
requires a date.

To test, apply the patch and make sure you have one or more item
subfields linked to the dateaccessioned.pl plugin. For instance, in
MARC21:

 - Administration -> MARC bibliographic framework -> MARC structure ->
   952 -> Edit subfields:
   - subfields d ("Date acquired") and w ("Price effective from"):
     - Other options -> Plugin -> dateaccessioned.pl

 - Go to cataloging and add or edit an item on a bibliographic record
 - The "Date acquired" and "Price effective from" fields should be
   styled as datepickers.
 - Clicking in these fields should populate the field with today's date
   and trigger the datepicker popup.
 - Test that all the datepicker features work correctly.
 - Test that manual entry of a date works.

 - With the AcqCreateItem system preference set to "placing an order,"
   go to Acquisitions -> Vendor -> Add to basket.
   - Add a title to your basket using your preferred method.
   - In the "New order" form, find the section for adding an item.
   - Test the "Date acquired" and "Price effective from" fields, which
     should behave just like they did in the cataloging module.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 4faea5bc1b3d607911211af8e238565f73f9de2c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 19465: Document koha-create --elasticsearch-server option switch
Tomas Cohen Arazi [Fri, 13 Oct 2017 19:04:40 +0000 (16:04 -0300)]
Bug 19465: Document koha-create --elasticsearch-server option switch

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 11bbc315690062b9de94f9bd76c2c6cc9d26c140)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 19465: Add --elasticsearch-server option to koha-create
Tomas Cohen Arazi [Fri, 13 Oct 2017 18:59:25 +0000 (15:59 -0300)]
Bug 19465: Add --elasticsearch-server option to koha-create

This patch adds the --elasticsearch-server option switch to koha-create.
It allows choosing a different Elasticsearch configuration. It defaults
to the current 'localhost:9200' value.

To test:
- Apply this patches
- Run:
  $ reset_all
  $ man koha-create
=> SUCCESS: The man page shows correct information about the added
option switch
- Run:
  $ sudo koha-create --create-db test
=> SUCCESS: /etc/koha/sites/test/koha-conf.xml contains the default
   value (i.e. the current behaviour is kept)
- Run:
  $ sudo koha-create --create-db --elasticsearch-server tomas:1234 test2
=> SUCCESS: /etc/koha/sites/test2/koha-conf.xml contains the passed
   value in the <elasticsearch><server> section.
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 0453ec44b2531dceaf58e1b1cfb83ea24f84e52c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24046: Untranslatable 'Activate filters'
Maryse Simard [Mon, 18 Nov 2019 13:50:52 +0000 (08:50 -0500)]
Bug 24046: Untranslatable 'Activate filters'

Bug 9573 moved the code for the table filters activation to it's
own javascript file. The strings contained in this file are not
translatable. This patch moves the strings to the datatables
include file since the filters are related to datatables.

Test plan:
Visit the catalogue/detail.pl and reports/itemslost.pl and test
that the 'Activate/Deactivate filters' option still work correctly.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 423cc1053d8740fe220325d2ec1821320e057e14)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24242: Display funds that the logged in user can access - suggestions
Jonathan Druart [Sun, 15 Dec 2019 11:32:34 +0000 (12:32 +0100)]
Bug 24242: Display funds that the logged in user can access - suggestions

The design of this script is pretty bad and any modifications is a
challenge.
Here we are trying to display to display the funds available for the
logged in user. I did not understand previous code, as we are doing a
limit using CanUserUseBudget, I do not think it makes sense to retrieve
funds for a given library.
Also, I am wondering if the dropdown list in the filters has ever been
populated: budgetid_loop in the template *never* appeared in the history
of suggestion.pl (??)

Test plan:
Search for suggestions
Add/edit suggestions
=> The funds in the dropdown list should be the ones the logged in user
can use.

Signed-off-by: hc <hc@interleaf.ie>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit de309a26746523de2e39e285727d691b0b10392c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24358: (bug 21232) Make the alert string translatable
Jonathan Druart [Mon, 6 Jan 2020 22:08:55 +0000 (23:08 +0100)]
Bug 24358: (bug 21232) Make the alert string translatable

"Bibliographic record does not exist!" was not translatable as it was
defined in the .js file

Test plan:
Repeat test plan from bug 21232

Bonus point: update and install a localized version and confirm that the
message is translatable

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit c86882f2aefe3bf2e567dbf59f5ca2d396351cf4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 21232: Add a client-side check on biblionumber when creating a subscription
Jonathan Druart [Fri, 13 Dec 2019 11:41:20 +0000 (12:41 +0100)]
Bug 21232: Add a client-side check on biblionumber when creating a subscription

This patch adds an AJAX call to the REST API (/api/v1/biblios/) to
retrieve and display the biblio's title.
On clicking the "next" button a check is done to make sure the title
exists, which means the biblionumber we manually entered is valid (can
we assume a title is mandatory?)

Test plan:
- Create or edit a new subscription
- Enter an invalid biblionumber in the input
=> A friendly note is telling you that the biblio does not exist
- Try to switch to the next screen
=> You get an alert
- Enter a valid biblionumber in the input
=> The title is displayed
=> Try to switch to the next screen
=> It works!

Signed-off-by: hc <hc@interleaf.ie>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 90374dacb97a69d5774234cedeeb7d741232cb53)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24232: Fix required permissions in DELETE /biblios/:biblio_id
Tomas Cohen Arazi [Tue, 17 Dec 2019 17:43:54 +0000 (14:43 -0300)]
Bug 24232: Fix required permissions in DELETE /biblios/:biblio_id

This patch fixes the required permissions defined on the spec for the
mentioned endpoint.

To test:
1. Apply the tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/biblios.t
=> FAIL: Tests fail due to badly defined permissions
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass! Notice parameters: edit_catelogue didn't exist
5. Sign off :-D

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit a7e5c5cfd17ca02c3b1c821bb458831b9a2494db)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24232: Regression tests
Tomas Cohen Arazi [Tue, 17 Dec 2019 17:38:41 +0000 (14:38 -0300)]
Bug 24232: Regression tests

This patch enhances the tests for the DELETE /biblios/:biblio_id
endpoint so more fine grained permissions are tested.

It highlights the fact that the required permissions defined on the spec
are not correcttly defined.

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/biblios.t
=> FAIL: Tests fail because the user (that now has subpermissions only)
does not have enough permissions for a non-existent subpermission

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 866b81ae18be5f0f257a05229920268c4ca8895c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 14419: [19.05.x] (squashed) Expanding facets (Show more) performs a new search
Nick Clemens [Tue, 2 Jul 2019 11:58:49 +0000 (11:58 +0000)]
Bug 14419: [19.05.x] (squashed) Expanding facets (Show more) performs a new search

This patch removes the constraint of only passing 5 facets to the template unless the list is expanded, in fact, it removes the 'expanded' attribute from Search.pm
Now that all facets are passed to page it adds a 'show more' link at the bottom of lists and allows user to expand or collapse any facet set without reloading page.

Updated tests included.

To test:
1  - Perform an OPAC search that returns more than 5 of any given facet type
2  - Click the "Show more" link on the facets and see that the search is reloaded
3  - Apply patch
4  - Repeat search
5  - Note that you can click "Show more" without reloading page
6  - Test that page load is not greatly affected
7  - Ensure that all facet links function normally
8  - Ensure that facets are the same a prior to patch
9  - Repeat for staff client
10 - Prove t/Search.t

NOTE: This patch makes it much easier to see that there is an existing issue with marking the "active" facet.  Ending punctuation seems to confuse the matcher.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Bug 14419: (QA follow-up) Restore the link styling

Test plan:
Look at Show more/less links in facets, in opac and staff client
--> without this patch they are pure text, no styling, no hand cursor
--> with this patch it is link, but continues to work as before

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23995: (19.05.x follow-up) Corrections for backport error
Martin Renvoize [Fri, 10 Jan 2020 15:14:59 +0000 (15:14 +0000)]
Bug 23995: (19.05.x follow-up) Corrections for backport error

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 5365: Make more clear how to reopen a basket in a basket group
Jonathan Druart [Wed, 6 Nov 2019 09:45:56 +0000 (10:45 +0100)]
Bug 5365: Make more clear how to reopen a basket in a basket group

The "reopen basket" button will be visible but disabled if the basket
cannot be reopened. A tooltip is attached to the button to add more
information.

Note that the export button is still hidden, would it makes sense to
display it (visible and active)?

Test plan:
- Create a basket
- Close it
- Go to the basket detail view
=> The reopen button should be displayed and enabled

- Attach it to a basket group
- Go to the basket detail view
=> The reopen button should be displayed but disabled

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b687c60b27fa5a813b148bd5730b2d8278062ad5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23997: Escape z3950servers.rank as it's a new MySQL 8 kw
Jonathan Druart [Fri, 8 Nov 2019 10:46:58 +0000 (11:46 +0100)]
Bug 23997: Escape z3950servers.rank as it's a new MySQL 8 kw

This patch will fix installation of Koha on MySQL 8
DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'rank, syntax, encoding,recordtype) VALUES
('lx2.loc.gov',210,'LCDB','','','LIBRA' at line 2 at /usr/share/perl5/DBIx/RunSQL.pm line 273.

https://dev.mysql.com/doc/refman/8.0/en/keywords.html
=> RANK (R); added in 8.0.2 (reserved)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5ebf75ecd07f99b5d8bb56edc9b1758d262a30c1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23995: Remove CHECK constraints from kohastructure
Martin Renvoize [Fri, 8 Nov 2019 10:27:06 +0000 (10:27 +0000)]
Bug 23995: Remove CHECK constraints from kohastructure

MySQL8 and MariaDB10.3 impliment check constraints but utilise
different, incompatible, syntaxes to do so.

This patch removes the check constraints entirely whilst we work on a
better solution to work around the incompatabilities of the two DBs.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0d2cc574d1c8ac00cebd91816277c75a461eef3b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24259: Handle non existing default circ rule in Charges::Fees
Jonathan Druart [Wed, 18 Dec 2019 09:50:43 +0000 (10:50 +0100)]
Bug 24259: Handle non existing default circ rule in Charges::Fees

Can't call method "lengthunit" on an undefined value at
/usr/share/koha/lib/Koha/Charges/Fees.pm line 101.

Test plan:
1 - Remove all/all rule form circulation rules
2 - Define a rental fee per day for an itemtype
3 - Checkout an item of this type ot patron
4 - Should get note of no circ rule defined
5 - Confirm the checkout
=> item is checked out

Signed-off-by: hc <hc@interleaf.ie>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 3d9e1e4603a1371d44868c42f4b7a29c58b5c20f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>