]> git.koha-community.org Git - koha.git/log
koha.git
5 years agoBug 21987: Do not generate true color thumbnails if not needed
Jonathan Druart [Tue, 18 Dec 2018 17:02:19 +0000 (14:02 -0300)]
Bug 21987: Do not generate true color thumbnails if not needed

If the original image is not a true color image we should not generate a
true color thumbnail.

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>
5 years agoBug 21987: Add tests
Jonathan Druart [Tue, 18 Dec 2018 17:02:14 +0000 (14:02 -0300)]
Bug 21987: Add tests

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>
5 years agoBug 22493: Clean up DecreaseLoanHighHolds.t
Nick Clemens [Mon, 11 Mar 2019 14:47:01 +0000 (14:47 +0000)]
Bug 22493: Clean up DecreaseLoanHighHolds.t

To test:

1 - prove -v t/db_dependent/DecreaseLoanHighHolds.t
2 - should pass
3 - read code, confirm changes make sense

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>
5 years agoBug 14591: (QA follow-up) Fix AddReturn call in Circulation/issue.t
Josef Moravec [Fri, 15 Mar 2019 09:41:22 +0000 (09:41 +0000)]
Bug 14591: (QA follow-up) Fix AddReturn call in Circulation/issue.t

Test plan:
prove t/db_dependent/Circulation/issue.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 14591: (QA follow-up) Optimize DateTime passing
Martin Renvoize [Thu, 14 Mar 2019 16:30:55 +0000 (16:30 +0000)]
Bug 14591: (QA follow-up) Optimize DateTime passing

We were passing around possibly undefined $return_date variables from
AddReturn and then instantiating a new DateTime object as a default for
each routine. This followup sets the default higher up the stack within
AddReturn which provider clearer logic and a small performance
improvment.

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>
5 years agoBug 14591: Update unit tests
Kyle M Hall [Thu, 14 Mar 2019 12:20:53 +0000 (08:20 -0400)]
Bug 14591: Update unit tests

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>
5 years agoBug 14591: Update other calls to AddReturn
Kyle M Hall [Thu, 14 Mar 2019 11:58:09 +0000 (07:58 -0400)]
Bug 14591: Update other calls to AddReturn

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>
5 years agoBug 14591: book drop / drop box mode incorrectly decrements accrued overdue fines
Kyle M Hall [Thu, 14 Mar 2019 11:54:09 +0000 (07:54 -0400)]
Bug 14591: book drop / drop box mode incorrectly decrements accrued overdue fines

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>
5 years agoBug 22043: (QA follow-up) Add parameter to control behavior
Kyle M Hall [Thu, 28 Feb 2019 21:13:11 +0000 (16:13 -0500)]
Bug 22043: (QA follow-up) Add parameter to control behavior

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22043: SIP Checkin Response alert flag set to often set to Y incorrectly
Kyle M Hall [Fri, 21 Dec 2018 18:54:18 +0000 (13:54 -0500)]
Bug 22043: SIP Checkin Response alert flag set to often set to Y incorrectly

If a checkin has any messages at all, even informational like LocalUse, the alert flag ( 4th character of the response ) will be set to Y, even if we do not prove a corresponding alert code in the CV field. We should only set the alert flag if we are going to send a value in the CV field.If a checkin has any messages at all, even informational like LocalUse, the alert flag ( 4th character of the response ) will be set to Y, even if we do not prove a corresponding alert code in the CV field. We should only set the alert flag if we are going to send a value in the CV field.

Test Plan:
1) Set the checked_in_ok sip account flag to 1 for an account
2) Check in an already checked in item via SIP
3) Note the alert flag is set to Y
4) Apply this patch
5) Restart SIP
6) Check the item in again
7) Note the alert flag is set to N

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jill Kleven <jill.kleven@pueblolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22222: Don't send empty params to mana service
Josef Moravec [Tue, 26 Feb 2019 15:05:50 +0000 (15:05 +0000)]
Bug 22222: Don't send empty params to mana service

Test plan:
0) Do not apply the patch
1) Go to serials > Search on Mana
2) Insert some value into the form
3) Submit -> you get many (3000+) results
4) Apply the patch and restart_all
5) Repeat, now, you get only the subscription matching your query

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22476: Correct default for MarkLostItemsAsReturned
Nick Clemens [Thu, 7 Mar 2019 16:49:11 +0000 (16:49 +0000)]
Bug 22476: Correct default for MarkLostItemsAsReturned

Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21560: (follow-up) move use at the top
Fridolin Somers [Tue, 5 Mar 2019 14:51:15 +0000 (15:51 +0100)]
Bug 21560: (follow-up) move use at the top

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21560: Unit test for Koha::Util::OpenDocument
Fridolin Somers [Tue, 19 Feb 2019 11:01:16 +0000 (12:01 +0100)]
Bug 21560: Unit test for Koha::Util::OpenDocument

Run prove t/Koha/Util/OpenDocument.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21560: create Koha::Util::OpenDocument with subroutine for ODS generation
Fridolin Somers [Mon, 18 Feb 2019 16:33:37 +0000 (17:33 +0100)]
Bug 21560: create Koha::Util::OpenDocument with subroutine for ODS generation

