]> git.koha-community.org Git - koha.git/log
koha.git
6 years agoBug 19974: (QA follow-up) Move lost logic to else branch
Marcel de Rooy [Fri, 23 Mar 2018 08:34:46 +0000 (09:34 +0100)]
Bug 19974: (QA follow-up) Move lost logic to else branch

If an error is raised for the barcode, we should not try to perform the
lost logic succeeding it.
Futhermore there is no need to go to GetMarcFromKohaField etc. if we just
use the output of ModItemFromMarc.

Note: It seems unnecessary to clear $itemnumber, but I can understand
the anxiety about passing it to the template with op=additem. So just
leaving it here.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19974: Marking an item as 'lost' in additem.pl will not modify the current item
charles [Mon, 15 Jan 2018 21:20:10 +0000 (16:20 -0500)]
Bug 19974: Marking an item as 'lost' in additem.pl will not modify the current item

    TEST PLAN:

    1) Log in with your superlibrarian account
    2) Borrow any book
    3) Visit your Checkouts page, and click 'Show Checkouts'
    4) Click on the item's barcode to visit the item's page
    5) On the item's page, click the 'Edit' button, and choose 'Edit items'
    6) In the items table, click the 'Actions->Edit' button of the item you borrowed
    7) Mark that item as lost (it should be the first row of the form) and click the button 'Save changes'
    8) Visit your Checkouts page. The item should still be there, despite BZ12363 claiming it should've been automagically returned
        8.1) Your koha-log should also output a warning message: 'DBIx::Class::Storage::DBI::select_single(): Query returned more than one row...'
        8.2) If you visit the item's page, the modification had no effect. It should not be marked as lost.
    9) APPLY PATCH
    10) Start back from step 2), but this time, after marking the item as lost, the item's page should
        reflect the change, and the item you borrowed should've been automatically returned to the library

Signed-off-by: Jean-Manuel Broust <jean-manuel.broust@univ-lyon2.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended: Using $item->{itemnumber} instead of new variable.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20556: Marking ILL request as complete..
Andrew Isherwood [Tue, 10 Apr 2018 15:50:56 +0000 (16:50 +0100)]
Bug 20556: Marking ILL request as complete..

When marking a request as complete, the status is updated internally
then the user to redirected to the view of the request.

Although the redirect header is sent, there is no exit to indicate that
the program flow should stop. As a result, an attempt is made to render
the template, which fails.

This patch simply adds the missing exit.

TEST PLAN
---------

- Create an ILL request
- "Manage request" > "Confirm request"
- "Mark completed"
- TEST: Ensure that no error is written to the error log upon clicking
"Mark completed"

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20590: Fix Members.t
Jonathan Druart [Fri, 20 Apr 2018 13:17:49 +0000 (10:17 -0300)]
Bug 20590: Fix Members.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20322: (QA follow-up) Use Font Awesome icons
Tomas Cohen Arazi [Thu, 19 Apr 2018 15:21:41 +0000 (12:21 -0300)]
Bug 20322: (QA follow-up) Use Font Awesome icons

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20322: (follow-up) fix validator.w3.org complaints - extra /div
Mark Tompsett [Tue, 27 Mar 2018 01:34:04 +0000 (01:34 +0000)]
Bug 20322: (follow-up) fix validator.w3.org complaints - extra /div

The intranet-bottom.inc has the closing div, just deleted
the last one.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20322: (follow-up) use tooltips for warning
Mark Tompsett [Tue, 27 Mar 2018 01:32:16 +0000 (01:32 +0000)]
Bug 20322: (follow-up) use tooltips for warning

This puts similar old text into tool tips for the overdues.
Hover over the overdues, and the tool tips should appear and
be similar to what the text was before.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20322: (follow up) design refresh for circulation page
Liz Rea [Tue, 20 Mar 2018 23:03:51 +0000 (23:03 +0000)]
Bug 20322: (follow up) design refresh for circulation page

Further revisions, compromise.

- 4 columns to three
- offline circulation demoted to below the intranet homepage preference,
    and no buttons, due to its relative lack of everyday use.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20322: (follow-up) Circulation page layout and design update
Owen Leonard [Tue, 6 Mar 2018 13:16:21 +0000 (13:16 +0000)]
Bug 20322: (follow-up) Circulation page layout and design update

This follow-up makes some suggestions about how to push this further:

- Put content in four columns which reduces to two on smaller screens
- Adjust font size of large links
- Move Offline Circulation links into its own column
- Add image icons to the Firefox extension and Windows application
  download links
- Improve indentation in template

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20322: design refresh for circulation page
Liz Rea [Fri, 2 Mar 2018 02:21:24 +0000 (15:21 +1300)]
Bug 20322: design refresh for circulation page

do note, I don't actually mind if these aren't the changes eventually accepted. I just know it needs doing and starting it will hopefully get some gears turning.

To test:
Click all the links and check they work.
Do you like the styling? it's different. :)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18327: Style 'Multi receiving' button like others
Jonathan Druart [Thu, 19 Apr 2018 10:13:16 +0000 (07:13 -0300)]
Bug 18327: Style 'Multi receiving' button like others

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18327: Set label width to 50% in modal
Jonathan Druart [Wed, 18 Apr 2018 16:08:21 +0000 (13:08 -0300)]
Bug 18327: Set label width to 50% in modal

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18327: Rename submit button with 'OK'
Jonathan Druart [Wed, 18 Apr 2018 16:08:06 +0000 (13:08 -0300)]
Bug 18327: Rename submit button with 'OK'

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18327: Same change for serials-edit
Jonathan Druart [Tue, 17 Apr 2018 12:42:08 +0000 (09:42 -0300)]
Bug 18327: Same change for serials-edit

