]> git.koha-community.org Git - koha.git/log
koha.git
6 years agoBug 20205: Add IDs to buttons in patron-toolbar.inc
Magnus Enger [Thu, 15 Feb 2018 09:14:56 +0000 (10:14 +0100)]
Bug 20205: Add IDs to buttons in patron-toolbar.inc

The buttons in patron-toolbar.inc lack unique IDs, making them
hard to style/remove with CSS. This patch adds IDs to all three
buttons.

To test:
- Look in koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc
  and verify there are no IDs
- Apply the patch and look at the file again to verify the IDs have
  been added
- Test the "New patron" and "Quick add new patron" buttons to verify
  they still work as intended
- Check that the new buttons are globally unique:
  $ grep -rn "new-patron-button" *
  $ grep -rn "patron-lists-button" *

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 20185: Remove warnings from stats.print.pl
Jonathan Druart [Mon, 12 Feb 2018 18:37:18 +0000 (15:37 -0300)]
Bug 20185: Remove warnings from stats.print.pl

This needs a full rewrite!

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20185: Remove warnings from aqplan.pl
Jonathan Druart [Mon, 12 Feb 2018 16:58:28 +0000 (13:58 -0300)]
Bug 20185: Remove warnings from aqplan.pl

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20182: [sql_modes] Remove group by clause in search_patrons_to_anonymise
Jonathan Druart [Mon, 5 Feb 2018 20:06:55 +0000 (17:06 -0300)]
Bug 20182: [sql_modes] Remove group by clause in search_patrons_to_anonymise

Not trivial, more attention needed on this one!

Fix for:
'koha_kohadev.me.cardnumber' isn't in GROUP BY

Looks like the query is complexified, perf tests needed, see bug 19599.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20176: [sql_modes] Set biblio.datecreated to NOW if not defined
Jonathan Druart [Mon, 5 Feb 2018 18:59:09 +0000 (15:59 -0300)]
Bug 20176: [sql_modes] Set biblio.datecreated to NOW if not defined

Fix at ->store level, this issue appears in lot of places.

Fix for:
Field 'datecreated' doesn't have a default value

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 12904: Add KOHA_VERSION to few more .css
Jonathan Druart [Fri, 16 Feb 2018 15:58:34 +0000 (12:58 -0300)]
Bug 12904: Add KOHA_VERSION to few more .css

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20193: Path to Greybox CSS broken after Bug 12904
Owen Leonard [Wed, 14 Feb 2018 14:12:00 +0000 (14:12 +0000)]
Bug 20193: Path to Greybox CSS broken after Bug 12904

Bug 12904 changed the way CSS and JS assets should be linked, but the
Greybox CSS path wasn't changed in the process. This patch adds the
required VERSION template variable to greybox.inc.

To test, apply the patch and test usage of Greybox in the staff client.
For instance:

- Go to Tools -> Labels -> Manage -> Label batches
- Select a batch for export and click the 'Export selected' button
- A Greybox modal should be triggered, and the export process should
  proceed correctly.

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 20191: Use find with unique key combination
Jonathan Druart [Fri, 16 Feb 2018 15:12:00 +0000 (12:12 -0300)]
Bug 20191: Use find with unique key combination

To prevent unexpected issues later.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20191: Make OAI/Server.t tests use timestamps from the DB
Tomas Cohen Arazi [Thu, 15 Feb 2018 17:14:18 +0000 (14:14 -0300)]
Bug 20191: Make OAI/Server.t tests use timestamps from the DB

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20221: Fix for JavaScript error during checkout patron search
Owen Leonard [Thu, 15 Feb 2018 19:43:39 +0000 (19:43 +0000)]
Bug 20221: Fix for JavaScript error during checkout patron search

This patch fixes a bug caused by the changes in Bug 19641. JavaScript
embedded in circ-patron-search-results.inc executes before jQuery is
loaded.

This patch adds a separate javascript file which can be included both in
circulation.tt and request.tt since both use the same include.

To test, apply the patch and submit a patron name in the check out form.
On the page of search results, clicking a table row should work the same
as clicking the patron name link.

Perform the same test during the hold process: Locate and place a hold
on a title. In the patron search form, submit a patron name and test the
behavior of the search results screen.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18403: Prevent Modifications.t to fail randomly
Jonathan Druart [Fri, 16 Feb 2018 13:49:43 +0000 (10:49 -0300)]
Bug 18403: Prevent Modifications.t to fail randomly

    #   Failed test 'pending_count() correctly returns 2 if filtered by library'
    #   at t/db_dependent/Koha/Patron/Modifications.t line 355.
    #          got: '0'
    #     expected: '2'

    #   Failed test 'pending_count() correctly returns 2'
    #   at t/db_dependent/Koha/Patron/Modifications.t line 360.
    #          got: '0'
    #     expected: '2'

    #   Failed test 'pending_count() correctly returns 1'
    #   at t/db_dependent/Koha/Patron/Modifications.t line 365.
    #          got: '0'
    #     expected: '1'
    # Looks like you failed 3 tests of 16.

 #   Failed test 'pending_count() and pending() tests'
 #   at t/db_dependent/Koha/Patron/Modifications.t line 374.
 # Looks like you failed 1 test of 6.
 [19:45:28] t/db_dependent/Koha/Patron/Modifications.t

The logged in patron did not have permissions to view patron's info from other branches.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19881: Remove authorities-list.pl
Jonathan Druart [Tue, 26 Dec 2017 21:05:56 +0000 (18:05 -0300)]
Bug 19881: Remove authorities-list.pl

