]> git.koha-community.org Git - koha.git/log
koha.git
6 years agoBug 19559: Add tests
Nick Clemens [Wed, 1 Nov 2017 15:46:59 +0000 (15:46 +0000)]
Bug 19559: Add tests

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 26be355fe8c83a187a0cfbdae4f3a9e3b9ba8be9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18417: (follow-up) Document new shortcuts in dropdown
Nick Clemens [Tue, 24 Oct 2017 19:11:28 +0000 (19:11 +0000)]
Bug 18417: (follow-up) Document new shortcuts in dropdown

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e1bfe98d856ca849a48c728118a9e05fcbe2b31c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18417: Advanced Editor (Rancor) add shortcuts for copyright symbols (C) (P)
Jesse Weaver [Tue, 10 Nov 2015 19:02:06 +0000 (12:02 -0700)]
Bug 18417: Advanced Editor (Rancor) add shortcuts for copyright symbols (C) (P)

To test:
1 - Apply patch
2 - Open advanced cataloging editor
3 - Try using Alt+P and Alt+C and note symbols are added
4 - Save record and ensure symbols are saved

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ff374c3d3e9be828491821356c0b1790fa3d397f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19914: Add an id to the Delete button on the library list view
Jonathan Druart [Thu, 4 Jan 2018 13:27:57 +0000 (10:27 -0300)]
Bug 19914: Add an id to the Delete button on the library list view

To ease selenium tests, see bug 19243.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 564acdc4cd7e12885e4d470a929536fb25e442cd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19560: Correctly escape branchcode in admin/branches.pl
Jonathan Druart [Wed, 29 Nov 2017 18:24:40 +0000 (15:24 -0300)]
Bug 19560: Correctly escape branchcode in admin/branches.pl

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d9735ae0d8aff9ca405674df3d2b03183e0883b6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19401: Add confirm message when deleting invoice
Aleisha Amohia [Tue, 3 Oct 2017 02:47:40 +0000 (02:47 +0000)]
Bug 19401: Add confirm message when deleting invoice

To test:
1) Go to Acquisitions
2) Go to Invoices (left nav menu)
3) Click Search (no need to filter results)
4) Click dropdown menu for an invoice, click Details
5) Click Delete
6) Notice invoice is deleted instantly
7) Apply patch and repeat steps 4 and 5
8) Confirm the confirm message shows and works as expected

Sponsored-by: Catalyst IT
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 128d163e1baf7d203373883e03980e3a5f1b2d6c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19429: Rename .delete to .delete_invoice
Jonathan Druart [Thu, 21 Dec 2017 15:42:03 +0000 (12:42 -0300)]
Bug 19429: Rename .delete to .delete_invoice

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ad99cd0f41f792dcd0f308cc31dde16f58bb1522)

6 years agoBug 19429: Add confirm message when deleting invoice from invoice search page
Aleisha Amohia [Tue, 10 Oct 2017 02:17:36 +0000 (02:17 +0000)]
Bug 19429: Add confirm message when deleting invoice from invoice search page

To test:
To test:
1) Go to Acquisitions
2) Go to Invoices (left nav menu)
3) Click Search (no need to filter results)
4) Click dropdown menu for an invoice, click Delete
5) Notice invoice is deleted instantly
6) Apply patch and repeat steps 3 and 4
7) Confirm the confirm message shows and works as expected

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1a7c6c4b202da3246a20705e6a3e8c88340151cb)

6 years agod/control 17.05.08
Mirko Tietgen [Wed, 24 Jan 2018 15:02:26 +0000 (16:02 +0100)]
d/control 17.05.08

https://bugs.koha-community.org/show_bug.cgi?id=17111

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18696: Change debian/source/format to quilt
Mirko Tietgen [Fri, 19 Jan 2018 13:06:48 +0000 (14:06 +0100)]
Bug 18696: Change debian/source/format to quilt

debian/source/format uses 'native'. As Koha is not native Debian software,
and to allow Debian revision numbers like -2 in 16.05.13-2, it should be
changed to 'quilt'.

This is only relevant to packaging and does not affect Koha itself.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoUpdate release notes for 17.05.08 release v17.05.08
Fridolin Somers [Wed, 24 Jan 2018 09:59:55 +0000 (10:59 +0100)]
Update release notes for 17.05.08 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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: Fridolin Somers <fridolin.somers@biblibre.com>
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: Fridolin Somers <fridolin.somers@biblibre.com>
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: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoMerge remote-tracking branch 'translate/17.05.08-translate-20180123' into 17.05.x
Fridolin Somers [Tue, 23 Jan 2018 08:02:23 +0000 (09:02 +0100)]
Merge remote-tracking branch 'translate/17.05.08-translate-20180123' into 17.05.x

6 years agoTranslation updates for Koha 17.05.08
Koha translators [Tue, 23 Jan 2018 07:59:44 +0000 (04:59 -0300)]
Translation updates for Koha 17.05.08

6 years agoIncrement version for 17.05.08 release
Fridolin Somers [Tue, 23 Jan 2018 07:58:37 +0000 (08:58 +0100)]
Increment version for 17.05.08 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20063: (bug 18811 follow-up) Allow hidden $9 subfields
Marcel de Rooy [Wed, 17 Jan 2018 13:26:38 +0000 (14:26 +0100)]
Bug 20063: (bug 18811 follow-up) Allow hidden $9 subfields

Although we could argue that the user should make all $9 subfields
visible, this might be a good compromise. It selectively reverts the
change from the first patch by accepting $9 subfields without checking
the hidden flag in the framework.

Test plan:
[1] Make a subfield $9 visible for some authority field.
[2] Put a value in it somewhere in authorities.pl
[3] Make subfield $9 invisible in the auth framework.
[4] Open and save the adjusted authority record.
[5] Check the marcxml of this record.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9c3eb146fa8ff22452f87afb12cb6de25ac00b5d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19913: Fix embedded HTML5 videos at the OPAC
Jonathan Druart [Wed, 3 Jan 2018 21:12:33 +0000 (18:12 -0300)]
Bug 19913: Fix embedded HTML5 videos at the OPAC

Caused by
commit 752aef4593f1aa2d64700bf9738e7e03907eb1cd
Bug 18754: Translatability: Get rid of exposed tt directives in opac-detail.tt

A space is missing between 'source' and 'src'

Test plan:
Set  HTML5MediaEnabled  to OPAC
Put a video link to 856$u
See the OPAC detail page, tab video, click the video
=> Should play with this patch applied

Note that this does not affect intranet

Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d8080061a64726c3d466f187c223fe4c5234b806)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19918: Close span tag in opac-registration-confirmation.tt
Jonathan Druart [Fri, 5 Jan 2018 14:09:09 +0000 (11:09 -0300)]
Bug 19918: Close span tag in opac-registration-confirmation.tt