And use an include file to avoid copy/paste

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18327: Add the ability to set the received date to today on multi receiving serials
Jonathan Druart [Mon, 16 Apr 2018 21:56:06 +0000 (18:56 -0300)]
Bug 18327: Add the ability to set the received date to today on multi receiving serials

When receiving several issues for a subscription (Serials > Serial
collection > Multi receiving), the reception date is always identical to the
publication date.
In some use cases we would like to set this "date received" value to
today.
Note: "date received" refers to the DB column serial.planneddate

To make this possible this patch replaces the JS prompt with a modal
dialog asking for
 1. the number of issues to receive
 2. if the received date must be set to today

Ergonomic note: bootstrap styled buttons are used, but they do not display correctly
We may need to improve that (later)

Test plan:
- Receive 1 or more serials using the "Multi receiving" buttons
Note that this button appears twice, on the "serial collection
information" and the "serial edition" pages
- Try with and without the new checkbox ticked and confirm the behaviour
is correct (i.e. date received is set to today or set to the publish
date)
- Make sure "Edit serials" and "Generate next" buttons still work as
before

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20562: Fix Returns.t test
Jonathan Druart [Thu, 19 Apr 2018 19:21:57 +0000 (16:21 -0300)]
Bug 20562: Fix Returns.t test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20590: Include Koha::Exceptions::Exception
Tomas Cohen Arazi [Thu, 19 Apr 2018 14:13:06 +0000 (11:13 -0300)]
Bug 20590: Include Koha::Exceptions::Exception

This patch makes Koha::Exceptions::Object include
Koha::Exceptions::Exception so it is not required to include it
excplicitly for using this exceptions.

To test:
- Run:
  $ kshell
 $k prove t/Koha/Exceptions.t
=> FAIL: Tests fail because Koha::Exceptions::Exception is not
(implicitly or explicitly included)
- Apply this patch
- Run
 k$ prove t/Koha/Exceptions.t
=> SUCCESS: Tests pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20590: Unit tests
Tomas Cohen Arazi [Thu, 19 Apr 2018 14:12:31 +0000 (11:12 -0300)]
Bug 20590: Unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20590: Improve Koha::Exceptions in string context
Jonathan Druart [Mon, 16 Apr 2018 15:39:15 +0000 (12:39 -0300)]
Bug 20590: Improve Koha::Exceptions in string context

I was working on bug 20580 and noticed that the exceptions are not
stringified and so not really useful when displayed in string context.

This patch is for discussion and not ready for inclusion

Still need to fix:
Koha/REST/V1/Patrons.pm (The error is "Given xxx does not exist")
Koha/Object.pm: in ->store, Koha::Exceptions::Object::FKConstraint is
raised but we cannot set 'value'

Another note: In Koha::Exceptions::Exception I do not have access to
$self->line_number and $self->filename

See also
http://search.cpan.org/~drolsky/Exception-Class-1.44/lib/Exception/Class/Base.pm#OVERRIDING_THE_as_string_METHOD

Test plan:
Apply patch from bug 20580 and execute create_superlibrarian.pl with an
invalid categorycode

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20590: Koha::Exceptions::Exception
Jonathan Druart [Thu, 19 Apr 2018 13:50:33 +0000 (10:50 -0300)]
Bug 20590: Koha::Exceptions::Exception

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7143: Update about page for new dev - Andrew Isherwood
Jonathan Druart [Thu, 19 Apr 2018 12:12:11 +0000 (09:12 -0300)]
Bug 7143: Update about page for new dev - Andrew Isherwood

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoRevert "Bug 20104: Update minimum version of Perl to 5.20"
Jonathan Druart [Thu, 19 Apr 2018 12:09:31 +0000 (09:09 -0300)]
Revert "Bug 20104: Update minimum version of Perl to 5.20"

This reverts commit 4218875ec039dc375124f969caea1624399c21a4.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19952: Update popup window templates to use Bootstrap grid: UNIMARC cataloging...
Owen Leonard [Thu, 11 Jan 2018 13:56:11 +0000 (13:56 +0000)]
Bug 19952: Update popup window templates to use Bootstrap grid: UNIMARC cataloging plugins

This patch updates two UNIMARC cataloging plugin templates to use the
Bootstrap grid instead of the YUI grid.

- unimarc_field_210c_bis.tt
- unimarc_field_686a.tt

To test you do not need a UNIMARC system.

Apply the patch and for each plugin, configure a MARC subfield (e.g.
100$a) to use that plugin.

From the MARC edit page, trigger the plugin and confirm that the
page in the popup window looks correct. Confirm that changes made in the
popup window are saved to the corresponding field in the editor.

Signed-off-by: Te Rauhina Jackson <terauhina.jackson@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18790: DBRev 17.12.00.034
Jonathan Druart [Thu, 19 Apr 2018 15:29:20 +0000 (12:29 -0300)]
Bug 18790: DBRev 17.12.00.034

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18790: Prevent the tests to fail if precision changes
Jonathan Druart [Thu, 19 Apr 2018 15:19:17 +0000 (12:19 -0300)]
Bug 18790: Prevent the tests to fail if precision changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18790: (QA follow-up) Use a transaction for voiding
Kyle M Hall [Fri, 13 Apr 2018 12:25:51 +0000 (12:25 +0000)]
Bug 18790: (QA follow-up) Use a transaction for voiding

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18790: (QA follow-up) Fix capitalization
Kyle M Hall [Fri, 13 Apr 2018 11:16:19 +0000 (11:16 +0000)]
Bug 18790: (QA follow-up) Fix capitalization

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18790: Add new account offsets to atomic update
Kyle M Hall [Wed, 21 Feb 2018 12:04:22 +0000 (07:04 -0500)]
Bug 18790: Add new account offsets to atomic update

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18790: Add logging for voided payments
Kyle M Hall [Wed, 21 Feb 2018 12:03:17 +0000 (07:03 -0500)]
Bug 18790: Add logging for voided payments

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18790: Add ability to void payments
Kyle M Hall [Sat, 10 Jun 2017 11:34:56 +0000 (11:34 +0000)]
Bug 18790: Add ability to void payments

