]> git.koha-community.org Git - koha.git/log
koha.git
5 years agoBug 22899: (QA follow-up) Change accessor name
Martin Renvoize [Tue, 14 May 2019 12:21:55 +0000 (13:21 +0100)]
Bug 22899: (QA follow-up) Change accessor name

This patch changes pending_hold to has_pending_hold to signify that
we're returning a boolean and not a Koha::Hold object.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5c81d986212b480d9b491e46b3fb4498c0eb2c2c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22899: (QA follow-up) Ensure constraint is created
Martin Renvoize [Tue, 14 May 2019 12:17:01 +0000 (13:17 +0100)]
Bug 22899: (QA follow-up) Ensure constraint is created

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 49a6aac8b6d8fd13999638f5a6ae4d4481dbf304)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22899: Add pending_hold method to Koha::Item
Nick Clemens [Mon, 13 May 2019 20:09:05 +0000 (20:09 +0000)]
Bug 22899: Add pending_hold method to Koha::Item

To test:
 1 - Enable course reserves
 2 - Create a course
 3 - Add an item to the course
 4 - Attempt to view the course on the OPAC
 5 - Internal Server Error
 6 - Apply patch
 7 - Add an item to the holds queue by placing a hold and  running holds queue builder or:
     INSERT INTO tmp_holdsqueue (itemnumber) VALUES (###);
 8 - View the course page, note item appears 'Pending hold'
 9 - Remove the holdsqueue line
10 - View the course page, note item appears 'Available'
11 - prove -v t/db_dependent/Koha/Item.t

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
I see Jonathan's comments about small improvements, but will sign off as
everything works as expected here.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f21ebad7d298f25e44771e5833d1d1d4d6d8f777)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22899: Database update
Nick Clemens [Mon, 13 May 2019 20:08:06 +0000 (20:08 +0000)]
Bug 22899: Database update

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit af1067f3d466cf3bd32c4747c4a00dd7542c1fe0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22433: Use Data::Dumper instead of Data::Printer
Jonathan Druart [Fri, 10 May 2019 17:32:23 +0000 (12:32 -0500)]
Bug 22433: Use Data::Dumper instead of Data::Printer

Data::Printer is not in our deps

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b5b64e7900fd61bd525409ee869deafde7b8c50a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22433: Add debug statement to Transaction.t
Jonathan Druart [Thu, 9 May 2019 18:04:38 +0000 (13:04 -0500)]
Bug 22433: Add debug statement to Transaction.t

Hard to know what's going on here without more info. Adding this output
may help to investigate more.

Test plan:
Make sure the tests still pass

If it fails, please paste the output!!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 63a8e27f2e087b698e986e026dc9fa511b2afbfe)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21709: Replace 'no popup' plugin links with a span
Jonathan Druart [Thu, 1 Nov 2018 16:31:31 +0000 (13:31 -0300)]
Bug 21709: Replace 'no popup' plugin links with a span

Test plan:
Edit a bibliographic record
Notice that the icons next to fields linked with a plugin can be a link
or not. The browser displays a pointer or not.

It will remove the ambiguity to display an icon that is clickable but
does nothing when clicked.
We could also have another icon to disociate both behaviors.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9fa97774ae6b3c84028b15f8c768460a012320ea)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22782: DBIC update for SocialData
Nick Clemens [Fri, 10 May 2019 12:10:42 +0000 (12:10 +0000)]
Bug 22782: DBIC update for SocialData

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5ecbe281aff13e53d4fbc5064714de9209410358)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22895: (bug 22650 follow-up) Correct itemnumber call in placerequest.pl
Nick Clemens [Mon, 13 May 2019 15:07:41 +0000 (15:07 +0000)]
Bug 22895: (bug 22650 follow-up) Correct itemnumber call in placerequest.pl

Backport of 22650 makes an object call to an item hashref retrieved by get item:

  94             if ( CanItemBeReserved($borrower->{'borrowernumber'}, $item->itemnumber, $branch)->{status} eq 'OK' ) {

Should be $item->{itemnumber}

To test:
1 - Try to place an item level hold
2 - It fails
3 - Aply patch
4 - Try again
5 - It works!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 15524: (RMaint followup) Missing Sponsor Attribution
Martin Renvoize [Thu, 9 May 2019 11:44:49 +0000 (12:44 +0100)]
Bug 15524: (RMaint followup) Missing Sponsor Attribution

Sponsored-by: Northeast Kansas Library System, NEKLS (http://nekls.org/)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22357: (RMaint follow-up) Mana does not exist in 18.11.x
Martin Renvoize [Wed, 8 May 2019 18:13:46 +0000 (19:13 +0100)]
Bug 22357: (RMaint follow-up) Mana does not exist in 18.11.x

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22816: OPAC detail holdings table should now look a bit better
Liz Rea [Wed, 1 May 2019 00:31:15 +0000 (00:31 +0000)]
Bug 22816: OPAC detail holdings table should now look a bit better

This patch sets the "autowidth" option to "false" for the OPAC
holdings DataTable on opac-detail.pl. This gives the table a fluid
width rather than having the width be "hard-coded" by DataTables upon
first page render.

To test, apply the patch and view the detail page for a bibliographic
record with some items. Under the "Holdings" tab, the table of
holdings should fill the width of the tab container.

Resize the browser window and confirm that the table width adjusts
accordingly.

Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: arthur <arthur.bousquet@inlibro.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 604c7b818b63b93c66bb751ceb9d99bc1c109be9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21036: Remove odd number of elements warnings from AuthoritiesMarc.pm
Marcel de Rooy [Thu, 5 Jul 2018 10:10:26 +0000 (12:10 +0200)]
Bug 21036: Remove odd number of elements warnings from AuthoritiesMarc.pm

Like this one (16.11 line number):
Odd number of elements in anonymous hash at C4/AuthoritiesMarc.pm line 1070.

We need to add a scalar to some MARC::Field::subfield calls. In list context
an empty list returned affects the hash built around it.

Test plan:
Could reproduce this warning easily from OPAC authority search.
opac-authorities-home.pl calling BuildSummary.

Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 88b37330abaee6372ec999c1a81fd216d66a1379)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21036: Fix warnings from C4/Biblio
Marcel de Rooy [Thu, 5 Jul 2018 07:53:57 +0000 (09:53 +0200)]
Bug 21036: Fix warnings from C4/Biblio

Use of uninitialized value $isbn in string ne at /usr/share/koha/prodclone/C4/Biblio.pm line 1794. (16.11 line number)
Trivial edit.

And these warnings from TransformHtmlToXml (with 16.11 line numbers):
Use of uninitialized value in substr at /usr/share/koha/prodclone/C4/Biblio.pm line 2527.
Use of uninitialized value in substr at /usr/share/koha/prodclone/C4/Biblio.pm line 2528.
substr outside of string at /usr/share/koha/prodclone/C4/Biblio.pm line 2528.
Indicator in 952 is empty at /usr/share/koha/prodclone/C4/Biblio.pm line 2534.

The last warning is not needed and can be removed.
Note that the code used the construct @$indicator[$j] for $$indicator[$j].
The first is an array slice. This worked in list context. But apparently
the second was meant to be used. And can be rewritten as $indicator->[$j]
which generally is considered more readable.
The code around indicator1/2 and ind1/2 is simplified. This change is applied
twice in the same sub.

Test plan:
Read the changes.
Run t/Biblio/TransformHtmlToXml.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 295e9b1054386cf188c5fc1eb4fd590e5c451513)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21036: Fix uninitialized value within @itemnumber in string ne
Marcel de Rooy [Wed, 4 Jul 2018 14:49:38 +0000 (16:49 +0200)]
Bug 21036: Fix uninitialized value within @itemnumber in string ne