Introduced by:
commit 06f4950aa21ff889cff81f27b2f4e79788db193f
Bug 13599 - Add patron cardnumber to self registration confirmation

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6e9a466a7a0fde6a7706ef80ae773ac53d9fc57e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19807: Make IntranetCatalogSearchPulldown honor IntranetNumbersPreferPhrase
Victor Grousset [Wed, 13 Dec 2017 19:16:54 +0000 (20:16 +0100)]
Bug 19807: Make IntranetCatalogSearchPulldown honor IntranetNumbersPreferPhrase

This patch
- fixes callnum and sn
- Removes unecessary syspref transmission to the template.
  As the template directly reads the syspref

Test plan:
1. Set sysprefs IntranetCatalogSearchPulldown and
   IntranetNumbersPreferPhrase to true
2. Go to staff:/cgi-bin/koha/catalogue/search.pl
3. "search for" → "call number" and write anything that won't match a
   call number in the field
4. Then you should see
   «No results match your search for 'callnum,phr: [...]»
5. Go to the staff homepage
6. Click on "Search the catalog"
7. Do the same search as previouly
8. Then you should see
   «No results match your search for 'callnum,wrdl: [...]»
   This shows that IntranetNumbersPreferPhrase isn't honored
9. Apply this patch
10. Redo the same two searches and see that phr will now be always used.
    So IntranetNumbersPreferPhrase is honored

Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit df899212b25250cfac412f14478e481acdd6672a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18183: jQuery append error related to script tags in cloneItemBlock
Marcel de Rooy [Tue, 28 Feb 2017 13:26:22 +0000 (14:26 +0100)]
Bug 18183: jQuery append error related to script tags in cloneItemBlock

See the detailed explanation of the error on Bugzilla.
As a workaround, we move the append of clone to outeritemblock before the
append of data (long string with item fields and script tags) to clone.

This patch also moves two vars inside the success function, since they are
not used outside of it.

Test plan:
[1] Set AcqCreateItem to receiving.
[2] Receive an order. Verify that adding, updating or deleting an item block
    still works as expected.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8386f544b1bf68891b0ce2f68741e9d0115a0d49)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19338: Fix sorting by dates in opac-account.tt
Liz Rea [Tue, 19 Sep 2017 03:29:22 +0000 (15:29 +1200)]
Bug 19338: Fix sorting by dates in opac-account.tt

To test:
Find an account with lots of fines/payments
load up the borrower's account in the OPAC
note that the sort on the dates sorts by day, and not by date.
apply this patch
reload the page, note that the sort on the dates is now correct.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a0072fa491e8607a9aad54d8e07db5d20fefbbfe)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19857: Use BorrowerUnwantedField system preference for SMS provider selection
Lari Taskula [Thu, 21 Dec 2017 11:56:34 +0000 (13:56 +0200)]
Bug 19857: Use BorrowerUnwantedField system preference for SMS provider selection

Optionally hide SMS provider field in patron modification screen with
BorrowerUnwantedField system preference.

To test:
1. Apply patch
2. Append BorrowerUnwantedField with sms_provider_id and save changes
3. Go to patron modification screen in staff client
4. Observe the SMS provider selection is now hidden

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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f20d2f1ea37906c7bbc4be1935fb80295f771152)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19788: Preserve case sensitivity when creating Local preferences
Frédéric Demians [Mon, 11 Dec 2017 07:41:05 +0000 (08:41 +0100)]
Bug 19788: Preserve case sensitivity when creating Local preferences

Fix a bug tranforming new local preference variable name in lowercase.

TO TEST:

1. Admin > System preferences > Local use
2. Button New preference. Fill variable field with 'TESTfoo'. Click
   Save.
3. The new variable is named: 'testfoo'.
4. Apply the patch.
5. Button New preference. Fill variable field with 'TESTfoo2'. Click
   Save.
6. The new variable is properly named: 'TESTfoo2'.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5ff8eca26c8d42cbca1c1e8b6b4ee10f2c45a387)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19788: Add a test
Jonathan Druart [Tue, 19 Dec 2017 14:56:07 +0000 (11:56 -0300)]
Bug 19788: Add a test

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ab7ea3ff3834e1429f1b3244ee45468c43e58684)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19702: Correct cookie path in Basket.js
David Bourgault [Mon, 27 Nov 2017 21:05:48 +0000 (16:05 -0500)]
Bug 19702: Correct cookie path in Basket.js

This corrects the cookie path in bootstrap/js/basket.js. It used to take
the default value (current page path), but will now be "/"

Test plan:
0) Visit the OPAC, add a book to your basket
1) Navigate to the OPAC's homepage (www.domain.com, without the
    /cgi-bin/koha)
    -> The basket will display as empty
    2) Apply patch
    3) Clear your cookies and your cache
    4) Redo step 1)
        -> Basket will display correctly

Patch applies without issue and functions as descibed.
Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7934fea0c4c36f81b943de6c2016f8cedf53486c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19621: Use Koha.Preference on template side to display/hide "Routing lists" tab
Nick Clemens [Mon, 13 Nov 2017 17:18:44 +0000 (17:18 +0000)]
Bug 19621: Use Koha.Preference on template side to display/hide "Routing lists" tab

Patch applies without issue and functions as described.

Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1792ab3d813839b61b060967f4d4f174462eaaa7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18458: Fix subfields ordering when Merging authority records
Janusz Kaczmarek [Sat, 25 Nov 2017 01:28:02 +0000 (02:28 +0100)]
Bug 18458: Fix subfields ordering when Merging authority records

While doing a merge, if a subfield(s) precedes the controlled subfields
(like $i before $a in 7XX, which comes before $a -- rare but will
become more and more usual) after merging will be moved to the end.
This is not right.

The patch (with AuthorityMergeMode == loose) make merge consider the
subfields order: all subfields which originally were found before
the first controlled subfield (e.g. $i before $a in 7XX / MARC 21)
will remain in the front, the rest of not controlled subfields that
should remain in the field will come after the subfields copied
from authority rec.

As a bonus, $9 will be placed at the end.

To test:
0) Have AuthorityMergeMode == loose;
1) Have some field in bibliorecord, controlled by an authority, with
extra subfield(s) (i.e. not present in authority rec.) placed at the
beginning of the field;
2) Open (not necessarily edit) and save the connected authority;
3) See that the extra subfieds were moved to the end of the field
   (and $9 is in the front);
4) Apply the patch;
5) Reorder subfields in biblio field;
6) Open (not necessarily edit) and save the connected authority;
7) See that the order has been conserved, additionally $9 the last
   subfield in the field.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended:
Moved field creation to its original place. Changed $9 handling. Simplified the following add_subfields for loop. Edited comments.
Restored the append_fields_ordered call (see comment6).

With this patch, the Merge.t test now passes.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 806ad212f5c5c765abd657de7891bc41ed24dfcf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18458: Add a subtest in Merge.t
Marcel de Rooy [Fri, 8 Dec 2017 12:45:55 +0000 (13:45 +0100)]
Bug 18458: Add a subtest in Merge.t

This test illustrates the problem we have if you run it without the
second patch. And it serves to demonstrate that we resolved the
situation if you run it after the second patch.