There is nearly the same code in misc/cronjobs/gather_print_notices.pl and reports/guided_reports.pl.
This patch creates a new module with subroutine called by both scripts.

If file path or content is undefined, subroutine will just return undef.
If content is an empty arrayref, empty ods file is still generated.

Unicode encoding is kept outisde because it may not be necessary.

Note that for print notices the first line of message is always the column names so it is extracted only from first message.

Test plan :
Run previous patches test plans and check ODS files are the same.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21560: Optimize ODS export of gather_print_notices.pl
Fridolin Somers [Fri, 7 Dec 2018 09:30:30 +0000 (10:30 +0100)]
Bug 21560: Optimize ODS export of gather_print_notices.pl

Like previous patch, the call on OpenOffice-OODoc lib can be optimized.
Based on https://grep.metacpan.org/search?qci=&q=expandTable&qft=&qd=OpenOffice-OODoc&f=examples%2Ftext2table

Test plan inspired from Bug 11679.

Test plan:
- define your ODUE notice for the print template as:
cardnumber:patron:email:item
<<borrowers.cardnumber>>:<<borrowers.firstname>> <<borrowers.surname>>:<<borrowers.email>>:<item><<items.barcode>></item>
- define overdues rules for a patron category
- check-out 2 items using a due date in order to generate the overdue notices
- check-in these 2 items
- launch the script /misc/cronjobs/overdue_notices.pl
- the 'message_queue' table should now contain 2 new entries
- launch the gather_print_notices cronjob :
  perl misc/cronjobs/gather_print_notices.pl /tmp/test --ods --letter_code=OVERDUE -d=:
- A ods file should be generated in your /tmp/test directory
- Compare times with and without patch

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21560: report ODS export optimization
Fridolin Somers [Fri, 12 Oct 2018 12:09:54 +0000 (14:09 +0200)]
Bug 21560: report ODS export optimization

SQL reports can be exported with CSV, TSV of ODS format.
When report has thousands of rows, using ODS format is around 10 times longer than other formats.
It also loads CPU and RAM a lot.

The longest call is expandTable().
I found that the call on OpenOffice-OODoc lib can be optimized.
Based on https://grep.metacpan.org/search?qci=&q=expandTable&qft=&qd=OpenOffice-OODoc&f=examples%2Ftext2table

Test plan :
1) Don't apply patch yet
2) Create a new SQL report : Home > Reports > Create from SQL
3) Enter a SQL that will return thousands of results
4) Run report
5) Click Download > Semicolon separated text (.csv), look execution time
6) Click Download > Open Document Spreadsheet, look execution time
7) Apply patch
8) Redo 5) and 6) and compare times, CSV export should be the same but ODS export should be better

My tests shows 1,5 seconds for CSV export.
And for ODS export : 18 seconds without patch and 8 seconds with patch.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22429: Infinite loop in patron card printing
David Cook [Mon, 4 Mar 2019 06:43:29 +0000 (17:43 +1100)]
Bug 22429: Infinite loop in patron card printing

Text fields in Patron Card Text Layouts can contain regular
expression metacharacters, which - instead of being treated as
literal values - are interpreted and prevent line wrapping. This
causes the process to get stuck in an infinite loop, which keeps
running even after the web server has timed out (at least when
using CGI).

This patch escapes the relevant input from the text field so the
regular expression substitution treats characters as literals
instead of as metacharacters.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22237: Subscriptions are not linked to Mana upon edit
Owen Leonard [Wed, 30 Jan 2019 17:13:35 +0000 (17:13 +0000)]
Bug 22237: Subscriptions are not linked to Mana upon edit

This patch modifies C4/Serials.pm so that during the process of editing
a subscription a link to Mana can be created.

To test, apply the patch and go to Serials.

 - Locate a subscription which was not created using Mana data but which
   can be found in Mana.
 - Edit the subscription, skipping to the second page.
 - View the results returned by Mana and select one.
 - Save the subscription.
 - Upon being redirected to the subscription detail page you should see
   a "Report mistake" button. This shows that the subscription has been
   linked to Mana successfully.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22296: Add Invoice Adjustments to GetBudgetHierarchy
Nick Clemens [Fri, 8 Feb 2019 20:24:05 +0000 (20:24 +0000)]
Bug 22296: Add Invoice Adjustments to GetBudgetHierarchy

To test:
1 - prove -v t/db_dependent/Budgets.t
2 - Create some invoices on a single budget
    Invoice 1:
      add a non-encumbered adjustment for 1
      add an encumbered adjustment 2
      leave open
    Invoice 2:
      add a non-encumbered adjustment for 4
      add an encumbered adjustment for 8
3 - View acq home page, should see 2 order and 12 spent for the budget
4 - View the spent and ordered pages, they should show the correct amounts
5 - Add more orders etc and confirm things total correctly

https://bugs.koha-community.org/show_bug.cgi?id=22296
Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22498: Rename variable for budgets loop for invoice adjustments
Nick Clemens [Tue, 12 Mar 2019 13:15:34 +0000 (13:15 +0000)]
Bug 22498: Rename variable for budgets loop for invoice adjustments