Line from 16.11 log:
Use of uninitialized value within @itemnumber in string ne at /usr/share/koha/prodclone/reserve/modrequest.pl line 70.

Test plan:
Read the change. Not 100% identical (numeric zero) but should be enough.
This line is probably not needed at all.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4560d9623663e9fd0b60f9a39ec53082cdd90f24)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22800: (bug 22550 follow-up) Do not raw filter when not necessary (OPAC suggestions)
Jonathan Druart [Mon, 29 Apr 2019 02:09:39 +0000 (22:09 -0400)]
Bug 22800: (bug 22550 follow-up) Do not raw filter when not necessary (OPAC suggestions)

This is a follow-up for bug 22550, we do not need to use the $raw
filter.

Test plan:
Same as bug 22550:
Test plan:
Test plan:
1. OPAC->login->your purchase suggestions->New purchase suggestion
2. Click button "Submit your suggestion" directly without filling in any field.
   Empty suggestion record was added succeffully.
3. Apply the patch.
4. Click button "Submit your suggestion" directly without filling in any field.
   The required fields should be labeled in red.
   (you can change the mandatory fields by preference
   'OPACSuggestionMandatoryFields')

Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b9bff787ca863a45128cbd3a05a109e8f66d4fdf)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22791: Unify calculation between aqui-home and ordered.pl
Nick Clemens [Fri, 26 Apr 2019 19:58:05 +0000 (19:58 +0000)]
Bug 22791: Unify calculation between aqui-home and ordered.pl

To test:
1 - Enable order price rounding
2 - Order an example with 8 * 16,99 and 42% discount, 19.45% tax.
3 - Check ordered page - 94.17 is total
4 - Check aqui-home - 94.16 is total
5 - Apply patch
6 - Verify numbers now match

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 100b1e3eecb4de27f6a85095196019f6b36251c0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22527: (RM follow-up) Add filter
Nick Clemens [Tue, 7 May 2019 15:57:35 +0000 (15:57 +0000)]
Bug 22527: (RM follow-up) Add filter

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d38d78bcf4cc62d34aa953864cf6da87bef93c80)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22527: web installer links to outdated DB manual
Liz Rea [Tue, 16 Apr 2019 06:55:36 +0000 (06:55 +0000)]
Bug 22527: web installer links to outdated DB manual

To reproduce:
1. Use MySQL or MariaDB for your Koha installation
2. Create an empty database and point $KOHA_CONF to this database name.
3. Grant SELECT privilege to your database user, e.g.
grant select on koha3.* to 'koha'@'%' identified by 'koha';
4. Go to step 2 of web installer where it checks database
connection
5. Observe the following message

     User koha doesn't have enough privilege on database koha.

     Ask for or make a change in the user's privileges. User koha must
     have USAGE, INSERT, UPDATE, DELETE, DROP and CREATE privileges on
     database koha2.

     Need help? See manual for PostgreSQL

6. Note "See manual for PostgreSQL" is wrong. Should now read Need help?
For help with granting permissions, please search online for "[%
dbms %] manual grant permissions" of course the dbms should be the dbms
you are using.
7. Apply patch, restart all
8. Refresh page and observe it now displays correct link

Test plan and original patchset by Lari Taskula <lari.taskula@hypernova.fi>

Sponsored-by: Hypernova Oy
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 22527: Remove extra space after '?'

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit abd4445cd2b86fe601de20b403bb621115b27c83)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22787: Add mapping of letters "ů" and "Ů" to zebra definitions
Josef Moravec [Mon, 29 Apr 2019 12:18:43 +0000 (14:18 +0200)]
Bug 22787: Add mapping of letters "ů" and "Ů" to zebra definitions

Test plan:
0) Do not apply the patch
1) Add some word with character "ů" into metadata, for example author "Martinů, Bohuslav"
2) Try to search it with "Martinu" and you'll see you can't find it
3) Apply the patch
4) Copy file etc/zebradb/etc/word-phrase-utf.chr to your /etc/koha directory
    sudo cp etc/zebradb/etc/word-phrase-utf.chr /etc/koha/zebradb/etc/
5) koha-zebra --restart kohadev
6) koha-rebuild-zebra -f kohadev
6) try to search "Martinu" again - you should be able to find your record

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d57239ca78e7719f4c04865e8c493919c6362c15)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21671: Prevent Modifications.t to fail randomly
Jonathan Druart [Mon, 12 Nov 2018 18:20:33 +0000 (15:20 -0300)]
Bug 21671: Prevent Modifications.t to fail randomly

If repeatable is set to 0 by TestBuilder, the tests will fail with:
t/db_dependent/Koha/Patron/Modifications.t .. 1/6     # Looks like you planned 20 tests but ran 9.

 #   Failed test 'approve tests'
 #   at t/db_dependent/Koha/Patron/Modifications.t line 259.
[repeatable not set for attribute type and tried to add a new attribute for the same code]# Looks like your test exited with 255 just after 5.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 914f23970de536df3972ebd75b280ee8eec98955)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22813: (follow-up) Add missing condition
Tomas Cohen Arazi [Tue, 30 Apr 2019 18:48:14 +0000 (15:48 -0300)]
Bug 22813: (follow-up) Add missing condition

This patch restores a missing condition. $patron gets renamed to make
it obvious that it related to the logged in user.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 45b1ff8dfa1054590544caff200b307144bd02cf)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22813: remove repetitive queries inside two nested loops in searchResults
Tomas Cohen Arazi [Tue, 30 Apr 2019 15:30:25 +0000 (12:30 -0300)]
Bug 22813: remove repetitive queries inside two nested loops in searchResults

This patch moves a query on Koha::Patrons and then the related
Koha::Patron::Category that needlessly happens inside two nested loops
(all items of all MARC records in the resultset).

The Koha::Patron and Koha::Patron::Category are always the same as it is
fetched from C4::Context->userenv each time.

To test:
- Run:
  $ kshell
 k$ prove t/db_dependent/Search.t
=> SUCCESS: Tests pass
- Apply this patch
- Run:
 k$ prove t/db_dependent/Search.t
=> SUCCESS: Tests still pass!
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 10efe4e3f239c47b847c53f06f82245e07d54759)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22453: Make TestBuilder generates dates taking into account the timezone
Jonathan Druart [Mon, 4 Mar 2019 21:12:56 +0000 (18:12 -0300)]
Bug 22453: Make TestBuilder generates dates taking into account the timezone

I have no idea why this only appears today but TestBuilder generates dates using DateTime->now,
which does not take into account the timezone.

It has been highlights by a failing test today on U18.
Why today whereas this patch was pushed few weeks ago?
Why U18 and not D9?

The output of the test is:
koha_1       |     #   Failed test 'With BorrowerLogs and TrackLastPatronActivity we should not spam the logs'
koha_1       |     #   at t/db_dependent/Koha/Patrons.t line 1421.
koha_1       |     #          got: '2'
koha_1       |     #     expected: '1'
koha_1       |     # Looks like you failed 1 test of 4.
koha_1       |
koha_1       | #   Failed test 'BorrowersLog tests'
koha_1       | #   at t/db_dependent/Koha/Patrons.t line 1422.
koha_1       | # Looks like you failed 1 test of 33.
koha_1       | [19:51:44] t/db_dependent/Koha/Patrons.t