Test plan:
[1] Without the second patch: The last subtest should fail.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 809dc7c9c5557307e5ae4f3443a7529b28b02311)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19813: Make MarcItemFieldsToOrder handle non-existing tags
Kyle M Hall [Thu, 14 Dec 2017 15:31:17 +0000 (10:31 -0500)]
Bug 19813: Make MarcItemFieldsToOrder handle non-existing tags

MarcItemFieldsToOrder defines how Koha looks at tags in order records to generate item data.

Let's look at a simplified case:
homebranch: 955$a
holdingbranch: 956$a

So, here we are looking at 955 for the home branch, and 956 for the holding branch. So, it should make sense that Koha requires that these fields exist in equal number in the record. That is, for each 955, there should be a corresponding 956.

Let's look at a different case:
homebranch: 946$a|975$a
holdingbranch: 946$a|975$a

In this case, we are using the fallback behavior. VendorA stores the branch data in 946, and VendorB stores it in 975. This seems like it would work, but it won't! That's because Koha is expecting there to be the same number of 946's as there are 975's! In reality, the VendorA records will have a number of 946's, and *zero* 975's. The inverse will be true for VendorB.

Koha should be able to skip those tags that simply don't exist in the record.

Test Plan:
1) Set MarcItemFieldsToOrder to something like:
homebranch: 946$a|975$a
holdingbranch: 946$a|975$a
budget_code: 946$f|975$f
itype: 946$y|975$y
notforloan: 946$l|975$l
ccode: 946$t|975$c
quantity: 946$q|975$q
price: 946$p|975$p
itemcallnumber: 946$n|975$n
loc: 946$c|975$t
2) Create a record using only the 975 tag for item building data
3) Import the record into Koha
4) Create a basket
5) Attempt to add the record to the basket
6) Note the unequal fields error
7) Apply this patch
8) Reload the page
9) No error!

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marci Chen <mchen@mckinneytexas.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended: Fix typo occurrance and theses.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 2e5f4af8390478953771656a4cec511503225386)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19760: Fix Config.t test
Jonathan Druart [Fri, 22 Dec 2017 17:04:52 +0000 (14:04 -0300)]
Bug 19760: Fix Config.t test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9924fa4bd287ac665eb6e0c2adc7e7cea165f3f7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19760: Die if koha-conf is not accessible
Jonathan Druart [Wed, 6 Dec 2017 16:58:04 +0000 (13:58 -0300)]
Bug 19760: Die if koha-conf is not accessible

We got a lot of support questions because scripts are executed without
the correct environment/user.
We could die and provide more useful information

Tested on my kohadevbox VM by:

1) sudo chmod a-rx /etc/koha/sites/kohadev/koha-conf.xml
2) run help.pl from the command line to produce the desired die message
3) sudo chmod a+rx /etc/koha/sites/kohadev/koha-conf.xml
4) rerun help.pl successfully

Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 19760: Change wording

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>
(cherry picked from commit be960cc0cda7bb8dbe9a55a3a6e5e1aa0812f006)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19867: Prevent HouseboundRoles.t to fail randomly
Jonathan Druart [Thu, 21 Dec 2017 17:45:51 +0000 (14:45 -0300)]
Bug 19867: Prevent HouseboundRoles.t to fail randomly

Here is just a guess but we need to tell TestBuilder the values of
housebound_deliverer and housebound_chooser to make sure it will not be
1

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
I manually tested setting to the opposite values in the tests, and
verified those values made the tests fail due to count problems.
The fix is valid.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d17e661d30ed614a0790b54cf385da3b539f4a34)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19756: Fix encoding issues during the update DB process
Jonathan Druart [Wed, 20 Dec 2017 21:59:39 +0000 (18:59 -0300)]
Bug 19756: Fix encoding issues during the update DB process

To display the output of the updatedatabase.pl under Plack, we redirect
the output to a temporary file, read it, then display it.
We need to open it specifying the correct encoding (utf-8).

Test plan:
1. MariaDB [koha_kohadev]> update systempreferences set value="17.1100000"
where variable="version";
2. restart plack
3. Login
4. Make the update from the interface
=> Without this patch you will see encoding issue:
Upgrade to 17.12.00.000 done (TÄ\93 tÅ\8dia, tÄ\93 haumatia)
=> With this patch applied you will see :
Upgrade to 17.12.00.000 done (Tē tōia, tē haumatia)

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e52486eeba13987c926ecf0c952644e5bacdc2b0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19573: Link to make a new list in masthead in OPAC only appears / works if no...
Owen Leonard [Thu, 9 Nov 2017 15:54:12 +0000 (15:54 +0000)]
Bug 19573: Link to make a new list in masthead in OPAC only appears / works if no other list already exists

This patch corrects the OPAC masthead include file so that the "New
list" link will appear whether or not the logged-in user has existing
private lists.

To test, apply the patch and log into the OPAC as both a user with
private lists and a user without private lists. The header's "Lists"
dropdown menu should include a "New list" link in both cases.

Signed-off-by: Simon Pouchol <simon.pouchol@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f4c1712f58b8e90704893fb501c5cfc9d12f02a2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19725: OAI-PMH - Use biblio_metadata.timestamp
Julian Maurice [Fri, 1 Dec 2017 15:21:56 +0000 (15:21 +0000)]
Bug 19725: OAI-PMH - Use biblio_metadata.timestamp

Since bug 17196, biblioitems.timestamp is not always updated after a
change in the MARC record.
Filtering should be based on biblio_metadata.timestamp instead.

Test plan:
1. prove t/db_dependent/OAI/Server.t
2. Verify that it SUCCEEDS

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4ea54b678256b164fe9a951a44889ab3502c63b5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19725: Add failing test
Julian Maurice [Fri, 1 Dec 2017 15:18:04 +0000 (15:18 +0000)]
Bug 19725: Add failing test

Also fix tests for UNIMARC

Test plan:
1. prove t/db_dependent/OAI/Server.t
2. Verify that it FAILS

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 55824b09d63ee83a8358c6e6f7740f664d3b86e3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoRevert "Bug 19514: Add client-side check"
Fridolin Somers [Tue, 16 Jan 2018 14:26:04 +0000 (15:26 +0100)]
Revert "Bug 19514: Add client-side check"

This reverts commit f74fc96595b2e98cbfdb9a93312e9aa4e3a1b38e.

6 years agoRevert "Bug 19514: Implement password restrictions into onboarding tool"
Fridolin Somers [Tue, 16 Jan 2018 14:26:02 +0000 (15:26 +0100)]
Revert "Bug 19514: Implement password restrictions into onboarding tool"

This reverts commit 1fdf1398bea79ca60caaea4ccd9b58e3e3f8aa67.

6 years agoBug 19599: Speed anonymise_issue_history up
Jonathan Druart [Thu, 9 Nov 2017 13:34:08 +0000 (10:34 -0300)]
Bug 19599: Speed anonymise_issue_history up

The query generated by anonymise_issue_history is unecessary complex and
can be very slow on large DB.
With this patch we will execute one query per patron instead.