To test:
1 - Try to add some adjustments to an invoice (receive shipments, create invoice, click 'finish receiving')
2 - Note the fund dropdown has only 'No fund'
3 - Apply patch
4 - Refresh page
5 - Note you can now select funds, hooray!

Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22489: Update onboarding tool for bug 18925
Martin Renvoize [Tue, 12 Mar 2019 17:29:38 +0000 (17:29 +0000)]
Bug 22489: Update onboarding tool for bug 18925

When going through the onboarding process, the tool fails on submit of step 5,
due to changes made in the database structure and rule definitions by bug
18925.

This patch fixes this, adding code that creates a circulation rule where an
issuing rule is also created in onboarding.pl. It removes maxissueqty from
being sent with params to make an issuing rule, and adds it instead to the
params to make a circulation rule, to reflect the changes that have been made
in the database.

Test plan:
1) Drop and recreate your database
2) Reload the staff client and follow the installer and onboarding
process
3) Confirm that the process finishes without errors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Bug 22489: (follow-up) Correctly set success messages

The original patch was duplicating the success message upon successful
circ rule insertion. This corrects that.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Patches squashed for readability

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 11375: Compiled CSS
Nick Clemens [Mon, 11 Mar 2019 13:08:54 +0000 (13:08 +0000)]
Bug 11375: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 11375: (QA follow-up) Remove some more treeview occurences
Josef Moravec [Mon, 25 Feb 2019 14:49:18 +0000 (14:49 +0000)]
Bug 11375: (QA follow-up) Remove some more treeview occurences

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 11375: (QA follow-up) Fix typo
Josef Moravec [Mon, 25 Feb 2019 14:32:23 +0000 (14:32 +0000)]
Bug 11375: (QA follow-up) Fix typo

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 11375: (follow-up) Add links to show all/hide all
Owen Leonard [Thu, 17 Jan 2019 15:37:15 +0000 (15:37 +0000)]
Bug 11375: (follow-up) Add links to show all/hide all

This patch adds links in the toolbar to show or hide all
sub-permissions.

To test, apply the patch and view the permissions page for a patron.
Clicking the "Show all" or "Hide all" links should work to show or hide
all sub-permissions. The corresponding "Show details" and "Hide details"
links for each permission set should be correctly toggled.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 11375: Improve patrons permissions display
Owen Leonard [Thu, 24 May 2018 13:48:48 +0000 (13:48 +0000)]
Bug 11375: Improve patrons permissions display

This patch updates the patron permissions interface in order to
emphasize permission descriptions (which can be translated) over
permission code (which cannot).

The tree structure (and jQuery plugin) is removed, and permissions are
displayed in a table-like way. Sub-permissions are shown or hidden with
a link.

A free-text filter is added to the top for narrowing the list by
keyword.

Save and cancel buttons are now in a floating toolbar.

To test, apply the patch, regenerate the staff client CSS, and clear
your browser cache if necessary.

 - Open the "Set permissions" page for any patron.
 - Confirm that the filter works correctly to show only lines which
   match your entry
   - Note that the superlibrarian line stays visible all the time. This
     is to make it clearer that sub-permissions cannot be selected if
     superlibrarian is checked.
 - Check the superlibrarain "hint" text for clarity.
 - Test the show/hide controls.
 - Test that checking a "parent" permission displays the
   sub-permissions.
 - Test that the toolbar with Save and Cancel floats when scrolling.
 - Test that changing and saving permissions works correctly.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22368: DBRev 18.12.00.024
Nick Clemens [Mon, 11 Mar 2019 13:03:37 +0000 (13:03 +0000)]
Bug 22368: DBRev 18.12.00.024

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22368: Make sure the tests will always pass
Jonathan Druart [Tue, 26 Feb 2019 20:23:13 +0000 (17:23 -0300)]
Bug 22368: Make sure the tests will always pass

Who knows!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22368: (QA follow-up) Changed to LEFT JOIN as requested
Martin Renvoize [Tue, 26 Feb 2019 17:35:22 +0000 (17:35 +0000)]
Bug 22368: (QA follow-up) Changed to LEFT JOIN as requested

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22368: (QA follow-up) Switch to using foreign_key_exists
Martin Renvoize [Mon, 25 Feb 2019 12:39:19 +0000 (12:39 +0000)]
Bug 22368: (QA follow-up) Switch to using foreign_key_exists

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22368: (QA follow-up) Missing comma in kohastructure.sql
Martin Renvoize [Wed, 20 Feb 2019 16:51:22 +0000 (16:51 +0000)]
Bug 22368: (QA follow-up) Missing comma in kohastructure.sql

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22368: (QA follow-up) Mute db errors in test
Josef Moravec [Wed, 20 Feb 2019 16:08:38 +0000 (16:08 +0000)]
Bug 22368: (QA follow-up) Mute db errors in test

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22368: Add missing constraints to `suggestions`
Martin Renvoize [Tue, 19 Feb 2019 14:03:34 +0000 (14:03 +0000)]
Bug 22368: Add missing constraints to `suggestions`

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22368: Add tests
Martin Renvoize [Tue, 19 Feb 2019 15:31:20 +0000 (15:31 +0000)]
Bug 22368: Add tests

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19489: (QA follow-up) Revert changes in printinvoice
Josef Moravec [Mon, 25 Feb 2019 21:43:17 +0000 (21:43 +0000)]
Bug 19489: (QA follow-up) Revert changes in printinvoice

