koha.git
5 years agoBug 15282: Switch default CHECKIN notice to Template Toolkit
Kyle M Hall [Wed, 2 Dec 2015 15:46:41 +0000 (15:46 +0000)]
Bug 15282: Switch default CHECKIN notice to Template Toolkit

Test Plan:
1) Ensure dependancies are applied
2) Apply this patch
3) Update your CHECKIN notice to match the following:

The following items have been checked in:
----
[% biblio.title %]
----
Thank you.

3) Generate a CHECKIN notice for a patron
4) Note there is no change to the generated notice

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15280: Switch default CHECKOUT notice to Template Toolkit
Kyle M Hall [Wed, 2 Dec 2015 15:21:11 +0000 (15:21 +0000)]
Bug 15280: Switch default CHECKOUT notice to Template Toolkit

Test Plan:
1) Ensure dependancies are applied
2) Apply this patch
3) Update your CHECKOUT notice to match the following:

The following items have been checked out:
----
[% biblio.title %]
----
Thank you for visiting [% branch.branchname %].

3) Generate a CHECKOUT notice for a patron
4) Note there is not change to the generated notice

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21505: Box around 'Additional fields' does not contain the fields
Owen Leonard [Tue, 9 Oct 2018 18:05:04 +0000 (18:05 +0000)]
Bug 21505: Box around 'Additional fields' does not contain the fields

This patch modifies the subscription detail page markup to eliminate a
confusing bordered <legend> tag. It is replaced with an <hr> to
delineate the sections and an <h3> tag to serve as the heading.

To test, apply the patch and regenerate the staff client CSS.

 - Configure one or more additional subscription fields.
 - View the detail page for a subscription and confirm that the
   "Additional fields" section is clearly labeled.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21531: Subscription "New fields" button should read "New field"
Owen Leonard [Wed, 10 Oct 2018 12:10:45 +0000 (12:10 +0000)]
Bug 21531: Subscription "New fields" button should read "New field"

This patch changes the label of the "New fields" button on the
subscription add fields page to read "New field," making it consistent
with similar buttons in the staff client.

Also changed:

- Add missing id to <select> to make label clickable.
- Remove custom DataTables configuration in favor of defaults.

To test, apply the patch and go to Serials -> Add subscription fields.

- The button in the toolbar should read "New field."
- The DataTables' functionality of the table of existing custom fields
  should be correct.
- Click the "New field" button.
  - Cliking the "Authorised value category" label should put the focus
    on the dropdown.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21523: Update two-column templates with Bootstrap grid: Serials part 2
Owen Leonard [Tue, 9 Oct 2018 16:41:55 +0000 (16:41 +0000)]
Bug 21523: Update two-column templates with Bootstrap grid: Serials part 2

This patch modifies several serials templates to use the
Bootstrap grid instead of YUI.

This patch also removes obsolete "text/javascript" attributes from
<script> tags and "text/css" attributes from <style> tags in the
modified templates.

To test, apply the patch and view the following pages, confirming that
they look correct at various browser widths:

 - Serials home page
   - Subscription search
     - Subscription details
       - Edit history (under the "Planning" tab. Manual history must be
         enabled for that subscription).
       - Subscribers
 - Serials -> Manage frequencies
 - Serials -> Manage numbering patterns

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21519: Update two-column templates with Bootstrap grid: Serials part 1
Owen Leonard [Tue, 9 Oct 2018 13:41:39 +0000 (13:41 +0000)]
Bug 21519: Update two-column templates with Bootstrap grid: Serials part 1

This patch modifies several serials templates to use the
Bootstrap grid instead of YUI.

This patch also removes obsolete "text/javascript" attributes from
<script> tags and "text/css" attributes from <style> tags in the
modified templates.

To test, apply the patch and view the following pages, confirming that
they look correct at various browser widths:

 - Serials -> Add subscription fields
   - Add or edit subscription fields
 - Serials -> Check expiration
 - Serials -> Claims
 - Serials -> Subscription
   -> Serial collection
      -> Edit serials
   -> Routing list
     - Save and preview routing list

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21590: change virtual shelf to list in send list email.
Barton Chittenden [Wed, 17 Oct 2018 19:29:22 +0000 (19:29 +0000)]
Bug 21590: change virtual shelf to list in send list email.

To test

1) Choose a public list from the 'lists' menu in the OPAC.
2) Click 'Send list'
3) Log in as necessary
4) Fill in your own email address
5) Click 'send'
6) Check your email, the sent email will contain the text
   "sent you from our online catalog, the virtual shelf called".

Apply patch, re-test. The email will now contain
   "sent you from our online catalog, the list called".

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21005: Address QA tool failures on tabs
Mark Tompsett [Wed, 17 Oct 2018 01:39:41 +0000 (01:39 +0000)]
Bug 21005: Address QA tool failures on tabs

Only whitespace changes.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21005: Missing row/column defaults cause unexpected results in report wizards
David Cook [Fri, 10 Aug 2018 08:08:13 +0000 (18:08 +1000)]
Bug 21005: Missing row/column defaults cause unexpected results in report wizards

Some report wizards are missing row/column defaults, which sometimes return blank
pages (borrowers_stats.pl) or results always equalling 0, which a non-discerning
user may interpret incorrectly.

If the DEBUG environmental variable is enabled, missing row/column choices will
actually cause fatal software errors as well, which is also undesirable for users.

This patch adds default choices for row and column on
report wizards that had no radio buttons selected, so that a user
can't submit the form without choosing a row and column. This
prevents errors.

To test:
1) Apply patch
2) Visit /cgi-bin/koha/reports/issues_avg_stats.pl
3) Visit /cgi-bin/koha/reports/borrowers_stats.pl
4) Visit /cgi-bin/koha/reports/catalogue_stats.pl
5) Visit /cgi-bin/koha/reports/issues_stats.pl
6) Observe that default choices for row/column are there

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20592: Return early in ModItem if nothing to update
Mark Tompsett [Tue, 17 Apr 2018 23:59:58 +0000 (23:59 +0000)]
Bug 20592: Return early in ModItem if nothing to update

Two lines of code and move them earlier.
Add a check to make sure there are changes.

Followed the test plan, both the _BEFORE_ and after do as described.

Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20592: Add tests
Jonathan Druart [Tue, 24 Apr 2018 18:53:02 +0000 (15:53 -0300)]
Bug 20592: Add tests

NOTE: It isn't really a test, but it does trigger
      the return line which was added to ModItem.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21277: (follow-up) fr-CA translation for notices in sample_notices.sql
Caroline Cyr La Rose [Fri, 19 Oct 2018 00:18:54 +0000 (20:18 -0400)]
Bug 21277: (follow-up) fr-CA translation for notices in sample_notices.sql

This follow-up patch adds fr-CA translation for the SR_SLIP notice.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21277: fr-CA translation for notices in sample_notices.sql
Caroline Cyr La Rose [Mon, 27 Aug 2018 14:46:12 +0000 (10:46 -0400)]
Bug 21277: fr-CA translation for notices in sample_notices.sql

This patch adds fr-CA translations for the following sample notices:

