Commit graph

32896 commits

Author SHA1 Message Date
dab70daa55 Bug 19687: (RM follow-up) Export correct function name
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-15 13:08:04 +00:00
David Gustafsson
3f09e1d733 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>
2018-10-15 12:57:22 +00:00
Dobrica Pavlinusic
b23fe0b0b8 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>
2018-10-15 12:52:55 +00:00
Alex Arnaud
9c6025ccbf 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>
2018-10-15 12:44:50 +00:00
Alex Arnaud
3e6f9b8a1d 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>
2018-10-15 12:44:49 +00:00
b1bb9f9e6b 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>
2018-10-15 12:44:49 +00:00
3950dd4f6c Bug 20797: (QA follow-up) Fix ill requests table
... by adding a missing comma.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2018-10-13 08:54:58 -03:00
Andrew Isherwood
7da41e430d 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>
2018-10-13 08:54:57 -03:00
Andrew Isherwood
dd91fa1712 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>
2018-10-13 08:54:57 -03:00
Mirko Tietgen
8bacf1935d 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>
2018-10-13 08:50:38 -03:00
511ffe4700 Bug 20772: (QA follow-up) 'readonly' is a boolean
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2018-10-13 08:34:33 -03:00
3516e9a9f8 Bug 20772: DBRev 18.06.00.041
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2018-10-13 08:34:33 -03:00
Andrew Isherwood
64740898aa Bug 20772: (follow-up) Add unit test
Add unit test for price_paid

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2018-10-13 08:34:33 -03:00
b097c69522 Bug 20772: (QA follow-up) Add a missing html filter
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2018-10-13 08:34:33 -03:00
Andrew Isherwood
925f4ca1da 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>
2018-10-13 08:34:33 -03:00
Barry Cannon
e24099cbbc 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>
2018-10-13 08:34:33 -03:00
Andrew Isherwood
a1b4941ab8 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>
2018-10-13 08:34:33 -03:00
Andrew Isherwood
00178268ca 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>
2018-10-13 08:34:32 -03:00
Andrew Isherwood
300b12a37d 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>
2018-10-13 08:34:32 -03:00
Andrew Isherwood
731f83a85e 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>
2018-10-13 08:34:32 -03:00
Andrew Isherwood
ecc5acf653 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>
2018-10-13 08:34:32 -03:00
Andrew Isherwood
feefbb504f 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>
2018-10-13 08:34:32 -03:00
Julian Maurice
ec49e7d83b 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>
2018-10-13 07:29:44 -03:00
c7299bc773 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>
2018-10-13 07:29:44 -03:00
4a7c6fa10c Bug 21178: Add Koha::Patron::set_password
This patch introduces the 'set_password' method for Koha::Patron
objects. The main point is to make password changing atomic
(update_password touches the userid on the DB, which should be done
carefully with better error handling, and it is done there only for
legacy backwards compatibility).

A follow-up bug will make the codebase use this instead of
update_password, and use a proper method for changing the userid if
required.

To test:
- Apply this patchset
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Patrons.t
=> SUCCESS: Tests pass!
- Sign off! :-D

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2018-10-13 07:29:44 -03:00
c28d62ce91 Bug 21178: Unit tests
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2018-10-13 07:29:44 -03:00
0e81b387ca Bug 21541: Use raw filter for report results
To test:
 1 - Create new report
 SELECT CONCAT('<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=',borrowernumber,'">',"",firstname,"",surname,'</a>')
 AS people
 FROM borrowers
 2 - Run this report
 3 - Note the results contain raw text, they are not hyperlinks
 4 - Apply patch
 5 - Reload the results
 6 - They should now be links

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2018-10-13 07:28:24 -03:00
07fa37abbe Bug 21464: Hide patron's title not biblio's title
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2018-10-13 07:19:33 -03:00
8a8c0ae51e Bug 21464: Fix overdue list export
commit e09ed656af
  Bug 18403: Only display libraries from group in dropdown lists
and
  commit 0ab22e1c7c
  Bug 18789: Send Koha::Patron object to the templates

broke the overdue list export.

Test plan:
Create some overdues
Export them: "Home › Circulation › Overdues" then click the link on top
of the table.
All the different columns of the generated CSV file must be filled
correctly

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2018-10-13 07:19:33 -03:00
56ab537020 Bug 20260: Use CodeMirror for the SQL reports editor
This patch adds CodeMirror syntax highlighting to the SQL reports
editor. Newly added is a file containing the sql-specific syntax
highlighting code, in both compressed and uncompressed versions.