It would be change behaviour, libraries are often using POS printers and
wider table could make a problem for them and break theirs workflow.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19489: (QA follow-up) Remove passing issue_id in pay form
Josef Moravec [Mon, 25 Feb 2019 21:36:31 +0000 (21:36 +0000)]
Bug 19489: (QA follow-up) Remove passing issue_id in pay form

This is not needed

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19489: (QA follow-up) Update test to use objects and module methods for creating...
Josef Moravec [Mon, 25 Feb 2019 21:33:12 +0000 (21:33 +0000)]
Bug 19489: (QA follow-up) Update test to use objects and module methods for creating needed data

Test plan:
prove t/db_dependent/Koha/Account/Lines.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19489: (QA follow-up) Cache checkout object in variable
Josef Moravec [Mon, 25 Feb 2019 21:32:39 +0000 (21:32 +0000)]
Bug 19489: (QA follow-up) Cache checkout object in variable

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19489: (follow-up) Fix typos in the tests
Nazlı Çetin [Wed, 20 Feb 2019 07:21:33 +0000 (07:21 +0000)]
Bug 19489: (follow-up) Fix typos in the tests

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19489: Change method name issue --> checkout
Nazlı Çetin [Tue, 19 Feb 2019 12:45:56 +0000 (12:45 +0000)]
Bug 19489: Change method name issue --> checkout

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19489: Detailed Description of charges in Patron accounting
Nazlı Çetin [Mon, 18 Feb 2019 09:50:10 +0000 (09:50 +0000)]
Bug 19489: Detailed Description of charges in Patron accounting

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19489: Koha::Account::Line->issue method and Unit test
Nazlı Çetin [Mon, 18 Feb 2019 09:44:24 +0000 (09:44 +0000)]
Bug 19489: Koha::Account::Line->issue method and Unit test

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22392: Reuse existing pattern
Jonathan Druart [Thu, 21 Feb 2019 19:02:31 +0000 (16:02 -0300)]
Bug 22392: Reuse existing pattern

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22392: Allow barcode to be passed to build_sample_item
Martin Renvoize [Thu, 21 Feb 2019 17:26:33 +0000 (17:26 +0000)]
Bug 22392: Allow barcode to be passed to build_sample_item

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22045: Compiled CSS
Nick Clemens [Mon, 11 Mar 2019 12:33:35 +0000 (12:33 +0000)]
Bug 22045: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22045: (follow-up) Fix tab-switching when some tab numbers are missing
Owen Leonard [Thu, 14 Feb 2019 19:37:21 +0000 (19:37 +0000)]
Bug 22045: (follow-up) Fix tab-switching when some tab numbers are missing

This patch changes the way tab-switching is done so that it switching
tabs based on tab id rather than tab index. Using tab index doesn't work
when the tab number doesn't match the tab index.

To test, apply the patch and load a record or blank editor using a MARC
framework which doesn't include one or more tabs (for instance, by
deleting the entries in the framework for one tab:

DELETE FROM marc_subfield_structure WHERE frameworkcode = 'KT' AND tab = 4;

...backup first). In the MARC editor the numbered tabs should exclude
that number. Tab-switching should work correctly.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22045: (follow-up) Revert change to numbering of tabs
Owen Leonard [Mon, 11 Feb 2019 17:13:55 +0000 (17:13 +0000)]
Bug 22045: (follow-up) Revert change to numbering of tabs

I wanted the tabs to be numbered like humans count, starting from 1.
But if the MARC framework setup isn't changed as well it doesn't make
sense. This patch removes the change.

Also fixed: Some missing template filters, an errant console.log()
removed.

To test, apply the patch and open a new or existing record for
editing. The tabs (now "Sections") should be labeled from 0-9.

Signed-off-by: John Doe <you@example.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22045: Cataloging UX enhancement - Improve access to tabs
Owen Leonard [Thu, 10 Jan 2019 13:07:10 +0000 (13:07 +0000)]
Bug 22045: Cataloging UX enhancement - Improve access to tabs

This patch makes style changes to the standard MARC editor with the goal
of both making it more responsive and making it easier to navigate among
tabs and tags.

Tabs are now part of the page's toolbar, which floats as the page
scrolls. In addition to the numbered tabs, there is also a section
showing in-page links to the MARC tags which are available on that page.

To test, apply the patch, regenerate the staff client CSS, and clear
your browser cache if necessary.

Open a blank or existing record in the standard cataloging editor. Test
the redesigned tabs, the floating toolbar, and the in-page tag links.
Confirm that everything works well at various browser widths.

Signed-off-by: Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com>
Signed-off-by: John Doe <you@example.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21091: Add missing USE raw statement
Jonathan Druart [Fri, 22 Feb 2019 10:36:11 +0000 (07:36 -0300)]
Bug 21091: Add missing USE raw statement

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21091: Move add item template JavaScript to a separate file
Owen Leonard [Wed, 28 Nov 2018 17:51:10 +0000 (17:51 +0000)]
Bug 21091: Move add item template JavaScript to a separate file