We've had the ability to 'reverse' a payment for a long time, but it
would be much better if we had a true void payment function that
replaces the paid amounts into the fee so that it appears as if the
payment was never made.

Test Plan:
1) Apply this patch and dependent patches
2) Run updatedatabase.pl
3) Create some fines
4) Pay those fines
5) Use the new 'void' button to void the payments
6) Note the fines were restored to their pre-payment amounts

Signed-off-by: Koha-us conference <koha-us@koha-us.net>
Signed-off-by: BWS Sandboxes <ByWaterSandboxes@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18786: DBRev 17.12.00.033
Jonathan Druart [Thu, 19 Apr 2018 15:28:16 +0000 (12:28 -0300)]
Bug 18786: DBRev 17.12.00.033

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18786: DBIC Schema changes
Jonathan Druart [Thu, 19 Apr 2018 15:21:00 +0000 (12:21 -0300)]
Bug 18786: DBIC Schema changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18786: Add PAYMENT_TYPE to the AV categories
Jonathan Druart [Fri, 13 Apr 2018 16:15:57 +0000 (13:15 -0300)]
Bug 18786: Add PAYMENT_TYPE to the AV categories

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18786: Add ability to create custom payment types
Kyle M Hall [Mon, 12 Jun 2017 14:09:35 +0000 (10:09 -0400)]
Bug 18786: Add ability to create custom payment types

Some libraries would like to be able to specify more specific payment types such as cash, check, credit card, or even canned food ( for food drives ). This feature will allow a library to specify payment types as authorised values of the type PAYMENT_TYPE.

Test Plan:
1) Apply patches
2) Update database
3) Add authorised value PAYMENT_TYPE with values 'Cash', 'Check', 'Credit card'
4) Go to the fines section of a patron who has several fines
5) Tab 'Fines'
6) Click on 'Pay' for an individual fine
7) Verify that in the form a 'Pay an individual fine' dropdown appears with payment types
8) Select a payment type, confirm payment
9) Verify that payment type appears in "Description of charges" in tab 'Account'

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Bug 18786: Remove use of Koha::Patron::Images

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Bug 18786: Remove duplicate block with bad IF

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18786: Update database
Kyle M Hall [Mon, 12 Jun 2017 14:07:53 +0000 (10:07 -0400)]
Bug 18786: Update database

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20343: Put translatable strings in strings.tt
Julian Maurice [Wed, 18 Apr 2018 13:20:02 +0000 (15:20 +0200)]
Bug 20343: Put translatable strings in strings.tt

Also add a CSS class on <details> for easier styling and change the
list style so it take less space on screen

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20343: Show number of checkouts by itemtype in circulation.pl
Julian Maurice [Tue, 6 Mar 2018 13:47:46 +0000 (14:47 +0100)]
Bug 20343: Show number of checkouts by itemtype in circulation.pl

It is sometimes useful to have the number of checkouts grouped by
itemtype (to see if we're approaching the maximum number of checkouts
allowed for instance).
This patch adds this information above the checkouts table, in
circ/circulation.pl

Test plan:
1. Check out some items with various item types to a patron
2. In circ/circulation.pl, click on 'Show checkouts' button to display
   the table
3. Notice the line "Number of checkouts by item type" above the table,
   click on it
4. See that the list of item types is displayed with a count in front of
   each one
5. Compare the numbers to the checkouts in the table and verify that the
   numbers are correct

Signed-off-by: claude <claude.brayer@cea.fr>
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20599: Add the Koha::Subscription->vendor method
Jonathan Druart [Tue, 17 Apr 2018 21:12:50 +0000 (18:12 -0300)]
Bug 20599: Add the Koha::Subscription->vendor method

Test plan:
  prove t/db_dependent/Koha/Subscription.t
must return green

NOTE: My preference is for $subscription to be object,
      and perhaps something like $built_subscription to
      be from the builder. Because, $object is a poor
      variable name.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19794: DBRev 17.12.00.032
Jonathan Druart [Thu, 19 Apr 2018 15:26:21 +0000 (12:26 -0300)]
Bug 19794: DBRev 17.12.00.032

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19794: (follow-up) Add atomic update
Katrin Fischer [Tue, 17 Apr 2018 00:17:09 +0000 (00:17 +0000)]
Bug 19794: (follow-up) Add atomic update

The update will
- change the RLIST notice code to SERIAL_ALERT
- adapt the description if it has remained unchanged from
  'Routing List' to 'New serial issue'
- update subscriptions to use the new notice code

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19794: (QA follow-up) Change tab to space
Josef Moravec [Mon, 16 Apr 2018 14:56:33 +0000 (14:56 +0000)]
Bug 19794: (QA follow-up) Change tab to space

Test plan:
Run qa tools, it should be happy

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19794: Rename RLIST notice to SERIAL_ALERT to better reflect its purpose
Katrin Fischer [Tue, 20 Feb 2018 21:33:10 +0000 (21:33 +0000)]
Bug 19794: Rename RLIST notice to SERIAL_ALERT to better reflect its purpose

The RLIST sample notice is used to send an email to patrons who have
subscribed to be notified when a new issue for a subscription arrives.

This is a feature that is totally independent and not related to the
use of routing lists. In the GUI however, this was misleading so far.

- Rename  RLIST to SERIAL_ALERT and fixes the sample notices
- Fix explanations in the helf files
- Fix name of the module in letters from 'serials (routing list)'
  to 'serials (new issue)'