See patch "Bug 19599: Simplify the query" on the bug report for an
alternative.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5be4704347610d269e7d3401f50af46b3202869a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19830: Add the Koha::Patron->old_checkouts method
Jonathan Druart [Mon, 18 Dec 2017 17:27:52 +0000 (14:27 -0300)]
Bug 19830: Add the Koha::Patron->old_checkouts method

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 699340a398c3301eb74619c6dd1d18a4cee0951d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19694: Force scalar context for output_pref called with billingdate
Jonathan Druart [Tue, 19 Dec 2017 18:04:13 +0000 (15:04 -0300)]
Bug 19694: Force scalar context for output_pref called with billingdate

If no string is passed to output_pref, it needs to be called in scalar
context (to avoid a shift in the hash elements).
Here we have billingdate that is not defined yet (NULL)

Test plan:
- Search for an existing invoice
- Show details
- Changing shipping cost
- Save
- Verify the new amount is shown

Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ad550017ff7618e5e4bdb8686a88710480648864)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18201: Unit tests
Nick Clemens [Wed, 4 Oct 2017 12:10:13 +0000 (12:10 +0000)]
Bug 18201: Unit tests

To test:
1. prove -v t/db_dependent/Exporter/Record.t
2. Tests should pass/be green/make the day a little brighter

Signed-off-by: Scott Kehoe <scott@masslibsystem.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4075953c78cf044564c9215c3ea0ecc78789a9e0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18201: Export data -Fix "Remove non-local items" option and add "Removes non...
Nick Clemens [Thu, 13 Apr 2017 14:21:50 +0000 (10:21 -0400)]
Bug 18201: Export data -Fix "Remove non-local items" option and add "Removes non-local records" option for existing functionality

It turns out the modules had the option expected  built in, we just didn't call
it. This patch set expands the options for passing to the export.

To test:
1 - Go to Tools->Export data
2 - Perform an export and check 'Remove non-local items'
3 - Note that file contains only 'local' records, but includes all items
on those records
4 - Apply patch
5 - Note Tools->Export data has a new option to remove records not owned
by logged in branch
6 - Export as before checking records option, file should be as before
7 - Now check 'Remove items not owned by logged in branch'
8 - File should now only have local items (may have empty records)
9 - Check both boxes and recieve only 'local' records and items

Signed-off-by: Scott Kehoe <scott@masslibsystem.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 008920eaeb77ffbabece855682e157936bb89c8b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19510: Add description for edi_manage in acquistion permissions
Chris Weeks [Mon, 18 Dec 2017 22:10:05 +0000 (22:10 +0000)]
Bug 19510: Add description for edi_manage in acquistion permissions

Test Plan:
1/ Login
2/ Select patrons
3/ Search for a patron by name or card number that exists in the system
4/ Click More -> Set permissions
5/ Expand 'acquistions' and notice that 'edi_manage' has no description
6/ Apply patch
7/ Refresh the permissions page or repeat steps 2 to 5.
8/ Notice that 'edi_manage' now has a description of 'Manage EDIFACT transmissions'

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 42f20997dfc126bfa1e8e64af70274b39693890a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19444: (QA follow-up) Remove repeating condition
Julian Maurice [Fri, 15 Dec 2017 09:08:11 +0000 (10:08 +0100)]
Bug 19444: (QA follow-up) Remove repeating condition

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 2b2a031b3adbb1994239cd4aae90665b597e8282)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19444: (QA follow-up) Fix tests for UNIMARC
Julian Maurice [Fri, 15 Dec 2017 08:46:54 +0000 (09:46 +0100)]
Bug 19444: (QA follow-up) Fix tests for UNIMARC

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e4aee4b799574736dfe62355e7d78bfa227e85a2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19444: Display error message for auto_account_expired
Jonathan Druart [Tue, 5 Dec 2017 13:23:09 +0000 (10:23 -0300)]
Bug 19444: Display error message for auto_account_expired

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 439a3f43b67be872ace052d9d9aeb8f6ced1c053)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19444: Do not auto renew if patron is expired and BlockExpiredPatronOpacActions...
Jonathan Druart [Wed, 25 Oct 2017 19:51:28 +0000 (16:51 -0300)]
Bug 19444: Do not auto renew if patron is expired and BlockExpiredPatronOpacActions is set

If the patron's account has expired and BlockExpiredPatronOpacActions is set,
we expect auto renewal to be rejected.

Test plan:
Use the automatic_renewals.pl cronjob script to auto renew a checkout

Before this patch, if the patron's account has expired the auto renew was done.
With this patch, it will only be auto renewed if BlockExpiredPatronOpacActions is not set.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Conflicts:
t/db_dependent/Circulation.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 87680805ddb7ebe8dab62cf709ad5e4eebf80726)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19514: Add client-side check
Jonathan Druart [Mon, 6 Nov 2017 15:22:59 +0000 (12:22 -0300)]
Bug 19514: Add client-side check

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d5fde992ef04faaa7bd3d32aec57cb76cc4672c7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19514: Implement password restrictions into onboarding tool
Alex Buckley [Sat, 21 Oct 2017 00:54:23 +0000 (00:54 +0000)]
Bug 19514: Implement password restrictions into onboarding tool

Test plan:
1. Drop and recreate your database
2. Restart memcached
3. Go through the web installer
4. In the onboarding tool create a patron with a password of only 2 characters in length
5. Notice the patron is successfully created and no warning message is
displayed
6. Repeat step 1,2,3 and create a patron with a password of 3 characters
none of which are a uppercase letter or number and notice the patron is
successfully created and no warning message is displayed
7. Apply patch
8. Repeat steps 1,2,3 and create a patron with a password consisting of
2 characters, notice that after submitting the form the same form is
loaded again and there is a warning message at the top of the page
informing you the patron wasn't created
9. Repeat steps 1,2,3 and create a patron with a password consisting of
3 characters (all lower case) and submit the form, notice the same form
is reloaded and a warning message at the top of the page informs you
that the patron wasn't created because the password was weak
10. Repeat steps 1,2,3 and create a patron with a password consisting of
3 characters (one lower case letter, one upper case letter and one
number) and submit the form and notice this time the next form in the onboarding is displayed with the message at the top of the screen informing you that the patron was successfully created

Sponsored-By: Catalyst IT
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b59a2c4d1104add61daccbd40562a56e6ffa5a53)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 11210: Writeoff partial amounts
David Bourgault [Mon, 25 Sep 2017 17:05:01 +0000 (13:05 -0400)]
Bug 11210: Writeoff partial amounts

Minor changes to pay.pl and paycollect.tt to allow writing off a partial amount of a fine.

Test plan:
0) Go to the Fines tab of a test patron's profile
1) Create a fine if there are none (under the Manual invoice tab)
2) Go to the "Pay fines" tab
3) Press the write off button on the corresponding account line

Without patch, you'll be asked to confirm, but will not be able to edit the amount
With patch, you'll be able to edit the amount.

Followed test plan, patch worked as described. Also ran QA test tool and
modified files passed