For obvious reasons...

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19847: Track links within the records and 404 for others
Jonathan Druart [Wed, 20 Dec 2017 15:13:10 +0000 (12:13 -0300)]
Bug 19847: Track links within the records and 404 for others

Test plan:
Behave like a robot, you will get 404
Be a human, you will be tracked

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19738: Fix XSS on vendor name in serials module
Josef Moravec [Sun, 3 Dec 2017 22:21:57 +0000 (22:21 +0000)]
Bug 19738: Fix XSS on vendor name in serials module

Test plan:

1) do not apply this patch
2) Have at least one vendor which name does contain javascript, for
example: <i>Vendor 1</i><script>alert('Hi');</script>
3) go to serial module and create new subscription
4) use "Search for vendor"
5) Search for your vendor, when search results table is presented, the
javascript is executed
6) go through subscription creation and save the new subscription
7) On subscription detail page, the javascript is executed as well
8) apply this patch
9) Repeat 3-7, the script is not executed, the input is escaped

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 20216: Correctly populate values in itemtype editor
Nick Clemens [Thu, 15 Feb 2018 17:05:29 +0000 (17:05 +0000)]
Bug 20216: Correctly populate values in itemtype editor

Caused by a bad merge conflict on bug 12768.

To test:
1 - Edit an item type, define a replacement cost,processing fee, and
remote image url
2 - Save the item type
3 - Values are correct in list
4 - Edit again
5 - note values in fields are not populated
6 - Save itemtype, values are lost
7 - Apply patch
8 - Repeat 1-4
9 - Values should be correctly populated and saved now

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Bug 20216: (follow-up) - Fix other use of remote_image

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19641: (follow-up) Update circulation.tt too
Jonathan Druart [Thu, 15 Feb 2018 18:20:16 +0000 (15:20 -0300)]
Bug 19641: (follow-up) Update circulation.tt too

Fix bad merge conflict with bug 18403

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19641: (follow-up) Move patron templates to the footer
Jonathan Druart [Thu, 15 Feb 2018 18:09:35 +0000 (15:09 -0300)]
Bug 19641: (follow-up) Move patron templates to the footer

Fix bad merge conflict with bug 12904

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20038: Switch single-column templates to Bootstrap grid: Acquisitions
Owen Leonard [Thu, 18 Jan 2018 19:41:45 +0000 (19:41 +0000)]
Bug 20038: Switch single-column templates to Bootstrap grid: Acquisitions

This patch updates several acquisitions module templates to use the
Bootstrap grid.

- acqui/z3950_search.tt - Acquisitions -> Vendor -> View basket -> Add
  to basket -> From an external source. The Z39.50 search form should
  look correct.
  - Search for a title. The search results page should look correct.

- acqui/addorder.tt - Acquisitions -> Vendor -> View basket -> Add to
  basket. Add an order to the basket which costs more than is available
  in the fund you select. The error/confirmation screen should look
  correct.

- acqui\modordernotes.tt - Acquisitions -> Vendor -> View basket -> Add
  internal or vendor note. The note add form should look correct.

- acqui/cancelorder.tt - Acquisitions -> Vendor -> View basket -> Cancel
  order (from an open basket which has existing orders). The
  confirmation screen should look correct.

- acqui\basketheader.tt - Acquisitions -> Vendor -> New basket. The new
  basket edit form should look correct.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20036: Switch single-column templates to Bootstrap grid: Offline circulation
Owen Leonard [Thu, 18 Jan 2018 18:00:20 +0000 (18:00 +0000)]
Bug 20036: Switch single-column templates to Bootstrap grid: Offline circulation

This patch updates three single-column offline circulation templates to
use the Bootstrap grid.

- offline_circ\process_koc.tt - Circulation -> Upload offline
  circulation.

- offline_circ\enqueue_koc.tt - After uploading offline circulation
  file -> Add to offline circulation queue. The confirmation page is the
  page to be tested.

- offline_circ\list.tt - From the confirmation page -> View pending
  offline circulation actions.

Each of these pages should look correct, with a single centered column
with wide margins on either side. At lower browser widths the margins
should disappear.

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 20035: Switch single-column templates to Bootstrap grid: Patron clubs
Owen Leonard [Thu, 18 Jan 2018 17:33:00 +0000 (17:33 +0000)]
Bug 20035: Switch single-column templates to Bootstrap grid: Patron clubs

This patch updates two single-column Patron clubs templates to
use the Bootstrap grid.

- clubs/clubs-add-modify.tt - Tools -> Patron clubs -> New club.
- clubs/templates-add-modify.tt - Tools -> Patron clubs -> New club
  template. Also changed in this file: Markup corrections. Label "for"
  attribute should match the form field's id attribute.

Each of these pages should look correct, with a single centered column
with wide margins on either side. At lower browser widths the margins
should disappear.

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 20034: Switch single-column templates to Bootstrap grid: Circulation
Owen Leonard [Thu, 18 Jan 2018 16:45:05 +0000 (16:45 +0000)]
Bug 20034: Switch single-column templates to Bootstrap grid: Circulation

This patch updates two single-column circulation templates to
use the Bootstrap grid.

- circulation-home.tt - Circulation home page. This patch corrects what
  appears to have been a long-broken three-column layout.

- article-requests.tt - Article requests list. Turn on the
  ArticleRequests system preference if necessary. Go to Circulation ->
  Article requests.

Each of these pages should look correct, with a single centered column
with wide margins on either side. At lower browser widths the margins
should disappear.

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 20033: Switch single-column templates to Bootstrap grid: Catalog
Owen Leonard [Thu, 18 Jan 2018 16:08:26 +0000 (16:08 +0000)]
Bug 20033: Switch single-column templates to Bootstrap grid: Catalog