Note: There is no logic to be changed as the notice template
to be used is defined for each subscriptions and this is just
the sample notice. I've also opted against a database update, to not
interfere with existing installations, reports etc.

A patch to the manual will be submitted shortly after this passes QA.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 12123: Make iframe large enough to remove scroll bars
Kyle M Hall [Fri, 13 Apr 2018 13:57:38 +0000 (09:57 -0400)]
Bug 12123: Make iframe large enough to remove scroll bars

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 12123: Prevent HTML notices to break the notice viewer
Kyle M Hall [Tue, 22 Apr 2014 13:55:22 +0000 (06:55 -0700)]
Bug 12123: Prevent HTML notices to break the notice viewer

Depending on the content of an html notice, it can cause the notice to
either not be collapsible, be uncollapsible, or to be permanently
collapsed.

Test Plan:
1) Set your CHECKOUT notice to the following ( with HTML Message checked ) :
<p>The following items have been checked out:</p>

----
<blockquote> <<biblio.title>> </blockquote>
----

<p>Thank you for visiting the <<branches.branchname>> of HMCPL.</p>
2) Check out some items to a patron
3) View the patrn's notices
4) Note the notice viewer is broken ( message is not collapsed, and
   con't be collapsed ).
5) Apply this patch
6) Reload the page
7) Note the notice viewer is no longer broken

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
I followed the test plan successfully.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20562: Pass the Koha::Checkout object to AddIssuingCharge
Jonathan Druart [Mon, 16 Apr 2018 16:48:54 +0000 (13:48 -0300)]
Bug 20562: Pass the Koha::Checkout object to AddIssuingCharge

We do not need to pass all those parameters, just the checkout object is
enough.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20562: issue_id is not stored in accountlines for rental fees
Kyle M Hall [Sun, 8 Apr 2018 07:11:11 +0000 (07:11 +0000)]
Bug 20562: issue_id is not stored in accountlines for rental fees

Test Plan:
1) Apply this patch
2) Assign a charge to an item type
3) Checkout an item of that type to a patron
4) View the accountlines table for that patron
SELECT * FROM accountlines WHERE accounttype='Rent' and borrowernumber=##;
5) Note there is an issue_id

Or

1) Apply this patch
2) prove t/db_dependent/Circulation/issue.t

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 11674: DBRev 17.12.00.031
Jonathan Druart [Mon, 16 Apr 2018 17:09:03 +0000 (14:09 -0300)]
Bug 11674: DBRev 17.12.00.031

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 11674: Configuration for MARC field doc URLs
Pasi Kallinen [Thu, 1 Feb 2018 10:00:02 +0000 (12:00 +0200)]
Bug 11674: Configuration for MARC field doc URLs

Add a new system preference MarcFieldDocURL. Setting it to some URL
will make all the MARC documentation links point to that in
the MARC edit UI. Leaving the value empty will use the old defaults
(http://loc.gov for MARC21 and http://archive.ifla.org for UNIMARC).

There are some possible substitutions usable in the URL:
 - {MARC} is replaced with either "MARC21" or "UNIMARC"
 - {FIELD} is replaced by the MARC field number, eg. "000", "048", ...
 - {LANG} is replaced by the UI language, eg. "en", or "fi-FI"

To test:

1) Go to Cataloguing > New record
2) Clicking on the question mark links in the MARC edit will
   open a window to either loc.gov or archive.ifla.org
3) Install patch, run updatedatabase, etc
4) Redo parts 1, and 2.
5) Set the value of MarcFieldDocURL to
   http://example.com/?field={FIELD}&marc={MARC}&lang={LANG}
6) Redo parts 1 and 2
7) Clicking on the question mark links in the MARC edit will
   open a window to example.com, with the proper substitutions
   in the URL for the field, marc flavour and language

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18007: Interface updates to notices and notice previews
Owen Leonard [Fri, 13 Apr 2018 11:43:21 +0000 (11:43 +0000)]
Bug 18007: Interface updates to notices and notice previews

This patch makes changes to the form for adding and editing notices, and
to the template for viewing a rendered preview of notices.

- Preview now shows side-by-side comparisons
- JavaScript has been movied out of template into separate file
- Validation of the add/edit form improved through use of validation
  plugin

To test, apply the patch on top of those for Bug 17981

- Add a new notice.
  - Confirm that the form can't be submitted without data in the "code"
    and "name" fields.
  - Confirm that the form can't be submitted without filling in at least
    one message template (subject and body).
  - Confirm that you cannot submit the form while using an
    existing notice code.
  - Follow Bug 17981's test plan for testing the preview function.
    Confirm that the preview loads correctly and looks correct.
    - Test both with old syntax messages which require conversion and
      messages in template-toolkit syntax.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Fixed conflicts caused by bug 20538.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20515: (QA follow-up) Fix capitalization on 'Ill Requests'
Katrin Fischer [Sun, 15 Apr 2018 22:25:56 +0000 (00:25 +0200)]
Bug 20515: (QA follow-up) Fix capitalization on 'Ill Requests'

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20515: (follow-up) Add missing CAN_user_ill
Andrew Isherwood [Fri, 13 Apr 2018 10:41:37 +0000 (11:41 +0100)]
Bug 20515: (follow-up) Add missing CAN_user_ill

This follow up patch adds two missing CAN_user_ill tests in templates

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20515: (QA follow-up) Remove specific superlibrarian check
Andrew Isherwood [Mon, 9 Apr 2018 14:41:57 +0000 (15:41 +0100)]
Bug 20515: (QA follow-up) Remove specific superlibrarian check