This patch moves the JavaScript in the add item template to separate
files: 1 JS file and 1 include file containing translatable strings.

While moving the JS to cataloging_additem.js I have made some changes to
quiet ESLint warnings (spacing, variable definition).

To test, apply the patch and open the add item page for an existing
record. Test the various JS-driven functionalities:

- Table sorting
- Table column configuration
- Table searching
- Table inline edit/delete links (click anywhere in the table row)
- Add multiple item form show/hide
- Add multiple item warning when adding 100+ items

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>
5 years agoBug 22363: (follow-up) Fix pod
Josef Moravec [Mon, 25 Feb 2019 18:13:04 +0000 (18:13 +0000)]
Bug 22363: (follow-up) Fix pod

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22363: Update Circulation.t to use Koha::ActionLogs instead of GetLogs
Josef Moravec [Sun, 17 Feb 2019 22:45:07 +0000 (22:45 +0000)]
Bug 22363: Update Circulation.t to use Koha::ActionLogs instead of GetLogs

Test plan:
prove t/db_dependent/Circulation.t

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22363: Use Koha::ActionLogs->search instead of GetLogs in log viewer
Josef Moravec [Mon, 18 Feb 2019 14:08:19 +0000 (14:08 +0000)]
Bug 22363: Use Koha::ActionLogs->search instead of GetLogs in log viewer

Test plan:
1) Use log viewer, try different parameters
2) Try screen and file export
3) prove t/db_dependent/Koha/ActionLogs.t

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22363: Add tests
Josef Moravec [Mon, 18 Feb 2019 14:01:44 +0000 (14:01 +0000)]
Bug 22363: Add tests

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22363: Add Koha::ActionLog[s] objects
Josef Moravec [Mon, 18 Feb 2019 13:28:34 +0000 (13:28 +0000)]
Bug 22363: Add Koha::ActionLog[s] objects

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 17496: Remove undocumented/maintained install-CPAN.pl file
Katrin Fischer [Sun, 10 Feb 2019 02:09:45 +0000 (03:09 +0100)]
Bug 17496: Remove undocumented/maintained install-CPAN.pl file

The install-CPAN.pl file was added in 2007 and hasn't been
updated or documented since.

This patch removed it from Koha.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22452: Fix typos in add mana comment modals
Josef Moravec [Tue, 26 Feb 2019 12:58:41 +0000 (12:58 +0000)]
Bug 22452: Fix typos in add mana comment modals

There are typos in modal where you can add a comment to mana:

'caracters' should be 'characters'
'commment' should be 'comment'

Test plan:
1) Create subscription from Mana
2) On subscription detail page: report mistake > other a modal is shown
--> without patch it reads 'Please enter a new commment (max 35 caracters)'
--> with patch it reads 'Please enter a new comment (max 35 characters)'
3) The same in mana search resultss and in reports

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>
5 years agoBug 22422: Compiled CSS
Nick Clemens [Mon, 11 Mar 2019 10:42:25 +0000 (10:42 +0000)]
Bug 22422: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22422: improve item location display with class "shelvingloc"
Fridolin Somers [Thu, 28 Feb 2019 12:37:40 +0000 (13:37 +0100)]
Bug 22422: improve item location display with class "shelvingloc"

In record detail page, item location is displayed with CSS using class "shelvingloc".
Many many places at intranet and OPAC can use this class.
It allows to change display in all places using CSS customisation.

This patch removes the CSS "display:block" for class "shelvingloc".
Some places where using "inline" to correct the display.
I think the display should not be managed in template.
So it will be inline by default and it can be changed by custom CSS, on all places or depending on a selctor.

Test plan :
1) Compile SCSS to CSS
2) Add to preferences IntranetUserCSS and OPACUserCSS : .shelvingloc { color:red }
3) Go to pages impacted by patch, be sure to look at cart with "more details"
4) You see item location italic and red

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>
5 years agoBug 21030: Date widget on suspend modal not working correctly
Owen Leonard [Tue, 5 Mar 2019 18:22:12 +0000 (18:22 +0000)]
Bug 21030: Date widget on suspend modal not working correctly

This patch makes a change to the suspend hold modal markup in order to
allow the datepicker <selects> to work properly.

To test, apply the patch and locate a patron in the staff client who has
holds.

 - On the checkout or patron detail page, open the holds tab.
 - Click the "Suspend" button for one of the holds.
 - In the modal, trigger the date picker and confirm that the dropdowns
   for selecting month and year work correctly.

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>
5 years agoBug 19046: (QA follow-up) Remove doubled up 'Title as phrase'
Katrin Fischer [Thu, 7 Mar 2019 03:10:28 +0000 (03:10 +0000)]
Bug 19046: (QA follow-up) Remove doubled up 'Title as phrase'

One search option was doubled up by accident.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19046: Make seach pulldown to retain index selection
Jonathan Druart [Mon, 4 Mar 2019 18:39:29 +0000 (15:39 -0300)]
Bug 19046: Make seach pulldown to retain index selection

This patch also fixes add the term in the search input

