]> git.koha-community.org Git - koha.git/log
koha.git
5 years agoBug 21692: (QA follow-up) Enhance test for new
Martin Renvoize [Tue, 19 Feb 2019 19:34:04 +0000 (19:34 +0000)]
Bug 21692: (QA follow-up) Enhance test for new

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 569c64252eba27607deb9eccefe7d72678c7bbb9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6643dc2a94a1165a5c4ea77bdcf760385446944e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21692: created a test for Koha::Account->new
Jasmine Amohia [Thu, 17 Jan 2019 03:33:49 +0000 (03:33 +0000)]
Bug 21692: created a test for Koha::Account->new

Test plan:
1) Run test for /Koha/Account.t and confirm that all tests were
successful

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 34c36a32a057c3a9be062e4ea8b6ec46c41859a0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d0b51ad0f47558b41208c7c7cbc19e1218cc0850)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21997: SIP patron information requests can lock patron out of account
Kyle M Hall [Thu, 13 Dec 2018 19:56:22 +0000 (14:56 -0500)]
Bug 21997: SIP patron information requests can lock patron out of account

Many SIP services send an empty password field (AD). Even if allow_empty_passwords is enabled for the given SIP account, this empty password is run though Koha's password checker which increments the number of login attempts for a patron. Thus repeated patron information requests can lock a patron out! Empty password fields in SIP should not call for a password check if allow_empty_passwords is enabled.

Test Plan:
1) Enable a patron password attempt with a limit of 3
2) Send 4 patron information requests with an empty AD field
3) Note the patron's account is now locked
4) Apply this patch
5) Repeat step 2 with a different patron
6) Note the patron's account does not get locked!

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit fac2c172143b31255767684e4b22c0ba1ae0aaaf)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9d811184fef4c7db64f616bd631991aef503a8a9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21997: Unit tests
Kyle M Hall [Mon, 11 Feb 2019 18:16:10 +0000 (13:16 -0500)]
Bug 21997: Unit tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d0a6469ad58ccd6067bdfbb6cfb0e28dabc5862a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a72d11e55dc24764faa6717d3d130ca92777afd0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22386: Remove debug statements
Jonathan Druart [Thu, 21 Feb 2019 16:25:22 +0000 (13:25 -0300)]
Bug 22386: Remove debug statements

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22386: Define patron variable when matchign on extended attributes
Nick Clemens [Thu, 21 Feb 2019 14:30:22 +0000 (14:30 +0000)]
Bug 22386: Define patron variable when matchign on extended attributes

For all other methods we define a patron object and check the userid,
we just need to define the $patron here

To test:
0 - Apply unit test patch alone
1 - prove t/db_dependent/Koha/Patrons/Import.t
2 - It dies
3 - Apply this patch
4 - repeat tests
5 - It passes!

Signed-off-by: Devlyn Courtier <dcourtier@hccc.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8a9c82c3ec42fb5c2937fa523170b3710288d7fd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4771a7da8e30798d1d9e389db94e7efc3428a5e0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22386: Unit tests
Nick Clemens [Thu, 21 Feb 2019 14:29:59 +0000 (14:29 +0000)]
Bug 22386: Unit tests

Signed-off-by: Devlyn Courtier <dcourtier@hccc.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9f27a63b9ad770ac56e32a3e79d1ecb657534482)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d6ca92031339629bfa50fdda3c8e1e46b5c33c89)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 18143: Silence ods MARC framework export flood
Mark Tompsett [Sun, 19 Feb 2017 00:50:32 +0000 (19:50 -0500)]
Bug 18143: Silence ods MARC framework export flood

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5b0eb51c8066abbd645731593572277ca5b46715)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 854f1ca17a78c5b73c63cfd0b57bcf89108778b2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 18143: Silence XML MARC Framework export flood
Mark Tompsett [Sun, 19 Feb 2017 00:21:59 +0000 (19:21 -0500)]
Bug 18143: Silence XML MARC Framework export flood

TEST PLAN
---------
1) Log in to staff client
2) Click Koha administration
3) Click MARC bibliographic framework
4) export default as xml
5) Read the error log
   -- it's floody and export is default framework
6) export another framework as xml
7) Read the error log
   -- it's floody and export is the correct framework
8) apply the patch
9) repeat steps 4-7
   -- expected frameworks exported, and no flooding.
10) run koha qa test tools

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 719153455c8c58fb8b1a8e9123acef5052dbd462)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 65a6cd355ef227ab4e11b620f485f010b611e115)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21427: (QA follow-up) Fix for tabs
Martin Renvoize [Fri, 8 Feb 2019 16:54:37 +0000 (16:54 +0000)]
Bug 21427: (QA follow-up) Fix for tabs

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d220725694302f187b3ff92c0eedda583919b735)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 685b9cdec79b5d58e5a4ffdc148df1a182c401ea)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21427: Format prices on ordered/spent lists consistently
Katrin Fischer [Fri, 11 Jan 2019 21:55:35 +0000 (22:55 +0100)]
Bug 21427: Format prices on ordered/spent lists consistently

Some price information on the spent and ordered list already
used the $Price filter. With this patch all amounts should be
formatted according to the CurrencyFormat system preference.

Signed-off-by: Jack Kelliher <jke0429@stacmail.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 209570f89d050f22fa90eed6a8a70ad9eb56e8a2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 71227300a3f367ef8b17572a419d24eeecea9ded)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22147: Hidden 'Batch modify' button on report print layout
Jasmine Amohia [Wed, 16 Jan 2019 21:26:10 +0000 (21:26 +0000)]
Bug 22147: Hidden 'Batch modify' button on report print layout

Test plan:
1) Create or run a report that has an itemnumber column
2) Notice the Batch modify button under the itemnumber heading
3) Print the page
4) Notice the button no longer shows on the printed page

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5ea9fb91632d712a6f70f4a3382ba96b4db74f69)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5054f1a1a30e4921d47941220786118c3a8575ee)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21966: Fix descriptions of acquisition permissions to be more clear (again)
Katrin Fischer [Thu, 6 Dec 2018 14:17:37 +0000 (15:17 +0100)]
Bug 21966: Fix descriptions of acquisition permissions to be more clear (again)

This was already done and pushed on bug 3849, but some of it got
undone accidentally by a later patch.

To test:
- Check the acquisition permissions
- The *budget* permissions should clearly describe their
  use for 'funds'.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 940c5c0add3065d35f776a3a19ba87d936e84a0f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit bda0f717cda8d57373b1619c17234ea9230dd416)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21845: Sort of issues in OPAC subscription table
Owen Leonard [Thu, 24 Jan 2019 16:13:47 +0000 (16:13 +0000)]
Bug 21845: Sort of issues in OPAC subscription table

This patch adds a default sort option to the table of subscriptions on
the OPAC detail page. This sorting option matches the sort of data
passed from GetLatestSerials.

To test, apply the patch and locate a subscription in the OPAC which has
multiple issues. They should be sorted by default on publication date.

Signed-off-by: mikael <mikael.Olangcay-Brisebois@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit fd9ff6a4f012399fc8408aa25ab1185d8308ea45)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c765f0c2df8b1f02ce937e776b357f5fb35dadc9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22156: Subscription result list sorts on "checkbox" by default
Owen Leonard [Thu, 17 Jan 2019 16:39:52 +0000 (16:39 +0000)]
Bug 22156: Subscription result list sorts on "checkbox" by default

This patch adds default sorting by title to the subscription search
results list. Previously no default sort was defined, so it defaulted to
sorting by the first column in the table.