Actually there are 2 logs, one for the cardnumber that is expected, and on for updated_on:
   "updated_on" : {
      "after" : "2019-03-04 21:10:00",
      "before" : "2019-03-04 18:10:00"
   }
Apart from the fact that we may want to remove this updated_on field from MODIFY,
the before/after dates differ from 3 hours.
Here it's currently 18:10 and in UTC-3

To prevent such behaviors in tests (create stuffs in the future...), we should
use our Koha::DateUtils::dt_from_string method that takes care of the timezone
used in other places of Koha.

Test plan:
prove t/db_dependent/Koha/Patrons.t
May fail without this patch.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
This patch is fine in itself, but there may still be an issue around
the failing test for TrackLastPatronActivity. Reopened bug 22741.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c1513a10c35f721e3c519d5ab3c38c7154b7fa1c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22808: Move Cache.t to db_dependent
Mirko Tietgen [Tue, 30 Apr 2019 08:56:20 +0000 (10:56 +0200)]
Bug 22808: Move Cache.t to db_dependent

Cache.t fails during package build. Moving it to db_dependent fixes
the problem.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6509d73d7925fe5d317d6f2baa1d1565d8d36220)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22420: Remove wrong calculation on approved tags
Tomas Cohen Arazi [Wed, 27 Feb 2019 10:09:12 +0000 (07:09 -0300)]
Bug 22420: Remove wrong calculation on approved tags

Before the patch from bug 14385, the passed structure (that is returned
by get_approval_rows() looks like:

\ [
    [0] {
        approved           1,
        approved_by        51,
        approved_by_name   undef,
        date_approved      "2019-02-26 15:36:42",
        term               "another",
        weight_total       3
    },
    [1] {
    ...

After the introduced 'filtering', we loose the information about the
term weight!:

\ [
    [0] {
        approved               1,
        author                 "Heylin, Clinton.",
        biblionumber           1,
        borrowernumber         51,
        date_created           "2019-02-26 15:36:37",
        language               undef,
        subtitle               [],
        tag_id                 1,
        term                   "word",
        time_created_display   "15:36:37",
        title                  "E Street shuffle :",
        visible                1,
        XSLTBloc               "
            <<<BUNCH OF GENERATED HTML HERE>>>
    ...

The code even calls GetMarcBiblio. This needs to be reverted as it is
plain wrong. If it was worth removing *some* biblios from the
weight_total value, then this calculation should be done somewhere else,
without fetching the MARC data again.

Signed-off-by: Claudio <costalc@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 28bcc5aa68733e41d50a6a801088b06857968f42)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22010: Check preferences for ebook integration
Nick Clemens [Mon, 17 Dec 2018 13:35:09 +0000 (13:35 +0000)]
Bug 22010: Check preferences for ebook integration

To test:
1 - Enable OverDrive and RecordedBooks (you can put anything in the
        prefs)
2 - Search on the opac - verify you get results (or search error) on
first page of results'
3 - Go to second page of results - OD and RB are not searched
4 - Apply patch
5 - Verify nothing has changed

If you have valid credentials:
1 - Enable RB prefs
2 - Sign in with an account that has an email matching your registered
account for recordedbooks
3 - Confirm you RB account loads on opac-user.pl

Otherwise:
Read the patches, verify it all makes sense

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7a44c9edb969cd92db4de0223a2c9db06d576451)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22357: Do not duplicate report rows if several reports exist
Jonathan Druart [Mon, 29 Apr 2019 01:40:21 +0000 (21:40 -0400)]
Bug 22357: Do not duplicate report rows if several reports exist

At the moment every time you run runreport.pl with the --store-results
option another line will appear for your report in the saved
reports table. This is not a data, but a display problem as the
report is still only stored once.

1) Create a report and note the report number
2) Run from command line (replace X by report number) :
    misc/cronjobs/runreport.pl X --format=csv --csv-header --store-results
3) Go to saved reports table
4) Look at the table, each run of the cronjob will create a new row
   in the table instead of just updating the saved results column.
5) Apply patch
6) Veriy the table displays correctly again and there are no regressions

QA: Run t/db_dependent/Reports/Guided.t

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4ca1d8e3b3f60722321f9f4b5f1f0caa461beecb)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22717: (bug 20287 follow-up) Fix Google OpenId auto registration
Jonathan Druart [Sat, 27 Apr 2019 00:49:14 +0000 (20:49 -0400)]
Bug 22717: (bug 20287 follow-up) Fix Google OpenId auto registration

Silly bug caused by:
  commit ef410fd62f279a10687636a4f26babb2c91ecadc
  Bug 20287: Replace occurrences of AddMember with Koha::Patron->new->store->borrowernumber

Constructors take a hashref!

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 59b740613e7a72bf6e5283c2876bad9444a7ef6a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoUpdate release notes for 18.11.05 release v18.11.05
Martin Renvoize [Mon, 29 Apr 2019 11:33:38 +0000 (12:33 +0100)]
Update release notes for 18.11.05 release

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoIncrement version for 18.11.05 release
Martin Renvoize [Mon, 29 Apr 2019 11:07:23 +0000 (12:07 +0100)]
Increment version for 18.11.05 release

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoTranslation updates for Koha 18.11.05
Koha translators [Mon, 29 Apr 2019 09:48:15 +0000 (06:48 -0300)]
Translation updates for Koha 18.11.05

(cherry picked from commit d20e811b71fa536aaf5b9e34c4804dd899875a81)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22542: Force back button to display personal data
Jonathan Druart [Thu, 21 Mar 2019 17:45:37 +0000 (14:45 -0300)]
Bug 22542: Force back button to display personal data

This is a follow-up of bug 5371

The following command must not return anything:
grep ^output_html_with_http_headers `git grep -l -P "authnotrequired\s*=>\s*0" opac`|grep -v force_no_caching

This must be a test somehwere to prevent further regressions.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22478: (RMaint follow-up) source t::lib::Mocks
Martin Renvoize [Fri, 26 Apr 2019 16:24:06 +0000 (17:24 +0100)]
Bug 22478: (RMaint follow-up) source t::lib::Mocks

In 18.11.x the t::lib::Mocks module is not yet sourced for the relevant
test

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22478: (QA follow-up) Update tests to check for any script tags
Martin Renvoize [Mon, 29 Apr 2019 12:30:09 +0000 (13:30 +0100)]
Bug 22478: (QA follow-up) Update tests to check for any script tags

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22478: (QA follow-up) Make test consistent with variable name
Martin Renvoize [Fri, 26 Apr 2019 18:56:43 +0000 (19:56 +0100)]
Bug 22478: (QA follow-up) Make test consistent with variable name

We were adding data to category 1 (private lists) and testing against
that, but we named the variable 'publist_lists'.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22478: (QA follow-up) Handle category in opac-shelves like a boolean
Marcel de Rooy [Fri, 12 Apr 2019 07:02:06 +0000 (07:02 +0000)]
Bug 22478: (QA follow-up) Handle category in opac-shelves like a boolean

The category parameter should be restricted to 1 or 2 (private/public). In
order to keep same behavior, no parameter means 1 (private).
Note: Adding the same line in intranet counterpart.