- ACCOUNT_PAYMENT
- ACCOUNT_WRITEOFF
- ACQORDER
- AR_CANCELED
- AR_COMPLETED
- AR_PENDING
- AR_PROCESSING
- AR_SLIP
- CANCEL_HOLD_ON_LOST
- CHECKOUT_NOTE
- MEMBERSHIP_EXPIRY
- PASSWORD_RESET

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21617: DBRev 18.06.00.042
Nick Clemens [Fri, 19 Oct 2018 16:50:40 +0000 (16:50 +0000)]
Bug 21617: DBRev 18.06.00.042

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21617: statistics.ccode is not long enough (see also DBRev 18.06.00.032)
Marcel de Rooy [Fri, 19 Oct 2018 08:51:05 +0000 (10:51 +0200)]
Bug 21617: statistics.ccode is not long enough (see also DBRev 18.06.00.032)

Warn from a test:
DBD::mysql::st execute failed: Data too long for column 'ccode' at row 1 [for Statement "INSERT INTO statistics
        (datetime,
         branch,          type,        value,
         other,           itemnumber,  itemtype, location,
         borrowernumber,  proccode,    ccode)
         VALUES (now(),?,?,?,?,?,?,?,?,?,?)" with ParamValues: 0="z8LIyIV", 1='issue', 2=undef, 3='', 4='2584', 5='E_QkzaV5Ay', 6='oDnFRZyog2CS2_XoUB_MB2sBxyI3elbFPC_AekxLPrduGTXKnlNoLKEdQrXzpAw5zD1pGbZshV9ydZup', 7='2000005168', 8='', 9='j9ZDn74omZAoZrTOdC4a05SpWRSHPR2apfss7y5V6QJuQnBEk32XWXCfMp7'] at C4/Stats.pm line 138.

The dbrev 18.06.00.032 did not change it from 10 to 80 as in other tables.

We should either truncate to 10 chars in Stats.pm or increase to varchar(80). Since it is varchar and not char, we should not be afraid about size. I choose for the latter here.

Test plan:
Run db rev.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21497: Correctly format dates for ILL requests in OPAC
Owen Leonard [Fri, 5 Oct 2018 12:50:26 +0000 (12:50 +0000)]
Bug 21497: Correctly format dates for ILL requests in OPAC

This patch updates the opac ILL template to use the $KohaDates plugin
for displaying dates. Also updated:

- Added "title-string" sorting to allow for correct sorting of dates in
  the table of requests.
- Corrected capitalization as per our capitalization rules.
- Added self-closing / to inputs as per coding guidelines.

To test, apply the patch and log in to the OPAC as a user who has
multiple outstanding ILL requests.

 - In the table of ILL requests, the "Request placed" and "Last updated"
   dates should be formatted according to your system's dateformat
   preference.
 - Sorting of those columns should work correctly.
 - View a request and confirm that "Request placed" and "Last updated"
   dates in this view are also formatted correctly.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18959: Skip xt/author/Text_CSV_Various.t if Text::CSV::Unicode missing
Tomas Cohen Arazi [Sat, 13 Oct 2018 12:17:00 +0000 (09:17 -0300)]
Bug 18959: Skip xt/author/Text_CSV_Various.t if Text::CSV::Unicode missing

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18959: Text::CSV::Unicode missing from dependencies
Tomas Cohen Arazi [Sat, 13 Oct 2018 12:15:52 +0000 (09:15 -0300)]
Bug 18959: Text::CSV::Unicode missing from dependencies

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21600: Use str param instead of dt for output_pref
Jonathan Druart [Thu, 18 Oct 2018 19:36:45 +0000 (16:36 -0300)]
Bug 21600: Use str param instead of dt for output_pref

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: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21600: /patrons should have timestamp/datetime values converted from rfc3339...
Tomas Cohen Arazi [Thu, 18 Oct 2018 18:50:27 +0000 (15:50 -0300)]
Bug 21600: /patrons should have timestamp/datetime values converted from rfc3339 into valid MySQL values

Bug 21597 enabled the option so set strict SQL modes in koha-conf.xml to
be able to improve Koha's comformance to current standards on DB
engines.

This causes lots of parts of Koha to fail because they rely on MySQL
fallbacks that are no longer default behaviours.

While we can workaround this by setting SQL modes on runtime, the
decision has been that this needs fixing.

This patch deals with the /patrons API failing to correctly convert
datetimes into valid SQL timestamps.

To test:
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/patrons.t
=> SUCCESS: Tests pass
- Add <strict_sql_modes>1</strict_sql_modes> on your koha-conf.xml
  $ sudo vim /etc/koha/sites/kohadev/koha-conf.xml
- Restart memcached and Plack:
  $ restart_all
- Run:
 k$ prove t/db_dependent/api/v1/patrons.t
=> FAIL: Tests fail due to updated_on and/or lastseen fields wrong
format (MySQL error)
- Apply this patch
- Run:
 k$ prove t/db_dependent/api/v1/patrons.t
=> SUCCESS: Tests pass! It all makes sense!
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21554: Add missing use statement in subscription-batchedit
Jonathan Druart [Fri, 12 Oct 2018 14:27:27 +0000 (11:27 -0300)]
Bug 21554: Add missing use statement in subscription-batchedit

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21475: Fix crash on missing default itemtype
Marcel de Rooy [Mon, 15 Oct 2018 12:01:14 +0000 (14:01 +0200)]
Bug 21475: Fix crash on missing default itemtype

Test plan:
Enable ArticleRequests.
Find book without itemtype (942c). Maybe you need this:
  update biblioitems set itemtype=NULL where biblionumber=[...]
Goto opac detail for that book. No crash anymore?

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20521: Use a specific config for strict sql modes
Jonathan Druart [Thu, 18 Oct 2018 14:07:02 +0000 (11:07 -0300)]
Bug 20521: Use a specific config for strict sql modes

To avoid disrupting testers and new developers it will be turned off by default.

We will turn it on for Jenkins so devs will have to take care of the
regressions they introduce (!)

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21597: Incorrect decimal value: 't_value_bib639' for column 'price'
Jonathan Druart [Wed, 17 Oct 2018 23:24:09 +0000 (20:24 -0300)]
Bug 21597: Incorrect decimal value: 't_value_bib639' for column 'price'

Fix t/db_dependent/selenium/basic_workflow.t

We want to send specific values depending on the data type in DB
For instance integer, or varchar(10)

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21597: Field 'description' doesn't have a default value
Jonathan Druart [Wed, 17 Oct 2018 22:26:32 +0000 (19:26 -0300)]
Bug 21597: Field 'description' doesn't have a default value

Nick proposed another fix, see bug 21594.
The interface does not explode so I do not think we should make a DB
update in a rush.

Fix t/db_dependent/Koha/Object.t and t/db_dependent/Koha/ApiKeys.t

api_keys.description and api_keys.secret:
  `secret` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,

    #   Failed test 'Exception is thrown correctly'
    #   at t/db_dependent/Koha/Object.t line 262.
    # expecting: Koha::Exceptions::Object::FKConstraint
    # found: DBIx::Class::Exception (DBIx::Class::Storage::DBI::_dbh_execute(): Field 'description' doesn't have a default value at /home/vagrant/kohaclone/Koha/Object.pm line 125
    # )
    # Looks like you planned 7 tests but ran 1.
    # Looks like you failed 1 test of 1 run.

and later, but not related:
Can't locate object method "message" via package
"DBIx::Class::Exception" at t/db_dependent/Koha/Object.t line 264.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21597: Incorrect date value: '0' for column 'onloan'
Jonathan Druart [Wed, 17 Oct 2018 22:21:56 +0000 (19:21 -0300)]
Bug 21597: Incorrect date value: '0' for column 'onloan'

Fix t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t

items.onloan
  `onloan` date DEFAULT NULL,

DBIx::Class::Storage::DBI::_dbh_execute(): Incorrect date value: '0' for
column 'onloan' at row 1 at /home/vagrant/kohaclone/t/lib/TestBuilder.pm
line 288

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21597: Data too long for column 'invitekey'
Jonathan Druart [Wed, 17 Oct 2018 22:18:58 +0000 (19:18 -0300)]
Bug 21597: Data too long for column 'invitekey'

Fix t/db_dependent/Virtualshelves.t

virtualshelfshares.invitekey
  `invitekey` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,

We should not insert a longer string!

DBIx::Class::Storage::DBI::_dbh_execute(): Data too long for column
'invitekey' at row 1 at /home/vagrant/kohaclone/Koha/Object.pm line 125

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21597: Field 'amount' doesn't have a default value
Jonathan Druart [Wed, 17 Oct 2018 22:11:29 +0000 (19:11 -0300)]
Bug 21597: Field 'amount' doesn't have a default value

Fix t/db_dependent/Accounts.t

Default value could be 0, or left as it.
It seems that the different initialisation we have in the code pass a
value for 'amount'

account_offsets.amount
  `amount` decimal(26,6) NOT NULL,

DBIx::Class::Storage::DBI::_dbh_execute(): Field 'amount' doesn't
have a default value at /home/vagrant/kohaclone/Koha/Object.pm line 125

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21597: Column 'notforloan' cannot be null
Jonathan Druart [Wed, 17 Oct 2018 22:07:20 +0000 (19:07 -0300)]
Bug 21597: Column 'notforloan' cannot be null

Fix t/db_dependent/Circulation.t

items.notforloan:
  `notforloan` tinyint(1) NOT NULL DEFAULT '0',

t/db_dependent/Circulation.t .. 115/119 DBD::mysql::st execute failed: Column 'notforloan' cannot be null [for Statement "UPDATE `items` SET `notforloan` = ? WHERE ( `itemnumber` = ? )" with ParamValues: 0=undef, 1='1046'] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1832.
        # No tests run!

    #   Failed test 'No tests run for subtest "item-level_itypes = 0"'
    #   at t/db_dependent/Circulation.t line 2356.
    # Looks like you failed 1 test of 2.

 #   Failed test 'CanBookBeIssued | notforloan'
 #   at t/db_dependent/Circulation.t line 2359.
Can't locate object method "rethrow" via package "DBD::mysql::st execute failed: Column 'notforloan' cannot be null [for Statement "UPDATE `items` SET `notforloan` = ? WHERE ( `itemnumber` = ? )" with ParamValues: 0=undef, 1='1046'] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1832.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21599: Fix item type creation by defining default values
Jonathan Druart [Thu, 18 Oct 2018 11:32:59 +0000 (08:32 -0300)]
Bug 21599: Fix item type creation by defining default values

Same as what we have in Koha::Patron->new, empty strings should not be
inserted in integer or date column type

DBD::mysql::st execute failed: Incorrect decimal value: '' for column 'defaultreplacecost' at row 1 [for Statement "INSERT INTO `itemtypes` ( `checkinmsg`, `checkinmsgtype`, `defaultreplacecost`, `description`, `hideinopac`, `imageurl`, `itemtype`, `notforloan`, `processfee`, `rentalcharge`, `searchcategory`, `sip_media_type`, `summary`) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" with ParamValues: 0="", 1="message", 2="", 3="xx", 4=0, 5='', 6="XX", 7=0, 8="", 9="", 10="", 11=undef, 12=""] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1832.

Test plan:
Create a new itemtype

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21598: 'koha_kohadev.aqbudgets.budget_parent_id' isn't in GROUP BY
Jonathan Druart [Wed, 17 Oct 2018 22:31:14 +0000 (19:31 -0300)]
Bug 21598: 'koha_kohadev.aqbudgets.budget_parent_id' isn't in GROUP BY

DBD::mysql::db selectall_hashref failed:
'koha_kohadev.aqbudgets.budget_parent_id' isn't in GROUP BY [for
Statement "

    at /home/vagrant/kohaclone/C4/Budgets.pm line 558.
and
    at /home/vagrant/kohaclone/C4/Budgets.pm line 565.

Test plan:
hit /cgi-bin/koha/admin/aqbudgets.pl

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21596: Handle empty string for lost when storing a patron
Jonathan Druart [Wed, 17 Oct 2018 23:02:12 +0000 (20:02 -0300)]
Bug 21596: Handle empty string for lost when storing a patron

lost - should default to 0 at DB level, not null
But let fix it as it for now

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21596: Handle empty string for other attributes when storing a patron
Jonathan Druart [Wed, 17 Oct 2018 23:01:47 +0000 (20:01 -0300)]
Bug 21596: Handle empty string for other attributes when storing a patron

lastseen, updated_on => dates
gonenoaddress, login_attempts, privacy_guarantor_checkouts => [tiny]int

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21596: Handle empty string for flags when storing a patron
Jonathan Druart [Wed, 17 Oct 2018 22:53:47 +0000 (19:53 -0300)]
Bug 21596: Handle empty string for flags when storing a patron

Incorrect integer value: '' for column 'flags'

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21596: Handle empty string for date_renewed when storing a patron
Jonathan Druart [Wed, 17 Oct 2018 22:51:50 +0000 (19:51 -0300)]
Bug 21596: Handle empty string for date_renewed when storing a patron

Incorrect date value: '' for column 'date_renewed'

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21593: Remove GROUP BY from GetAuthValueDropbox
Nick Clemens [Thu, 18 Oct 2018 10:05:38 +0000 (10:05 +0000)]
Bug 21593: Remove GROUP BY from GetAuthValueDropbox

With new MYSQL modes we are permitted only full group by.

In this case I don't think we need a GROUP BY at all

To test:
1 - Try to pay a fine or create a borrower
2 - Internal server error
3 - Apply patch
4 - Page should load
5 - Test various authorised values ot ensure they work
   e.g. Set bsort1 and bsort2 to have some authorised values with and
   without branch limits
   set PAYMENT_TYPE to have some values with and without branch limits

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20995: Add Request ID to table and request view
Andrew Isherwood [Tue, 26 Jun 2018 10:36:33 +0000 (11:36 +0100)]
Bug 20995: Add Request ID to table and request view

This patch adds the display of Request ID to the OPAC views of all a
user's requests and the individual request.

To test:

1) Ensure you have ILL enabled
2) Log into the OPAC as a user with at least one request
3) Go to the "your interlibrary loan requests" page
4) TEST: Ensure that Request ID is displayed as the first column in the
table
5) Click the "View" button on a request
6) TEST: Ensure that Request ID is displayed along with all the other
request information