To test, apply the patch and go to Serials.

- Perform a search of subscriptions which will return multiple results.
- Confirm that the table of open subscriptions is sorted by default by
  title ascending.
- Confirm the same for the table of closed subscriptions.

Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8a2d5fab95ae2db5adf8cca16524b7a231680dd3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit dc865158780c28fb22c5a8c03d3105529403a150)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22323: cronjob runreport.pl CSV add encoding
Fridolin Somers [Wed, 13 Feb 2019 12:25:20 +0000 (13:25 +0100)]
Bug 22323: cronjob runreport.pl CSV add encoding

Cronjob runreport.pl runs SQL reports and can export as CSV.
This export needs to be UTF-8 encoded.

This pathes replaces use of Text::CSV_XS by Text::CSV::Encoded like in other places like tools/viewlog.pl.
It adds a decode of headers bcause they will be encoded lika other lines.

Test plan:
1) Create a new item with itemnotes 'accentué'
2) Create a SQL report with :
SELECT barcode,itemnotes AS itè FROM items WHERE itemnotes LIKE 'accenté'
3) Run this report
4) You see well encoded header and content
5) Run from command line (replace X by report number) :
misc/cronjobs/runreport.pl X --format=csv --csv-header --store-results
6) You well encoded header and content
7) Go to saved reports table
8) Look at saved results of report
9) You well encoded header and content

Signed-off-by: Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 83fe95d0c5d404a2ffc6ed35e822ff0f5ee8b6e6)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0ad76960cd24b3f12eb5c0e7058f02cd13ba1ac0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21904: Add missing PROCESS stt
Jonathan Druart [Sun, 17 Feb 2019 13:54:24 +0000 (10:54 -0300)]
Bug 21904: Add missing PROCESS stt

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit fcc17549bee1d1f9d85815a5bab24ba4ffaac7b3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 220d6e95956b9efb9daee135fb2a66d273032785)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21904: Hide libraries outside of the group in the header
Jonathan Druart [Thu, 6 Dec 2018 16:58:44 +0000 (13:58 -0300)]
Bug 21904: Hide libraries outside of the group in the header

Fix typo

To test:
1 - Create a library group with two libraries
2 - Enable hiding patron info for that group
3 - Find or create a patron at one of those libraries without
view_borrower_infos_from_any_libraries permission (but with staff side
permission)
4 - Sign in as that staff person
5 - Click 'Patrons'
6 - Click the [+] to expand search options
7 - Set the 'Library' dropdown to a library outside of the group
8 - Search

Signed-off-by: Nazlı Çetin <nazli@devinim.com.tr>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b225ffc559d22e7a373b92bf25a3a4162dc21be2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 57bfc4a8ea96ceb2da5ce6e51aa32a689a686555)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22171: Fix shipping cost display on invoice
Katrin Fischer [Tue, 5 Feb 2019 21:29:13 +0000 (21:29 +0000)]
Bug 22171: Fix shipping cost display on invoice

When not 0 the shipping cost on the invoice would display with
a lot of numbers after the comma. This fixed it to display with
only 2.

To test:
- Make sure you have an invoice with shipping cost set (example: 5.00)
- Open the invoice for editing (invoice.pl)
- Verify the shipping cost displays with too many decimals (5.000000)
- Apply patch
- Verify now the shipping cost displays correctly (5.00)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ae85590a323c468e1ffbe566fe1f916a2901b56b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 343fc9267819a271fc6532fcb63ca8d6120599f1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21710: Fix typo in atributes in installer
Katrin Fischer [Tue, 5 Feb 2019 22:10:01 +0000 (22:10 +0000)]
Bug 21710: Fix typo in atributes in installer

Adds the missing t to some atributes in the web installer
files.

To test:
Easiest to verify by looking at the patches, changes
appear in comments and the text shown by the nb-NO and
English web installer.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a5ceb74102ef664dfa5cde20b049c924b1600c0b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 409dde014048794ce23a63cae13e01d7251bac1a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 20544: Wrong comment database documentation on itemnotes
Katrin Fischer [Sun, 10 Feb 2019 00:36:20 +0000 (01:36 +0100)]
Bug 20544: Wrong comment database documentation on itemnotes

Fixes the comments in kohastructure.sql to state the right
MARC21 fields for itemnotes (public and internal).

To test:
- Create a new Koha database and make sure it still installs
- Read the patch and check comments are correct

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 60347dcc0724ad354cfabb89ca024dfa269e62e5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 87ee1cac40f061f5f365fda54c3f0bb76071cd65)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 20174: Remove xml_sax.pl target from Makefile.pl
Katrin Fischer [Sun, 10 Feb 2019 00:48:46 +0000 (01:48 +0100)]
Bug 20174: Remove xml_sax.pl target from Makefile.pl

There appears to be no xml_sax.pl in Koha, so the
reference should be removed.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit daf47da8cd9c94829ff49ec2041d39b1510ae6da)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c6f2d8b7b168bc81e51211476f0374729611f9dc)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 8387: Hide headings in tools when user has no permissions for any listed below
Katrin Fischer [Mon, 4 Feb 2019 06:30:51 +0000 (06:30 +0000)]
Bug 8387: Hide headings in tools when user has no permissions for any listed below

The headings for each column on the tools page will show, even if the
user has no permission for any tool below it. This patch tries to
correct this.

To test:
- Try various combinations of tool permissions
- On the tools module start page and for the tools sidebar
  visible on the left on a tool's page:
  - Make sure headings don't show when you have no permissions
    for any of the tools listed below
  - Make sure headings show correctly if you have one or
    many of the tools permissions needed

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
The qa tool gives some warnings but I think they can be considered false
positives.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1fe43199b642fa575fd93131e1390c55d4631e52)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit dc2bca10630211abe4118917a4c7d185a9b6b2cf)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 18393: Acquisition statistics - Fix wrong template variable name for collection...
Katrin Fischer [Wed, 6 Feb 2019 11:43:52 +0000 (11:43 +0000)]
Bug 18393: Acquisition statistics - Fix wrong template variable name for collection filter

The template variable was wrong, so the filter never submitted the
collection code for the query.

Before:
<option value="">Fiction</option>
<option value="">Non-fiction</option>

After:
<option value="FIC">Fiction</option>
<option value="NFIC">Non-fiction</option>

To test:
- Go to Reports > Statistics wizards > Acquisitions
- Pick a row and column
- Compare results with and without collection filter
- Verify the table is always the same
- Apply patch
- Repeat comparison, verify the filter works now

https://bugs.koha-community.org/show_bug.cgi?id=18393
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f2746dd8fb1c4557ae56db4769a07fe663576ddc)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9523546f2df4128ecaa48d86cb7d03cabdc477ac)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 10676: Add unit tests - GetItemsInfo
Katrin Fischer [Fri, 4 Jan 2019 11:42:08 +0000 (11:42 +0000)]
Bug 10676: Add unit tests - GetItemsInfo

To test:
  prove t/db_dependent/Items.t

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4e139a237b874df5fcd2169abba75eb3745239f5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 97f41c827fe57b92319871c23e8291bad3f2dd3a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 10676: Fix behaviour of OpacHiddenItems for items.restricted
Katrin Fischer [Fri, 4 Jan 2019 10:11:03 +0000 (10:11 +0000)]
Bug 10676: Fix behaviour of OpacHiddenItems for items.restricted

The numerical restricted value was overwritten in GetItemsInfo
with the description. So OpacHiddenItems would only work for
restricted using the description, not the numerical value
of the authorised value like for other similar status fields.