Signed-off-by: Simon Pouchol <simon.pouchol@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ab2a92c6f585a964795ac376e8e8f00220e7a537)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19450: Fixed WebService::ILS bug upstream (0.17)
Srdjan [Thu, 12 Oct 2017 00:45:43 +0000 (13:45 +1300)]
Bug 19450: Fixed WebService::ILS bug upstream (0.17)

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 60fa198eab9dcda869ff4703c442c4fe5573c491)

6 years agoBug 17770: Perltidy
Mark Tompsett [Tue, 7 Nov 2017 03:25:52 +0000 (03:25 +0000)]
Bug 17770: Perltidy

Signed-off-by: Your Full Name <your_email>
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 852d36d391f46fec0182716dd5d0f6834ae18fa4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 17770: Improve perlcritic level
Mark Tompsett [Tue, 7 Nov 2017 03:21:36 +0000 (03:21 +0000)]
Bug 17770: Improve perlcritic level

before patch: perlcritic -4 noisy
after patch: perlcritic -4 ok

Signed-off-by: Your Full Name <your_email>
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit cba47ec34769220a58e87cd801a25fabd774b720)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 17770: Fix Sitemapper.t if date changes during test run
Mark Tompsett [Mon, 6 Nov 2017 19:49:27 +0000 (19:49 +0000)]
Bug 17770: Fix Sitemapper.t if date changes during test run

To compensate, DateTime->now is mocked to the current date.

Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1db2234423d56203e6ee1e7567b4437bc2d2c1bc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19669: (QA follow-up) Remove itemstypes.plugin
Kyle M Hall [Thu, 21 Dec 2017 14:17:01 +0000 (09:17 -0500)]
Bug 19669: (QA follow-up) Remove itemstypes.plugin

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit cd56123068d63033dc07b680c196f78bc256e40b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19669: Remove deprecated checkouts by patron category report
Owen Leonard [Tue, 21 Nov 2017 13:56:31 +0000 (13:56 +0000)]
Bug 19669: Remove deprecated checkouts by patron category report

Patch applies. Reports and general OPAC and staff client functionality is intact.
Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5ca2b7fedfb13b80b6c453b184474240d4c46a3e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18923: Warning in Biblio::GetCOinSBiblio
Marcel de Rooy [Mon, 10 Jul 2017 12:54:56 +0000 (14:54 +0200)]
Bug 18923: Warning in Biblio::GetCOinSBiblio

Use of uninitialized value in concatenation (.) or string at C4/Biblio.pm line 1456.
Note: In current master this is now line 1370 (Oct 9, 2017).

Test plan:
Enable COinSinOPACResults.
Select a record with leader pos6==a and pos7==a. This triggers genre to be
journalArticle and titletype to be a.
Without this patch, do an opac search that includes this record.
Check the log. You should see the warning.
Apply this patch, search again and check the log. The warning should not be
repeated again.

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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a82d54d4b4f5eb7aa7d45afc13dac0a80c86f9ce)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19496: [17.05.x] ReplytoDefault is a pref, not a C4::Context method
Jonathan Druart [Thu, 7 Dec 2017 13:52:28 +0000 (10:52 -0300)]
Bug 19496: [17.05.x] ReplytoDefault is a pref, not a C4::Context method

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19496: [17.05.x] Fixing to_address for patron notes
Aleisha Amohia [Mon, 27 Nov 2017 21:33:58 +0000 (21:33 +0000)]
Bug 19496: [17.05.x] Fixing to_address for patron notes

This patch ensures the patron note to_address is the branch email or the
Koha Admin email, and the from_address is the patron's email.

To test:
1) Ensure syspref 'allowcheckoutnotes' is turned on
2) Go to OPAC, leave a note on a checkout
3) Confirm that the note is received (in mysql message_queue) but the
to_address is the patron's email - this is wrong
4) Apply patch and refresh OPAC
5) Leave a note on a checkout
6) Confirm that the note is received in message queue
7) Confirm that the to_address is one of:
- branch email
- branch reply to
- syspref ReplytoDefault
- syspref KohaAdminEmailAddress
8) Confirm that the from_address is one of:
- patron email
- patron emailpro
- patron B_email

Sponsored-by: Catalyst IT
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19602: Add usage statistics link to administration sidebar menu
Owen Leonard [Thu, 9 Nov 2017 16:47:42 +0000 (16:47 +0000)]
Bug 19602: Add usage statistics link to administration sidebar menu

This patch adds a link to the new usage statistics page in the
administration sidebar menu.

To test, apply the patch and view an administration page which includes
the admin sidebar. Confirm that the link to usage statistics is there.

Visit the usage statistics page and confirm that the usage statistics
link in the sidebar is display in bold.

Signed-off-by: Simon Pouchol <simon.pouchol@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9d79d463250c430678f724f265500776f541cd42)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoUpdate release notes for 17.05.07 release v17.05.07
Fridolin Somers [Sat, 23 Dec 2017 10:12:22 +0000 (11:12 +0100)]
Update release notes for 17.05.07 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoMerge remote-tracking branch 'translate/17.05.07-translate-20171223' into 17.05.x
Fridolin Somers [Sat, 23 Dec 2017 09:59:44 +0000 (10:59 +0100)]
Merge remote-tracking branch 'translate/17.05.07-translate-20171223' into 17.05.x

6 years agoIncrement version for 17.05.07 release
Fridolin Somers [Sat, 23 Dec 2017 09:48:41 +0000 (10:48 +0100)]
Increment version for 17.05.07 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19614: Fix XSS in members/pay.pl
Amit Gupta [Mon, 13 Nov 2017 03:57:44 +0000 (09:27 +0530)]
Bug 19614: Fix XSS in members/pay.pl

To Test
1. Hit the page /cgi-bin/koha/members/memberentry.pl
2. Add a text in the field firstname, surname that contains js
3. Save the page.
4. click on fine tab
5. Notice js is execute
6. Apply patch and reload, the js is escaped

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e576b89c461c87efc122816fca9f6c3ba08a1833)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19612: Fix XSS in members/memberentry.pl
Amit Gupta [Mon, 13 Nov 2017 03:35:14 +0000 (09:05 +0530)]
Bug 19612: Fix XSS in members/memberentry.pl

To Test
1. Hit the page /cgi-bin/koha/members/memberentry.pl
2. Add a text in the field address, address2, city, state, country,
   zipcode, B_streetnumber, B_city, B_country, B_zipcode that contains js
3. Save the page.
4. Notice js is execute
5. Apply patch and reload, the js is escaped

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4333617b1d33b2c7c0488de593c76ac79f4ebf70)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19611: Fix XSS Flaws in supplier.pl
Amit Gupta [Sun, 12 Nov 2017 15:44:41 +0000 (21:14 +0530)]
Bug 19611: Fix XSS Flaws in supplier.pl

Test
1. Hit the page /cgi-bin/koha/acqui/supplier.pl?op=enter
2. Add a text in the field Name that contains java script
3. Save the page.
4. Notice js is execute
5. Apply patch and reload the js is escaped

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 99d327a5ea039b98f2bb19a3ef29431b33437cb7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19319: Only fetch the record if it exists
Jonathan Druart [Fri, 8 Dec 2017 17:57:15 +0000 (14:57 -0300)]
Bug 19319: Only fetch the record if it exists