Test plan
[1] Check for category empty, '1a', '11' etc. And with script ;)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22478: Fix POD
Katrin Fischer [Wed, 10 Apr 2019 02:06:37 +0000 (02:06 +0000)]
Bug 22478: Fix POD

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>
5 years agoBug 22478: Add tests
Jonathan Druart [Fri, 15 Mar 2019 16:41:27 +0000 (13:41 -0300)]
Bug 22478: Add tests

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>
5 years agoBug 22478: Prevent XSS vulnerabilities when pagination appears
Jonathan Druart [Thu, 14 Mar 2019 22:42:50 +0000 (19:42 -0300)]
Bug 22478: Prevent XSS vulnerabilities when pagination appears

This is a bad one as we thought we were XSS safe since bug 13618.

The html code generated in C4::Output::pagination_bar must escape the
variables and values correctly.

This patch needs to be widely tested, everywhere the pagination appears,
to make sure we will not introduce regressions.

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>
5 years agoBug 22692: Check for patron using cardnumber and userid
Nick Clemens [Fri, 12 Apr 2019 01:23:34 +0000 (01:23 +0000)]
Bug 22692: Check for patron using cardnumber and userid

TO test:
1 - Set failed login attempts to 1
2 - Attempt a login with a userid and bad password, no success
3 - Attempt a login with userid and correct password, prevented because
locked
4 - Attempt a login with cardnumber and right password, you are logged
in
5 - Log out, try again with userid and correct password, prevented
because locked?
6 - Apply patch
7 - Repeat 1-3 to lock account
8 - Attempt logging in with cardnumber, you are prevented

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22692: Unit tests
Nick Clemens [Fri, 12 Apr 2019 01:11:19 +0000 (01:11 +0000)]
Bug 22692: Unit tests

1 - Apply just this patch
2 - prove -v t/db_dependent/Auth.t
3 - Failure
4 - Apply second patch
5 - prove -v t/db_dependent/Auth.t
6 - Success

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22464: Pass forward parameters
Andrew Isherwood [Wed, 6 Mar 2019 14:07:50 +0000 (14:07 +0000)]
Bug 22464: Pass forward parameters

This patch ensures that parameters that are present are passed forward
when accepting the copyright notice.

Test plan:

- Clone the latest version of the FreeForm backend from:
  https://github.com/PTFS-Europe/koha-ill-freeform
- Ensure the ILLModuleCopyrightClearance syspref is populated
- Create an OpenURL in order to pre-populate the FreeForm form, a suitable URL would be:

<your_koha_instance>/cgi-bin/koha/opac-illrequests.pl?openurl=true&backend=FreeForm&method=create&opac=1&atitle=Theater%20careers.%20%5Belectronic%20resource%5D%20%3A%20a%20realistic%20guide.&aulast=Donahue%2C%20Tim&date=2012&genre=article&isbn=978123123123&issn=1234-5678&issue=34&pages=12-34&sid=EBSCO%3AAthlone%20Institute%20of%20Technology%3Aait.101326&title=article%20title%20here&volume=12

- Log in
- Accept the copyright notice
=> TEST: Observe that the FreeForm form is pre-filled with the metadata
supplied in the OpenURL

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5e20e438e80465fcd6f1c2af5e6138a639dec5f3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22621: Fix filters on subscription search results
Jonathan Druart [Wed, 24 Apr 2019 02:49:46 +0000 (22:49 -0400)]
Bug 22621: Fix filters on subscription search results

Caused by
  commit 4e698f7b478a094d7b32ebfeaa917bca05ebcc5b
  Bug 18426: Allow to edit subscriptions in batch

There is a shift caused by a hidden column, which make the filters
searching on the previous column.

Test plan:
- Add 1+ searchable additional field for subscription
- Create a new subscription
- Search for subscriptions
- Use the column filters to filter the results
=> The results must be filtered accordingly

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1d6e9ff44c19379a41e9ce688685a24788583e0c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21589: Series link formed from 830 field is incorrect
Kyle M Hall [Wed, 17 Oct 2018 18:43:11 +0000 (14:43 -0400)]
Bug 21589: Series link formed from 830 field is incorrect

Bug 13692 corrected the series link for records using a 490/800 combination

When a record has a 490/830 conbination for series, the link is malformed (title is used as author, title is blank)

Test Plan:
1) Catalog two or more records with 830 fields
2) Note the series links are broken
3) Apply this patch
4) Reload the record details page
5) The series link should now work
6) Repeat for the OPAC

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 20496bc78b7830d812fda454a0fe243fae9c465c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22715: Remove extraneous html filter
Nick Clemens [Thu, 25 Apr 2019 17:47:14 +0000 (17:47 +0000)]
Bug 22715: Remove extraneous html filter

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7e85754083bd66f45009f55a01e9dec9eda81504)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22715: Searching for patrons with "" in the circulation note hangs patron search
Kyle M Hall [Tue, 16 Apr 2019 14:34:56 +0000 (10:34 -0400)]
Bug 22715: Searching for patrons with "" in the circulation note hangs patron search

To replicate:
Edit a patron to have a circ note, include quoted text in it, such as "this is quoted string"
Go to the patron search, search for a set of results that would include the patron with the quotes in the note
Enjoy looking at "Processing" for forever.

Test Plan:
1) Apply this patch
2) Attempt to replicate using the steps above

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
I took this a step further and used <script>"something in
quotes"</script> for my test note and this worked just fine. YAY.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6e641c5bcb7370556326fb64838fce1eefbc2c18)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20692: Extreme toggle checking for plack
Mark Tompsett [Mon, 28 May 2018 16:45:29 +0000 (16:45 +0000)]
Bug 20692: Extreme toggle checking for plack

TEST PLAN
---------
sudo koha-plack --disable
sudo koha-plack --disable
sudo koha-plack --enable

sudo koha-plack --disable
echo $?
sudo koha-plack --disable
echo $?
sudo koha-list --noplack
echo $?
sudo koha-plack --enable
echo $?
sudo koha-plack --enable
echo $?
sudo koha-list --plack
echo $?

git bz apply 20692
sudo perl ~/misc4dev/cp_debian_files.pl
then repeat the test.

It should also be noted, because the enable
and disable are now split, if for some reason
they become out of sync, an enable or disable
should correct them.

Because these are bash scripts, the test tool
(/home/vagrant/qa-test-tools/koha-qa.pl)
does not apply.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit de20398db303a1ee45b62f9aa51f124597ed0cd8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22551: Stray "//" appears at bottom of opac-detail.tt
phette23 [Mon, 8 Apr 2019 23:00:47 +0000 (16:00 -0700)]
Bug 22551: Stray "//" appears at bottom of opac-detail.tt

Removes a couple stray "//<![CDATA[" like comments which are artifacts of other
code that since been removed. One of the comments causes two forward slashes to
appear at the bottom of each OPAC detail page.

Testing plan:

- enable SocialNetworks
- visit any OPAC detail page, observe "//" at bottom of page
- apply patch
- revisit page, slashes should be gone

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit eb8f5c86fe5f3e1e20bea73fa8b646cdc092513a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22413: Improve query string and desc creation for Elasticsearch
Ere Maijala [Tue, 5 Mar 2019 09:04:55 +0000 (11:04 +0200)]
Bug 22413: Improve query string and desc creation for Elasticsearch

Test plan:

After each of the following steps, verify that the results and query description looks ok.

1. Do a simple keyword query
2. Change sort order
3. Click a facet
4. Do an advanced search with title and author
5. Change sort order
6. Click a facet

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit aba8b130f8b96e5000e8a1eccecfb53d7b371c30)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22339: DBRev 18.11.04.004
Nick Clemens [Thu, 25 Apr 2019 10:36:36 +0000 (10:36 +0000)]
Bug 22339: DBRev 18.11.04.004

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ed6228de83dc57e624c3b3dc30632775df972277)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22339: Fix search field mappings of MARC fixed fields
Ere Maijala [Thu, 14 Mar 2019 11:31:34 +0000 (13:31 +0200)]
Bug 22339: Fix search field mappings of MARC fixed fields