This changes GetItemsInfo to use a separate variable for
the description, as it's already done for notforloan and
changes the template files where the variable is used
accordingly.

To test
- Before applying patch
- Configure OpacHiddenItems with:
  restricted: [1]
- Find a record with more than one item and mark one of the items
  as "Restricted Access"
  (assume standard sample data - check authorised value if status doesn't exist)
- Verify the item is still shown in OPAC.
- Apply patch
- Verify that the item is now hidden
- Verify that the status still displays nicely in the staff detail page
- Delete OpacHiddenItems
- Verify that the status is showing nicely in the OPAC detail page

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 39d2885d1330afe825e1881f5fc8033d459f6006)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ceb74447df18d1fc8dc05b6142a10085d3a67420)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 12488: Make bulkmarcimport.pl -d use DELETE instead of TRUNCATE
Magnus Enger [Mon, 11 Feb 2019 10:07:21 +0000 (11:07 +0100)]
Bug 12488: Make bulkmarcimport.pl -d use DELETE instead of TRUNCATE

On MySQL >= 5.5 bulkmarcimport.pl with the -d (delete) switch gives
an error like "Cannot truncate a table referenced in a foreign
key constraint". This patch proposes to replace the offending
TRUNCATE with DELETE. Auto incerement counters are reset to 1 to
preserve the functionality from TRUNCATE.

To test:
- Make sure you havae a test database with some records and items
- Run bulkmarcimport.pl with the -d switch
- Observe the error described above
- Apply this patch
- Run bulkmarcimport.pl with the -d switch again
- Observe the lack of an error
- Verify that the newly imported records and items have biblionumber
  and itemnumbers starting with 1

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22067: Return if no patron passed to can_see_patron_infos
Nick Clemens [Thu, 3 Jan 2019 20:52:15 +0000 (20:52 +0000)]
Bug 22067: Return if no patron passed to can_see_patron_infos

To test:
1 - Find an adult patron
2 - Add a child to their account
3 - Delete the parent from the db
4 - Attempt to edit the child record
5 - Apply patch
6 - Repeat
7 - Note you can edit the child account
8 - Note guarantor id is not a link

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
No blocker for me, but we are a bit hiding that guarantorid probably should
be a foreign key cleared to NULL at deletion time.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5324268e099ead7a6864d16bae0f051444a1d34e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e7201d27af1ca0c83ba66b69b4836c21b4905dda)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoUpdate release notes for 18.05.10 release v18.05.10
Lucas Gass [Thu, 28 Feb 2019 00:44:44 +0000 (00:44 +0000)]
Update release notes for 18.05.10 release

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoIncrement version for 18.05.10 release
Lucas Gass [Thu, 28 Feb 2019 00:28:30 +0000 (00:28 +0000)]
Increment version for 18.05.10 release

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22395: reverting 21986
Lucas Gass [Thu, 28 Feb 2019 00:11:22 +0000 (00:11 +0000)]
Bug 22395: reverting 21986

This reverts commit e2cfc2615c119252e5c317059312c0d020f2924f.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 13515: Schema Updates
Lucas Gass [Tue, 26 Feb 2019 05:07:17 +0000 (05:07 +0000)]
Bug 13515: Schema Updates

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug: 13515 DBRev 18.05.09.001
Lucas Gass [Mon, 25 Feb 2019 22:59:29 +0000 (22:59 +0000)]
Bug: 13515 DBRev 18.05.09.001

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 13515: Fix constraint name before deleting it
Jonathan Druart [Thu, 14 Feb 2019 20:19:08 +0000 (17:19 -0300)]
Bug 13515: Fix constraint name before deleting it

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 13515: Add unit tests
Alex Arnaud [Wed, 26 Dec 2018 16:44:39 +0000 (17:44 +0100)]
Bug 13515: Add unit tests

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 13515: Add a foreign key constraint to messages.borrowernumber
Jonathan Druart [Tue, 18 Dec 2018 15:43:00 +0000 (12:43 -0300)]
Bug 13515: Add a foreign key constraint to messages.borrowernumber

This patch adds a missing foreign key constraint to
mesages.borrowernumber.
To create it sucessfully the entries from the messages table that are
not linked with an existing patron will be removed.

Test plan:
0/ Do not apply the patch
1/ Add messages to different patrons
2/ Delete one of the patron's record
3/ Have a look at the messages table and notice that the messages for
the deleted patron's record still appear
4/ Apply the patch and execute the update DB entry
5/ Have a look again at the messages table and notice that the messages
for the deleted patron's record have been removed
6/ Delete a patron that have messages
7/ Notice that now the messages are deleted when the patron's record is
deleted

Signed-off-by: Nazlı Çetin <nazli@devinim.com.tr>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0daa02a961be828d5c38b6933c91ee79853f95c5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a224d0598e0ef037c879201375e36e9f640dc1ed)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoUpdate release notes for 18.05.09 release v18.05.09
Jesse Maseto [Fri, 22 Feb 2019 12:45:22 +0000 (12:45 +0000)]
Update release notes for 18.05.09 release

5 years agoIncrement version for 18.05.09 release
Jesse Maseto [Fri, 22 Feb 2019 12:27:30 +0000 (12:27 +0000)]
Increment version for 18.05.09 release

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoTranslation updates for Koha 18.05.09
Koha translators [Fri, 22 Feb 2019 11:59:47 +0000 (08:59 -0300)]
Translation updates for Koha 18.05.09

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 21441: Fix wrong reference to a 'holds' table on system information tab
Katrin Fischer [Mon, 4 Feb 2019 23:42:34 +0000 (00:42 +0100)]
Bug 21441: Fix wrong reference to a 'holds' table on system information tab

It looks like a typo snuck in on the about page, listing a holds
table instead of reserves.

To test:
- Manually create the same PK (reserve_id) in reserves and old_reserves
- Verify that the message on about > system information now
  correctly lists those tables (not holds and old_reserves)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit cfea47cb064362bbb1fc93769be4b7df3a8e2fae)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d7c112bc0ecc380fa8621842bc02ff30d8e3c68c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21840: Fixed some typos in the templates
Jasmine Amohia [Wed, 16 Jan 2019 01:37:22 +0000 (01:37 +0000)]
Bug 21840: Fixed some typos in the templates

intranet-tmpl/prog/en/modules/ill/ill-requests.tt:13
Bibliograpic record ID --> Bibliographic record ID

intranet-tmpl/prog/en/modules/acqui/basket.tt:547
Can't cancel order, ([% books_loo.holds_on_order | html %]) holds are linked with this order cancel holds first -->  ... with this order. Cancel holds first

intranet-tmpl/prog/en/modules/acqui/parcel.tt
Can't cancel order, ([% loop_order.holds_on_order | html %]) holds are linked with this order cancel holds first --> ... with this order. Cancel holds first

intranet-tmpl/prog/en/modules/labels/spinelabel-print.tt:32
Print this slabel --> Print this label

Test plan:
1. Check that the fixes in the patch are correct

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7a58d0215907c05b0b82944141f6f4d4595c3979)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a6945032dab677dbba47c66f3116ba6a34d3ff0e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21829: (QA follow-up) - Update the number of unit tests
Kyle M Hall [Mon, 11 Feb 2019 12:15:11 +0000 (07:15 -0500)]
Bug 21829: (QA follow-up) - Update the number of unit tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f3f5b98fd909f9e13aa4e45a16dc275ef4ee8489)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 60b1a4f83611414a042651bea757dc7e96fde6f9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21829: Correctly format dateexpiry in notices (date only)
Jonathan Druart [Wed, 14 Nov 2018 12:38:01 +0000 (09:38 -0300)]
Bug 21829: Correctly format dateexpiry in notices (date only)