This patch updates a few catalog-related single-column templates to use
the Bootstrap grid.

- basket/basket.tt - The staff client cart. Add some items to the cart
  and open the cart.

- catalogue/advsearch.tt - The advanced search page.

- catalogue/itemsearch.tt - The item search page, both the initial form
  and the search results.

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 20032: Switch single-column templates to Bootstrap grid: Tools
Owen Leonard [Thu, 18 Jan 2018 15:32:56 +0000 (15:32 +0000)]
Bug 20032: Switch single-column templates to Bootstrap grid: Tools

This patch updates several single-column Tools templates to
use the Bootstrap grid.

- batchMod-del.tt - Tools -> Batch item deletion -> Submit barcodes or
  item numbers for deletion. The grid is changed for the results and
  confirmation screens.

- batchMod-edit.tt - Tools -> Batch item modification -> Submit barcodes
  or item numbers for modification. The grid is changed for the results
  and confirmation screens.

- koha-news.tt - Tools -> News -> Edit or create a new news item. The
  grid is changed for the edit screen.

- letter.tt - Tools -> Notices and Slips -> Edit or create a notice. The
  grid is changed for the edit screen.

Each of these pages should look correct. The News and Notices page
should have a single centered column with wide margins on either side.
At lower browser widths the margins should disappear.

The batch mod screens should be displayed at full screen width.

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 19982: Switch single-column templates to Bootstrap grid: Patrons
Owen Leonard [Tue, 16 Jan 2018 16:00:23 +0000 (16:00 +0000)]
Bug 19982: Switch single-column templates to Bootstrap grid: Patrons

This patch updates two single-column patron module templates to use
the Bootstrap grid:

- discharges.tt - The list of pending discharges. One or more
  discharges must have been made via the OPAC. From the staff client
  home page, look for "Discharge requests pending."

- members-update.tt - The list of pending patron updates. One or more
  updates must have been submitted via the OPAC. From the staff client
  home page, look for "Patrons requesting modifications."

Each of these pages should look correct, with a single centered column
with wide margins on either side. At lower browser widths the margins
should disappear.

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 19960: Update popup window templates to use Bootstrap grid: Add to list
Owen Leonard [Thu, 11 Jan 2018 18:53:33 +0000 (18:53 +0000)]
Bug 19960: Update popup window templates to use Bootstrap grid: Add to list

This patch updates add-to-list template to use the Bootstrap grid
instead of the YUI grid.

To test, open the detail page for a bibliographic record in the staff
client and choose "Add to -> List." The resulting pop-up window should
look correct.

Signed-off-by: Zoe Bennett <zoebennett1308@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 19950: Update popup window templates to use Bootstrap grid: Serials
Owen Leonard [Wed, 10 Jan 2018 19:21:46 +0000 (19:21 +0000)]
Bug 19950: Update popup window templates to use Bootstrap grid: Serials

This patch updates the two serials templates to use the Bootstrap grid
instead of the YUI grid.

Apply the patch and go to Serials and locate an existing
subscription.

- Click the "Edit routing list" in the sidebar.
- Save the routing list, and click "Save and preview routing slip."
- The routing slip preview should look correct and buttons should work
  correctly.

- When viewing the details of a subscription, click the "Renew" button
  in the toolbar. The popup window should look correct.

Signed-off-by: Zoe Bennett <zoebennett1308@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 19755: Move template JavaScript to the footer: Acquisitions, part 3
Owen Leonard [Tue, 5 Dec 2017 18:30:08 +0000 (18:30 +0000)]
Bug 19755: Move template JavaScript to the footer: Acquisitions, part 3

This patch modifies even more staff client acquisitions templates so
that JavaScript is included in the footer instead of the header.

To test, apply the patch and test the JavaScript-driven features of the
modified templates: All button controls, DataTables functionality, tabs,
etc.

- Acquisitions -> Vendor -> Vendor details
  - Contracts datatable
  - Edit vendor
    - Add contacts, form validation
- Acquisitions -> Vendor -> Invoices -> Invoice -> "Go to receipt"
  - Datatables, MARC and Card previews
    - Transfer
      - Confirmation of transfer, window closes
- Acquisitions -> Vendor -> Receive shipments
  - Datatables, date pickers
- Acquisitions -> Available funds table -> Spent report
  - Datatables
- Acquisitions -> Vendor -> Uncertain prices
  - Datatables, form validation
- Acquisitions -> Vendor -> Basket -> Add to basket from external source
  - Select and clear all on search form
  - Search results
    - Datatables, MARC and Card previews, in-table pop-up controls
      (click any table cell)

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 19682: Move JS to the footer: Two patron-related tools
Owen Leonard [Wed, 22 Nov 2017 19:33:48 +0000 (19:33 +0000)]
Bug 19682: Move JS to the footer: Two patron-related tools

This patch modifies two patron-related tools templates in the staff
client so that JavaScript is included in the footer instead of the
header.

To test, apply the patch and test the JavaScript-driven features of
each modified template: All button controls, DataTables functionality,
form validation, etc.

  - Import patrons
  - Upload patron images

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Edit for QA: Fixed datepickers on import patron form

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19641: (follow-up) Fix update child menu option
Owen Leonard [Fri, 26 Jan 2018 13:12:16 +0000 (13:12 +0000)]
Bug 19641: (follow-up) Fix update child menu option