Test plan:
Enable IntranetCatalogSearchPulldown
Search for a term using the search input in the header (simple search)
Re-do selecting different indices

The selection must retain on the search result page.

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>
5 years agoBug 22442: (bug 13618 follow-up) Fix item search CSV export
Jonathan Druart [Mon, 4 Mar 2019 17:50:36 +0000 (14:50 -0300)]
Bug 22442: (bug 13618 follow-up) Fix item search CSV export

We must not filter assignements statements.

Test plan:
Export item search result as CSV
Without this patch the biblio and biblioitem values are not displayed.
With this patch applied everything is displayed correctly

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15774: (follow-up) Fix TestBuilder.t so it doesn't catch wrong classes
Tomas Cohen Arazi [Sat, 9 Mar 2019 08:41:45 +0000 (05:41 -0300)]
Bug 15774: (follow-up) Fix TestBuilder.t so it doesn't catch wrong classes

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 22483: Restore svc/members/search
Martin Renvoize [Sat, 9 Mar 2019 08:15:14 +0000 (08:15 +0000)]
Bug 22483: Restore svc/members/search

This script used to pass 'undef' to haspermission, this patch restores
that behaviour.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 22483: Restore exact behaviour of undef
Martin Renvoize [Sat, 9 Mar 2019 08:13:03 +0000 (08:13 +0000)]
Bug 22483: Restore exact behaviour of undef

Passing undef (or nothing) as $flagsrequired to haspermission simply
returned the return from fetchrow prior to this patch. Restoring that
behaviour.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 22483: Restore undef behaviour
Martin Renvoize [Fri, 8 Mar 2019 16:52:07 +0000 (16:52 +0000)]
Bug 22483: Restore undef behaviour

Turns out that we rely heavily on the side effect that passing undef
to haspermission would always return true no matter what permissions
or lack of permissions you had.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 22483: (follow-up) Fix wrong tests higlighted by bug
Tomas Cohen Arazi [Fri, 8 Mar 2019 16:45:03 +0000 (13:45 -0300)]
Bug 22483: (follow-up) Fix wrong tests higlighted by bug

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 22483: (QA follow-up) Tweaking call to haspermission
Martin Renvoize [Fri, 8 Mar 2019 15:10:20 +0000 (15:10 +0000)]
Bug 22483: (QA follow-up) Tweaking call to haspermission

This patch tweaks the logic to check the permissions is defined before
passing to haspermission.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 22483: (QA follow-up) Corrections to logic in check_cookie_auth
Martin Renvoize [Fri, 8 Mar 2019 14:20:41 +0000 (14:20 +0000)]
Bug 22483: (QA follow-up) Corrections to logic in check_cookie_auth

check_cookie_auth needs to allow for cases where we wish to check for
ANY permission and cases where we wish to skip the permissions check
entirely and just authenticate the session.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 22483: (follow-up) Improve POD as requested in bug 22031
Martin Renvoize [Fri, 8 Mar 2019 12:49:10 +0000 (12:49 +0000)]
Bug 22483: (follow-up) Improve POD as requested in bug 22031

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 22483: Explicitly ban 'undef' as a valid $flagsrequired
Martin Renvoize [Fri, 8 Mar 2019 12:24:17 +0000 (12:24 +0000)]
Bug 22483: Explicitly ban 'undef' as a valid $flagsrequired

Before bug 22031 the haspermission subroutine signature allowed for
passing 'undef' to mean 'any permission' in $flagsrequired.  This feels
like a mistake and was only in practical use in two places in the
codebase.

This patch explicitly forbids this practice (`*` may be used to the same
result and is more explicit in it's nature) and replaces the two
instances of it's use.

Test Plan
1. Before this patch, the API tests are all failing with authentication
errors
2. After this patch the API tests should now all pass.
3. t/db_dependent/Auth/haspermission.t should continue to pass (with one
addition subtest added herin)
3. /svc/members/search is not unit tested. Please check that patron
searching still yields results in the UI after this patch.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 22303: Correct bottom in virtualshelves/addbybiblionumber.tt
Fridolin Somers [Mon, 11 Feb 2019 08:54:43 +0000 (09:54 +0100)]
Bug 22303: Correct bottom in virtualshelves/addbybiblionumber.tt

In virtualshelves/addbybiblionumber.tt the include intranet-bottom.inc which closes the HTML last tag is not the last line of the template.

This patch moved bottom include to last line and uses popup-bottom.inc.

Test plan :
1) Permission OK :
1.1) Login in staff interface with user 'Bob'
1.2) Create a new list 'Readme' : category public and allow changes to contents from anyone
1.3) Perform a search
1.4) Check some results
1.5) Click 'Add to list' and on the list 'Readme'
1.6) A popup window opens
1.7) Check its HTML is OK, ending with </html>
2) Permission KO :
2.1) Open a new window (Firefox private session) and login in staff interface with user 'Bill'
2.2) Perform a search
2.3) Check some results
2.4) On session of 'Bob', edit list 'Readme'
2.5) Change : category private and allow changes to contents from owner only
2.6) On session of 'Bill'
2.7) Click 'Add to list' and on the list 'Readme'
2.8) A popup window opens saying 'Sorry, you do not have permission to add items to this list'
2.9) Check its HTML is OK, ending with </html>

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22246: Fix indexing of large fields with Elasticsearch
Ere Maijala [Fri, 1 Feb 2019 11:18:11 +0000 (13:18 +0200)]
Bug 22246: Fix indexing of large fields with Elasticsearch