dateexpiry is a date, we should not display the time
part in notice.

Test plan:
Create a notice with borrowers.dateexpiry, generate this notice.
The value should be displayed without the time part

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5b160af2a051dc3693f04dabf320d0995cf26160)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ecb86a84c13e4e5661f4c6683b7755c21d607bbe)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21829: Add tests for dateexpiry format in notices
Jonathan Druart [Wed, 14 Nov 2018 12:37:58 +0000 (09:37 -0300)]
Bug 21829: Add tests for dateexpiry format in notices

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 04e121a741a442f5b557e11864eb69be9d0c3ded)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1106c0fa595c8378807bc955b29c2f83c2af5ba9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22119: Add price formatting in more places in circulation
Katrin Fischer [Sun, 13 Jan 2019 09:06:22 +0000 (10:06 +0100)]
Bug 22119: Add price formatting in more places in circulation

This adds some missing Price filters to some places in circulation.
To check verify the amount are displayed according to setting
of CurrencyFormat (use FR or CH for seeing a change)

Use a patron account with no pending fines at the beginning
for all tests.

1)
- Switch RentalFeesCheckoutConfirmation to "Ask"
- Check out an item with a rental charge
- Verify message is formatted correctly:
  Rental charge for this item: ...

2)
- Switch RentalsInNoissuesCharge to "Don't include"
- Make sure patron has only Rental fines on their account
- Check out another item
- Verify message is formatted correctly:
  The patron has unpaid charges for holds, rentals etc ...

3)
- Switch BatchCheckouts to "Allow"
- Add the patron category of your test patron to BatchCheckoutsValidCategories
- Checkout any item
- Verify the message in the information column is formatted correctly:
  The patron has unpaid charges for holds, rentals etc of ...

Signed-off-by: Jasmine Amohia <jasmineamohia.student@wegc.school.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit dc6be66e2b2ec5917d7bec020d4e94c40baa9f6c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 26c59980fe123fc6033098ae374f57c4afd53aca)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22120: Add price formattig to patron summary print
Katrin Fischer [Sun, 13 Jan 2019 10:15:27 +0000 (11:15 +0100)]
Bug 22120: Add price formattig to patron summary print

The patron summary print lists the replacement prices
and rental charges of items and totals them. With this
patch they will be formatted according to the
CurrencyFormat system preference.

To test:
- Find or create a patron with some checkouts
- Make sure some items have replacement price set
  and some have a rental charge
- "Print summary" from the account in staff
- Verify that charges and prices in the checkouts
  table are formatted correctly
- Toggle CurrencyFormat to different settings

Signed-off-by: helene hickey <hickeyhe@wgc.school.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3c2cc8da26f7a907c0b51f928ffb100eefbfa692)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3638172077c95f0cba2f0e190f245e598e4b004d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 17347: Ignore whitespace before and after on renewing
Katrin Fischer [Mon, 14 Jan 2019 05:41:48 +0000 (05:41 +0000)]
Bug 17347: Ignore whitespace before and after on renewing

When an item is checked out, Koha ignores whitespace
at the beginning and the end of the entered barcode.
This makes life easier, if a barcode is C&P from another
page. This patch makes the renewal page behave the same.

To test:
- Checkout an item
- Renew the item from the renew tab or renewal page
  entering the barcode with leading and trailing
  whitespace
- "Barcode not found"
- Apply patch
- Try again
- Barcode should be found now

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Devinim <kohadevinim@devinim.com.tr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0e220869f5a3327eee8f9426d648fbcaaa0fd7fa)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7c881b32b5f7bfca6ccb17b8ddc8045ad37a3524)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21885: Calendar to-date starts before end-date
Pasi Kallinen [Tue, 27 Nov 2018 09:53:32 +0000 (11:53 +0200)]
Bug 21885: Calendar to-date starts before end-date

When adding new holidays to the calendar, you pick the start date,
and then the end date, but the end date calendar will start from
current date, not from the picked start date. Sometimes this means
many extra clicks to pick an end date.

Make the end date calendar start from the beginning date by default.

Test plan:

1) Go to the tools -> calendar
2) Pick a start date somewhere in the future, and then open the
   end date calendar. Notice how it starts before the start date
   of the date range.
3) Apply patch.
4) Pick a start date in the future. The end date calendar should
   automatically default to the same date.
5) Change the start date a day backwards, note how the end date
   does not change.
6) Change the start date after the end date, note how the end date
   adjusts, so it is not in the past.

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
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 0939d44c22cda569faf4c0c60fd67de04097b34d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a69fd8912496c5d7335e0e4d8f113d2b2aeb7b61)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22282: Fix PDF issue when exporting PDF in French format.
Liz Rea [Thu, 31 Jan 2019 22:41:29 +0000 (22:41 +0000)]
Bug 22282: Fix PDF issue when exporting PDF in French format.

Fixing up QA comments, keeping 1st instance and removing the 2nd.
Original test plan by Christophe Croullebois.

To test :
Without the patch :

1° select in Acquisitions preferences/OrderPdfFormat French 3-page
2° restart plack if needed
3° In acqui/basketgroup.pl select closed tab
4° Click on "Export as PDF" button
5° You should see a blank page saying "Internal Server Error"

With the patch :

Do the same

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 0844f2c174c83ce3da11be07511730b0c220e5ad)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 981670c68cb3d12b30c410c12ed6488f5a555117)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22278: Clear cache when creating new report groups or subgroups
Nick Clemens [Wed, 6 Feb 2019 12:49:58 +0000 (12:49 +0000)]
Bug 22278: Clear cache when creating new report groups or subgroups

When a user adds a new group we create it, then fetch the groups from the cache. However, we aren't clearing the cache on creation. This patch fixes that

To test:
 0) Start a new report
 1) Pick create for the group
 2) Enter code and value
 3) Save
 4) You remain on the page and value and code are now empty (ok)
 5) BUT: The pull down for the group remains "None" instead of reflecting
    the new group
 6) Open a new tab and browse to reports - note the group exists and the report is in it
 7) On original tab save report again, the group was not selected so is lost
 8) Apply patch
 9) Retest with a new report
10) Group is created, saved, and selected upon save
11) Subsequent edits include the new group
12) Test with subgroups as well

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 ea36265697c85cfb1f7de0b2344ef8647dc31387)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f64d0d9038a58abe360744200348950688e834cd)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21808: Field 711 is not handled correctly in showAuthor XSLT for relator term...
Marcel de Rooy [Mon, 12 Nov 2018 10:48:23 +0000 (11:48 +0100)]
Bug 21808: Field 711 is not handled correctly in showAuthor XSLT for relator term or code

The test should check $4 or $e for fields ne 111,711.
And should check $4 or $j for 111,711.

Test plan:
Edit a record, add a meeting in 711 without $4 but with $j.
Without this patch the term is not visible, with this patch it is.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6179f23dd8b4ed24add2e76c7b8e193372052201)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9199083de8637d96148b873cc745c1a81fe78d01)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22097: CataloguingLog should be suppressed for item branch transfers
Kyle M Hall [Thu, 10 Jan 2019 19:32:22 +0000 (14:32 -0500)]
Bug 22097: CataloguingLog should be suppressed for item branch transfers

Bug 18816 missed the fact that a branch transfer triggers ModItem and
thus generates an action log line. We should not be creating those
action logs, especially considering the transfers table itself already
documents the transfer.