This follow-up corrects handling of clicks on the "Update child" menu
option when the patron is an adult. Previously the click handler was
conditionally added via template markup. This patch modifies it to use
the data-tooltip attribute as an indicator that the option is disabled.

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

- Open an adult patron's record for viewing.
- Choose More -> Update child from the toolbar menu.
- The menu item should be disabled, and should show a tooltip.
- Clicking the menu item should do nothing.

- Open a child patron's record for viewing.
- Choose More -> Update child from the toolbar menu.
- The patron should be updated to an adult category.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19641: (follow-up) Correct popup templates
Owen Leonard [Thu, 11 Jan 2018 17:37:49 +0000 (17:37 +0000)]
Bug 19641: (follow-up) Correct popup templates

This patch corrects the footer include for two patron-related popup
windows. popup-bottom.inc should be considered obsolete, and
"'intranet-bottom.inc' popup_window=1" used in its place.

To test you must have more than one adult-type patron category defined.

- Locate and view a child-type patron record.
- From the "More" menu in the toolbar, choose "Update child to adult
  patron."
  - The popup window which appears should look correct and work
    correctly.
- Add a new patron and enter the first and last names of an existing
  patron.
  - When Koha asks to confirm a possible duplicate record, click the
    "View existing record" link. The popup which is triggered should
    look correct.

Signed-off-by: Zoe Bennett <zoebennett1308@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 19641: (follow-up) Update circulation.tt too
Owen Leonard [Thu, 11 Jan 2018 16:15:01 +0000 (16:15 +0000)]
Bug 19641: (follow-up) Update circulation.tt too

This patch makes the same JS-to-footer changes to circulation.tt.
Inclusion of this template in this bug is necessary because it includes
members-toolbar.inc.

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

- Enter a patron card for checkout
- Test any JavaScript-driven actions on the checkout page, for instance:
    - Select all/clear all controls
    - Datepicker/timepickers
    - Datatable sorting, columns configuration
    - Renewals, check-ins
    - Patron message interactions, print slip, and other toolbar actions
    - Checkout exports
    - Search to hold
    - Tab loading: Restrictions, Holds, Clubs

Signed-off-by: Zoe Bennett <zoebennett1308@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 19641: Move patron templates to the footer
Owen Leonard [Thu, 16 Nov 2017 16:08:07 +0000 (16:08 +0000)]
Bug 19641: Move patron templates to the footer

This patch modifies the staff client patron module templates so that
JavaScript is included in the footer instead of the header.

This patch touches a lot of files because the changes are all
interdependent, affecting a couple of module-wide include files.

To test, apply the patch and test the JavaScript-driven features of the
modified templates: All button controls, DataTables functionality, tabs,
etc.

Patrons -> Patrons home, patron search results
  -> Manage pending modification requests
  -> Patron detail page
    -> Edit patron
      -> Set guarantor
    -> Fines
       -> Account, Pay fines, Create manual invoice, Create manual
          credit
       -> Print receipts for different kinds of charges
    -> Routing lists
    -> Circulation history
    -> Holds history
    -> Notices
    -> Statistics
    -> Files
    -> Purchase suggestions
    -> Discharges
    -> Housebound
    -> Set permissions
    -> Change password
    -> Print summary, slips, and overdues
    -> Update child to adult patron type

Patron toolbar and patron search bar operations should work correctly on
all pages.

This patch also updates the template for searching the Norwegian
national patron database, but it has NOT been tested.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Zoe Bennett <zoebennett1308@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 20214: (bug 18403 follow-up) Fix patron search: remove newline breaking JSON
Victor Grousset [Thu, 15 Feb 2018 15:06:03 +0000 (16:06 +0100)]
Bug 20214: (bug 18403 follow-up) Fix patron search: remove newline breaking JSON

== Test plan ==
1. go/cgi-bin/koha/members/members-home.pl
2. search "a"
3. result never display
4. apply patch
5. search "a"
3. result display

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19996: (RM follow-up 2) Remove commented use warnings;
Jonathan Druart [Thu, 15 Feb 2018 14:23:48 +0000 (11:23 -0300)]
Bug 19996: (RM follow-up 2) Remove commented use warnings;

This one is easy to fix.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19996: (RM follow-up) Remove commented use warnings;
Jonathan Druart [Thu, 15 Feb 2018 14:20:34 +0000 (11:20 -0300)]
Bug 19996: (RM follow-up) Remove commented use warnings;

These plugins are very noisy, badly written and I have no idea what they
do.
t/db_dependent/FrameworkPlugin.t outputs a log of warnings about "
uninitialized value".

Let fix them later.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20204: Add TestBuilder to replace CPL branch
Marcel de Rooy [Thu, 15 Feb 2018 08:08:59 +0000 (09:08 +0100)]
Bug 20204: Add TestBuilder to replace CPL branch

Remove CPL; without this branch, the test crashes.
Rearrange modules at the start.
Add Koha::Database calls.
Move a few global my vars to our level.
Remove intermediate rollbacks.

Test plan:
[1] Run prove t/db_dependent/FrameworkPlugin.t
    Ignore noise from unimarc plugins :)

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 19243: Fix tests for patron categories
Jonathan Druart [Tue, 26 Dec 2017 19:23:00 +0000 (16:23 -0300)]
Bug 19243: Fix tests for patron categories

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19243: Fix tests for AV
Jonathan Druart [Tue, 26 Dec 2017 19:09:41 +0000 (16:09 -0300)]
Bug 19243: Fix tests for AV