Removed the test for CAN_user_superlibrarian as requested

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20515: Fix permission check on "ILL request" menu options
Andrew Isherwood [Wed, 4 Apr 2018 11:09:52 +0000 (12:09 +0100)]
Bug 20515: Fix permission check on "ILL request" menu options

This patch adds the following additional conditions to the display of
both the ILL Requests drop down "More" menu option and the "ILL Requests"
option on the intranet front page:

Before:

[% IF Koha.Preference('ILLModule') %]

After:

[% IF Koha.Preference('ILLModule') && (CAN_user_ill || CAN_user_superlibrarian) %]

This prevents the options being displayed to users who have no
permissions to work with ILL.

Test plan:

View both the intranet front page and "More" dropdown while logged in as
a user without ILL permissions, ensure the options do not display. Then
do the same with a user with ILL permissions, ensure the options do
display.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20539: Remove warnings in catalogue/search.pl
Julian Maurice [Mon, 9 Apr 2018 09:38:44 +0000 (11:38 +0200)]
Bug 20539: Remove warnings in catalogue/search.pl

Test plan:
1. Start a search from intranet
2. See several warnings in logs
3. Apply patch (&& reload starman)
4. Start a new search
5. Confirm that warnings are gone and that the search still works

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18725: Test return values of make_column_dirty
Jonathan Druart [Mon, 16 Apr 2018 15:56:01 +0000 (12:56 -0300)]
Bug 18725: Test return values of make_column_dirty

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18725: (QA follow-up) Use make_column_dirty instead of status change
Marcel de Rooy [Fri, 13 Apr 2018 07:38:50 +0000 (09:38 +0200)]
Bug 18725: (QA follow-up) Use make_column_dirty instead of status change

Moving the status to the invalid 'processing' might well have unwanted
side-effects. (The status column will be set to empty string and we have
a problem if it is not processed.)

This patch allows pass-through of DBIX's make_column_dirty in
Koha::Object (simple tests included) and uses it to force an update.
If the update does not return true, it still exits.

Test plan:
[1] Read the changes.
[2] Run t/db_dependent/Koha/Object.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18725: Prevent process_message_queue to send duplicate emails if message_queue...
Kyle M Hall [Thu, 26 Oct 2017 13:04:59 +0000 (09:04 -0400)]
Bug 18725: Prevent process_message_queue to send duplicate emails if message_queue is not writable.

Last week, we had a database server whose disk filled, causing database writes to fail.

This meant that messages in message_queue marked 'pending' were not marked as 'sent' when they were added to the postfix mail queue; messages were sent every 15 minutes (as specified in the cron job) until the disk space issues were cleared.

I would suggest adding a token write to the start of process_message_queue.pl as a 'canary in the coal mine'. If the database write fails, process_message_queue should stop, because it's not safe to proceed sending emails that may not be marked 'sent'.

Test Plan:
1) Apply this patch
2) Make the message_queue table unwriteable somehow
3) Run process_message_queue.pl
4) Script should die with error

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19882: Fix syntax issue in .pref file
Jonathan Druart [Mon, 16 Apr 2018 14:14:50 +0000 (11:14 -0300)]
Bug 19882: Fix syntax issue in .pref file

The translate script raised an error:
Use of uninitialized value $pref_name in concatenation (.) or string at
LangInstaller.pm line 190.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20584: Prevent Koha/Patron/Categories.t to fail randomly
Jonathan Druart [Fri, 13 Apr 2018 18:09:53 +0000 (15:09 -0300)]
Bug 20584: Prevent Koha/Patron/Categories.t to fail randomly

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18791: Export visible columns only
Jonathan Druart [Fri, 13 Apr 2018 16:53:32 +0000 (13:53 -0300)]
Bug 18791: Export visible columns only

We certainly will want to improve that and explicitely list the columns
to export. For instance the actions and checkboxes should not be
exported, even if visible.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18791: (follow up) Fix translation of copy messages
Owen Leonard [Tue, 27 Mar 2018 15:09:08 +0000 (15:09 +0000)]
Bug 18791: (follow up) Fix translation of copy messages

This patch updates DataTables configuration so that more strings are
translatable:

https://datatables.net/extensions/buttons/examples/html5/copyi18n.html

To test, apply the patch and clear your browser cache.

- Open the account tab for a patron who has only one fine.
- Confirm that the new DataTables buttons appear.
- Click the 'Copy' button and confirm that a "Copied 1 row to clipboard"
  message appears.
- Test again with a patron who has multiple fines, confirm that the
  message reads "Copied X rows to clipboard."

To test the translation:

- Confirm that "Copied 1 row to clipboard" is missing from the language
  file you're testing with (misc/translator/po/xx-YY-staff-prog.po).
- Run 'translate update xx-YY'
- Check that the clipboard strings are now in the po file.
- Add translations for those strings.
- Run 'translate update xx-YY' and 'translate install xx-YY'
- Switch to the translated language and clear your browser cache.
- Test the 'Copy' button again. Your translated text should appear.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18791: (follow-up) Make buttons translatable
Kyle M Hall [Fri, 9 Mar 2018 16:22:06 +0000 (11:22 -0500)]
Bug 18791: (follow-up) Make buttons translatable

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18791: Add the ability for librarians to easily copy, download or print DataTable...
Kyle M Hall [Mon, 12 Jun 2017 18:13:51 +0000 (14:13 -0400)]
Bug 18791: Add the ability for librarians to easily copy, download or print DataTables based tables in Koha

There are many tables in Koha where it would be useful
for librarians to easily copy, download or print the table
for various purposes. These functions are available via
DataTables button plugins.