Test Plan:
1) Enable CataloguingLog
2) Transfer an item to another branch
3) Note the new action log line created
4) Apply this patch
5) Create another item transfer
6) No new action log line should be created!

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 b3c25b64b868b56423c50b9df4fac4bb55947679)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0f0218bc838bee7b55853a456334fd2518b5784c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21907: Fix article requests count for non-superlibrarians
Jonathan Druart [Tue, 11 Dec 2018 13:13:42 +0000 (10:13 -0300)]
Bug 21907: Fix article requests count for non-superlibrarians

The query generates "Column 'branchcode' in where clause is ambiguous"

Test plan:
1 - Enable 'IndependentBranchesPatronModifications' and article requests
2 - Sign in as non-superlibrarian
3 - View plack log
4 - Refresh mainpage, see error in logs

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ab9e4ca6a46519ddc69ad76837407c0a4f0ed0cd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9c823701268d07feb149e219ece7c88d89d47732)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 16231: Correct permission handling in subscription edit
Owen Leonard [Wed, 3 Oct 2018 16:07:19 +0000 (16:07 +0000)]
Bug 16231: Correct permission handling in subscription edit

This patch corrects the way subscription edit menu items are displayed
according to the user's permissions settings.

To test, apply the patch and log in to the staff client as a user who
has permission to create, edit, and delete subscriptions.

- Locate an subscription and view the details for it.
- Confirm that each "Edit" menu item works correctly.
- Repeat the process when logged in as a user with varying combinations
  of create, edit, and delete permissions.
- Test as a user limited by IndependentBranches.

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7520ede89987a7a65301debdda46950a6364ebfd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f2151c1bbc98003576606d8b1bd2cb2453e6925a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22254: Correction to datehandling in test
Martin Renvoize [Fri, 1 Feb 2019 09:55:54 +0000 (09:55 +0000)]
Bug 22254: Correction to datehandling in test

Adding 13 months is not always the same as adding 1 month and then
adding 12 months in DateTime maths.  This patch rectified the test
to match the correct behaviour in koha.

Test plan.

1) Modify the test (around line 268) to test against the suspect
   leap date of 2019-01-31 and watch the test fail.
2) Apply the patch (which also adds this modification to test
   for such a leap date) and watch the test now pass.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1da0ba48b6fdf38cfd3d3ea63ec076b15995610f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 413f34ba244af3560861785f5aa74ab457f00b02)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22236: Translation should generate tags with consistent attribute order
Marcel de Rooy [Wed, 30 Jan 2019 15:37:10 +0000 (15:37 +0000)]
Bug 22236: Translation should generate tags with consistent attribute order

When running misc/translator/translate, the order of attributes in the translated templates is not consistent and may vary. This is caused by the random order of hash keys in perl.

This causes things like this in run 1:
<input type="submit" class="btn" value="Plaats aanvraag" />
And this in run 2:
<input value="Plaats aanvraag" type="submit" class="btn" />
As you can see, there is actually no difference apart from the order.

When comparing the result of various translation runs, I would rather get rid of such noise and only see the real changes.

The needed change is not trivial to find, but only requires a simple addition to a sort operation in tmpl_process3.pl. The current sort only makes sure that the '/' comes at the end. We should sort the names of the keys too when this value is 0 (just meaning: no end tag symbol).

Test plan:
[1] Run a translation without this patch and set a few templates aside.
[2] Run a translation with this patch.
[3] Run a compare (diff) on the templates copied in step 1. Verify that the
    only changes are found in the sort order of attributes in html tags.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit fb62e8d1fc8b210a5b23801b7b8faff3280bf638)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 150de6dfe7f7d18f5b61e45b0442802c2f61fe9f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22242: Javascript error in value builder cased by Select2
Fridolin Somers [Thu, 31 Jan 2019 08:12:13 +0000 (09:12 +0100)]
Bug 22242: Javascript error in value builder cased by Select2

Same as Bug 17780 but in value builders.

Select2 (Bug 13501) introduced divs and inputs that broke some
assumptions about the expected HTML structure. This patch checks if
input has name attribute, because some inputs in Select2 have not.

It brakes value builders marc21_linking_section.tt and
unimarc_field_4XX.tt.

Test plan :
1)  On a MARC21 database
2)  Define 774$0 as a regular subfield
3)  Define 774$4 with an authorised value category
4)  Define 774$t with value builder marc21_linking_section
5)  Create a new record
6)  Use value builder in 774$t
7)  Search for a record and click choose
8)  Without patch : a popup window does not close and show a blank
    screen
9)  With patch : popup windows get close and you see in field 774 $0 and
    $t field with values
10) Same tests with a UNIMARC database on field 461 with value builder
    unimarc_field_4XX.tt

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Tested successfully with MARC21

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3ca0234d34ac9708a8335cfa97805fb7498201bf)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 55b20ad1a7b8afa5c385bd3f9825014d40936ba1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 19816: Implement dateonly for rfc3339 format
Tomas Cohen Arazi [Thu, 24 Jan 2019 17:29:09 +0000 (14:29 -0300)]
Bug 19816: Implement dateonly for rfc3339 format

This patch implements the dateonly option for the rfc3339. This is
described in the OpenAPI 2.0 specification [1]. The required output
format is described on RFC 3339 [2], as 'full-date'.

[1] https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#dataTypeFormat
[2] https://tools.ietf.org/html/rfc3339#section-5.6

To test:
- Apply the regression tests patch
- Run:
 k$ prove t/DateUtils.t
=> FAIL: Tests fail because dateonly is not implemented
- Apply this patch
- Run:
 k$ prove t/DateUtils.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b2dce05ddff8a047e7770ea241b1edd9b798212e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit dcc0478089f5fde72426d94810bed6430df73a34)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 19816: Regression tests
Tomas Cohen Arazi [Thu, 24 Jan 2019 17:27:28 +0000 (14:27 -0300)]
Bug 19816: Regression tests

This patch adds tests for the rfc3339 behaviour when dateonly => 1.

To test:
- Run:
  $ kshell
 k$ prove t/DateUtils.t
=> SUCCESS: Tests pass
- Apply this patch
- Run:
 k$ prove t/DateUtils.t
=> FAIL: dateonly is not implemented

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7e69ab62a5ef3fbd350c6606d25b5ab6f6bc168e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 41115fc79dfd16be62dd56e1946e0a2e08c6a2fc)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22132: Add RESTBasicAuth syspref - Revert
Lucas Gass [Tue, 12 Feb 2019 00:39:57 +0000 (00:39 +0000)]
Bug 22132: Add RESTBasicAuth syspref - Revert

This reverts commit 5b020c98163c9af74b60338d126887eb2fd7ec9f.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22132: Unit tests - Revert
Lucas Gass [Tue, 12 Feb 2019 00:39:19 +0000 (00:39 +0000)]
Bug 22132: Unit tests - Revert

This reverts commit 2b12b70de4a117365cf76521be2119aa01a00957.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22132: Add Basic authentication to the API - Revert
Lucas Gass [Tue, 12 Feb 2019 00:38:41 +0000 (00:38 +0000)]
Bug 22132: Add Basic authentication to the API - Revert

This reverts commit 2403b01021e66cae65e210426b644cc6a695ff5f.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22132: (QA follow-up) Tests - use Mojo builtin for auth - Revert
Lucas Gass [Tue, 12 Feb 2019 00:37:34 +0000 (00:37 +0000)]
Bug 22132: (QA follow-up) Tests - use Mojo builtin for auth - Revert