Fixes handling of /0 selector in addition to several fixed field positions. Note that ff7-01-02 is in fact 00-01 in Zebra and that has been replicated here.

Test plan:
1. Before applying a patch, check from Elasticsearch (e.g. localhost:9200/koha_biblios/_search?q=_id:123) what is indexed in Elasticsearch for a record for date-entered-on-file, ff7-00, ff7-01, ff7-02 and lleader.
2. Apply the patch, update database and save the record again.
3. Verify that the contents of the forementioned fields is now correct in Elasticsearch.
4. Verify that tests pass:  prove -v t/Koha/SearchEngine/Elasticsearch.t

Signed-off-by: Björn Nylén <bjorn.nylen@ub.lu.se>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0047ede37e46a3334c9c47d7ebaed848907b6890)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20891: Escape html then JSON
Jonathan Druart [Fri, 8 Jun 2018 15:19:41 +0000 (12:19 -0300)]
Bug 20891: Escape html then JSON

To my understanding we need to escape first html chars then to JSON.

If this patch works we will need to rethink the 'To' TT plugin.
It was originally designed to have several escape methods, but with
these changes it will not make sense to name it 'To' if used only to
escape JSON

IIRC we should keep the 2 different ways to use it:
 * [% To.json( string ) %]
 * [% string | $To %]
otherwise it will be hard to use it when called in argument of
patron-title.inc (`git grep To.json`)

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit bdf0d85c1de9cbb37cc8a40b0b4a2e86633d3aaf)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20891: Escape list's names in JSON
Jonathan Druart [Thu, 7 Jun 2018 15:17:26 +0000 (12:17 -0300)]
Bug 20891: Escape list's names in JSON

When someone uses \ in the description of a list, the datatable in staff
won't load and keeps processing.

Test plan:
- Create a list named "<script>alert('hola');</script>"
- Create another list named "k\o\h\a"
- Hit /cgi-bin/koha/virtualshelves/shelves.pl

=> Without this patch the lists will not be displayed, JSON is
malformated
=> With this patch everything is ok

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 2be0195895628ec491ee1f25368e60181c4f1eb2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22650: Prevent multiple holds on individual items
Nick Clemens [Wed, 24 Apr 2019 15:12:17 +0000 (15:12 +0000)]
Bug 22650: Prevent multiple holds on individual items

This patch corrects a missing id on the holds_to_place field and adds code to disable the box when an item is checked

Additionally script login now places a single hold if an itemnumebr is passed and checks for holdability of the specific item

To test:
 1 - Allow multiple holds per record in circ rules
 2 - In staff client, go to place a hold on a record
 3 - Select a patron
 4 - Increase the number of holds
 5 - Then select a specific item to hold
 6 - Patron now has multiple holds on a single item
 7 - Apply patch
 8 - Repeat, notice that count is disabled when item checked
 9 - Confirm count is enabled when 'Hold next available item' is checked
10 - Set number to more than 1
11 - Check an item and submit
12 - Confirm only one item is reserved
13 - Hit the script directly (with valid info):
     http://localhost:8081/cgi-bin/koha/reserve/placerequest.pl?biblionumber=1&checkitem=1&holds_to_place_count=2&borrowernumber=5
14 - Confirm only one hold is placed
15 - Confirm multiple hits of the url do not generate further holds

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ef5adaff5ac045000b90c4b2b121d8c2ce2d5c59)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19241: Waiting items show as available in the cart
Nick Clemens [Tue, 16 Apr 2019 17:21:01 +0000 (17:21 +0000)]
Bug 19241: Waiting items show as available in the cart

The cart uses the same item-status.inc that the details page uses, however, we don't
set the waiting or reserved flags. This patch adds those flags to the script

To test:
1 - Find an item on the opac
2 - Place a hold on the item
3 - Check in the item to confirm the hold
4 - Note the details page on OPAC shows 'On hold'
5 - Add the item to a basket
6 - Note the basket shows 'Available'
7 - Apply patch
8 - Check the cart, should show as 'On hold'

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e2fa6d97ef45efb902086aa3a3d232137c054afa)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22743: Add password modal to overdrive results page
Nick Clemens [Fri, 19 Apr 2019 11:25:43 +0000 (11:25 +0000)]
Bug 22743: Add password modal to overdrive results page

This patch also removes a line abotu ratings which was throwing an error.
Confirm stars rating for OD results are still shown as expected

To test:
 1 - Enable overdrive circulation with password required
 2 - Sign in to OPAC but not overdrive
 3 - Perform a search that returns overdrive results
 4 - Click in to results page
     http://localhost:8080/cgi-bin/koha/opac-overdrive-search.pl?q=cats
 5 - Note 'Login to OverDrive account' link
 6 - Click it
 7 - Nothing happens!
 8 - Apply patch
 9 - Repeat
10 - Success!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7be176cf1da5adb5f264bb9668667dfeb1d9a2ae)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22739: Test SelfCheckInTimeout <> 0, not just defined
Tomas Cohen Arazi [Fri, 19 Apr 2019 12:28:35 +0000 (09:28 -0300)]
Bug 22739: Test SelfCheckInTimeout <> 0, not just defined

On sci-main.pl the preference value is tested for 'defined'. This patch
tests it is different than empty string too. This was causing a
JavaScript syntax error, that made it display a wrong message.

To test:
1 - Blank the syspref SelfCheckInTimeout
2 - Attempt to checkin something via sci
=> FAIL: The 'Your request included no check-ins.' message is printed.
3 - Apply this patch, reload the sci-main.pl page
4 - Attempt to checkin something via sci
=> SUCCESS: The UI correctly stacks the scanned barcodes
5 - Sign off :-D

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c1949cda9b2847bc6ecf7e1dbc07990c4055b69a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 16232: Fix edit as new in Rancor
Agustin Moyano [Tue, 23 Apr 2019 00:50:49 +0000 (00:50 +0000)]
Bug 16232: Fix edit as new in Rancor

When you edit a biblio as new, and you have enabled advanced editor,
current record was opened, and was overwritten when saved. This patch
effectively opens a new record based on the one selected.

To test:
1) Enable "EnableAdvancedCatalogingEditor" preference
2) Go to cataloguing and click on advanced editor to save preference to the cookie
3) Search for an item in catalog
4) Click in "Edit as new (duplicate)"
5) Advanced editor should appear.
CHECK => browser url ends with #catalog/{original biblionumber}
      => Title above toolbar is "Editing catalog record #{original biblionumber}"
6) Apply this patch
7) Repeat steps 3 to 5
SUCCESS => browser url ends with #duplicate/{original biblionumber}
        => Title above toolbar is "Editing duplicate record of #{original biblionumber}"
8) Save
SUCCESS => browser url ends with #catalog/{new biblionumber}
        => Title above toolbar is "Editing catalog record #{new biblionumber}"
9) Sign off

Sponsored-by: Carnegie
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 680dd7f340ef445820864045127da9c65b3be0e2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22723: Correct syntax error on confess call in Koha/MetadataRecord/Authority.pm
Fridolin Somers [Wed, 17 Apr 2019 11:58:57 +0000 (13:58 +0200)]
Bug 22723: Correct syntax error on confess call in Koha/MetadataRecord/Authority.pm