Deduplicate multivalued fields and make sure sort fields are not excessively long. Also updates default mappings so that sort fields are not created for item fields where it doesn't make sense.

Test plan:
1. Reset ES mappings in administration
2. Check that sort is '0' for local-classification in biblio mappings.
3. Change sort back to '1' for local-classification for the next steps.
4. Create a record with 20 items, each with a 100 character long call number
5. Check that when indexed, the record in ES does not have duplicates in any of the item fields and local-classification__sort is truncated to 255 characters.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22416: (bug 22140 follow-up) Remove warnings in Search.t
Jonathan Druart [Tue, 5 Mar 2019 17:29:58 +0000 (14:29 -0300)]
Bug 22416: (bug 22140 follow-up) Remove warnings in Search.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22419: Records listed twice when select/unselect all from the cart
Jonathan Druart [Tue, 5 Mar 2019 18:16:44 +0000 (15:16 -0300)]
Bug 22419: Records listed twice when select/unselect all from the cart

It fixes a browser timeout when records are removed from the cart.
The onchange event already call selRecord.

Test plan:
Launch a search
Add all the result to your cart
Open the cart
Click "select all"
Then remove them all from your cart
=> Without this patch the action will timeout
=> With this patch applied the action is immediate

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20639: DBRev 18.12.00.023
Nick Clemens [Thu, 7 Mar 2019 20:52:59 +0000 (20:52 +0000)]
Bug 20639: DBRev 18.12.00.023

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20639: (QA follow-up) Rephrase system preference
Katrin Fischer [Sat, 9 Feb 2019 22:11:55 +0000 (23:11 +0100)]
Bug 20639: (QA follow-up) Rephrase system preference

Rephrases system preference a tiny bit and explaining case
of leaving the pref empty.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20639: (follow-up) Fix population of backends
Andrew Isherwood [Thu, 27 Sep 2018 10:44:27 +0000 (11:44 +0100)]
Bug 20639: (follow-up) Fix population of backends

The OPAC view wasn't correctly restricting the display of backends when
the ILLOpacbackends preference was set.

See the test plan on comment 7

Signed-off-by: Niamh.Walker-Headon@it-tallaght.ie
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20639: Add ILLOpacbackends syspref
Martin Renvoize [Tue, 24 Apr 2018 13:15:22 +0000 (14:15 +0100)]
Bug 20639: Add ILLOpacbackends syspref

This adds the ILLOpacbackends syspref, allowing users to refine the ill
backends available to opac users for initiating ill requests

Remove default assignment for backends

We don't need a default assignment for the ILLOpacbackends assignment,
if the pref isn't set, it returns undef anyway. Also, having this
default assignment actually breaks the fetching of the preference

Signed-off-by: Niamh.Walker-Headon@it-tallaght.ie
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22031: Add SQL::Abstract like syntax to haspermission
Martin Renvoize [Sat, 22 Dec 2018 13:55:23 +0000 (13:55 +0000)]
Bug 22031: Add SQL::Abstract like syntax to haspermission

This patch adds an SQL::Abstract inspired query syntax to the
haspermission method in C4::Auth.  One can now pass Arrayrefs to denote
an OR list of flags, a Hashref to denote a AND list of flags.

Structures can be nested at arbitrary depth.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22275: (bug 15836 follow-up) Fix class_sources.class_split_rule FK creation
Jonathan Druart [Wed, 27 Feb 2019 12:38:57 +0000 (09:38 -0300)]
Bug 22275: (bug 15836 follow-up) Fix class_sources.class_split_rule FK creation

18.06.00.060 will fail if custom Classification sources were created.

In that case we should use the 'generic' split rule.

Test plan:
% git checkout -b bug_22395_pre 3a0cba67f1387595f570ab9d9efdeabc856345b4
Reset the DB
Go to  Home › Administration › Classification sources
Create a custom "Classification filing rules"
Create a custom "Classification sources" using this filing rules
% git checkout master
% perl installer/data/mysql/updatedatabase.pl
=> Without this patch you will get:
DBD::mysql::db do failed: Cannot add or update a child row: a foreign key constraint fails (`koha_kohadev`.`#sql-33a_67`, CONSTRAINT `class_source_ibfk_2` FOREIGN KEY (`class_split_rule`) REFERENCES `class_split
_rules` (`class_split_rule`)) [for Statement "
            ALTER TABLE class_sources
            ADD CONSTRAINT class_source_ibfk_2 FOREIGN KEY (class_split_rule)
            REFERENCES class_split_rules (class_split_rule)
        "] at installer/data/mysql/updatedatabase.pl line 17104.

=> With this patch applied the FK will be created successfully
class_sources.class_split_rule will be set to "generic" for these custom values.

Signed-off-by: Oliver Behnke <oliver.behnke@aei.mpg.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20535: ModZebra called with $record with items stripped
David Gustafsson [Fri, 6 Apr 2018 09:15:07 +0000 (11:15 +0200)]
Bug 20535: ModZebra called with $record with items stripped

ModZebra called with $record with items stripped in
ModBiblioMarc. Remove $record argument to force
record to be loaded again from database with items
embedded.

How to test:
1) Make sure biblios are indexed (with
   rebuild_elastic_search.pl).