We already know if the bibliographic record exists (404 redirect),
we can avoid unecessary fetches

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 33b0a26a5bf32de1ffead556269d8f8e27289521)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19319: (QA follow-up) Biblionumber leftovers in opac-detail.tt
Marcel de Rooy [Fri, 8 Dec 2017 08:46:02 +0000 (09:46 +0100)]
Bug 19319: (QA follow-up) Biblionumber leftovers in opac-detail.tt

Correcting a few biblionumber template var leftovers in opac-detail
template. They were combined with url filter instead of html.

Test plan:
[1] Look for [^.;?]biblionumber in opac-detail.tt and verify that these
    occurrences are fine.

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>
(cherry picked from commit 102456b27388dad8e6043c36e773a5a005bd451e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19319: Reflected XSS Vulnerability in opac-MARCdetail.pl
Kyle M Hall [Thu, 14 Sep 2017 15:52:08 +0000 (11:52 -0400)]
Bug 19319: Reflected XSS Vulnerability in opac-MARCdetail.pl

Try going to this URL on your site: /cgi-bin/koha/opac-MARCdetail.pl?biblionumber=2"><TEST>

Test Plan:
1) Go to /cgi-bin/koha/opac-MARCdetail.pl?biblionumber=2"><TEST>
2) Note <TEST> is embedded all over the html
3) Apply this patch
4) Refresh the page, note the injection is gone!
5) run koha qa test tools

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 617e87c59d0b270d424aa4f1977e3e95c019e0b5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19570: Add autocomplete to opac-main as well
Mark Tompsett [Mon, 6 Nov 2017 15:10:45 +0000 (15:10 +0000)]
Bug 19570: Add autocomplete to opac-main as well

To confirm all the files were modified for opac, typed
this:
$ git grep -i password | grep opac | grep -v "[.]po:" | grep
"opac[^/]*[.]tt:" | cut -f1 -d: | sort -u

The follow output was handled as follows:
    koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt
    koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt
    koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-passwd.tt
    koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-confirmation.tt
These were already done in the first patch.

    koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt
This already had the autocomplete modification.

    koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
This was a false-find. There was no modification necessary.

    koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt
This is the modal login in. This patch amends it.

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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9b141bcd3dbeebd91d4df20205f57bbc564cbb32)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19570: Add autocomplete='off' for login forms at the opac
Jonathan Druart [Thu, 2 Nov 2017 19:24:00 +0000 (16:24 -0300)]
Bug 19570: Add autocomplete='off' for login forms at the opac

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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 541603db17ea08b44bab50219f3634946a13e64a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19569: Set X-Frame-Options=SAMEORIGIN - opac-showmarc.ok
Jonathan Druart [Thu, 2 Nov 2017 19:14:12 +0000 (16:14 -0300)]
Bug 19569: Set X-Frame-Options=SAMEORIGIN - opac-showmarc.ok

Before and after:
wget 'http://catalogue.kohadev.org/cgi-bin/koha/opac-showmarc.pl?id=1&viewas=html'
must be the same

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 727f915c1b2e2ee7869d14d852b48eeaa67735ae)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19568: Escape url params with url filter - opac-opensearch.tt
Jonathan Druart [Thu, 2 Nov 2017 19:13:32 +0000 (16:13 -0300)]
Bug 19568: Escape url params with url filter - opac-opensearch.tt

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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a33cfa4506711f83abaa3f6de049ebbe76e13931)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoTranslation updates for Koha 17.05.07
root [Sat, 23 Dec 2017 09:52:01 +0000 (06:52 -0300)]
Translation updates for Koha 17.05.07

6 years agoBug 19751: Holds awaiting pickup report should not be fixed-width
Owen Leonard [Tue, 5 Dec 2017 15:26:58 +0000 (15:26 +0000)]
Bug 19751: Holds awaiting pickup report should not be fixed-width

This patch changes the grid used for the holds awaiting pickup report so
that the results are full page and fluid instead of fixed-width.

To test, apply this patch and the patch for Bug 19700 if necessary.

View the holds awaiting pickup report. The report should fluidly fill
the page width.

Test with the CircSidebar system preference enabled and disabled.

Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: BWS Sandboxes <ByWaterSandboxes@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 232b3cf25374f07ee2966231c5e5294ef16965a4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19775: Try & prevent Search/History.t to fail randomly
Jonathan Druart [Thu, 7 Dec 2017 16:41:06 +0000 (13:41 -0300)]
Bug 19775: Try & prevent Search/History.t to fail randomly

 #   Failed test 'There are still 8 searches after calling delete with an interval = 6 days'
 #   at t/db_dependent/Search/History.t line 185.
 #          got: '6'
 #     expected: '8'

 #   Failed test 'There are still 2 searches after calling delete with an interval = 2 days'
 #   at t/db_dependent/Search/History.t line 191.
 #          got: '0'
 #     expected: '2'
 # Looks like you failed 2 tests of 27.
[15:04:12] t/db_dependent/Search/History.t

It looks like it does not longer fail with this change (date comparaison wrongly rounded to second in mysql?)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 68a6d049869789618af1ddba9802b6d593593d09)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19724: DBIC Schema changes
Jonathan Druart [Thu, 7 Dec 2017 13:26:32 +0000 (10:26 -0300)]
Bug 19724: DBIC Schema changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7e691bc6d8695377e12896be085039c81115e4d0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18907: Build has deprecating message
Mark Tompsett [Thu, 6 Jul 2017 15:42:43 +0000 (15:42 +0000)]
Bug 18907: Build has deprecating message

Following the instructions at:
https://wiki.koha-community.org/wiki/Building_Debian_Packages_-_The_Easy_Way
Receiving the following message in the build:
dpkg-source: warning: relation < is deprecated: use << or <=

This patch tweaks the list-deps.
git diff origin/master -- debian/list-deps shows just the one line
changed from < to << as per the messages suggestion and eythian's
suggestion on IRC:
http://irc.koha-community.org/koha/2017-07-06#i_1950698

The control file can be regenerated from the command-line:
./debian/update-control
However, it will be attached separately.

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>
(cherry picked from commit d8a16dd89a2853837e87eec1b1ec0d419ede1b55)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 12497: Fix OPAC search history reachable by URL even when disabled
Victor Grousset [Fri, 24 Nov 2017 11:02:47 +0000 (12:02 +0100)]
Bug 12497: Fix OPAC search history reachable by URL even when disabled