In Koha/MetadataRecord/Authority.pm the call to confess is missing string quotes.

It may generates this error :

Can't locate object method "confess" via package "Empty String at /usr/share/perl5/MARC/File/XML.pm line 448.
" (perhaps you forgot to load "Empty String at /usr/share/perl5/MARC/File/XML.pm line 448.
"?) at /home/koha/src/Koha/MetadataRecord/Authority.pm line 186.

Simply missing double quotes.
Also missing use Carp to call confess.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4e2c74fced685db861a78fc1aa151dd35ad0d5f2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22753: Fix tabs pointed out by QA script
Katrin Fischer [Wed, 24 Apr 2019 06:55:12 +0000 (06:55 +0000)]
Bug 22753: Fix tabs pointed out by QA script

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 40cf22ab5f9dbdcaa37f46977fe5386a6303a42e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22753: Fix hold priority adjustment, move to top
Nick Clemens [Tue, 23 Apr 2019 18:03:33 +0000 (18:03 +0000)]
Bug 22753: Fix hold priority adjustment, move to top

Since the holds table can be split we need to calculate the
first priority for each table. However, currently we use the
first in the loop, not taking into account the waiting status.
This patchset sets the first_priority to the first non-found hold

Additionally, some clean-up is done to not display the alter
priority arrows for waiting holds.

To test:
1 - Place several holds on a title
2 - Confirm one of the holds to be waiting
3 - Attempt to move the last hold to the top
4 - Nothing happens
5 - Apply patch
6 - Note that the waiting hold has no options to move in the list
7 - Attempt to move the last hold to the top
8 - It moves as expected!
9 - Split the holds queue by pickup library
10 - PLace some holds for pickup at another branch
11 - Confirm moving these holds works within their own table
12 - Unsplit the queue
13 - Ensure the holds end where you expect (moving in a split
     table didn't move above holds form another table)

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit eb956eb4cf3d44f45ad54be58fe95d7355a2b8bf)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22762: Fix items.collection display on receiving
Jonathan Druart [Wed, 24 Apr 2019 04:09:44 +0000 (00:09 -0400)]
Bug 22762: Fix items.collection display on receiving

Caused by
  commit 31c29fd31f557306233e6a2936148a5bb10b89a1
  Bug 21206: Replace C4::Items::GetItem

The log says: The method Koha::Item->collection is not covered by tests!

It has highlighted an older problem:
Since
  commit bb1e9c500c810402c64436c53bcc00ffb9a0b857
  Bug 17248 - Koha::AuthorisedValues - Remove GetKohaAuthorisedValueLib
the "Collection code" is not filled correctly (items.collection vs items.ccode).

Test plan:
- Set acqcreateitem to "when placing an order"
- Receive an order with items
=> The "Collection code" column must be filled with the items.ccode value
- Edit an item
- Change the collection code value
=> The "Collection code" column must be filled with the new value

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22735: Resolve internal server error on missing item type
Marcel de Rooy [Fri, 19 Apr 2019 06:49:48 +0000 (06:49 +0000)]
Bug 22735: Resolve internal server error on missing item type

Trivial fix, similar to opac-detail, applied to ISBD and MARC detail.

Test plan:
Enable ArticleRequests pref.
Make sure you have a biblio with no item type in 942c. (Perhaps you need to
make 942c not mandatory temporarily and save a biblio record without this
field being filled.)
If you are logged in, log out.
Go to MARC or ISBD detail page. No crash anymore?

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b78bd2faec703bb7d7c750dbc1070ba2449f29a9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22501: (follow-up) Use raw filter for course note on details page
Nick Clemens [Thu, 18 Apr 2019 16:35:03 +0000 (16:35 +0000)]
Bug 22501: (follow-up) Use raw filter for course note on details page

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 22deca9445cb02320a04abb69febc9ef83d4d58f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22687: Typo correction for Portuguese manual link
Martin Renvoize [Thu, 11 Apr 2019 09:32:52 +0000 (10:32 +0100)]
Bug 22687: Typo correction for Portuguese manual link

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 38d68299ce7405823c50a6a41ac0f5d18b0b9044)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22174: Add link to help page for API key management
Katrin Fischer [Tue, 12 Mar 2019 11:19:35 +0000 (11:19 +0000)]
Bug 22174: Add link to help page for API key management

Makes the help link on the API key management page point
to the proper section in the Koha manual.

To test:
- Activate RESTOAuth2ClientCredentials system preference
- Go to any patron account
- Go to More > Manage API keys
- Click on the Help link in top right corner
- Verify that the right section of the Koha manual displays

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b969ccbf97c218da2bf6e22ab7773baf36c4fa71)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21937: Syspref autoBarcode annual doesn't increment properly barcode
Frédéric Demians [Mon, 3 Dec 2018 17:02:03 +0000 (18:02 +0100)]
Bug 21937: Syspref autoBarcode annual doesn't increment properly barcode

This patch fix the barcode annual builder. The test should pass.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 31ace6a9347a8260532f6cc50d55fc36f87f1b44)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21937: Add test to show autoBarcode annual increment bug
Frédéric Demians [Mon, 3 Dec 2018 17:27:08 +0000 (18:27 +0100)]
Bug 21937: Add test to show autoBarcode annual increment bug

This patch show the issue. If the DB contains a barcode (not auto attributed
by Koha) which begin with the year used to generate automatically a new one,
there may be a 'collision'.

prove -v t/db_dependent/Barcodes_ValueBuilder.t

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7262bc066784247b12ce7f25c390498086e1d72b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 15505: Mark Hold Items 'On hold' instead of 'Available'
Nick Clemens [Tue, 27 Dec 2016 17:07:20 +0000 (17:07 +0000)]
Bug 15505: Mark Hold Items 'On hold' instead of 'Available'

This patch adds a 'pending hold' column to C4::Items:GetItemsInfo to
allow for displaying status of an item when it has been selected for a
hold by the holdsqueue and AllowItemsOnHoldCheckout is set to 'Don't
allow'

To test:
00 - Set AllowItemsOnHoldCheckout to 'Allow'
01 - Place a hold on an item
02 - Build the holdsqueue (kohadevbox example below)
      sudo koha-shell kohadev
      perl misc/cronjobs/holds/build_holds_queue.pl
03 - Search for the item on the OPAC
04 - Note item shows as 'Available' in results and details
05 - Toggle AllowItemsOnHOldCheckout to 'Don't allow'
06 - Repeat search, note there is no change
06 - Apply Patch
07 - Search for the item on the OPAC
08 - Note that item now shows as 'Pending hold'
09 - Toggle AllowItemsOnHoldCheckout to Allow
10 - Note item shows as available
11 - prove -v t/db_dependent/Items.t

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 170085397b23d9b688628a56039f5e485fade6a5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22365: Removing warn when accessing Log Viewer
Aleisha Amohia [Tue, 19 Feb 2019 01:36:14 +0000 (01:36 +0000)]
Bug 22365: Removing warn when accessing Log Viewer

To test:
Go to Tools -> Log Viewer and confirm the warn no longer shows after
applying the patch.

Sponsored-by: Catalyst IT
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8adb2f8003e25f6fe8cc78506a823a618a837fa1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21545: Translate new ACCOUNT_PAYMENT and ACCOUNT_WRITEOFF notices to German
Katrin Fischer [Tue, 18 Dec 2018 23:19:07 +0000 (00:19 +0100)]
Bug 21545: Translate new ACCOUNT_PAYMENT and ACCOUNT_WRITEOFF notices to German