This reverts commit 7296f1d0bf76798ab914f45d65810e23194a565d.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22132: (QA follow-up) set_password now expects a hashref - Revert
Lucas Gass [Tue, 12 Feb 2019 00:36:46 +0000 (00:36 +0000)]
Bug 22132: (QA follow-up) set_password now expects a hashref - Revert

This reverts commit c028f916747ee4b6618b76ff5a85db1f3ba9ff88.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22132: DBRev 18.05.08.001 - Revert
Lucas Gass [Tue, 12 Feb 2019 00:35:50 +0000 (00:35 +0000)]
Bug 22132: DBRev 18.05.08.001 - Revert

This reverts commit 5dd2bed00cf4661cb9d1762415df649db7648e19.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22132: DBRev 18.05.08.001
Lucas Gass [Thu, 7 Feb 2019 23:31:38 +0000 (23:31 +0000)]
Bug 22132: DBRev 18.05.08.001

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22132: (QA follow-up) set_password now expects a hashref
Tomas Cohen Arazi [Wed, 30 Jan 2019 18:46:04 +0000 (15:46 -0300)]
Bug 22132: (QA follow-up) set_password now expects a hashref

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 63f40e519c7fbbba70a2944113830a1d3ed80306)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3c8f67afe8d6e4dcc044d5f97a66336bd76af93e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22132: (QA follow-up) Tests - use Mojo builtin for auth
Martin Renvoize [Thu, 24 Jan 2019 15:54:08 +0000 (15:54 +0000)]
Bug 22132: (QA follow-up) Tests - use Mojo builtin for auth

Mojolicious has built in handling for encoding/decoding of of basic auth
paramenters. We should use it to simplify our test here.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8ee08c3922dd892e9432ce243fc7244092fdd18f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a9b3b01dd9290f964d739e0f2f818990d9a6e9ba)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22132: Add Basic authentication to the API
Tomas Cohen Arazi [Tue, 15 Jan 2019 16:23:23 +0000 (13:23 -0300)]
Bug 22132: Add Basic authentication to the API

This patch implements Basic authentication for the API to aid testers
and developers with tools like Postman.

To test:
- Apply this patches
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/auth_basic.t
=> SUCCESS: Tests pass!
- Open Postman or your favourite tool
- In Authorization, choose Basic auth.
- Enter the username and password of a known privileged user.
- Hit an endpoint with Postman, for example:
  ] GET http://kohadev-intra.myDNSname.org:8081/api/v1/patrons
=> SUCCESS: Basic authentication is great!
- Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 26af040c79e548e9388346b247f509f743401c34)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 14e2dd9c9f6ee3c2796954f3e25433197c41f9d5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22132: Unit tests
Tomas Cohen Arazi [Tue, 15 Jan 2019 16:23:09 +0000 (13:23 -0300)]
Bug 22132: Unit tests

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 103670e726b9938aa1484b7486cba94adf7b69a9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4730724c661d50df4268d581691cc73de8500186)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22132: Add RESTBasicAuth syspref
Tomas Cohen Arazi [Tue, 15 Jan 2019 16:22:53 +0000 (13:22 -0300)]
Bug 22132: Add RESTBasicAuth syspref

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 3ffed7d55a1d77df2d3c0748614434866612ed24)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3741027605b61b0e988fd7e8df8ec60dc5fe5b99)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 20634: Changing the identical label "Library:" to "Location" in Inventory Home.
Olivia Lu [Tue, 15 Jan 2019 21:24:25 +0000 (21:24 +0000)]
Bug 20634: Changing the identical label "Library:" to "Location" in Inventory Home.

To find fix:

1. Go to tools
2. Go to Inventory
3. Verify that under Item location filters the label should be "Location"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a3993a75822972e1e013410ab020f5a749248017)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 92001cc504d03f3aa20b5295154e9ae66c0a530e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21495: Regression in hold override functionality
Kyle M Hall [Thu, 15 Nov 2018 13:35:33 +0000 (08:35 -0500)]
Bug 21495: Regression in hold override functionality

The changes caused by the patches for bug 11512 have broken existing
workflows for many libraries and are widely considered to be a bad move.
We should revert this behavior.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Rhonda Kuiper <kuiper@roundrocktexas.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 398704662487a0c8a3f848a2ae23618ee96406ff)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e3fde6153e66b7c01b804ec7c36e22706abd3e27)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 19994: Used Modern::Perl in Authorities perl scripts
Jasmine Amohia [Thu, 17 Jan 2019 00:51:11 +0000 (00:51 +0000)]
Bug 19994: Used Modern::Perl in Authorities perl scripts

Test plan:
1. Review code of the following files and confirm that 'use Modern::Perl;' is used in place of
'use strict; use warnings;'

auth_finder.pl
authorities-home.pl
authorities.pl
blinddetail-biblio-search.pl
detail-biblio-search.pl
detail.pl
export.pl
merge.pl
merge_ajax.pl

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 843c4a4bae760754d96867d2596bc78651910c8e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 69802bed3e61f2039c14952480e57540e8f03ca8)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 15110: Improve decreaseHighHolds system preference description
helene hickey [Thu, 17 Jan 2019 02:28:57 +0000 (02:28 +0000)]
Bug 15110: Improve decreaseHighHolds system preference description

To test:
1) Apply patch
2) Go to Koha admin
3) Search in system prefernces for 'high demand'
4) Verify that the system prefernce 'decreaseLoanHighHolds' is in the
results of the search

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit fe2dceba34310c890dd1f06b114de9f3151f59e1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c8ca6926ed114062d4a55ce981b32ffeb670fc7a)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 22124: Update cataloguing plugin system to not generate type parameter in script tag
Josef Moravec [Mon, 14 Jan 2019 09:16:53 +0000 (09:16 +0000)]
Bug 22124: Update cataloguing plugin system to not generate type parameter in script tag

Test plan:
1) Apply the patch
2) Have defined some cataloguing plugin which generates javascript - for
example dateaccessioned.pl
3) Go to cataloguing/adding item and show source
-> there should be no type parameter in script tag in code added by
cataloguing pulgin
4) prove t/db_dependent/FrameworkPlugin.t

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 cadb7eaab2c9617551450f84acadff0d48a846b2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b27150cf9a4c62a636ed7d158e1fe44941de189b)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 22136: Added 'ExtendedPatronAttributes' notes to 'Import Patrons' notes.
Ethan Amohia [Wed, 16 Jan 2019 04:01:44 +0000 (04:01 +0000)]
Bug 22136: Added 'ExtendedPatronAttributes' notes to 'Import Patrons' notes.

Fixed ExtendedPatronAttributes typo.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 273656f84c9dbc49c8a3669c7994b8c0ea7f3522)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1debd138ca3603b7bf7fa0929553203c7bcbe2ac)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 21926: Enhance OAI-PMH:archiveID system preference description
Josef Moravec [Fri, 30 Nov 2018 10:26:54 +0000 (10:26 +0000)]
Bug 21926: Enhance OAI-PMH:archiveID system preference description

Test plan:
1) Apply the patch
2) Go to Administration -> System preferences -> Web services, section
OAI-PMH
3) See description on OAI-PMH:archiveID and confirm it does make sense
and have the link to implementation guidelines

Signed-off-by: Michal Denar <black23@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 ddc4c5b8aa75cfe8994ff150a0cae4cc51656852)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 62d5d98371a673bb8c1c15d5dad382cf866879d2)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 21290: Updating documentation for ModItem
helene hickey [Wed, 16 Jan 2019 23:20:38 +0000 (23:20 +0000)]
Bug 21290: Updating documentation for ModItem