Test plan:
1. Set EnableOpacSearchHistory syspref to "Keep"
2. Make a search in the OPAC
3. Go to /cgi-bin/koha/opac-search-history.pl
4. Set the EnableOpacSearchHistory syspref to "Don't keep"
5. Refresh the OPAC page to show that history is still accessible
6. Apply the patch
7. Refresh the OPAC page, you should end on the 404 page
8. Set EnableOpacSearchHistory syspref to "Keep"
9. Go to /cgi-bin/koha/opac-search-history.pl which should be reachable

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Charles Farmer <charles.farmer@inLibro.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>
(cherry picked from commit b90824527b47e78e56e2f602199481325beeec15)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 12497: Fix search history non-accessible when OPAC was private
Victor Grousset [Thu, 23 Nov 2017 15:03:14 +0000 (16:03 +0100)]
Bug 12497: Fix search history non-accessible when OPAC was private

(when the user didn't have the "borrowers" permission)

Test plan:
1. Set syspref "OpacPublic" to false (Disable)
2. Log in as a user without any permission
3. Try to access the search history. The link is next to "Log out"
4. Then you should see "Access denied"
5. Apply this patch
6. Refresh the page
7. Then you should see the search history

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Charles Farmer <charles.farmer@inLibro.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>
(cherry picked from commit adb37ce8cf10fee1c81ee35d703ec3a81c82697d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19674: Broken indicators of changed fields in manage staged MARC records template
Owen Leonard [Tue, 21 Nov 2017 16:17:32 +0000 (16:17 +0000)]
Bug 19674: Broken indicators of changed fields in manage staged MARC records template

This patch returns some CSS to the manage staged MARC records template
which was incorrectly removed by Gug 16538.

To test, apply the patch and go to Tools -> Staged MARC management.
Choose a staged MARC file.

Changing any of the <select> fields in the first section should cause a
label to appear showing that the selection has changed, along with a
link to reset the option to its original state. Clicking 'Reset' should
make the label and the link disappear.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
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>
(cherry picked from commit ca95a10d90ebfec7a82b6224569f29df6059fd5b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19595: Clicking plugin link does not fill item's date acquired field
Owen Leonard [Fri, 10 Nov 2017 12:59:58 +0000 (12:59 +0000)]
Bug 19595: Clicking plugin link does not fill item's date acquired field

This patch updates the dateaccessioned plugin for the item edit form to
return functionality which was removed in a previous patch.

To test, apply the patch and open an item for editing. Clicking the
"..." link next to the "Date acquired" field should insert the current
date, overwriting the existing date.

Open a blank item add form. Putting the cursor in the "Date acquired"
field should automatically insert the current date.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Added a comment line in set_to_today.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 18897829e4bd585d5adb16681ce6dd648b368c66)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19724: DBRev 17.05.06.001
Fridolin Somers [Wed, 20 Dec 2017 11:25:32 +0000 (12:25 +0100)]
Bug 19724: DBRev 17.05.06.001

6 years agoBug 19724: Add timestamp to biblio_metadata and deletedbiblio_metadata
Nick Clemens [Thu, 14 Dec 2017 12:01:38 +0000 (12:01 +0000)]
Bug 19724: Add timestamp to biblio_metadata and deletedbiblio_metadata

Since bug 17196, biblioitems.timestamp is not always updated after a
change in the MARC record.
We need to know the last modification time of the MARC record for some
features (like OAI-PMH parameters 'from' and 'until' for instance)

This patch only adds the missing column in biblio_metadata and
deletedbiblio_metadata

Test plan:
1. Run updatedatabase.pl
2. Verify that both tables have the new column, its value should be the
   greatest timestamp value from the corresponding biblio and
   biblioitems table entries
   You can verify with the following SQL query:
     SELECT b.biblionumber, b.timestamp as biblio_ts,
     bi.timestamp as biblioitems_ts, m.timestamp as biblio_metadata_ts
     FROM biblio_metadata m
     LEFT JOIN biblioitems bi ON (bi.biblionumber = m.biblionumber)
     LEFT JOIN biblio b ON (b.biblionumber = m.biblionumber);

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druat <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4db611b5dc83e2d865aaba4afe04cd5aaa89904e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19638: Remove false positive obsolete reports (auth_header.marcxml)
Jonathan Druart [Mon, 4 Dec 2017 18:39:48 +0000 (15:39 -0300)]
Bug 19638: Remove false positive obsolete reports (auth_header.marcxml)

Bug 17898 tries to help users identify reports affected by the move of marcxml to the biblio_metadata table, however, the auth_header table still uses the column name 'marcxml' and so reports as needing updated though it doesn't.

C4::Reports::Guided::convert_sql only converts if the sql query contain biblioitems and marcxml.
We should use the same regexp in the controler script.

Test plan:
Use a sql report that use auth_header.marcxml (see https://wiki.koha-community.org/wiki/SQL_Reports_Library)
After the this the report should not be longer marked as obsolete on the report list view

Replicated bug with the following SQL:
select marcxml from auth_header;

Patch applied correctly and functioned as expected.

Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit fff0065785b0cd7e664eac3285a5f051cb94871a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 10222: Correct and expand to other languages
Mark Tompsett [Mon, 23 Oct 2017 14:00:53 +0000 (14:00 +0000)]
Bug 10222: Correct and expand to other languages

This added column names, and reformated to be a bit more readable.
This also adds this change to de-DE, es-ES, fr-CA, and nb-NO.
While there was printer_profiles for it-IT, the Italian file seems
to not use the same numbers, and does not visibly look like it needs
these changes.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit fdde85a52164168d998d995ce41b4421b4a3ffbb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 10222: Error when saving Demco label templates
Chris Nighswonger [Thu, 16 Apr 2015 16:07:29 +0000 (12:07 -0400)]
Bug 10222: Error when saving Demco label templates

This patch fixes a bug whereby if you open either of the
Demco label templates (loaded by the sample data) and
click "save" without making any changes you will get an
error:

Can't bless non-reference value at C4/Creators/Profile.pm
line 92.

It also fixes another minor bug in the creator sample data.

To test:

1. Install all sample data in a clean database.
2. In the label tool, edit either of the Demco label templates.
3. Save the template and observe the error mentioned above.
4. Drop and recreate the database.
5. Apply the patch.
6. Repeate steps 1-3 and note the successful save.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d3eef921f501634d3656b9d08abafa55b3ed6c07)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18990: Overdue Notices are not sending through SMS correctly
Nick Clemens [Fri, 28 Jul 2017 11:58:46 +0000 (11:58 +0000)]
Bug 18990: Overdue Notices are not sending through SMS correctly

Bug 18478 fixed sms via email problems under the assumption that
to_address was either smsalertnumber or blank.

It seems overdues set the to_address to email. This patch changes the
code to enforce that an sms sent with emial driver will use the
smsalertnumebr and provider defined for the borrower, regardless of what
is set in the queue

To test:
 1 - Define a messaging prefs for a patron to recieve hold notices via
  SMS
 2 - Ensure you have defined an SMS message for an overdue letter
 3 - Set an SMS alert number for patron
 4 - Set the SMS::Send driver to 'Email'
 5 - Checkout an item as overdue to trigger notice above
 6 - Run overdue_notices.pl
 6 - Check the db and note the address is email
 7 - run process_message_queue.pl
 8 - Check db - address is email followed by service provider
 9 - Apply patch
 10 - repeat
 11 - Message to_address should be populated with smsalertnumber

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>
(cherry picked from commit a7aab6d30b0a14c58bc0ab355ff284bd60750103)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19643: Pagination buttons on staged marc management are stacking instead of inline
Owen Leonard [Thu, 16 Nov 2017 19:19:33 +0000 (19:19 +0000)]
Bug 19643: Pagination buttons on staged marc management are stacking instead of inline

This patch modifies the template for staged MARC import management to
correct a problem with the style of pagination links.

To test you must have more than 25 staged imports. Go to Tools -> Staged
MARC management. The pagination links, both at the top and the bottom,
should look correct (use multi-page SQL report results for reference).

Signed-off-by: Nick Clemens <nick@bywatersolutions.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>
(cherry picked from commit e0c3780634ef35ad937f69721aaeafa7bf9a4fee)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19681: Correct result count formatting
David Bourgault [Wed, 22 Nov 2017 18:58:21 +0000 (13:58 -0500)]
Bug 19681: Correct result count formatting

This simply passes the missing information to the template.

Test plan:
0) Apply patch
1) Go to Tools > Label creator > New > Label batch
2) Press 'Add items'
3) Do a search that will return few items
4) The result count will read "Results 1 through X of X"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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>
(cherry picked from commit ef8c92ce21e1ea983da3445045236939b1de90fe)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19692: fix unclosed div in opac-shelves.tt
Simon Pouchol [Fri, 24 Nov 2017 15:53:49 +0000 (16:53 +0100)]
Bug 19692: fix unclosed div in opac-shelves.tt