The tricky part here was to find an alternative for ends-with in Xpath
version 1
Indeed there are 2  button with
"/admin/authorised_values.pl?op=add_form", and the first one was picked
(/admin/authorised_values.pl?op=add_form&category=Asort1)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19243: The "delete library" is now a button with id
Jonathan Druart [Tue, 26 Dec 2017 17:38:55 +0000 (14:38 -0300)]
Bug 19243: The "delete library" is now a button with id

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19243: Fix for bug 19860
Jonathan Druart [Tue, 26 Dec 2017 17:37:43 +0000 (14:37 -0300)]
Bug 19243: Fix for bug 19860

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19243: fix urls - do not use /cgi-bin/koha
Jonathan Druart [Tue, 26 Dec 2017 17:11:05 +0000 (14:11 -0300)]
Bug 19243: fix urls - do not use /cgi-bin/koha

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19243: Amended Selenium test to add the creation of patron category and authorise...
Alex Buckley [Thu, 14 Dec 2017 23:07:30 +0000 (23:07 +0000)]
Bug 19243: Amended Selenium test to add the creation of patron category and authorised values

Sponsored-By: Catalyst IT
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19243: Add selenium tests for the administration module
Jonathan Druart [Tue, 12 Dec 2017 22:11:15 +0000 (19:11 -0300)]
Bug 19243: Add selenium tests for the administration module

This is just a start.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19802: Add stack trace to ease debugging
Jonathan Druart [Tue, 26 Dec 2017 17:41:50 +0000 (14:41 -0300)]
Bug 19802: Add stack trace to ease debugging

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19802: Move Selenium code to t::lib::Selenium
Jonathan Druart [Tue, 12 Dec 2017 18:42:56 +0000 (15:42 -0300)]
Bug 19802: Move Selenium code to t::lib::Selenium

To make it reusable easily.

Test plan:
The basic_workflow.t tests should still pass after this change.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: (follow-up) Adjust /patrons endpoint
Tomas Cohen Arazi [Tue, 13 Feb 2018 18:52:45 +0000 (15:52 -0300)]
Bug 20144: (follow-up) Adjust /patrons endpoint

Fields 'address' and 'city' have been maybe nullable by this bug. This
patch makes them nullable on the API as well.

To test:
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/patrons.t
=> FAIL: Tests fail (randomly) when address or city are set to null by
         TestBuilder.
- Apply this patch
- Run:
 k$ prove t/db_dependent/api/v1/patrons.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: DBIC Schema changes
Jonathan Druart [Tue, 13 Feb 2018 17:09:12 +0000 (14:09 -0300)]
Bug 20144: DBIC Schema changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: DBRev 17.12.00.015
Jonathan Druart [Tue, 13 Feb 2018 17:07:37 +0000 (14:07 -0300)]
Bug 20144: DBRev 17.12.00.015

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Do not store 0000-00-00
Jonathan Druart [Mon, 5 Feb 2018 19:32:26 +0000 (16:32 -0300)]
Bug 20144: [sql_modes] Do not store 0000-00-00

This patch needs to be linked with bug 20145.

Fix for:
Incorrect date value: '0000-00-00' for column 'dateexpiry'

We cannot longer store 0000-00-00, but no need to.
The tests must be kept for now as long as bug 20145 has a solution

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Fix GROUP BY clause in Virtualshelves search (DT)
Jonathan Druart [Tue, 6 Feb 2018 18:43:09 +0000 (15:43 -0300)]
Bug 20144: [sql_modes] Fix GROUP BY clause in Virtualshelves search (DT)

Fix for:
'koha_kohadev.vs.shelfname' isn't in GROUP BY

t/db_dependent/Utils/Datatables_Virtualshelves.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Set subscription.numberlength and weeklength to NULL if not...
Jonathan Druart [Tue, 6 Feb 2018 17:49:47 +0000 (14:49 -0300)]
Bug 20144: [sql_modes] Set subscription.numberlength and weeklength to NULL if not passed

Fix for:
Incorrect integer value: '' for column 'numberlength'
Incorrect integer value: '' for column 'weeklength'

t/db_dependent/Serials/ReNewSubscription.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Add default value for subscription_numberpatterns.description...
Jonathan Druart [Tue, 6 Feb 2018 17:47:43 +0000 (14:47 -0300)]
Bug 20144: [sql_modes] Add default value for subscription_numberpatterns.description in tests

Fix for:
Field 'description' doesn't have a default value

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Fix search history tests
Jonathan Druart [Tue, 6 Feb 2018 17:45:08 +0000 (14:45 -0300)]
Bug 20144: [sql_modes] Fix search history tests

Incorrect datetime value: '1374978877' for column 'time'

Need to investigate this: Why did I put that value in the test?
Does the feature correctly works?

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Fix values when creating a sql report in tests
Jonathan Druart [Tue, 6 Feb 2018 17:39:32 +0000 (14:39 -0300)]
Bug 20144: [sql_modes] Fix values when creating a sql report in tests

For fix:
Data too long for column 'report_area'
Incorrect integer value: 'null' for column 'cache_expiry'

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Set default value for opac_news.content in tests
Jonathan Druart [Tue, 6 Feb 2018 17:32:27 +0000 (14:32 -0300)]
Bug 20144: [sql_modes] Set default value for opac_news.content in tests

Fix for:
Field 'content' doesn't have a default value

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Remove ORDER BY clause for COUNT(*) in GetItemsForInventory
Jonathan Druart [Tue, 6 Feb 2018 16:39:51 +0000 (13:39 -0300)]
Bug 20144: [sql_modes] Remove ORDER BY clause for COUNT(*) in GetItemsForInventory