To test:
Review the patch and check it is now updated correctly

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9a5bfee706f85bc5fd53a9c2d0616c2e1186379a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e96eed9b841394353cc5c4484ddc608432e22d29)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 20679: Removed 'rows per page' from report print layout
Jasmine Amohia [Wed, 16 Jan 2019 20:53:40 +0000 (20:53 +0000)]
Bug 20679: Removed 'rows per page' from report print layout

Test plan:
1. Create a report or view an existing report
2. Notice that 'Rows per page:' is visible
3. Print report (Ctrl+P)
4. Confirm that on printed report, 'Rows per page:' is no longer visible

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 65b64bcafacf983a101f263e554b6d7274567bb9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ba8cd76c6239ed71246c26666f16f07f56b731b7)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 22149: Fixed grammar in the manage_circ_rules_from_any_libraries description
Jasmine Amohia [Wed, 16 Jan 2019 23:10:35 +0000 (23:10 +0000)]
Bug 22149: Fixed grammar in the manage_circ_rules_from_any_libraries description

Test plan:
1. Review patch and confirm that the sentence makes sense

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9e79de6ef2d1662d04018203d2f9ff48be8a0f0f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e227fea2a23b9da2f201e49934018342109c9cd7)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 21930: Reworded message on permissions.inc
Jack Kelliher [Tue, 15 Jan 2019 03:24:17 +0000 (03:24 +0000)]
Bug 21930: Reworded message on permissions.inc

1. Go to patrons account, more, Set Permissions.
2. Dropdown the Parameters section.
3. Text should display "If not set the logged in user could only edit
circulation rules for its the own library (please note that
        manage_circ_rules is still required)"
4. Apply patch and reload page
5. Text should now display "Edit circulation rules from any library. If
not set the logged in user could only edit circulation rules for their
own library (please note that manage_circ_rules is still required)"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ae84cf1e7a512ce198e5fe7e0b4dd3930967ba76)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ea8bd52f6dbb6aab6aabb1d9e191b0356ba1a529)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 20569: Improved description of CheckPrevCheckout system preference
Jasmine Amohia [Tue, 15 Jan 2019 21:34:32 +0000 (21:34 +0000)]
Bug 20569: Improved description of CheckPrevCheckout system preference

The CheckPrevCheckout preference can be overriden by a setting in the
patron categories, I've edited the options to reflect this.

Test plan:
1. Check the CheckPrevCheckout system preferences and confirm that the
options are clear

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9b69ceeac64850dce05b56c978856bd5d1c43b06)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 52e13bf70c68df255b241f248ec138b96cc41cf1)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 22083: Typo in circulation_batch_checkouts.tt
Caroline Cyr La Rose [Tue, 8 Jan 2019 14:28:35 +0000 (09:28 -0500)]
Bug 22083: Typo in circulation_batch_checkouts.tt

There is a typo in circulation_batch_checkouts.tt that makes Koha skip
a warning if the user cannot borrow due to circulation rules.

This patch corrects this typo.

To test:

1. In Administration > Global system preferences, 'Allow'
   BatchCheckouts and enter patron categories in
   BatchCheckoutsValidCategories
2. Go to Administration > Circulation and fines rules
3. Enter a rule where a certain category of patrons (that is in
   BatchCheckoutsValidCategories) cannot take out a particular item type
4. Search the catalog for an item of that item type
5. Copy the barcode
6. Go into patrons and find a patron of that category
7. Click on the Batch checkout tab
8. Paste the barcode in the box and click Check out
9. It should say 'Too many checked out'
10. Apply the patch
11. Try the check out again, it should show both warnings ('Too many
    checked out' and 'This patron can't check out this item per library
    circulation policy')

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 3ee95bd0213943b625ea5a35eb04e45835cf6f65)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4c928041f1ee5ec4c21aab24dfd7f69399ae330f)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 22207: course reserves page does not have unique <body> id
Lucas Gass [Fri, 25 Jan 2019 15:37:21 +0000 (15:37 +0000)]
Bug 22207: course reserves page does not have unique <body> id

Test plan: Go to cgi-bin/koha/opac-course-reserves.pl in the OPAC and
make sure the body id is opac-course-reserves

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 358adce2e75bdd317165c86a9b5064bc52d9e2ad)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a4345d8af3b6e30d21d7cd310dc144fd50d04b8e)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 21478: (RMaint follow-up) fixed test count
Lucas Gass [Wed, 6 Feb 2019 16:17:43 +0000 (16:17 +0000)]
Bug 21478: (RMaint follow-up) fixed test count

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21478: (QA follow-up) Make sure tests don't fail randomly
Tomas Cohen Arazi [Mon, 28 Jan 2019 15:23:35 +0000 (12:23 -0300)]
Bug 21478: (QA follow-up) Make sure tests don't fail randomly

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e33f125384694dd825965dffae8d2ca31840aecf)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 17231a2c35f13bef2fc19551cb7c3c7110e5c438)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21478: Make Koha::Hold->suspend reject found holds
Tomas Cohen Arazi [Fri, 25 Jan 2019 16:49:37 +0000 (13:49 -0300)]
Bug 21478: Make Koha::Hold->suspend reject found holds

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1d5934cae52dd96d9c5b8685a5f5531c69e92df8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 81c6172ee224f7432ec809f8a9cd17f9c4971ecc)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21478: Unit tests
Tomas Cohen Arazi [Fri, 25 Jan 2019 16:48:54 +0000 (13:48 -0300)]
Bug 21478: Unit tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 92db2e74fd3cd761ae67d2f7573ee03d32d0a8ed)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f087b9895eb97f29a5a712dfcb3d0946fd570afd)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21478: Add Koha::Exceptions::Hold
Tomas Cohen Arazi [Fri, 25 Jan 2019 15:48:04 +0000 (12:48 -0300)]
Bug 21478: Add Koha::Exceptions::Hold

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 11ce911915a237047d8168876849de3df2b3b2e0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ddbfc92aa601e672535c4478eb8e65e624a7d53f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21877: (RM follow-up) Move space into conditional
Nick Clemens [Mon, 28 Jan 2019 11:32:55 +0000 (11:32 +0000)]
Bug 21877: (RM follow-up) Move space into conditional

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5b4cbb1643aa20ada17c3f73df3e59dfc5a3dbd8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 582a84a6c7328efe78bbacaad293e4e21e6785ca)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21877: Use AuthorisedValues.GetDescriptionByKohaField for notforloan in checkout
Fridolin Somers [Tue, 22 Jan 2019 08:45:02 +0000 (09:45 +0100)]
Bug 21877: Use AuthorisedValues.GetDescriptionByKohaField for notforloan in checkout

Using only TT plugin for authorised value description is a better code.

Test plan :
Part 1:
1.1) On a catalog with items.notforloan defined with authorized values category NOT_LOAN
1.2) Define in NOT_LOAN an authorized values 1 with description 'at the beach'
1.3) Define in NOT_LOAN an authorized values 2 with description empty
Part 2:
2.1) Set preference 'AllowNotForLoanOverride' to 'Don't allow'
2.2) Edit an item with notforloan=1
2.3) Checkout this item => You see 'Item not for loan (at the beach)'
2.4) Edit an item with notforloan=2
2.5) Checkout this item => You see 'Item not for loan'
Part 3:
3.1) Set preference 'AllowNotForLoanOverride' to 'Allow'
3.2) Edit an item with notforloan=1
3.3) Checkout this item => You see 'Item is normally not for loan (at the beach)'
3.4) Edit an item with notforloan=2
3.5) Checkout this item => You see 'Item is normally not for loan'

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 36df53ad8d4987e938e478d934d553b73e7450f2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 30895e2c561215fa7c094c9838021a0095a578ba)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21877: Show authorized value description for withdrawn in checkout
Fridolin Somers [Tue, 22 Jan 2019 08:47:22 +0000 (09:47 +0100)]
Bug 21877: Show authorized value description for withdrawn in checkout