Test plan:
1. set syspref OpacKohaUrl to "Show"
2. Log into the OPAC
3. /cgi-bin/koha/opac-shelves.pl
4. Notice that "Powered by Koha" is not in the footer in this page.
  When on the other tabs it's in the footer (out of .main)
5. Apply this patch
6. Notice that "Powered by Koha" now in the footer in the "your lists" page

Signed-off-by: Dominic Pichette <dominic@inlibro.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>
(cherry picked from commit 30f2b40f3c408a1f81eae57c5012e6283eccb3d0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19533: Hold pulldown for itemtype is empty if hold placement needs override
Kyle M Hall [Thu, 26 Oct 2017 11:35:53 +0000 (07:35 -0400)]
Bug 19533: Hold pulldown for itemtype is empty if hold placement needs override

Test Plan:
1) Enable AllowHoldPolicyOverride
2) Enable AllowHoldItemTypeSelection
3) Create a situation where adding a hold for a patron would trigger a tooManyReserves
   warning.
4) Note the itemtype pulldown is empty
5) Apply this patch
6) Reload the page
7) Itemtype pulldown should have values

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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e2d05f3fdfde20977ca5525510e8f4c0daa964f1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18833: Plugin unimarc_field_210c pagination error
Fridolin Somers [Wed, 21 Jun 2017 11:05:40 +0000 (13:05 +0200)]
Bug 18833: Plugin unimarc_field_210c pagination error

In plugin unimarc_field_210c, the editors search results have pagination.
First page works but not other pages.

The main problem whas mainly because $startfrom var was missused. It is defined in C4::Output::pagination_bar as page number.
This patch corrects by using a $offset var.
Also removes dead code, obsoleted by using C4::Output::pagination_bar.
Also changes hardcoded results per page from 19 to 20.

Test plan :
- Use UNIMARC catalogue
- Define in framework value builder unimarc_field_210c on 210$c
- Create autority type EDITORS with heading 200$b
- Create 22 authorities of that type
- Index those new authorities
- Create a new biblio record
- Click on 210$c plugin
- Click on "Search"
- You see 20 results
- Click on page 2
=> Without patch you get empty table
=> With patch you get 2 results
- Check that you see "Results 21 to 22 of 22"
- Delete 2 autorities and retest

Works as intended.

Signed-off-by: Simon Pouchol <simon.pouchol@biblibre.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>
(cherry picked from commit 455d94eec9c41f7bad718ac62c2367bea6202452)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19640: fix OPAC IdRef webservice display
Fridolin Somers [Thu, 16 Nov 2017 14:22:48 +0000 (15:22 +0100)]
Bug 19640: fix OPAC IdRef webservice display

The OPAC webservice IdRef display was broken.
The call returns results but citations where empty.
Maybe the webservice has changed.

This patch corrects the fetch of datas in result.
Also fixes a small HTML missing tag tr.
Also adds a comment with link to official doc :
http://documentation.abes.fr/aideidrefdeveloppeur/index.html#MicroWebBiblio

Test plan :
1) Enable system preference IdRef
2) Choose an existing PPN like 032581270
3) Look result on : https://www.idref.fr/services/biblio/032581270.json
4) Call in OPAC website : /cgi-bin/koha/opac-idref.pl?unimarc3=032581270
5) Without patch you see only one role containing empty rows
6) With patch you see all roles with correct rows

Signed-off-by: Simon Pouchol <simon.pouchol@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended: removed unused @unimarc3 (not to be confused with $unimarc3).

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 803c70cef8e88dae25394ca7d2fc645f1b514ad8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19646: (QA follow-up) Fix tab character
Marcel de Rooy [Fri, 24 Nov 2017 08:27:14 +0000 (09:27 +0100)]
Bug 19646: (QA follow-up) Fix tab character

Resolve qa tools warning:
 FAIL   koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_linking_section.tt
   FAIL   forbidden patterns
                forbidden pattern: tab char (line 172)

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>
(cherry picked from commit 58b6f1cd9e466c375526b01b801bb5de61e37706)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19646: fix value_builder marc21_linking_section template
Fridolin Somers [Fri, 17 Nov 2017 12:38:06 +0000 (13:38 +0100)]
Bug 19646: fix value_builder marc21_linking_section template

When using marc21_linking_section cataloging plugin, you get the error :
Template process failed: undef error - The method selected is not
covered by tests! at /home/koha/src/C4/Templates.pm line 122.

It commes from [% IF ( itypeloo.selected ) %], selected is not defined
in itypeloo.

This patch removes this condition because all item types are fetched
from database, there is not one selected. It sets "All item types" as
selected. Also correctes two errors in HTML : ending form and div,
"<a_class=" instead of "<a class="

Test plan :
1) Use a MARC21 database
2) Define marc21_linking_section cataloging plugin in framework, on
   773$t for example
3) Create a new biblio record
4) Click on icon in 773$t
5) Check plugin works fine

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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>
(cherry picked from commit 5a852cadaf9fddc38618e22d4fad1e1b7a3f9120)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19683: Fix authority types in tools/export template
David Bourgault [Wed, 22 Nov 2017 19:35:27 +0000 (14:35 -0500)]
Bug 19683: Fix authority types in tools/export template

Fixes the bug by correcting the variable names in the template.

To test:
1) Tools > Export > Export authority records
2) Authority Types dropdown is not empty

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended: Changing the export script and unblessing is not needed.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 47f65da22e63a35fdecf6857016983869d6855cb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>