Unrelated changes:

 - Some JavaScript has been moved from inside the body of the page to
   the footer.
 - Paths to some assets have been corrected to no use relative paths.

To test, apply the patch and go to Reports -> Saved SQL reports

- Edit an existing report and confirm that the SQL is correctly
  highlighted and that there are no display problems when editing.
- Confirm that changes are saved successfully.
- Perform the same test when creating a new SQL report.
- View an existing report and confirm that the SQL is syntax-highlighted
  but is read-only.

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2018-10-12 15:50:39 -03:00
be4f22f5a0 Bug 21479: Remove the trace if the node does not exist
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2018-10-12 15:39:47 -03:00
45fbd36e1f Bug 21479: Add regression tests
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2018-10-12 15:39:46 -03:00
2cd49034c4 Bug 21479: Fix remove from cart links at the OPAC (should remove only 1)
This patch changes the way biblionumbers are passed to the cart script
for adding and removing single items. The title's biblionumber is now
stored in a data-attribute on the links for adding and removing. This
should be a more robust, unified way to handle these single-item
operations.

To test, apply the patch and enable the opacbookbag system preference.

Test adding and removing items from the cart from various pages using
various methods:

 - By clicking an "Add to your cart" / "Remove" link in search results
 - By clicking an "Add to your cart" / "Remove" link on a detail page
 - By checking boxes in search results and adding via the dropdown

Each operation should work correctly.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2018-10-12 15:39:46 -03:00
3c210589f8 Bug 21553: Remove JS error on the Rota view
JS error was:
 ReferenceError: _ is not defined

The strings after staff-global.js (for the function _)

Test plan:
Turn on StockRotation system preference

1) Go to a staff detail page
2) Switch to rota page
3) Check web developer tools

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2018-10-12 15:03:32 -03:00
Mirko Tietgen
ef769ea332 Bug 21536: t/Koha_ExternalContent_RecordedBooks.t skips more tests than scheduled
t/Koha_ExternalContent_RecordedBooks.t skips more tests than scheduled
if WebService::ILS is not available.

Test plan:
- have a system without Webservice::ILS available
- in koha-shell, do
  prove t/Koha_ExternalContent_RecordedBooks.t
- tests should be skipped and tests count as "passed"

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2018-10-12 15:02:33 -03:00
f11cb49a36 Bug 11897: Add mising semi-colon to user*.sql
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-09 17:19:00 +00:00
216a8f1d03 Bug 11897: (follow-up) Add Stock Rotation atomic update schema
Remove the duplicate entry for RoutingListAddReserves
I guess it has been caused by a bad merge resolution conflict

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-09 17:19:00 +00:00
01646f9743 Bug 7143: (follow-up) remove trailing apostrophe
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-09 16:13:57 +00:00
06e4af6ba8 Bug 11897: Add Boolean handling to dbic classes.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-09 15:53:27 +00:00
Alex Sassmannshausen
d87bffa091 Bug 11897: DBIX::Class::Ordered in Stockrotationstage.
* Koha/Schema/Result/Stockrotationstage.pm: Load `Ordered`, add
  grouping_column.

Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-09 15:53:14 +00:00
2f2e40ca46 Bug 11897: DBRev 18.06.00.040
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-09 15:51:34 +00:00
97acf28fef Bug 11897: (QA follow-up) Convert atomic update to perl
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-09 15:46:09 +00:00
7ce34d94ca Bug 11897: Translatability and wrong escaping fix
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-09 15:46:08 +00:00
f72002d997 Bug 11897: (QA follow-up) Move menu to 'Catalog'
Originally this menu item was placed under the 'Patrons' section of the
tools page, this patch moves it to the more appropriate 'Catalog'
section.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-09 15:46:08 +00:00
fac27bc029 Bug 11897: (QA follow-up) Update of tools-menu.js
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-09 15:46:08 +00:00
513aa79a5b Bug 11897: (QA follow-up) Fixes for JS12
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-09 15:46:07 +00:00
b2ff7223b7 Bug 11897: 'superlibrarian' has 'stockrotation' perms
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-09 15:46:07 +00:00
732ff4b1c6 Bug 11897: (QA follow-up) Template filter fixes
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-09 15:46:06 +00:00
2bcaa4004c Bug 11897: Add sample notices for all languages
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-09 15:46:06 +00:00
a9248f237d Bug 11897: Use 'stockrotation' permission for the endpoint
This patch makes the tests for 'authorized' session use the
'stockrotation' permission instead of 'superlibrarian'.

The path x-koha-permission is fixed accordingly.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-09 15:46:06 +00:00