To test:
- Apply patch
- Run the German web installer
- Verify the sample notices installs without error
- Verify it looks 'German' in the GUI :)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6b610497ffba5008f4e2541dc6cb07727ac5a63a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21545: Translate 'Stock rotation slip'
Katrin Fischer [Tue, 18 Dec 2018 23:06:55 +0000 (00:06 +0100)]
Bug 21545: Translate 'Stock rotation slip'

Throwing in some capitalization fixes for the English
version of the notice as well.

To test:
- Verify the changes make sense and the SQL is still valid
  and executes

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit bc1a21ec65377c8e7b331b89b45ebcddf9a7e4c7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21957: Add a flag to ModBiblio to avoid linking auths if called from linker
Nick Clemens [Wed, 5 Dec 2018 21:05:32 +0000 (21:05 +0000)]
Bug 21957: Add a flag to ModBiblio to avoid linking auths if called from linker

To test:
1 - prove -v t/db_dependent/Biblio.t
2 - Set BiblioAddsAuthoorities and AutoCreateAuthorities
3 - Modify a biblio to add a heading with no existing auth record
4 - Ensure the record was created on saving
5 - Ensure that editing works as normal otherwise
6 - Run link_bibs_to_authorities
7 - Ensure results are as expected

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e600ae6c4b125ee40ce80346ce15f954a1fa424d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22139: Fields of ACCTDETAILS email not populating
Kris Sinnaeve [Tue, 16 Apr 2019 21:37:17 +0000 (21:37 +0000)]
Bug 22139: Fields of ACCTDETAILS email not populating

To test:
* Make sure AutoEmailOpacUser is set to "send"
* Create a new patron with a username and password, and an email address
* In Kohadevbox, check the mail (usually you can type "mail" and go down
to the last message) - these do not go into the message queue and they
are processed immediately.
notice that the email does not have
<<borrowers.title>> <<borrowers.firstname>> <<borrowers.surname>>

Apply this patch, restart the things, retest as above.

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 086a0007d2d484ecbd6ae6d60317ed4f0d3434b1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22461: (follow-up) Use `exists` not `defined`
Martin Renvoize [Fri, 26 Apr 2019 13:35:18 +0000 (14:35 +0100)]
Bug 22461: (follow-up) Use `exists` not `defined`

Prior to this patch there is a regression in the LDAP replication
functionality such that clearing a field become impossible. This patch
restores that functionality.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22461: Clarify and correct the hash reduction
Martin Renvoize [Wed, 10 Apr 2019 13:39:40 +0000 (14:39 +0100)]
Bug 22461: Clarify and correct the hash reduction

There were a couple of bugs in the previous patch which meant it wasn't
working as intended. This patch corrects those bugs and simplifies the
code a little along the way.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c9fa30a55b585b3351ece9c3f789fd18d9807fac)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22461: Filter ldap mapping before inserting patron's info
Jonathan Druart [Thu, 21 Mar 2019 17:05:49 +0000 (14:05 -0300)]
Bug 22461: Filter ldap mapping before inserting patron's info

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4e40784f99f883a4f2634ed938764221d818096c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22461: Fix LDAP user replication
Jonathan Druart [Fri, 15 Mar 2019 23:16:41 +0000 (20:16 -0300)]
Bug 22461: Fix LDAP user replication

From bug 20287:
-        $borrowernumber = C4::Members::AddMember(%borrower) or die "AddMember failed";
+        Koha::Patron->new( \%borrower )->store;
         C4::Members::Messaging::SetMessagingPreferencesFromDefaults( { borrowernumber => $borrowernumber, categorycode => $borrower{'categorycode'} } );

$borrowernumber is not updated with the value of the newly created patron

This patch restores the previous behavior (as well as the die)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d482c7b27257f5a63425633a17efed0747c317a1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21899: Update MARC21 frameworks to Update 27 (November 2018)
Bernardo Gonzalez Kriegel [Wed, 28 Nov 2018 16:14:21 +0000 (13:14 -0300)]
Bug 21899: Update MARC21 frameworks to Update 27 (November 2018)

This bug updates MARC21 english frameworks to Update 27

Bibliographic
-------------
 * New fields 251, 341 and 532 with corresponding subfields
 * New subfields 041$p, 041$q and 041$r
 * Renamed subfield 041$j

Authorities
-----------
 * New subfield 055$2

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: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b31d314613994da218740b735139af70f009fca8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22716: Use gender-neutral pronouns in system preference descriptions
Owen Leonard [Tue, 16 Apr 2019 16:34:13 +0000 (16:34 +0000)]
Bug 22716: Use gender-neutral pronouns in system preference descriptions

This patch makes a few corrections to the .pref files which provide
descriptions for system preferences. Language like "him or her" is
replaced with "they/them" pronouns.

To test, apply the patch and check the following preferences:

 - OPACFineNoRenewalsBlockAutoRenew
 - ExpireReservesMaxPickUpDelayCharge
 - PatronSelfRegistrationVerifyByEmail

Signed-off-by: Lisette <lisettes@latahlibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4b3eb99ad6cd9fc8e9bac6627c38bd16600aa38a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21172: Remove obsolete framework parameter from GetMarcFromKohaField
Katrin Fischer [Sun, 14 Apr 2019 03:13:01 +0000 (03:13 +0000)]
Bug 21172: Remove obsolete framework parameter from GetMarcFromKohaField

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 2a9b9a526bb3e1c73e09cbee499a2debcab74ee5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21172: Remove warning from addbiblio.pl
Jonathan Druart [Tue, 7 Aug 2018 20:06:41 +0000 (17:06 -0300)]
Bug 21172: Remove warning from addbiblio.pl

Argument "01e" isn't numeric in numeric ne (!=) at
/home/vagrant/kohaclone/cataloguing/addbiblio.pl line 507.

A tagfield can be 01e and so raise a warning is compared with == or !=

This patch also fixes few inconsistencies:
- tagfield for items.itemnumber must be retrieved with GetMarcFromKohaField
(to support other marcflavours)
- do not use $_
- loop only once on $usedTagsLib

Test plan:
For devs only, read the code and confirm the changes make sense.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f3afec0587f4baeff580e153ea592020d4d36be3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22044: DBRev 18.11.04.003
Nick Clemens [Wed, 17 Apr 2019 10:11:04 +0000 (10:11 +0000)]
Bug 22044: DBRev 18.11.04.003

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4177d2e32942b16e65748852df881541406297bd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22044: Fix sysprefs.sql description to use circ column description
Katrin Fischer [Sun, 14 Apr 2019 04:26:29 +0000 (04:26 +0000)]
Bug 22044: Fix sysprefs.sql description to use circ column description

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f6e143c73c9ba7f6b1daf76d592dc7a56e8694bb)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22044: Correct syspref name
Nick Clemens [Mon, 15 Apr 2019 13:32:12 +0000 (13:32 +0000)]
Bug 22044: Correct syspref name

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a3a3bf2dda3219b3385b587585985c51f6cc8498)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22044: Set default and add NoRenewalBeforePrecision preference for new/affected...
Nick Clemens [Fri, 21 Dec 2018 19:19:05 +0000 (19:19 +0000)]
Bug 22044: Set default and add NoRenewalBeforePrecision preference for new/affected installs

I am not sure the correct answer - for upgraded installs the pref was
set to date, which changed behaviour

For new installs the pref was unset, behaved as if 'exact_time' so we
shouldn't change behaviour?

If the perceived default is date then the code should be changed, or
this shouldn't be a pref at all?