Test Plan:
1) Clear your browser cache ( just in case )
2) Apply this patch
3) Browse to boraccount.pl ( or another page using DataTabes )
4) Note the new Excel, CSV, Copy and Print buttons
5) Test each button to ensure they work

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19882: DBRev 17.12.00.030
Jonathan Druart [Fri, 13 Apr 2018 16:31:23 +0000 (13:31 -0300)]
Bug 19882: DBRev 17.12.00.030

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19882: (follow-up) Add 'IGNORE' in DB update
Nick Clemens [Thu, 12 Apr 2018 13:51:17 +0000 (13:51 +0000)]
Bug 19882: (follow-up) Add 'IGNORE' in DB update

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19882: Add Novelist Select staff client profile
Nick Clemens [Wed, 27 Dec 2017 13:18:26 +0000 (13:18 +0000)]
Bug 19882: Add Novelist Select staff client profile

This patchset allows for use of a separate Novelist profile for the
staff client and opac. This allows Novelist to determine links and
special styling for each. Testing is best with novelist credentials,
however, confirming that values are set and used correctly and nothing
is broken should suffice.

To test:
1 - Apply patches
2 - Update database
3 - View detail pages for some records on opac and staff client and ensure no changes have been
made
4 - Enable NovelistSelectStaffEnabled (and enter or have info in the Profile and password)
5 - Set NovelistSelectStaffView to 'above'
6 - View detail pages for some records, verify that if novelist info is
available it is displayed and nothing is displayed if not
7 - Repeat with all staff view options

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20538: ->tag is private - tell it explicitly
Jonathan Druart [Fri, 13 Apr 2018 15:08:07 +0000 (12:08 -0300)]
Bug 20538: ->tag is private - tell it explicitly

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20538: Add POD for Asset.pm
Julian Maurice [Thu, 12 Apr 2018 09:21:05 +0000 (11:21 +0200)]
Bug 20538: Add POD for Asset.pm

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20538: Move categories.js out of language directory
Julian Maurice [Thu, 12 Apr 2018 09:05:31 +0000 (11:05 +0200)]
Bug 20538: Move categories.js out of language directory

This was the last js/css file inside a language directory

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20538: Fix 2 JS paths
Julian Maurice [Thu, 12 Apr 2018 08:30:10 +0000 (10:30 +0200)]
Bug 20538: Fix 2 JS paths

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20538: Fix copyright notice in Asset.pm
Julian Maurice [Thu, 12 Apr 2018 08:28:45 +0000 (10:28 +0200)]
Bug 20538: Fix copyright notice in Asset.pm

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20538: (follow-up) Update discharges request page with Asset plugin
Josef Moravec [Thu, 12 Apr 2018 06:57:25 +0000 (06:57 +0000)]
Bug 20538: (follow-up) Update discharges request page with Asset plugin

This is follow-up of bug 20524

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20538: Remove the need of writing [% KOHA_VERSION %] everywhere
Julian Maurice [Fri, 6 Apr 2018 15:02:55 +0000 (17:02 +0200)]
Bug 20538: Remove the need of writing [% KOHA_VERSION %] everywhere

Having to write [% KOHA_VERSION %] for each url is bad because:
- It's easily forgettable when adding new <script> or <link>
- It prevents grep'ing for the full filename
- It violates the DRY principle
- If at some point we want to change the "force js and css reload"
  mechanism, it will be tedious

This patch:
- adds a Template::Toolkit plugin that generates <script> and
  <link> tags for JS and CSS files, and inserts automatically the Koha
  version in the filename
- use the new plugin to remove all occurences of [% KOHA_VERSION %]
- remove the code that was adding KOHA_VERSION as a template variable

Test plan:
1. Apply patch
2. Go to several different pages in Koha (opac and intranet) while
   checking your browser's dev tools (there should be no 404 for JS and
   CSS files, and the Koha version should appear in filenames) and the
   server logs (there should be no "File not found")
3. `git grep KOHA_VERSION` should return nothing
4. prove t/db_dependent/Koha/Template/Plugin/Asset.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20499: just check if GetItem returns something is enough
Jonathan Druart [Thu, 12 Apr 2018 15:31:28 +0000 (12:31 -0300)]
Bug 20499: just check if GetItem returns something is enough

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20499: Fix the Internal Server Error
Mark Tompsett [Thu, 29 Mar 2018 18:47:25 +0000 (18:47 +0000)]
Bug 20499: Fix the Internal Server Error

TEST PLAN
---------
See comment #1

Applying the test without the patch: messy.
Applyin both patches: smooth.
Run koha qa test tools

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20499: Unit Test to prove the problem
Mark Tompsett [Thu, 29 Mar 2018 18:44:32 +0000 (18:44 +0000)]
Bug 20499: Unit Test to prove the problem

TEST PLAN
---------
1) apply this patch
2) prove t/db_dependent/Circulation.t
   -- horrible death.
3) apply next path
4) prove t/db_dependent/Circulation.t
   -- passes.
5) run koha qa test tools

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7143: Update about page for new dev - Joachim Ganseman
Jonathan Druart [Fri, 13 Apr 2018 14:47:47 +0000 (11:47 -0300)]
Bug 7143: Update about page for new dev - Joachim Ganseman

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 17981: (QA follow-up) Fix and update pod in svc/letters/get
Josef Moravec [Tue, 10 Apr 2018 18:30:09 +0000 (18:30 +0000)]
Bug 17981: (QA follow-up) Fix and update pod in svc/letters/get

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 17981: Do not crash if the template is already using TT syntax
Jonathan Druart [Wed, 11 Apr 2018 18:55:04 +0000 (15:55 -0300)]
Bug 17981: Do not crash if the template is already using TT syntax

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 17981: Remove uneeded module JS var
Jonathan Druart [Fri, 15 Sep 2017 15:50:32 +0000 (12:50 -0300)]
Bug 17981: Remove uneeded module JS var