During checkout the withdrawn information is displayed in a message :
"Item has been withdrawn".

Like in other pages and like notforloan, we should display the withdrawn authorized value description.

This patch adds this display.
Add <span> so that translation does not change.
Also adds class 'co-withdrawn' (like in checkin 'ci-*' classes) to ease hidding this new information via CSS.

Test plan :
1) On a catalog with items.withdrawn defined with authorized values category WITHDRAWN
2) Define in WITHDRAWN an authorized values 1 with description 'dropped in trash'
3) Define in WITHDRAWN an authorized values 2 with description empty
4) Edit an item with withdrawn=1
5) Checkout this item => You see 'Item has been withdrawn (dropped in trash)'
6) Edit an item with withdrawn=2
7) Checkout this item => You see 'Item has been withdrawn'

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit cfd59672bb09c4766632de4c6f11cf9cf4bea3f9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c22928630ac2c00501b2bb17d60a3b2ba99481c5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22203: Holds modal does not link to patorn account
Nick Clemens [Thu, 24 Jan 2019 14:57:46 +0000 (14:57 +0000)]
Bug 22203: Holds modal does not link to patorn account

To test:
1 - Place a hold for a patron
2 - Check the item in at the pickup location
3 - Note the holds modal does not link to patron
4 - Apply patch
5 - Check in item again
6 - Patron name in modal is a link

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 258c538e76914e6c2023242b555bb38c6f1970b9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fe56745739adcec6a7cb441ced3c359369aacca1)

5 years agoBug 22111: Format amount shown on place holds when maxoutstanding is reached (staff)
Katrin Fischer [Sat, 5 Jan 2019 03:50:36 +0000 (03:50 +0000)]
Bug 22111: Format amount shown on place holds when maxoutstanding is reached (staff)

Displays amount outstanding correctly when holds are blocked
by maxoutstanding.

To test:
- Check maxoutstanding system preference value
- Add a fine to a patron account exceeding maxoutstanding
- Try to place a hold for this patron from staff
- Verify this message is shown:

     Patron has outstanding fines: 6.00

- Toggle CurrencyFormat system preference and verify display
  changes according to setting

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Mikael Olangcay Brisebois <mikael.olangcay-brisebois@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c37ded96714409cd572c79f3c9cd69694e0e71de)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 78e617b201402b5e551ba79131b362b2ef7f0bee)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22113: Add price formatting on item lost report
Katrin Fischer [Sat, 5 Jan 2019 05:41:48 +0000 (05:41 +0000)]
Bug 22113: Add price formatting on item lost report

The item lost report displays the price and replacement
price for lost items. With the patch they will display
according to the CurrencyFormat system preference.

To test:
- Mark 1 or more items lost
- Make sure that replacement cost and purchase price are set
- Go to Reports > Items lost
- Search for your lost items
- Verify price and replacement price display
- Apply patch and toggle CurrencyFormat to different settings
- Refresh lost items report
- Verify prices are always displayed according to syspref setting

Signed-off-by: Olivia Lu <olivialokm@gmail.com>
Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c3fb484fe2922d2a97053b3fde4fb433c5aa0c4f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit da8e5fcd2447aad751e511adac4d29bac7cec82c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21855: Changed "deprecated delete_unverified_opac_registrations.pl cronjob" to...
Olivia Lu [Wed, 16 Jan 2019 03:54:25 +0000 (03:54 +0000)]
Bug 21855: Changed "deprecated delete_unverified_opac_registrations.pl cronjob" to "cleanup_database"

To Find Fix:

1. Go to Koha Administration
2. Search PatronSelfRegistrationVerifyByEmail
3. Verify that NOTE now says "system preference requires the
cleanup_database ..."

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Mikael Olangcay Brisebois <mikael.olangcay-brisebois@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b93c5dcbfdeafc2758cb880bea02ca91c0ef4e67)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3f4b04852780e946c2fbc64ae4599058699a941d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 18909: Enable the maximum zebra records size to be specified per instance
Kyle M Hall [Tue, 6 Mar 2018 18:29:22 +0000 (13:29 -0500)]
Bug 18909: Enable the maximum zebra records size to be specified per instance

The default for Zebra is to not return results where the record size is
greater than 1045 KB ( 1 MB ). Some libraries need to increase this
ceiling, but it may come at a cost with z39.50 compatibility with other
services. For that reason, we should make this setting configurable on a
per-instance basis.

Test plan for kohadevbox:
1) Apply this patch
2) Run:
   $ reset_all
3) Restart Zebra:
   $ sudo koha-zebra --restart kohadev
4) Check how zebrasrv was called:
   $ ps waux | grep zebrasrv
=> SUCCESS: Looks like
 ... /usr/bin/zebrasrv -v none,fatal,warn -k 1024
5) Edit /etc/koha/sites/kohadev/koha-conf.xml, add:
   <zebra_max_record_size>2048</zebra_max_record_size>
6) Repeat (3) and (4)
=> SUCCESS: Looks like
 ... /usr/bin/zebrasrv -v none,fatal,warn -k 2048
7) Sign off :-D

General test plan:
1) Apply this patch
2) Build a Debian package
3) Specify a zebra_max_record_size of 2048 in your koha_conf.xml
4) Restart zebra
5) Index a record greater than 1 MB but smaller than 2 MB
6) Note that it is searchable!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8c0c6be7488e0543662e47006ded12e74ae4eb8d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 35fc9c10032a4b130d9861efb36f112112294e57)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22118: Format hold fee when placing holds in OPAC
Katrin Fischer [Sat, 12 Jan 2019 08:21:38 +0000 (09:21 +0100)]
Bug 22118: Format hold fee when placing holds in OPAC

When Koha charges for holds, a message with the fee is
shown before the patron places the hold. The amount needs
to be formatted according to CurrencyFormat system preference.

To test:
- Add a hold fee to your patron category
- Log into the OPAC
- Search for a record to place a hold on
- Click Place hold
- Verify there is a note showing about the hold fee
- Toggle CurrencyFormat and HoldFeeMode and verify
  that the formatting is always correct

Signed-off-by: Jack Kelliher <jke0429@stacmail.net>
Signed-off-by: Mikael Olangcay Brisebois <mikael.olangcay-brisebois@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4f0618a8888dff72b15dfe9193259c1bc5d06b5f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b8527c5057ddac6f956d102efa27ef95cd5d3051)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 11922: Add SHOW_BCODE patron attribute for Norwegian web installer
Jasmine Amohia [Thu, 17 Jan 2019 02:32:08 +0000 (02:32 +0000)]
Bug 11922: Add SHOW_BCODE patron attribute for Norwegian web installer

Test plan:
1. Notice that /patron_attributes.sql and /patron_attributes.txt can be
located in 2-Valgfritt
2. Confirm that the SHOW_BCODE patron attribute in the English web
installers .sql and .txt file is also in the Norwegian web installers
.sql and .txt file

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 495619649b329ce52b86998668461ca72827c6ab)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9f2110cbbedb2c5f13f915fc496bc2156a08d0ac)

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