Fix for:
DBD::mysql::st execute failed: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause [for Statement 'SELECT COUNT(*)

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Remove useless ORDER BY clauses in tests
Jonathan Druart [Tue, 6 Feb 2018 16:36:42 +0000 (13:36 -0300)]
Bug 20144: [sql_modes] Remove useless ORDER BY clauses in tests

Fix for:
Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Set value for creator_batches.timestamp
Jonathan Druart [Tue, 6 Feb 2018 16:28:38 +0000 (13:28 -0300)]
Bug 20144: [sql_modes] Set value for creator_batches.timestamp

Fix for:
Incorrect datetime value: 'now()' for column 'timestamp'

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Set default value for biblio.datecreated in tests
Jonathan Druart [Tue, 6 Feb 2018 16:27:32 +0000 (13:27 -0300)]
Bug 20144: [sql_modes] Set default value for biblio.datecreated in tests

Fix for:
Field 'datecreated' doesn't have a default value

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Set value for pending_offline_operations.timestamp
Jonathan Druart [Tue, 6 Feb 2018 15:51:19 +0000 (12:51 -0300)]
Bug 20144: [sql_modes] Set value for pending_offline_operations.timestamp

Not null

Fix for:
Incorrect datetime value: 'null' for column 'timestamp'

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Remove HAVING clause from GetTopIssues
Jonathan Druart [Tue, 6 Feb 2018 15:34:34 +0000 (12:34 -0300)]
Bug 20144: [sql_modes] Remove HAVING clause from GetTopIssues

Fix for:
'koha_kohadev.b.title' isn't in GROUP BY

t/db_dependent/Circulation/GetTopIssues.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Remove 'Null' string values from GetHardDueDate.t
Jonathan Druart [Tue, 6 Feb 2018 15:26:56 +0000 (12:26 -0300)]
Bug 20144: [sql_modes] Remove 'Null' string values from GetHardDueDate.t

Must be undef or correct integer value

Fix for:
Incorrect integer value: 'Null' for column 'enrolmentperiod'

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Set default value for Itemtype fees in TestBuilder
Jonathan Druart [Tue, 6 Feb 2018 15:15:02 +0000 (12:15 -0300)]
Bug 20144: [sql_modes] Set default value for Itemtype fees in TestBuilder

Fix for:
Out of range value for column 'amount'

t/db_dependent/Circulation/Chargelostitem.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Fix GROUP BY clause in GetInvoices
Jonathan Druart [Tue, 6 Feb 2018 15:02:47 +0000 (12:02 -0300)]
Bug 20144: [sql_modes] Fix GROUP BY clause in GetInvoices

Need to be tested from the interface!

Fix for:
'koha_kohadev.aqinvoices.invoicenumber' isn't in GROUP BY

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Fix GROUP BY clause in GetBasketsInfosByBookseller
Jonathan Druart [Tue, 6 Feb 2018 14:54:18 +0000 (11:54 -0300)]
Bug 20144: [sql_modes] Fix GROUP BY clause in GetBasketsInfosByBookseller

This need to be tested from the interface!

Fix for:
'koha_kohadev.aqbasket.basketname' isn't in GROUP BY

t/db_dependent/Acquisition/GetBasketsInfosByBookseller.t

We need this group by.
We should not need to list all fields, from mysql 5.7 doc:
https://dev.mysql.com/doc/refman/5.7/en/group-by-handling.html
"The query is valid if name is a primary key of t or is a unique NOT NULL column. In such cases, MySQL recognizes that the selected column is functionally dependent on a grouping column. "

However, MariaDB did not implemented yet:
https://jira.mariadb.org/browse/MDEV-11588

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Add default value for export_basket.description in tests
Jonathan Druart [Tue, 6 Feb 2018 14:08:02 +0000 (11:08 -0300)]
Bug 20144: [sql_modes] Add default value for export_basket.description in tests

Fix for:
Field 'description' doesn't have a default value

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Shorten values for virtualshelfshares.invitekey in tests
Jonathan Druart [Tue, 6 Feb 2018 14:00:31 +0000 (11:00 -0300)]
Bug 20144: [sql_modes] Shorten values for virtualshelfshares.invitekey in tests

It's a varchar(10)

Fix for:
Data too long for column 'invitekey'

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Set correct value for old_issues.issue_id in tests
Jonathan Druart [Tue, 6 Feb 2018 13:55:15 +0000 (10:55 -0300)]
Bug 20144: [sql_modes] Set correct value for old_issues.issue_id in tests

Fix for:
Column 'issue_id' cannot be null

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Shorten auth_header.authtypecode values in tests
Jonathan Druart [Tue, 6 Feb 2018 13:49:40 +0000 (10:49 -0300)]
Bug 20144: [sql_modes] Shorten auth_header.authtypecode values in tests

Fix for:
Data too long for column 'authtypecode'

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Set auth_header.marcxml to an empty string in tests
Jonathan Druart [Tue, 6 Feb 2018 13:48:49 +0000 (10:48 -0300)]
Bug 20144: [sql_modes] Set auth_header.marcxml to an empty string in tests

Fix for:
Field 'marcxml' doesn't have a default value

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Set default value for biblio.datecreated in tests
Jonathan Druart [Tue, 6 Feb 2018 13:47:09 +0000 (10:47 -0300)]
Bug 20144: [sql_modes] Set default value for biblio.datecreated in tests

Should call Koha::Biblio->new instead

Fix for:
Field 'datecreated' doesn't have a default value

t/db_dependent/UsageStats.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Add default value for subscription_numberpatterns.description...
Jonathan Druart [Mon, 5 Feb 2018 22:13:07 +0000 (19:13 -0300)]
Bug 20144: [sql_modes] Add default value for subscription_numberpatterns.description in tests

Fix for:
Field 'description' doesn't have a default value

t/db_dependent/Serials.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Remove HAVING clause in GetBorrowersToExpunge
Jonathan Druart [Mon, 5 Feb 2018 22:10:34 +0000 (19:10 -0300)]
Bug 20144: [sql_modes] Remove HAVING clause in GetBorrowersToExpunge

Special attention needed here!

Fix for:
Non-grouping field 'currentissue' is used in HAVING clause

t/db_dependent/Members.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Set default value for marc_modification_template_actions
Jonathan Druart [Mon, 5 Feb 2018 21:40:36 +0000 (18:40 -0300)]
Bug 20144: [sql_modes] Set default value for marc_modification_template_actions

Cannot be empty strings.

Fix for:
Data truncated for column 'conditional'
Data truncated for column 'conditional_comparison'
Incorrect integer value: '' for column 'conditional_regex'

t/db_dependent/MarcModificationTemplates.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Fix GROUP BY clause in GetLetters
Jonathan Druart [Mon, 5 Feb 2018 21:26:05 +0000 (18:26 -0300)]
Bug 20144: [sql_modes] Fix GROUP BY clause in GetLetters

This subroutine is wrong and must be rewritten using
Koha::Notice::Templates.
Mainly because the DB structure is bad.
Meanwhile we remove the branchcode from the SELECT to get correct
results, it was not used by callers anyway.

Fix for:
'koha_kohadev.letter.module' isn't in GROUP BY

t/db_dependent/Letters.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Correct quotes.timestamp values in tests
Jonathan Druart [Mon, 5 Feb 2018 21:23:59 +0000 (18:23 -0300)]
Bug 20144: [sql_modes] Correct quotes.timestamp values in tests

Fix for:
Incorrect datetime value: '0000-00-00 00:00:00' for column 'timestamp'

t/db_dependent/Koha.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Set default value for biblio.datecreated in tests
Jonathan Druart [Mon, 5 Feb 2018 21:22:34 +0000 (18:22 -0300)]
Bug 20144: [sql_modes] Set default value for biblio.datecreated in tests

When created without Koha::Biblio.

Fix for:
Field 'datecreated' doesn't have a default value

t/db_dependent/Items.t

TODO LATER - Use Koha::Biblio instead

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Set import_records.marcxml_old to '' on INSERT
Jonathan Druart [Mon, 5 Feb 2018 21:19:53 +0000 (18:19 -0300)]
Bug 20144: [sql_modes] Set import_records.marcxml_old to '' on INSERT

Fix for:
Field 'marcxml_old' doesn't have a default value

t/db_dependent/ImportBatch.t

Fixme - need to update existing DB?

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Remove HAVING clause in GetUpcomingDueIssues
Jonathan Druart [Mon, 5 Feb 2018 21:08:03 +0000 (18:08 -0300)]
Bug 20144: [sql_modes] Remove HAVING clause in GetUpcomingDueIssues

More attention needed here!

Fix for:
Non-grouping field 'days_until_due' is used in HAVING clause

t/db_dependent/Circulation.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Set issuingrules.no_auto_renewal_after to NULL in tests
Jonathan Druart [Mon, 5 Feb 2018 21:02:12 +0000 (18:02 -0300)]
Bug 20144: [sql_modes] Set issuingrules.no_auto_renewal_after to NULL in tests

Fix for:
Incorrect integer value: '' for column 'no_auto_renewal_after'

FIXME - must we update values for existing installs?
TODO - check if can be set to an empty string from the interface

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Add default value for subscription_numberpatterns.description...
Jonathan Druart [Mon, 5 Feb 2018 20:48:03 +0000 (17:48 -0300)]
Bug 20144: [sql_modes] Add default value for subscription_numberpatterns.description in tests

Fix for:
Field 'description' doesn't have a default value

t/db_dependent/AdditionalField.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Remove HAVING clause in GetLateOrders
Jonathan Druart [Mon, 5 Feb 2018 20:38:32 +0000 (17:38 -0300)]
Bug 20144: [sql_modes] Remove HAVING clause in GetLateOrders

More attention needed here!

Fix for:
Non-grouping field 'quantity' is used in HAVING clause

Having is useless, and certainly slower

t/db_dependent/Acquisition.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Shorten aqbudgets.budget_code
Jonathan Druart [Mon, 5 Feb 2018 20:31:34 +0000 (17:31 -0300)]
Bug 20144: [sql_modes] Shorten aqbudgets.budget_code

Fix for:
Data too long for column 'budget_code'

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Set default value for Acccountline in TestBuilder
Jonathan Druart [Mon, 5 Feb 2018 20:22:05 +0000 (17:22 -0300)]
Bug 20144: [sql_modes] Set default value for Acccountline in TestBuilder

Fix for:
Data too long for column 'proccode'

t/db_dependent/Accounts.t

FIXME LATER - It's a varchar(4), must be integer!

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Fix default value for statistics.itemnumber
Jonathan Druart [Mon, 5 Feb 2018 20:17:11 +0000 (17:17 -0300)]
Bug 20144: [sql_modes] Fix default value for statistics.itemnumber

Must be an integer, not empty string

Fix for:
Incorrect integer value: '' for column 'itemnumber'

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Add a value for borrower_attribute_types.description in tests
Jonathan Druart [Mon, 5 Feb 2018 19:24:56 +0000 (16:24 -0300)]
Bug 20144: [sql_modes] Add a value for borrower_attribute_types.description in tests

Fix for:
Field 'description' doesn't have a default value

t/db_dependent/Koha/Patron/Attribute/Types.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Shorten items.barcode
Jonathan Druart [Mon, 5 Feb 2018 19:21:43 +0000 (16:21 -0300)]
Bug 20144: [sql_modes] Shorten items.barcode

It's a varchar(20)

Fix for:
Data too long for column 'barcode'

t/db_dependent/Koha/Items.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Correct quotes.timestamp values in tests
Jonathan Druart [Mon, 5 Feb 2018 19:20:05 +0000 (16:20 -0300)]
Bug 20144: [sql_modes] Correct quotes.timestamp values in tests

Fix for:
Incorrect datetime value: '0000-00-00 00:00:00' for column 'timestamp'

t/db_dependent/Koha/GetDailyQuote.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Add default values for export_format columns
Jonathan Druart [Mon, 5 Feb 2018 19:09:31 +0000 (16:09 -0300)]
Bug 20144: [sql_modes] Add default values for export_format columns

Fix for:
Field 'field_separator' doesn't have a default value
Field 'encoding' doesn't have a default value

field_separator and subfield_separator are only used for MARC csv
profiles, no need to specify a default value

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Shorten cities.city_zipcode
Jonathan Druart [Mon, 5 Feb 2018 19:03:03 +0000 (16:03 -0300)]
Bug 20144: [sql_modes] Shorten cities.city_zipcode

It's a varchar(20)

Fix for:
Data too long for column 'city_zipcode'

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Set auth_header.marcxml to an empty string in tests
Jonathan Druart [Mon, 5 Feb 2018 18:51:03 +0000 (15:51 -0300)]
Bug 20144: [sql_modes] Set auth_header.marcxml to an empty string in tests

Fix for:
Field 'marcxml' doesn't have a default value

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Set missinglist and recievedlist in subscriptionhistory
Jonathan Druart [Mon, 5 Feb 2018 18:46:51 +0000 (15:46 -0300)]
Bug 20144: [sql_modes] Set missinglist and recievedlist in subscriptionhistory

Fix for:
Field 'missinglist' doesn't have a default value

t/db_dependent/Koha/Acquisition/Booksellers.t

from mysql doc:
BLOB, TEXT, GEOMETRY, and JSON columns cannot be assigned a default
 value.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Fix date format in tests
Jonathan Druart [Mon, 5 Feb 2018 18:39:49 +0000 (15:39 -0300)]
Bug 20144: [sql_modes] Fix date format in tests

Fix for:
Incorrect date value: '01-01-2013' for column 'startdate'
Incorrect date value: '01-01-2016' for column 'budget_period_enddate'
Incorrect date value: '30-11-2013' for column 'enddate'
Incorrect date value: '31-12-2015' for column 'budget_period_enddate'
Incorrect date value: '12-31-2015' for column 'budget_period_enddate'
Incorrect date value: '01-01-2014' for column 'entrydate'

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Set default value for aqbasket.is_standing
Jonathan Druart [Mon, 5 Feb 2018 18:36:27 +0000 (15:36 -0300)]
Bug 20144: [sql_modes] Set default value for aqbasket.is_standing

Fix for:
Column 'is_standing' cannot be null

t/db_dependent/Koha/Acquisition/Booksellers.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Fix datatype for aqbasket.authorisedby
Jonathan Druart [Mon, 5 Feb 2018 18:32:28 +0000 (15:32 -0300)]
Bug 20144: [sql_modes] Fix datatype for aqbasket.authorisedby

It's defined as a VARCHAR(10) in DB, but it is expecting a
borrowernumber instead

Fix for
Data too long for column 'authorisedby'

Must be a FK but first a borrowernumber
Need to update kohastructure for the comment?

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Set default value for Aqbookseller in TestBuilder
Jonathan Druart [Mon, 5 Feb 2018 18:21:26 +0000 (15:21 -0300)]
Bug 20144: [sql_modes] Set default value for Aqbookseller in TestBuilder

Fix for:
Out of range value for column 'tax_rate'

t/db_dependent/Koha/Acquisition/Basket.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Fix generated value for account_offsets.amount
Jonathan Druart [Mon, 5 Feb 2018 17:51:43 +0000 (14:51 -0300)]
Bug 20144: [sql_modes] Fix generated value for account_offsets.amount

Fix error:
Out of range value for column 'amount'

DBD::mysql::st execute failed: Out of range value for column 'amount' at
row 1 [for Statement "INSERT INTO `account_offsets` ( `amount`,
`debit_id`, `type`) VALUES ( ?, ?, ? )" with ParamValues:
0=7925469795795194609664.000000, 1='10', 2='Manual Debit'] at
/usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1832.

7925469795795194609664.000000
=> Should be lower anyway

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Fix default value for statistics.amount
Jonathan Druart [Mon, 5 Feb 2018 17:41:48 +0000 (14:41 -0300)]
Bug 20144: [sql_modes] Fix default value for statistics.amount

Must be an integer, not empty string
Fix for:
Data truncated for column 'value'

Found with
t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Set a default value for lowestPriority
Jonathan Druart [Mon, 5 Feb 2018 17:33:45 +0000 (14:33 -0300)]
Bug 20144: [sql_modes] Set a default value for lowestPriority

Fix for:
Field 'lowestPriority' doesn't have a default value

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20144: [sql_modes] Fix borrowers table structure
Jonathan Druart [Mon, 5 Feb 2018 17:28:31 +0000 (14:28 -0300)]
Bug 20144: [sql_modes] Fix borrowers table structure

surname, address and city can be NULL

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>