As we only support CHECKIN and CHECKOUT for now, we do not need this
module variable. It may be useful to re-add it later.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 17981: Move the divs to the top of the modal
Jonathan Druart [Tue, 24 Jan 2017 16:38:17 +0000 (17:38 +0100)]
Bug 17981: Move the divs to the top of the modal

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 17981: Better error handling
Jonathan Druart [Tue, 24 Jan 2017 16:13:07 +0000 (17:13 +0100)]
Bug 17981: Better error handling

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 17981: Add a preview mode for notice templates
Jonathan Druart [Tue, 24 Jan 2017 12:31:30 +0000 (13:31 +0100)]
Bug 17981: Add a preview mode for notice templates

This patch is a first step to provide a preview mode for notice
templates.

CHECKIN, CHECKOUT and HOLD_SLIP are supported so far.
Maybe more, but I have not tested yet and the interface will not allow
you to generate the preview.

The idea is to provide an idea of how will render the messages generated
from a notice template.

A new "Preview" button is added close to each textarea on the editing
notice templates view.
For each notice template code (letter_code), we will need some input
data to produce the preview.

For instance, for CHECKIN we need an barcode. From the barcode we
can guess all the other data.
For CHECKOUT we will need the borrowernumber and the barcode.
Note that the way to enter the data for the preview is not really
user-friendly, for CHECKOUT you will have to fill
'borrowernumber|barcode', but the placeholder will help you to know how
and what to fill.
In the modal window, you will see 4 blocks:
1/ the content of the letter (with the placeholds << >>)
2/ the generated message (with the data filled)
3/ if the letter contained historical syntax markers, the screen will
try to generate a notice template using the TT syntax
4/ the generated message from this TT syntax
=> You will be able to compare the 2 generated messages.

What is the goal of this first patchset:
- Show this first POC and get feedback from other developpers
- Add a way to easily visualise the differences between the 2 syntaxes
- Confort users with the TT syntax and the migration step from the
historical syntax.

I'd like to get opinions before going further.

The possibilities:
- Mock data to get fully working generated messages for any notice
templates. For instance, for CHECKIN and CHECKOUT, the item is not
checked in/out yet. So we cannot access the issue's information.
(I have no idea how to do that)
- Browse the data to get the ones we want to use for the preview (big).

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 17981: Add a 'letter' param to GetPreparedLetter
Jonathan Druart [Tue, 24 Jan 2017 10:18:46 +0000 (11:18 +0100)]
Bug 17981: Add a 'letter' param to GetPreparedLetter

This will allow us to call GetPreparedLetter with a letter content that
does not exist in the DB

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 17981: Move svc/letters to svc/letters/get
Jonathan Druart [Tue, 24 Jan 2017 09:09:26 +0000 (10:09 +0100)]
Bug 17981: Move svc/letters to svc/letters/get

To allow another script under svc/letters

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20426: Fix default fund value when adding orders from iso2709 file
Jonathan Druart [Mon, 2 Apr 2018 15:56:21 +0000 (12:56 -0300)]
Bug 20426: Fix default fund value when adding orders from iso2709 file

A new bug has been highlighted since:
  commit b830349f45007629f141a9835e05b95f90ee4b92
  Bug 19453: Incorrect jQuery selector for fund drop down validation

Prior to bug 19453 the check on the existence of the fund did not work
as expected, no select with name='budget_code' existed and the error was
never raised.
Now it works but expect a fund to be selected for every record to
import.
This check must only be done if there is no default value selected.

Test plan:
- Create an order from a staged file
- Do not select any funds
=> You must get a warning
- Select a specific fund for some of the records
=> You must get a warning
- Select a default fund in the last tab
=> You must not get a warning and the records must be imported and
inserted with the correct fund

Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18904: (follow-up) Use Ctrl+Shift+L
Nick Clemens [Wed, 11 Apr 2018 18:19:58 +0000 (18:19 +0000)]
Bug 18904: (follow-up) Use Ctrl+Shift+L

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18904: (QA follow-up) Do not put authid in searchbox of blinddetail
Marcel de Rooy [Mon, 9 Apr 2018 10:55:38 +0000 (12:55 +0200)]
Bug 18904: (QA follow-up) Do not put authid in searchbox of blinddetail

Adding trivial test if subfield equals 9.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18904: (follow-up) Rebase onto 14769
Nick Clemens [Fri, 6 Apr 2018 12:30:16 +0000 (12:30 +0000)]
Bug 18904: (follow-up) Rebase onto 14769

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended: simplified if-then-else around cur_field.setIndicator[12].

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18904: (follow-up) Set indicators and correct js path
Nick Clemens [Thu, 15 Mar 2018 10:18:54 +0000 (10:18 +0000)]
Bug 18904: (follow-up) Set indicators and correct js path

TO test:
1 - Have an authority with some indicators
2 - Link a field in rancor to that authority
3 - See that you get some indicators (same in unimarc, diff in marc21)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18904: Remove debugging code
Nick Clemens [Fri, 27 Oct 2017 11:17:09 +0000 (11:17 +0000)]
Bug 18904: Remove debugging code

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18904: (follow-up) Retrieve subfield in the order they are stored
Nick Clemens [Thu, 20 Jul 2017 10:23:49 +0000 (10:23 +0000)]
Bug 18904: (follow-up) Retrieve subfield in the order they are stored

Use subfields in the order they are stored.

This patch removes use of an intermediate hash for storing values. Order
of subfields as obtained from authority is now preserved.

Also removes useless code that was intended to set $2 subfields

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18904: (follow-up) Fix whitespace and don't use hardcoded path
Nick Clemens [Thu, 6 Jul 2017 17:49:14 +0000 (17:49 +0000)]
Bug 18904: (follow-up) Fix whitespace and don't use hardcoded path