Signed-off-by: mmg@interleaf.ie
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 20995: (QA follow-up) Add html filters and fix doubled up columns from merge

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21174: (follow-up) Removed MSG_IN_YOUR_CART and its usage in OPAC JS
Jonathan Druart [Tue, 9 Oct 2018 16:38:34 +0000 (13:38 -0300)]
Bug 21174: (follow-up) Removed MSG_IN_YOUR_CART and its usage in OPAC JS

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 21174: Removed MSG_IN_YOUR_CART and its usage in OPAC JS
Alex Buckley [Sun, 30 Sep 2018 16:22:10 +0000 (16:22 +0000)]
Bug 21174: Removed MSG_IN_YOUR_CART and its usage in OPAC JS

The 'Items in your cart' message is obsolete with the cart dropdown
box being removed.

Therefore the assignment of this text into the
MSG_IN_YOUR_CART variable (which is done in the opac-bottom.inc), and
the use of the MSG_IN_YOUR_CART variable in the updateBasket() function
(in the OPAC's basket.js) has been removed.

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
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 21174: Open the OPAC cart with one click by default
Alex Buckley [Sat, 29 Sep 2018 05:24:22 +0000 (05:24 +0000)]
Bug 21174: Open the OPAC cart with one click by default

Feedback from the Koha mailing list in Aug 2018 showed there was
widespread concensus for making the default behaviour of the OPAC cart
to be to open with one click, rather than clicking on the cart icon then
on the dropdown box to load the cart popup.

This commit is a combination of Owen Leonard's alternative patch
(slightly changing the markup in masthead.inc) and my
work to remove the dropdown elements from the template and basket.js

Test plan:
1. In Koha OPAC click on the cart icon (making sure to have items in the
   cart and the dropdown box 'Items in your cart:..' appears.

2. Click this dropdown and the cart popup appears.

3. Confirm you can successfully remove items from and empty the
   cart

4. Apply patch

5. Restart memcached, and plack

6. Click on the cart icon (making sure to have items in the cart) and
   notice no 'Items in your: ..' dropdown appears
   instead the cart popup loads straight away.

7. Confirm the items in your cart are displayed by the cart popup

8. Confirm you can remove items from/empty the cart, and that as you do
   this the number of cart items shown by the number to the right of the
   cart icon changes accordingly

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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 20351: Shortcut serials scripts if a blocking error appeared
Jonathan Druart [Tue, 8 May 2018 17:25:57 +0000 (14:25 -0300)]
Bug 20351: Shortcut serials scripts if a blocking error appeared

The idea of output_and_exit_if_error (added by bug 18403) is to make sure
parameters are valid before executing the script.
If not (old or broken URLs), we shortcut everything coming next to display a
generic error ("object does not exist", "you do not have permission to do that", etc.)

This bug report fixes the scripts under serials/*.

Test plan:
Hit the script under the serials directory with an invalid subscriptionid parameter
and confirm you get an error instead of the normal view with empty values.

The goal is not to be exhaustive during the first iteration, but at least to fix
the most common views.

For instance:
/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=XXX
/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=XXX
/cgi-bin/koha/serials/routing.pl?subscriptionid=XXX&op=new
/cgi-bin/koha/serials/subscription-add.pl?op=modify&subscriptionid=XXx
/cgi-bin/koha/serials/subscription-add.pl?op=dup&subscriptionid=XXX

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20521: Enable problematic SQL modes for dev installs
Jonathan Druart [Wed, 4 Apr 2018 19:28:53 +0000 (16:28 -0300)]
Bug 20521: Enable problematic SQL modes for dev installs

So far we have bug 17258 (omnibus to list the issue we have with the new
default SQL modes), bug 20144 (which fixed our test suite with these
modes) and bug 20229.
This last one forces the SQL modes to avoid to modify the DBMS
configuration and define the SQL modes we support.

We should let developers catch the issues and report/fix them.
Also Jenkins must alert us if there is a regression with the test suite.

I suggest to enable the problematic SQL modes on dev installs.

Test plan:
- Revert commit 0180524bb9b1464c441bb1b858d0d8df37524d72
- prove t/db_dependent/Koha/Biblios.t

=> If you have dev_install defined in your Koha config file, the test
will fail with "Field 'datecreated' doesn't have a default value"
=> If you do not have dev_install, the tests will pass

NOTE: The commit number was wrong. Using
    git log -- t/db_dependent/Koha/Biblios.t
    This showed bug 20176 which was 524eab678833b2719187e67128ee4f83a2a48ba4
    Also dev_install was in koha_conf.xml already, so I just had to
    toggle 0 and 1.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21513: Add a 'Cancel' button to the authority editor and remove duplicate 'Save...
Andreas Roussos [Sun, 7 Oct 2018 18:00:09 +0000 (21:00 +0300)]
Bug 21513: Add a 'Cancel' button to the authority editor and remove duplicate 'Save' button

The authority editor (authorities/authorities.pl) does not have
a 'Cancel' button. Also, it has two 'Save' buttons.

This patch fixes that by:
a) adding a 'Cancel' button to the floating toolbar at the top
b) removing the 'Save' button from the bottom of the page

Test plan:
1) Go to Home > Authorities and launch the authority editor by
   clicking on 'New authority'. Notice how the editor doesn't
   have a 'Cancel' button. Also notice the two 'Save' buttons.
2) Apply the patch.
3) Re-launch the authority editor, and hit cancel; you should
   be taken back to Home > Authorities.
4) Edit an existing authority, and hit cancel; you should be
   taken back to the details page for the authority you chose.
5) Edit an authority as new (duplicate), and hit cancel; you
   should be taken back to Home > Authorities (this behaviour
   is mimicking the bibliographic editor: when duplicating a
   biblio the 'Cancel' button will take you back to Home >
   Cataloging).

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 14786: Use MARC istead of ISO2709 everywhere
Katrin Fischer [Sun, 12 Aug 2018 15:08:57 +0000 (17:08 +0200)]
Bug 14786: Use MARC istead of ISO2709 everywhere

This patch changes the term ISO2709 in the templates to use
MARC instead.

Test plan:
- The term was changed on the following pages in staff:
  - Advanced catalouging editor > Save to catalog
  - Patron account > Check out (Activate ExportCircHistory) > Format
  - Patron account > Check out > Help page
  - Lists > Download list
  - Acquisitions > Add order to basket > From a staged file (breadcrumbs)
  - Administration > System preferences > ExportRemoveFields
  - Cart > Download
  - Tools > Export data > Output format

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 21456: (QA follow-up) Catch missed case in authorities merge
Martin Renvoize [Mon, 8 Oct 2018 14:25:50 +0000 (15:25 +0100)]
Bug 21456: (QA follow-up) Catch missed case in authorities merge

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21456: The 'New authority' button lists authority types inconsistently
Andreas Roussos [Sun, 30 Sep 2018 10:06:28 +0000 (13:06 +0300)]
Bug 21456: The 'New authority' button lists authority types inconsistently

The 'New authority' button does not always list the available
authority types in A-Z order based on their description.

This patch fixes that.

Test plan:
1) Go to Home > Authorities in the staff client; notice how the
   'New authority' button lists auth types sorted by description.
2) Go to an authority's detail page; notice how the same 'New
   authority' button will list auth types sorted by their code.
3) Apply the patch.
4) In an authority's detail page, the 'New authority' button will
   now list the available authority types sorted by description.

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 21439: Update two-column templates with Bootstrap grid: Rotating collections
Owen Leonard [Thu, 3 May 2018 12:58:36 +0000 (12:58 +0000)]
Bug 21439: Update two-column templates with Bootstrap grid: Rotating collections

This patch modifies rotating collections templates to use the
Bootstrap grid instead of YUI.

To test, apply the patch and view the following pages, confirming that
they look correct at various browser widths:

 - Tools -> Rotating collections
   - View rotating collection
   - Transfer rotating collection
   - Edit rotating collection

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 21490: Disambiguation of 'Order' part 2
Caroline Cyr La Rose [Thu, 4 Oct 2018 18:52:53 +0000 (14:52 -0400)]
Bug 21490: Disambiguation of 'Order' part 2

This patch changes the 'Order' term in neworderbiblio.tt,
newordersubscription.tt, newordersuggestion.tt, and
z3950_search.tt for 'Place order'.

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 21490: Disambiguation of 'Order'
Caroline Cyr La Rose [Thu, 4 Oct 2018 18:38:25 +0000 (14:38 -0400)]
Bug 21490: Disambiguation of 'Order'

This patch changes the 'Order' term in marc_modification_template.tt
for 'Rank'.

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 16754: Use validation plugin in budgets, planning, and contracts
Owen Leonard [Thu, 16 Jun 2016 13:28:01 +0000 (09:28 -0400)]
Bug 16754: Use validation plugin in budgets, planning, and contracts

This patch removes the custom javascript form validation from three
templates: Budgets, budget planning, and contracts. Validation via the
validation plugin is done instead.

This patch also removes use of event attributes like onclick and
onchange. Also changed: I added the "Required" text next to required
fields as necessary.

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

- Test the budget creation process for adding, editing, and duplicating
  budgets. In all cases:
  - The start date and end date should be required
  - You should be warned if you enter an end date which falls before the
    start date.
  - The description should be required
  - The budget amount should be required to be a number

To test the budget planning page:

Note that much of the JS removed from this template was unused. It
looked for inputs by the name 'est_total' which don't exist.

- When viewing the table of funds for a budget, select a choice from the
  'planning' toolbar menu.
  - Verify that after entering a numeric value in any cell, the
    'remaning' value at the end of the row is correctly updated.
  - Verify that after entering non-numeric data an error is displayed.
  - Verify that clicking the 'auto-fill' button at the end of the row
    works to fill any empty or zero-value fields with the remaning funds
    available.

To test the vendor contracts page:

- Go to Acquisitions -> Vendor -> Contracts
- Add or edit a contract
  - Confirm that name, start date, and end date are required.
  - Confirm that you are warned if you enter an end date which falls
    before the start date.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21583: Don't use Asset.js for external script files
Nick Clemens [Tue, 16 Oct 2018 17:09:29 +0000 (17:09 +0000)]
Bug 21583: Don't use Asset.js for external script files

To test:
1 - Enable Novelist in staff client:
    NovelistSelectStaffEnabled: Add
    NovelistSelectStaffProfile: anything
    NovelistSelectPassword: anything
    ( these don't need to be valid, just not blank )
2 - Pull up a record detail page in staff client
3 - View page source - search for ns2init.js
4 - You won't find it
5 - Apply patch
6 - Reload details
7 - Search page source for ns2init.js
8 - It loaded! Huzzah!

Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21579: Make showdiffmarc.pl work for authorities and biblios
Nick Clemens [Tue, 16 Oct 2018 14:00:59 +0000 (14:00 +0000)]
Bug 21579: Make showdiffmarc.pl work for authorities and biblios

To test:
 1 - Have or make some authority records
 2 - Have or make an authority matching rule
 3 - Export your authrotities
 4 - Import them using the matching rule
 5 - On the 'Manage staged records' page view some diffs
 6 - The import record is correct, but the existing records pull form
 bibs
 7 - Apply patch
 8 - Repeat
 9 - Confirm you see the expected authority matches

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marjorie Vila <marjorie.barry-vila@collecto.ca>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21155: Prevent SwitchOnSiteCheckouts.t to fail randomly
Jonathan Druart [Tue, 16 Oct 2018 13:27:37 +0000 (10:27 -0300)]
Bug 21155: Prevent SwitchOnSiteCheckouts.t to fail randomly

 #   Failed test 'The date_due should have been set depending on the circ
 rules when the on-site checkout has been switched'
 #   at t/db_dependent/Circulation/SwitchOnSiteCheckouts.t line 126.
 #          got: '2018-10-16T23:59:00'
 #     expected: '2018-10-21T23:59:00'

TestBuilder set date to today, so issuingrules.harduedate will be set to
today.
issuingrules.hardduedatecompare will be set to an integer.
If set to 0, $datedue will be reset to the hard due date

The call stack is: AddIssue > CalcDateDue > GetHardDueDate

In GetHardDueDate:
3509         if ( $hardduedatecompare == 0 || $hardduedatecompare == $cmp ) {
3510             $datedue = $hardduedate->clone;
3511         }

To fix this random failure we need to set issuingrules.harduedate to undef.

Test plan:
0. Do not apply this patch
1. Modify the test to set hardduedatecompare to 0 (search 'my $issuingrule = ')
2. Execute the test and confirm the failure
3. Apply this patch
4. Execute the test and confirm the it is no longer failing

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21552: Use raw filter for displaying RoutingListNote
Katrin Fischer [Tue, 9 Oct 2018 12:22:35 +0000 (12:22 +0000)]
Bug 21552: Use raw filter for displaying RoutingListNote

The RoutingListNote system preference works like other prefs
allowing you to insert your own content on the routling list
template using HTML. The default text even uses HTML, so it
looks broken without this patch.

To test:
- Add a subscription
- Add a new routing list to it
- Add some patrons to it
- Save
- preview routing list
- Verify that the note shows and is formatted correctly.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21542: Use modal and password field for overdrive password
Nick Clemens [Wed, 10 Oct 2018 15:53:13 +0000 (15:53 +0000)]
Bug 21542: Use modal and password field for overdrive password

To test:
 1 - Enabled Overdrive and fill all preferences
 2 - Make sure OverDrivePasswordRequired is true
 3 - Go to opac account
 4 - Log in to overdrive
 5 - Note the input is shown
 6 - Apply patch
 7 - Repeat
 8 - Note popup is now a modal
 9 - Note password is now hidden
10 - Confirm overdrive integration works as before

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21479: "Mock" SearchEngine to use Zebra
Jonathan Druart [Mon, 15 Oct 2018 17:53:35 +0000 (14:53 -0300)]
Bug 21479: "Mock" SearchEngine to use Zebra

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21337: Koha::Objects->delete must return the number of deleted rows
Jonathan Druart [Mon, 15 Oct 2018 17:38:14 +0000 (14:38 -0300)]
Bug 21337: Koha::Objects->delete must return the number of deleted rows

To follow DBIC behaviour

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21479: Zebra index can return different result
Jonathan Druart [Mon, 15 Oct 2018 14:42:34 +0000 (11:42 -0300)]
Bug 21479: Zebra index can return different result

If the zebra index has been rebuilt by previous tests, the order/results
will be different, and we will not have biblionumber 1, 3, 5

Let make this more flexible

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18480: Get rid of unwanted / distracting link in patron search for fund owner
Owen Leonard [Mon, 13 Aug 2018 13:55:31 +0000 (13:55 +0000)]
Bug 18480: Get rid of unwanted / distracting link in patron search for fund owner

This patch modifies templates where a pop-up window is used to display
patron search results. A link has been added to the patron name which
triggers a modal window displaying more details about that patron. With
each page in the test plan, check that clicking linked names in search
results triggers a modal with the correct data.

 - Acquisitions -> Vendor -> View basket -> Add user
 - Acquisitions -> Vendor -> Add to basket -> From a new (empty) record
   -> Add user
 - Acquisitions -> Funds -> Edit fund -> Select owner
 - Tools -> Patron card creator -> Manage -> Card batches -> Edit -> Add
   patrons
 - Serials -> Subscription -> Edit routing list -> Add recipients

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21337: (RM follow-up) Adjust number of tests
Nick Clemens [Mon, 15 Oct 2018 14:14:37 +0000 (14:14 +0000)]
Bug 21337: (RM follow-up) Adjust number of tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21337: (QA follow-up) Rollback for partial delete
Marcel de Rooy [Mon, 1 Oct 2018 07:52:21 +0000 (09:52 +0200)]
Bug 21337: (QA follow-up) Rollback for partial delete

Puts delete loop in a txn_do.
Raises Koha::Exceptions::Patron::Delete when Patron->delete does not return
true (like 0 or -1).
Unit test adjusted accordingly.

Note: A follow-up report for raising exceptions in Object->delete could well
be considered. Not here please.

Test plan:
Run t/db_dependent/Koha/Patrons.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21337: (follow-up) Add parameter for move_to_deleted action
Marcel de Rooy [Thu, 13 Sep 2018 10:26:57 +0000 (12:26 +0200)]
Bug 21337: (follow-up) Add parameter for move_to_deleted action

For consistency, it would be better to make the move optional.

Test plan:
Run again t/db_dependent/Koha/Patrons.t.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Michal Denar <black23@gmail.com>
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 21337: Add Koha::Patrons->delete (trivial wrapper)
Marcel de Rooy [Wed, 12 Sep 2018 13:49:45 +0000 (15:49 +0200)]
Bug 21337: Add Koha::Patrons->delete (trivial wrapper)

Adds Koha::Patrons->delete as wrapper around Koha::Patron->delete. We do
not want to bypass Koha::Patron and let DBIx do the job without further
housekeeping. A call to move_to_deleted is included now, but could be
made optional with a parameter if needed.

Test plan:
Run t/db_dependent/Koha/Patrons.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Michal Denar <black23@gmail.com>
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 21409: Add column configuration to course reserves
Owen Leonard [Tue, 25 Sep 2018 18:40:28 +0000 (18:40 +0000)]
Bug 21409: Add column configuration to course reserves

This patch adds columns configuration and print/export options to two
tables: The table listing courses and the table listing titles reserved
for a course.

To test you should have more than one course and multiple title reserved
for at least one course.

- Apply the patch and go to Course reserves
  - In the table of courses, confirm that all DataTables controls work
    correctly: paging, filter, column visibility, export, etc.
  - View a course with multiple titles reserved. Test all DataTables
    controls on this table too.
- Go to Administration -> Columns settings
  - Change the settings for the courses and reserves table and confirm
    that these changes are applied correctly.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15139: Add non-public item notes to overdue report
Katrin Fischer [Sat, 11 Aug 2018 18:47:23 +0000 (18:47 +0000)]
Bug 15139: Add non-public item notes to overdue report

Sometimes libraries want to see internal notes on the overdue
reports page, this patch adds the notes.

Additional fixes:
- Library column was always empty, now library displays
- Replacement price was not formatted according to CurrencyFormat

To test:
- Make sure you have some overdue issues in your system
- Circulation > Overdues report
- Make sure everything displays as it should
  - Verify internal item note shows
  - Verify price is correctly formatted (syspref CurrencyFormat)
  - Library shows
- Download list of overdues
  - Verify the new column displays

Signed-off-by: Spencer <ssmith3@mckinneytexas.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended patch: remove the branchcode line, added on its own bug report,
see bug 21463

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21550: DataTables four button pagination uses the wrong icon for disabled buttons
Owen Leonard [Thu, 11 Oct 2018 15:59:13 +0000 (15:59 +0000)]
Bug 21550: DataTables four button pagination uses the wrong icon for disabled buttons

This patch modifies the DataTables CSS which styles "full_nubmers"
controls which are disabled: First and Previous buttons on the first
page of results, Next and Last buttons on the last page of results.
These buttons should have gray icons instead of blue.

To test, apply the patch and clear your browser cache if necessary. View
a page which uses a "full_numbers" DataTables configuration, e.g.

- Administration -> Cities
- ILL requests -> List requests
- Circulation -> Holds to pull

Confirm that buttons in their disabled state have a gray icon and text
instead of blue.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21115: Add multi_param call and add divider in cache key in svc/report and opac...
Marcel de Rooy [Wed, 25 Jul 2018 12:37:59 +0000 (14:37 +0200)]
Bug 21115: Add multi_param call and add divider in cache key in svc/report and opac counterpart

Resolve things like:
CGI::param called in list context from package CGI::Compile::ROOT::usr_share_koha_prodclone_opac_svc_report line 42, this can lead to vulnerabilities. See the warning in "Fetching the value or values of a single named parameter" at /usr/share/perl5/CGI.pm line 436.

The cache key in both script looks like:
    opac:report:id:602018
but should for consistency be:
    opac:report:id:60:2018
Note: The 2018 here is part of the sql_params and should not be
concatenated to the report id.

Test plan:
Do not yet apply this patch.
Make a report public, set cache to 300 secs.
Check its output with opac/svc/report.
Check for the warn in your log.
Apply the patch, restart Plack and flush cache.
Check opac/svc/report.
Modify your report; e.g. add a simple string to the SELECT.
Check opac/svc/report. You should still see cached output.
Flush the cache.
Check opac/svc/report. You should now see the added text.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested also by clearing individual keys with $cache->clear_from_cache.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21291: (follow-up) Pass subscriptionsnumber to all tools in staff detail's sidebar
Blou [Thu, 4 Oct 2018 17:00:08 +0000 (13:00 -0400)]
Bug 21291: (follow-up) Pass subscriptionsnumber to all tools in staff detail's sidebar

The subscriptionsnumber is required in biblio-view-menu.inc to display
the Subscription(s) tab. In detail.pl, if you click any of

Labeled MARC  (you need to set the syspref viewLabeledMARC)
Hold(s)
Article requests
Checkout history
Modification log
Rota          (you need to set the syspref StockRotation)

you lose the Subscription(s) tab.

This patch fixes the display by having each feature script generate that
value to be passed to the UI. I keep this separated from the first patch
since it's not exactly the same issue, and the solution might not
please.

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 21291: request-article.pl doesn't show MARC, LabeledMARC and ISBD in sidebar
Blou [Thu, 30 Aug 2018 14:33:44 +0000 (10:33 -0400)]
Bug 21291: request-article.pl doesn't show MARC, LabeledMARC and ISBD in sidebar

When on a detailed record in the intranet, any click on the sidebar
will lead you to another page with the same sidebar EXCEPT for "Article
requests".

When clicking on article requests, you get a new sidebar without
MARC
Labeled MARC
ISBD

This fix adds the required C4::Biblio::enabled_staff_search_views that
loads the required hash with the permissions.

TEST
0) login with a user having all rights
1) go to any detailed notices, notice the sidebar on the left
2) click on MARC
3) notice the sidebar is the same in the new page
4) click on Request articles
5) notice the missing labels on the sidebar
6) apply patch, redo steps

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 20131: Inventory optional filters correct "For loan" addition
Fridolin Somers [Fri, 2 Feb 2018 13:34:34 +0000 (14:34 +0100)]
Bug 20131: Inventory optional filters correct "For loan" addition

In inventory, optional filters are build from authorize values categories used for items.notforloan, items.itemlost, items.withdrawn and items.damaged.

The bug is that description of value 0 is always "For loan".
This seems to be only for "notforloan".

Second bug is that if a description exists for "notforloan" value 0, it is not used.

This patch corrects by adding "For loan" only for "notforloan" authorized values and if there is no 0 value.
It changes the description added by code from "ignore" to a more unlikly user defined "__IGNORE__".

Test plan:
1) Make sure you have authorized values defined on items.notforloan, say "NFL" category, with at least a value and description but no 0 value
2) Make sure you have authorized values defined on items.itemlost, say "LOST" category, with 0 = "Not lost" and 1 = "Lost"
3) Go to inventory /cgi-bin/koha/tools/inventory.pl
4) Without patch you see "For loan" on both items.notforloan and items.itemlost
5) With patch you see "For loan" only in items.notforloan, you see for items.itemlost : "Not lost" and "Lost"
6) Create in authorized values category "NFL" a value 0 with description "Available"
7) Go to inventory /cgi-bin/koha/tools/inventory.pl
8) Without patch you see "For loan" in items.notforloan for value 0
9) With patch you see "Available" in items.notforloan for value 0

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18655: Correct the choose link in unimarc_field_210c value builder
Baptiste Wojtkowski [Tue, 23 May 2017 08:54:00 +0000 (08:54 +0000)]
Bug 18655: Correct the choose link in unimarc_field_210c value builder

- Link 'choose' is now a button.
- It doesn't call directly javascript anymore (use of listener).
- field to load stored in html on the page (less escaping needed).

Test plan :
1) Use UNIMARC catalog
2) Define unimarc_field_210c value builder on 210$c
3) Define an autority type EDITORS with heading on 200$b
4) Create an autority of this type with a single quote in heading, ie : l'avenir
5) Index this new autority
6) Edit a biblio record and launch 210$c value builder
7) Search for new autority
8) Click on 'Choose'
=> Heading should be pasted in 210$c

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21113: Corrections to patron merge confirmation prompt
Martin Renvoize [Mon, 8 Oct 2018 10:47:15 +0000 (11:47 +0100)]
Bug 21113: Corrections to patron merge confirmation prompt

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21351: Rename the Taiwanese language pack to use correct file name
Margaret Hade [Fri, 21 Sep 2018 19:41:52 +0000 (12:41 -0700)]
Bug 21351: Rename the Taiwanese language pack to use correct file name

The words "Han (Simplified variant)" is appearing in the language name because the file is titled "zh-Hans-TW" when it should be titled "zh-Hant-TW". The database is set up to use "Hant" but it just incorrectly named.

Test plan
1. Apply patch.
2. Install zh-Hant-TW on your Koha server.
3. Navagate to I18N/L10N preferences and confirm that the english text description states (Traditional variant).

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Files on translate.kc.org have already been fixed by Bernardo.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21537: Fix typo for options_for_item_types
Nick Clemens [Wed, 10 Oct 2018 15:02:14 +0000 (15:02 +0000)]
Bug 21537: Fix typo for options_for_item_types

To test:
 0 - Set UseACQFrameworkForBiblioRecords to 'Use'
 1 - Define a subfield in the ACQ framework linked to authorised value
 'itemtypes'
 2 - Make sure that field is visible
 3 - Create a purchase suggestion
 4 - Accept it
 5 - Go to Acquisitions
 6 - Find a vendor with an open basket, or create one
 7 - Add to the basket using a suggestion
 8 - Choose the suggestion
 9 - Internal server error
10 - Apply patch
11 - Place order form a suggestion again
12 - Confirm that the field linked to itemtypes shows correctly

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21365: Call BiblioAutoLink from AddBiblio and ModBiblio
Ere Maijala [Sun, 16 Sep 2018 22:13:55 +0000 (01:13 +0300)]
Bug 21365: Call BiblioAutoLink from AddBiblio and ModBiblio

This makes e.g. the advanced MARC editor, and anything that uses AddBiblio or
ModBiblio honor BiblioAddsAuthorities.

To test:
1. Make sure BiblioAddsAuthorities and AutoCreateAuthorities preferences are enabled.
2. Add a new record using advanced editor (enable EnableAdvancedCatalogingEditor to
use it), include a previously non-existing author.
3. Save the record and observe the author get an authority number.
4. Add another author, save the record and make sure it also gets an authority number.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21279: Fix &nbsp; in transport cost matrix
Marcel de Rooy [Wed, 10 Oct 2018 11:43:40 +0000 (13:43 +0200)]
Bug 21279: Fix &nbsp; in transport cost matrix

Test plan:
On Home › Administration › Transport cost matrix you should no longer
see "&nbsp;".
Fill some values and save, you should see the correct values.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19687: (RM follow-up) Export correct function name
Nick Clemens [Mon, 15 Oct 2018 13:07:11 +0000 (13:07 +0000)]
Bug 19687: (RM follow-up) Export correct function name

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19687: Undefined subroutine in bulkmarcimport
David Gustafsson [Wed, 26 Sep 2018 15:25:44 +0000 (17:25 +0200)]
Bug 19687: Undefined subroutine in bulkmarcimport

Bulkmarcimport produces undefined subroutine error for
C4::Items::TransformMarcToKoha and C4::Items::GetMarcStructure
probably caused by mutually recursive modules. Put exports in
BEGIN clause before all the other imports.

To test:
1) Run bulkmarcimport.pl before applying patch and verify
that undefined subroutine error occurs
2) Apply patch
3) Run bulkmarcimport.pl again and verify that no errors are
produced

Sponsored-by: Gothenburg University Library
Signed-off-by: George Veranis <gveranis@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21320: Holds to pull should honor syspref AllowHoldsOnDamagedItems
Dobrica Pavlinusic [Thu, 6 Sep 2018 11:21:53 +0000 (13:21 +0200)]
Bug 21320: Holds to pull should honor syspref AllowHoldsOnDamagedItems

Test plan:

1. Set syspref AllowHoldsOnDamagedItems to Allow
2. Create a hold on record with item which is damaged
3. Verify that it doesn't appear in report
4. Apply patch and verify that it's now visible

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 10382: Course reserves: handle empty values
Alex Arnaud [Wed, 21 Feb 2018 13:10:50 +0000 (13:10 +0000)]
Bug 10382: Course reserves: handle empty values

Test Plan:
1) Create an item, do not set a collection code
2) Add the item to a course, and choose to set a collection code
3) Ensure the course is enabled, and the collection code is now visible
4) Disable the course, ensure the collection code is no longer visible

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 10382: Add unit tests for course items
Alex Arnaud [Thu, 9 Mar 2017 13:42:04 +0000 (13:42 +0000)]
Bug 10382: Add unit tests for course items

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 10382: collection not returning to null when removed from course reserves
Kyle M Hall [Wed, 5 Jun 2013 14:01:17 +0000 (10:01 -0400)]
Bug 10382: collection not returning to null when removed from course reserves

Test Plan:
1) Create an item, do not set a collection code
2) Add the item to a course, and choose to set a collection code
3) Ensure the course is enabled, and the collection code is now visible
4) Disable the course, ensure the collection code is no longer visible

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20797: (QA follow-up) Fix ill requests table
Katrin Fischer [Fri, 5 Oct 2018 12:18:11 +0000 (12:18 +0000)]
Bug 20797: (QA follow-up) Fix ill requests table

... by adding a missing comma.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 20797: (follow-up) Conditionally link
Andrew Isherwood [Thu, 7 Jun 2018 10:14:50 +0000 (11:14 +0100)]
Bug 20797: (follow-up) Conditionally link

We don't want to display the link to the biblio if the biblio_id is null

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 20797: Add link to biblio detail view from ILL detail view
Andrew Isherwood [Wed, 23 May 2018 11:26:25 +0000 (12:26 +0100)]
Bug 20797: Add link to biblio detail view from ILL detail view

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 17084: Automatic debian/control updates (unstable/master)
Mirko Tietgen [Thu, 11 Oct 2018 14:21:41 +0000 (16:21 +0200)]
Bug 17084: Automatic debian/control updates (unstable/master)

I added libwebservice-ils-perl 0.17 to the repository, so it
goes into debian/control too.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 20772: (QA follow-up) 'readonly' is a boolean
Tomas Cohen Arazi [Sat, 13 Oct 2018 11:05:34 +0000 (08:05 -0300)]
Bug 20772: (QA follow-up) 'readonly' is a boolean

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 20772: DBRev 18.06.00.041
Tomas Cohen Arazi [Sat, 13 Oct 2018 10:47:12 +0000 (07:47 -0300)]
Bug 20772: DBRev 18.06.00.041

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 20772: (follow-up) Add unit test
Andrew Isherwood [Mon, 8 Oct 2018 16:48:39 +0000 (17:48 +0100)]
Bug 20772: (follow-up) Add unit test

Add unit test for price_paid

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 20772: (QA follow-up) Add a missing html filter
Katrin Fischer [Fri, 5 Oct 2018 11:38:26 +0000 (13:38 +0200)]
Bug 20772: (QA follow-up) Add a missing html filter

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 20772: (follow-up) Fix DB updates and templates
Andrew Isherwood [Fri, 5 Oct 2018 10:56:31 +0000 (11:56 +0100)]
Bug 20772: (follow-up) Fix DB updates and templates

Carry out changes requested in commenbt #27

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 20772: Bug preventing backend JS execution
Barry Cannon [Tue, 24 Jul 2018 14:56:30 +0000 (15:56 +0100)]
Bug 20772: Bug preventing backend JS execution

We should be 'PROCESS'ing any backend JS, not 'INCLUDE'ing it

Signed-off-by: Barry Cannon <bc@interleaf.ie>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 20772: Display and edit of price_paid
Andrew Isherwood [Mon, 21 May 2018 09:40:59 +0000 (10:40 +0100)]
Bug 20772: Display and edit of price_paid

Signed-off-by: Barry Cannon <bc@interleaf.ie>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 20772: Return cost & price_paid in API
Andrew Isherwood [Thu, 17 May 2018 10:36:50 +0000 (11:36 +0100)]
Bug 20772: Return cost & price_paid in API

Signed-off-by: Barry Cannon <bc@interleaf.ie>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 20772: Fix malformed class name
Andrew Isherwood [Thu, 17 May 2018 10:29:49 +0000 (11:29 +0100)]
Bug 20772: Fix malformed class name

Supplier metadata elements have a dynamically formed class name, part of
the name is formed from the metadata key, this breaks if the key has a
space, so we replace spaces

Signed-off-by: Barry Cannon <bc@interleaf.ie>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 20772: Borrowernumber should be read only
Andrew Isherwood [Thu, 17 May 2018 09:58:02 +0000 (10:58 +0100)]
Bug 20772: Borrowernumber should be read only

On the Manage Request page, borrowernumber should be read only, we do
not want users modifying the destination user once a request is placed

Signed-off-by: Barry Cannon <bc@interleaf.ie>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 20772: Add 'illrequest.price_paid'
Andrew Isherwood [Thu, 17 May 2018 09:47:52 +0000 (10:47 +0100)]
Bug 20772: Add 'illrequest.price_paid'

This patch adds a 'price_paid' column to 'illrequests'

Signed-off-by: Barry Cannon <bc@interleaf.ie>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 20772: Add 'illrequestattributes.readonly'
Andrew Isherwood [Thu, 17 May 2018 08:22:03 +0000 (09:22 +0100)]
Bug 20772: Add 'illrequestattributes.readonly'

This patch adds a 'readonly' column to illrequestattributes. On a DB
upgrade it also populates all existing rows with 1, indicating 'read
only'

Signed-off-by: Barry Cannon <bc@interleaf.ie>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 21178: (QA follow-up) Add a test to verify that the hash is correct
Julian Maurice [Fri, 5 Oct 2018 15:18:57 +0000 (17:18 +0200)]
Bug 21178: (QA follow-up) Add a test to verify that the hash is correct

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 21178: (QA follow-up) whitespace characters fix
Tomas Cohen Arazi [Fri, 14 Sep 2018 23:15:13 +0000 (16:15 -0700)]
Bug 21178: (QA follow-up) whitespace characters fix

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>