To test:
1 - Have a new system missing this pref
2 - Note when searchign the pref in staff client if appears as 'date'
3 - Check the db to confirm value is 'NULL'
4 - Apply patch and run update
5 - Pref is now set to 'exact_time'

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4779cf845077ffd7f564b63b22f72ba99aa812ff)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22702: circulation note on patron page should allow for HTML tags
Lucas Gass [Fri, 12 Apr 2019 23:04:06 +0000 (23:04 +0000)]
Bug 22702: circulation note on patron page should allow for HTML tags

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9f34d208d08fc89d2d0b4d3718fc43e3f32ff055)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22154: Fix search for Braille from Advanced search page
Katrin Fischer [Thu, 4 Apr 2019 01:36:47 +0000 (01:36 +0000)]
Bug 22154: Fix search for Braille from Advanced search page

When you do an advanced search and choose the Format subtype
Braille, it looks for l-format:fk, but that is not the right
code for Braille.

fk does not exist. It should be fb for Tactile material/Braille
OR tc for Text/Braille

To test:
0) Catalog 2 records, one with 007 tc and another with fb
   Use value builder to verify both are for Braille.
1) In Administration > System preferences, make sure 'Subtypes'
   is checked in either OpacAdvSearchMoreOptions or OpacAdvSearchOptions
2) Go to Advanced search
3) If necessary, click on 'More options'
4) In the 'Subtype limits' section, choose 'Braille' from the 'Format'
   drop-down menu
5) Click on 'Search'
6) Verify both records were found

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 44a39929afc60ddda3182a93197ced098044a12d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21975: Avoid unnecessary substitutions in automatic item modification by age
Fridolin Somers [Fri, 7 Dec 2018 15:05:52 +0000 (16:05 +0100)]
Bug 21975: Avoid unnecessary substitutions in automatic item modification by age

Automatic item modification by age cronjob is based on rules with conditions and substitutions.
When substitution value is equal to actual item value, the code should not call C4::Items::ModItem. It adds unnecessary action log and entry in zebraqueue.
With a rule than can impact all catalogue you can explode your database with action logs.

Test plan :
1) Run prove t/db_dependent/Items/AutomaticItemModificationByAge.t
2) Define a item modification by age with no condition
3) Run several times misc/cronjobs/automatic_item_modification_by_age.pl
4) Check it creates only one entry in action_logs and zebraqueue

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3a3ffbc54b8dec8ee63332417fe2732ee93f3034)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21975: add Unit Test
Fridolin Somers [Fri, 7 Dec 2018 14:21:48 +0000 (15:21 +0100)]
Bug 21975: add Unit Test

Added missing transaction rollback

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0be8fd212067ebd4b36e00b4d139761aa0e021c3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21975: get item field in substitutions
Fridolin Somers [Fri, 7 Dec 2018 14:58:54 +0000 (15:58 +0100)]
Bug 21975: get item field in substitutions

substitutions field stores the item field with 'items.' prefix.
Looks like call of C4::Items::ModItem() works but it will not if ORM object is used in the futur.
So I prefer fix it now and it is needed for main patch.

Test plan :
Run t/db_dependent/Items/AutomaticItemModificationByAge.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 003b70b697f9c57da8bfb0aca1223c867a07ac97)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18011: Enrollment period date on patron category can be set in the past without...
Owen Leonard [Fri, 12 Apr 2019 11:04:06 +0000 (11:04 +0000)]
Bug 18011: Enrollment period date on patron category can be set in the past without any error/warning messages

This patch modifies the patron category edit form so that the enrollment
period datepicker widget cannot be used to select a date in the past.

The <input> element had a "datepicker" class, which triggers a default
datepicker configuration. This was overriding the configuration in the
page-specific JavaScript file.

To test, apply the patch and go to Administration -> Patron categories.

Click the "Enrollment period -> Until date" field and verify that dates
before today are disabled.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 34c835ed141a3b4758ad77e5b72f30e83d57024f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22474: Clone field config before adding fields to it
Ere Maijala [Thu, 7 Mar 2019 14:35:30 +0000 (16:35 +0200)]
Bug 22474: Clone field config before adding fields to it

Test plain:

1. Reindex both authorities and biblios with the -d flag to recreate the index, e.g. "perl misc/search_tools/rebuild_elastic_search.pl -v -d"
2. Check that authorities only contains authority-specific fields in Elasticsearch e.g. by fetching  http://localhost:9200/koha_dev_authorities/_mappings
3. Reindex both without the -d flag and verify it works, e.g. "perl misc/search_tools/rebuild_elastic_search.pl -v"

Signed-off-by: Björn Nylén <bjorn.nylen@ub.lu.se>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 118f685dbf1519077ece65a47f83bff179efbf9b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22090: Add missing information to cash register CSV file
Katrin Fischer [Sun, 7 Apr 2019 18:23:32 +0000 (18:23 +0000)]
Bug 22090: Add missing information to cash register CSV file

Some information was missing from the CSV export file
of the Cash register report: manager surname, patron surname
and payment notes.

Also pretties up the column headers a bit and makes the
sequence between GUI and CSV export match.

To test:
- Make sure you have some fines and fees and payments in
  your system
- Make a search with the Cash register report
- Export results as CSV
- Proof read hader line and make sure contents match headings
- Verify first name and surname are shown for manager and patron
- Verify notes show up

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1a2572915b4bf4a11b3a65c3a65e506610263a03)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22069: Make log viewer find item renewals
Martin Renvoize [Thu, 25 Apr 2019 13:44:49 +0000 (14:44 +0100)]
Bug 22069: Make log viewer find item renewals

Without this patch renewals for checkouts wouldn't
show in the log viewer. The log viewre was using
RENEW, which we use for patrons, but for issue
RENEWAL is used.

The patch adds RENEWAL to the search params, when
Renew was selected in the form, so both terms are
included in the query.

To test:
- Make sure you have RenewalLog turned on
- Make a patron renewal
- Check something out and renew it
- Go to Tools > Log viewer and test different
  searches
  - Modules All - Actions All
  - Modules All - Actions Renew
  - Modules Circulation - Actions Renew
  ...
- Make sure results show as expected

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3e7b24e023c7c88eb9b1a30308a537de9dcd8682)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22688: (QA follow-up) Use search_params as all() does
Tomas Cohen Arazi [Thu, 11 Apr 2019 20:15:51 +0000 (17:15 -0300)]
Bug 22688: (QA follow-up) Use search_params as all() does

It looks like selected would be passed all the way down to
Koha::Libraries->search and this would fail all the time.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a48d1a43df24a47f1d31cd437a54961934d50230)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22688: TT plugin for pickup locations code wrong
Kyle M Hall [Thu, 11 Apr 2019 13:52:29 +0000 (09:52 -0400)]
Bug 22688: TT plugin for pickup locations code wrong

Test Plan:
1) Apply this patch
2) prove t/db_dependent/Koha/Libraries.t

Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ae18c4bb031a194302ced37f4b376c7439f77c99)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22688: (follow-up) Unit tests
Tomas Cohen Arazi [Thu, 11 Apr 2019 20:14:05 +0000 (17:14 -0300)]
Bug 22688: (follow-up) Unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 111068485d455d2020d68a69d29a562547e345c6)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22688: Unit tests
Kyle M Hall [Thu, 11 Apr 2019 14:13:58 +0000 (10:13 -0400)]
Bug 22688: Unit tests

Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 2c461fc508d6161c3ab60b523bd724eef20870b9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>