2) Perform a search that will produce a sample result
   containing at least one biblio with items.
3) Edit and save a biblio with items.
4) Perform the same search again, the updated biblio
   should now have no items when viewed in the search
   results (No items).
5) Apply patch.
6) Repeat step 1-3.
7) The updated biblio should now have items when viewed
   in the search results.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 16251: Fix value of material select for Rancor 008 widget
Julian Maurice [Wed, 6 Mar 2019 07:58:03 +0000 (08:58 +0100)]
Bug 16251: Fix value of material select for Rancor 008 widget

The material type is selected in accordance with the leader (06-07)

Test plan:
1. Create a new record using the advanced editor
2. Set the leader 6th position to 'c'
3. Save the record and reload the page
4. 'Music' should be automatically selected for 008
5. Try other values for the leader 6th and 7th positions

See comment 0 of this bug for the complete mapping

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>
5 years agoBug 15774: DBRev 18.12.00.022
Nick Clemens [Thu, 7 Mar 2019 20:40:53 +0000 (20:40 +0000)]
Bug 15774: DBRev 18.12.00.022

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15774: (QA follow-up) Remove asset of datables.css, and corresponding plugins
Josef Moravec [Thu, 28 Feb 2019 07:45:13 +0000 (07:45 +0000)]
Bug 15774: (QA follow-up) Remove asset of datables.css, and corresponding plugins

It is now part of doc-head-close.inc

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15774: (QA follow-up) Fix use statemenets
Josef Moravec [Thu, 28 Feb 2019 07:44:52 +0000 (07:44 +0000)]
Bug 15774: (QA follow-up) Fix use statemenets

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15774: (follow-up) fix rebase issues
Nick Clemens [Wed, 27 Feb 2019 18:22:31 +0000 (13:22 -0500)]
Bug 15774: (follow-up) fix rebase issues

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15774: Add permission for managing additional fields
Nick Clemens [Tue, 18 Dec 2018 12:05:10 +0000 (12:05 +0000)]
Bug 15774: Add permission for managing additional fields

To test:
 1 - Have three borrowers, one with order_manage permission, one with
 edit_subscription permisson, andone with both
 2 - Apply patch, updatedatabase
 3 - Verify all three now have the manage_additional_fields permission
 4 - Visit the admin page with these users, they should all see the
 'Manage additional fields' link
 5 - Click the link
 6 - User with order_manage should see 'Order baskest'
 7 - User with edit_subscription should see 'Subscriptions'
 8 - User with both should see both
 9 - Remove the additional permissions from a user - they should see a
 note about needing additional permissions

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15774: Remove unecessary returned value for ->delete
Jonathan Druart [Thu, 1 Nov 2018 20:58:14 +0000 (17:58 -0300)]
Bug 15774: Remove unecessary returned value for ->delete

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15774: Do not fetch additional fields from GetSubscription
Jonathan Druart [Thu, 1 Nov 2018 20:57:54 +0000 (17:57 -0300)]
Bug 15774: Do not fetch additional fields from GetSubscription

Finally we do not want that, they should be fetch when needed

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15774: Fix and unify additional_fields in C4::Serials
Jonathan Druart [Thu, 1 Nov 2018 20:57:24 +0000 (17:57 -0300)]
Bug 15774: Fix and unify additional_fields in C4::Serials

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15774: Add missing tests for Koha::Object::Mixin::AdditionalFields
Jonathan Druart [Thu, 1 Nov 2018 20:54:43 +0000 (17:54 -0300)]
Bug 15774: Add missing tests for Koha::Object::Mixin::AdditionalFields

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15774: Fix insert and update for subscription
Jonathan Druart [Thu, 1 Nov 2018 20:51:56 +0000 (17:51 -0300)]
Bug 15774: Fix insert and update for subscription

Call it a typo

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15774: Use the include file to display the subscription's additional fields
Jonathan Druart [Thu, 1 Nov 2018 20:41:37 +0000 (17:41 -0300)]
Bug 15774: Use the include file to display the subscription's additional fields

We have it, why not to use it?

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15774: (follow-up) Address QA issues
Nick Clemens [Thu, 1 Nov 2018 18:32:05 +0000 (18:32 +0000)]
Bug 15774: (follow-up) Address QA issues

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15774: Fix JS check when AV and MARC field are both selected
Jonathan Druart [Tue, 16 Oct 2018 19:55:18 +0000 (16:55 -0300)]
Bug 15774: Fix JS check when AV and MARC field are both selected

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15774: (follow-up) Add html filters
Nick Clemens [Thu, 4 Oct 2018 19:46:53 +0000 (19:46 +0000)]
Bug 15774: (follow-up) Add html filters

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15774: Show additional field values in edit form
Julian Maurice [Wed, 16 May 2018 07:30:42 +0000 (09:30 +0200)]
Bug 15774: Show additional field values in edit form

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>