Fix whitespace/tabs
use [% interface %] not intranet-tmpl

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18904: Advanced editor - Rancor - Add authority support
Nick Clemens [Thu, 6 Jul 2017 16:35:38 +0000 (16:35 +0000)]
Bug 18904: Advanced editor - Rancor - Add authority support

This patchset adds the ability to use the authorities search to select
or clear fields in the advanced editor

To test:
 1 - Open a record in the advanced cataloging editor
 2 - Press 'Ctrl+L' while in a field that shuold not be linked to
authorities (300 for instance)
 3 - Nothing should happen
 4 - Try it in a field that should be linked
 5 - You should get the authorities pop-up
 6 - Values in pop-up should be populated from values in record (as
        appropriate for authority type)
 7 - Correct authority type should be selected ( PERSO_NAME for 100,
        TOPIC_TERM for 650, etc.)
 8 - Press 'Clear', field should be blanked
 9 - Search again and select an authority
10 - Field should be correctly populated

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 14769: DBRev 17.12.00.029
Jonathan Druart [Tue, 10 Apr 2018 17:50:16 +0000 (14:50 -0300)]
Bug 14769: DBRev 17.12.00.029

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 14769: (QA follow-up) Remove global var $cached_indicators
Marcel de Rooy [Thu, 12 Apr 2018 06:54:34 +0000 (08:54 +0200)]
Bug 14769: (QA follow-up) Remove global var $cached_indicators

As requested by RM, this patch replaces using the global $cached_indicators
by saving state temporarily during the (limited) lifetime of the object.

Essentially this affects two places in code:
[1] blinddetail-biblio-search.pl (loading auth record in editor)
[2] AuthoritiesMarc::merge (merging authority into biblios)

Concurrent runs of [1] and/or [2] together with a simultaneous pref change
just in between could cause slight (hypothetical) side-effects.
The current approach of keeping state in the object makes that a series of
controlled_indicators calls during an immediate merge of one specific
authority is not affected by a simultaneous pref change. So the same rules
are applied to the set of attached biblio record for that authority.
Note also that the cron job ignores a simultaneous pref change, since
it reads from the unchanged L1 cache (yes, also hypothetical).

Test plan:
[1] Run t/Koha/Authority/ControlledIndicators.t
[2] Run t/db_dependent/Authority/Merge.t
[3] Run t/db_dependent/Koha/Authorities.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 14769: (Follow-up) Let blinddetail look at indicator values
Marcel de Rooy [Fri, 9 Feb 2018 11:18:10 +0000 (12:18 +0100)]
Bug 14769: (Follow-up) Let blinddetail look at indicator values

If the indicators are not controlled, blinddetail should not overwrite
what the user already entered. Very strictly seen, we could say that it
is outside the scope. But it is strongly related.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested with 100 and 600 in the cataloging editor.
For 100 the second indicator should not be overwritten. For 600 it should.
Also tested "ind2:" which should blank ind2.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 14769: (Follow-up) Reduce number of preference parses
Marcel de Rooy [Fri, 9 Feb 2018 08:03:26 +0000 (09:03 +0100)]
Bug 14769: (Follow-up) Reduce number of preference parses

In sub merge the Koha::Authority object was already created, so it was kind
of silly to recreate it each time with new.
In Koha::Authority, the ControlledIndicators object can be saved in the
object too for reuse during its life time. Similarly, we prevent repeated
lookups for the reporting tag (via authority type).

Test plan:
[1] Run t/db_dependent/Authority/Merge.t
[2] Run t/db_dependent/Koha/Authorities.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Limited benchmarking shows me a reduction of 11% on Merge.t and a
reduction of 4% on Authorities.t when comparing with and without this
last patch. The larger impact on Merge.t could be expected.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 14769: Put ControlledIndicators to work
Marcel de Rooy [Fri, 26 Jan 2018 09:17:33 +0000 (10:17 +0100)]
Bug 14769: Put ControlledIndicators to work

This patch does:
[1] Adds Koha::Authority->controlled_indicators (with a test).
[2] Adds a call to controlled_indicators in AuthoritiesMarc::merge.
    Unit test Merge.t is extended too.
[3] Simplifies the code in authorities/blinddetail-biblio-search.pl by
    calling controlled_indicators.

Test plan:
[1] Run t/db_dependent/Koha/Authorities.t
[2] Run t/db_dependent/Authority/Merge.t
[3] Steps 3 to 7 for MARC21:
    Create a PERSO_NAME authority with 008/11=r and ind1=3
[4] Edit a biblio and add a 600 linked to the new authority.
[5] Verify that the biblio has ind1==3 and ind2==7 and $2==aat.
    (If $2 is not visible, check the metadata in biblio_metadata.)
[6] Edit the PERSO_NAME authority and change 008/11 to '|' (bar).
[7] Verify that merge updated your biblio record: $ind2==4 and $2 gone.
[8] UNIMARC: Follow the pattern from steps 3 to 7.
    Create authority, link it in a biblio, check indicators (they should
    be copied both). Edit authority, change indicators and verify the
    merge results in the biblio record.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested PERSO_NAME and UNIF_TITLE.
For UNIF_TITLE the second authority indicator is copied to ind1 or ind2,
depending on the biblio tag involved.
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 14769: Add preference AuthorityControlledIndicators
Marcel de Rooy [Thu, 8 Feb 2018 11:59:08 +0000 (12:59 +0100)]
Bug 14769: Add preference AuthorityControlledIndicators

Including:

[1] Atomic update to add pref for existing installs
[2] Add new pref to sysprefs.sql for new installs
[3] Add description to authorities preference file.

Test plan:
[1] Run new install or upgrade to add pref.
[2] Check value of pref via System preferences in staff interface.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>