koha.git
7 years agoAdd release notes to 16.11.04 security release v16.11.05
Koha instance kohadev-koha [Thu, 16 Mar 2017 23:24:44 +0000]
Add release notes to 16.11.04 security release

7 years agoMerge remote-tracking branch 'transl/16.11.05-translate-20170316' into 16.11.x
Katrin Fischer [Thu, 16 Mar 2017 23:09:17 +0000]
Merge remote-tracking branch 'transl/16.11.05-translate-20170316' into 16.11.x

7 years agoTranslation updates for Koha 16.11.05
root [Thu, 16 Mar 2017 22:55:44 +0000]
Translation updates for Koha 16.11.05

7 years agoIncrement version for 16.11.05 release
Katrin Fischer [Thu, 16 Mar 2017 22:50:07 +0000]
Increment version for 16.11.05 release

7 years agoBug 18275: Do not rely on CGI param userid to log a user in if auth is not required
Jonathan Druart [Wed, 15 Mar 2017 17:52:49 +0000]
Bug 18275: Do not rely on CGI param userid to log a user in if auth is not required

From opac/opac-memberentry.pl, authnotrequired is set.
That means a patron can access the page without being logged in. It is
used on this page for the self registration feature.

From C4::Auth::get_template_and_user, we have
  $userid = $q_userid;
$q_userid is previously set to the 'userid' CGI param.

We end up here if authonotrequired is set AND CGISESSID does not exist.

Test plan:
- Run:
  $ prove t/db_dependent/Auth.t
=> FAIL: Regression test for checkauth fails
- Apply this patch
- Run:
  $ prove t/db_dependent/Auth.t
=> SUCCESS: Tests pass.
- Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

7 years agoBug 18275: Regression test
Tomas Cohen Arazi [Thu, 16 Mar 2017 12:23:24 +0000]
Bug 18275: Regression test

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

7 years agoBug 16202: GetIssuingCharges should return a collectable amount
Colin Campbell [Tue, 5 Apr 2016 11:56:24 +0000]
Bug 16202: GetIssuingCharges should return a collectable amount

Charges should not include elements less than a penny/cent
they are not displayed but can be saved to the database
causing "odd" behaviour down the line

Make the routine round the resultant charge to nearest cent,
so consistent values are returned.
Removed the one case where it was rounded post call.
Although the main danger is values generated by the discount
calculation apply the rounding to all returned charges in case
the item charge is defined using the 3rd or 4th decimal
places.

NOTE: prove -v t/db_dependent/Circulation.t triggers the change.
      Though, all the returned amounts are 0.00 only.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d84ed89557e2c921f261b1c620434d432dcbd3f7)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 7143: Replace Santallan by Santellan
Marcel de Rooy [Thu, 19 Jan 2017 14:43:38 +0000]
Bug 7143: Replace Santallan by Santellan

Missed one typo in about.tt.
Can go along with the next patch here.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 13de29ad4465b964e37d4f460f5c9145e23939a1)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 18135: Show alert if no authorities selected in batch record deletion
Aleisha Amohia [Thu, 16 Feb 2017 22:19:59 +0000]
Bug 18135: Show alert if no authorities selected in batch record deletion

To test:
1) Go to Tools -> Batch record deletion
2) Select Authorities as record type, put in an auth id, click Continue
3) Unselect the authorities and click Delete selected records
4) Confirm an alert shows up
5) Clear the alert and confirm deleting the authority still works as
normal

Sponsored-by: Catalyst IT

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7a5f17ff6ecbec3a7f73fa54b900dae909996b29)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 18122 - Audio alerts: Add hint on where to enable sounds
Marc Véron [Wed, 15 Feb 2017 09:24:56 +0000]
Bug 18122 - Audio alerts: Add hint on where to enable sounds

This patch adds a hint to page Home > Administration > Audio alerts
and related help page about where to enable the sound system
(syspref 'AudioAlerts').

To test:
- Apply patch
- Disable syspref 'AudioAlerts'
- Go to Home > Administration > Audio alerts
- Note hint below title 'Audio alerts'
- Enable syspref 'AudioAlerts'
- Go to  Home > Administration > Audio alerts
- Hint is no longer visible (since audios are enabled)
- Open Help page (top right)
- Verify that hint on help page makes sense.

Amended to add alert class as requested by comment #2 2017-02-21 mv

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b6cb18c4a8292cabe5fd611b349b51d5c79b5fe4)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 17840: adding classes to notes in checkouts
Emma Smith [Tue, 17 Jan 2017 03:23:18 +0000]
Bug 17840: adding classes to notes in checkouts

Test Plan
1) Add an internal and a public note to an item.
2) Check out the item.
3) Verify that both notes are shown in between title and barcode in the
second column of the details table.
4) Verify there is an empty class="" in the HTML source code for each
5) Apply patch and refresh page
6) View page source, confirm that class has been changed

I tested this by first applying the patch for bug 17919 to catch the
check-in software error. Patch working as expected :)

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 257c1793420108f1cb5efdec7bf03649d41940a0)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 13968: Follow up - Clean HTML tags for hints
Mark Tompsett [Tue, 21 Feb 2017 18:13:02 +0000]
Bug 13968: Follow up - Clean HTML tags for hints

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e9d5615e70056cd887b9471827611a78275016ab)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 13968 - Branch email hints are misleading
Marc Véron [Sat, 18 Feb 2017 16:15:06 +0000]
Bug 13968 - Branch email hints are misleading

This patch replaces missleading notes with Reply-To and Return-Path fields
to reflect indicate falback values if they are empty (ReplyToDefault and
ReturnpathDefault system prefs).

To test:
- Apply patch
- In Home > Administration > Libraties and Groups, edit a library
- Verify that hints display for fields Reply-To and Return-Path, indicating
  their default values.

Amended to remove extra </li> - 2017-02-21 mv

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b2eb6109ff308de7d2bc9338d708ac7fe9b6e3d7)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 18087: Handle invalid filetypes
Jonathan Druart [Tue, 14 Feb 2017 09:52:14 +0000]
Bug 18087: Handle invalid filetypes

If an invalid file is used as biblionumber list, we should display a
message.

Test plan:
1/ Use csv, plain text files
=> Should work
2/ Use invalid files (binary files like pdf, doc*, xsl*, etc.)
=> Should not work and see a warning message.

Amended patch after signoff: Remove one warn debug line

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d43131c4fca8124a8a9e4dcdea82e2bdf1af196a)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 18087 - Clarification on File type when using file of biblionumbers to export...
Joy Nelson [Thu, 9 Feb 2017 19:42:57 +0000]
Bug 18087 - Clarification on File type when using file of biblionumbers to export data

Added a line to the screen  detailing the types of files that can be used to upload a list of biblionumbers.

Test plan:
1. Go to tools->export data
2. under File option,  (File types accepted: .csv and .txt)  should appear
3. Check both Bibliographic and Authority Export screens for this new string.

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 18af48bffe112a5df61a8a546da86dc31f32a7e7)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 17260: DBRev 16.11.04.001
Katrin Fischer [Sun, 12 Mar 2017 22:09:39 +0000]
Bug 17260: DBRev 16.11.04.001

7 years agoBug 17260: updatedatabase.pl fails on invalid entries in ENUM and BOOLEAN columns
Blou [Fri, 27 Jan 2017 16:51:26 +0000]
Bug 17260: updatedatabase.pl fails on invalid entries in ENUM and BOOLEAN columns

The loading of file admin/searchengine/elasticsearch/mappings.yaml
specifies 'type' as empty, which fails with Mysql 5.7+ which is more
stringent.

Also, forcing an empty value into a boolean also fails.

Both issues arise when updatedatabase.pl hit 3.23.00.050.

NOTE: both issues could also be resolved by actually setting values in
      the load file. This doesn't make this solution incorrect, though.

To Test/reproduce:
-1) Happens with Mysql 5.7.4.  Maybe earlier, but certainly at
    that point. Use a Xenial kohadevbox to more easily test.
0) Find a database on 3.22 or earlier, save it.
    a) place
           sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
       into the [mysqld] section of /etc/mysql/mysql.conf.d/mysqld.cnf
    b) restart you mysql server
    c) drop the db and recreate it
    d) checkout the 3.22.x branch
    e) do a web install
    f) remove the added sql_mode
    g) restart the mysql server
1) Set your code base to master
2) run updatedatabase.pl
3) See the errors on 3.23.00.050
4) Apply the patch
5) Reload the 3.22 db.
   a) repeat steps 0(a)-0(g)
   b) don't forget the caching issues
6) succeed with updatedatabase.pl
7) drop the db and recreate it
8) run the web installer
9) notice no issues either.
10) run koha qa test tools

NOTE: This bug only solved the upgrade portion.
      I added the kohastructure.sql change as well.
      I confirmed that all the code changes were
      triggered with this test plan.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Mehdi Hamidi <mehdi.hamidi@inlibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 77337a2ab537843eab70cc06b8bc2531ad2014dc)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 18248: Fix SQL statement to setting marc_subfield_structure.authorised_value...
Jonathan Druart [Wed, 23 Nov 2016 14:47:10 +0000]
Bug 18248: Fix SQL statement to setting marc_subfield_structure.authorised_value to NULL

We want to update it if it's empty, not equal to ';'
nopaste vim mode is to blame

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 11bae489bc85a9463712c9caafd2caf7b63155d9)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 17947: Searching my library first shows the branchcode by the search bar rather...
Aleisha Amohia [Mon, 23 Jan 2017 22:32:39 +0000]
Bug 17947: Searching my library first shows the branchcode by the search bar rather than branchname

Test Plan
1: Turn on SearchMyLibraryFirst and go into OPAC
2: It should say Search (in <Branch Code> Only)
3: Apply patch and refresh page. It should now say Search (in <Library Name> only)

Sponsored-by: Catalyst IT

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e8420b5d80558a8a74f7f6a1421352dcad2c9c88)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 17895: 'Re-set' typo fix
Aleisha Amohia [Fri, 13 Jan 2017 00:19:48 +0000]
Bug 17895: 'Re-set' typo fix

To test:
1) Log into OPAC and go to change your password
2) Enter current password incorrectly and click Submit changes
3) Observe error message and typo 're-set'
4) Apply patch and refresh page
5) May be asked to resend data - if so, click Resend, if not, repeat
step 2
6) Observe error message and corrected spelling of 'reset'

Sponsored-by: Catalyst IT
Signed-off-by: Caitlin Goodger <caitlingoodger.student@wegc.school.nz>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 86ec263b2d0994ecb53ff283ef246b529d4570e2)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoAdd release notes for the 16.11.04 release v16.11.04
Katrin Fischer [Tue, 21 Feb 2017 21:50:20 +0000]
Add release notes for the 16.11.04 release

7 years agoFix broken ar-Arab staff po file
Katrin Fischer [Tue, 21 Feb 2017 21:39:32 +0000]
Fix broken ar-Arab staff po file

<failure message="msgfmt failure">misc/translator/po/ar-Arab-staff-prog.po:8952: 'msgstr' is not a valid C format string, unlike 'msgid'. Reason: The character that terminates the directive number 18 is not a valid conversion specifier.
 msgfmt: found 1 fatal error
 8098 translated messages.
</failure>

7 years agoTranslation updates for 16.11.04 release
Katrin Fischer [Tue, 21 Feb 2017 21:30:20 +0000]
Translation updates for 16.11.04 release

Merge remote-tracking branch 'transl/16.11.04-translate-20170221' into 16.11.x

7 years agoTranslation updates for Koha 16.11.04
root [Tue, 21 Feb 2017 21:22:40 +0000]
Translation updates for Koha 16.11.04

7 years agoIncrement version for 16.11.04 release
Katrin Fischer [Tue, 21 Feb 2017 21:20:21 +0000]
Increment version for 16.11.04 release

7 years agoBug 17852 Follow up.Multiple URLs (856) in list email are broken
Caitlin Goodger [Thu, 19 Jan 2017 00:54:24 +0000]
Bug 17852 Follow up.Multiple URLs (856) in list email are broken

This is a follow-up to my previous patch. This fixes it on the OPAC and
the previous one was from the intranet
Test Plan
1: Add multiple urls to a biblographic record
2: Add the biblographic record to a list and then email it from the OPAC
3: See that the links are broken and have been merged into one.
4: Apply patch
5: Send the list again and see that the links work

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit de7349e06af53996d3ae8244bda7f31655340e8a)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 17852; Multiple URLs (856) in list email are broken.
Caitlin Goodger [Tue, 17 Jan 2017 21:37:49 +0000]
Bug 17852; Multiple URLs (856) in list email are broken.

Test Plan
1: Add multiple urls to a biblographic record
2: Add the biblographic record to a list and then email it.
3: See that the links are broken and have been merged into one.
4: Apply patch
5: Send the list again and see that the links work

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 59482c68634fe392b23a39b75fcbae74bbb97c66)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 17865 'If a subscription has no history end date, it shows as expired today in...
Luke Honiss [Tue, 17 Jan 2017 02:27:55 +0000]
Bug 17865 'If a subscription has no history end date, it shows as expired today in OPAC'

--TEST PLAN--
1) View a subscription with no history end date
2) Search for an item with a subcription in OPAC
3) Under subscription tab click more details
4) The end date will be the current date
5) Apply patch and refresh
6) The end date will not be shown

Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f9a4f5edb84b826d9caf16b2221fed79fd7d421e)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 18111: Swap framework_name and frameworkcode
Mark Tompsett [Sun, 19 Feb 2017 04:06:16 +0000]
Bug 18111: Swap framework_name and frameworkcode

With the frameworkcode changed to an empty string, which really
is closer to the physical reality, some javascript somewhere
breaks. This means the spinner does not appear when you confirm
that you wish to import it.

TEST PLAN
----------
1) apply first patch
2) export default framework, doesn't matter format
3) import default framework using that file.
4) answer yes or whatever it is.
   -- spinner does not appear.
5) apply this patch
6) import default framework use the same file.
7) answer yes or whatever it is.
   -- spinner does appear.
8) decide if you wish to find and fix the javascript conditions.
   if yes -- do so, and then obsolete this once you have.
   if not -- sign this off after running koha qa test tools

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1ce61ac6a372783b39a11386018e08d92ccd8f39)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 18111: Fix import of default framework
Jonathan Druart [Tue, 14 Feb 2017 16:21:45 +0000]
Bug 18111: Fix import of default framework

Caused by bug 16035.

Recreate the issue:
Go to Home › Administration › MARC frameworks
For the default framework: Actions > import
It will not work

Test plan:
Confirm test plans from bug 16035 and bug 17389 still pass
Confirm that the import for the default framework now works

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c12aa9664ca71b38a0b570c71cbc0495ecfb9c0f)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 17913: [16.11.x] Add syspref to sysprefs.sql
root [Thu, 16 Feb 2017 14:00:29 +0000]
Bug 17913: [16.11.x] Add syspref to sysprefs.sql

See comment 69.

7 years agoBug 17461: Warn about plugins that can't be loaded
Magnus Enger [Tue, 18 Oct 2016 09:47:19 +0000]
Bug 17461: Warn about plugins that can't be loaded

The logs should have some info if a module has been installed that can
not be loaded.

To test:
- Make sure you have an up to date dev install
- Install v1.0 of the KitchenSink plugin from
  https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases
- Make sure the plugin does not show up in the list of installed
  plugins, and that the intranet-error.log has no info about it
- Apply the patch
- Reload plugins-home.pl
- Verify that there is now some interesting info in intranet-error.log

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Works as advertised, generates useful diagnostic information in the form of a log entry to either intranet-error or plack-error.log. Relief, thanks Magnus!
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 830786aba7084698c081a3f7745fe0fe54643c18)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 17950: Merge.t: Improve variable handling at top level
Marcel de Rooy [Mon, 23 Jan 2017 10:40:48 +0000]
Bug 17950: Merge.t: Improve variable handling at top level

This patch does:
[1] Remove unused $dbh.
[2] Move all mocking statements to one sub.
[3] Promote a few lexicals to globals when used in the subtests.

Test plan:
Run t/db_dependent/Authorities/Merge.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 849877d8d3bcd3791c624a84ec5e4cb0550fa0fe)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 17950: Improve quick UNIMARC fix in Merge.t
Marcel de Rooy [Mon, 23 Jan 2017 09:44:57 +0000]
Bug 17950: Improve quick UNIMARC fix in Merge.t

Bug 17909 and 17913 added a quick fix for Merge.t on UNIMARC records.
This patch improves that fix with the sub compare_fields, a merge from
compare_field_count and compare_field_order.
Also it adds the option to test MARC21/UNIMARC by adding a command line
switch that triggers mocking the marcflavour preference.
The test on a cleared field 609 in strict mode has been broken up in two
tests: first a count without 609 and then counting 609s only.

Note: Could have mocked GetMarcBiblio too, but decided to go this way.

Test plan:
[1] Run perl t/db_dependent/Authorities/Merge.t
[2] (For UNIMARC users:) Run perl Merge.t -flavour MARC21
[3] (For others:) Run perl Merge.t -flavour UNIMARC

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 5d279befed1b6faf829ab0ebd19357dbfc7c576e)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 18068: ES - Fix location and (home|holding)branch facets
Tomas Cohen Arazi [Mon, 6 Feb 2017 19:22:51 +0000]
Bug 18068: ES - Fix location and (home|holding)branch facets

This patch makes the 'Locations' facet work as expected (i.e. having the
same behaviour it has for Zebra: picking the 952$c in MARC21 and 995e
for UNIMARC).

It also adds the code to handle holding and home library settings for
facets and makes the facets show the library name instead of the branch
code.

The mappings are updated so the labels match what facets.inc expect to
work properly.

To test:
- On master, do a search that returns biblios with items having
homebranch set.
=> FAIL: Under the 'Locations' label on the facets you will notice
branchcodes are shown.
- Apply the patch
- Restart memcached and plack (just in case, it was tricky)
- Reset your mappings:
  http://localhost:8081/cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl?op=reset&i_know_what_i_am_doing=1
- Restart memcached and plack (again, not sure if needed)
- Make sure this mappings are set:
  homebranch => HomeLibrary
  holdingbranch => HoldingLibrary
  (Note: it might not be set due to the place the yaml file is being picked)
- Reindex your records:
  $ sudo koha-shell kohadev
 k$ cd kohaclone
 k$ perl misc/search_tools/rebuild_elastic_search.pl -d -v
- Repeat the initial search
=> SUCCESS: 'Location' contains the right stuff, 'Home libraries' and
'Holding libraries' too.
- Run
 k$ prove t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t
=> SUCCESS: Tests pass!
- Sign off :-D

Note: play with the 'DisplayLibraryFacets' syspref options.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d115602c9881371d38f3b1c4bda66e979984b218)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 18045: Fix Reserves.t tests - caching issues
Jonathan Druart [Thu, 2 Feb 2017 00:09:38 +0000]
Bug 18045: Fix Reserves.t tests - caching issues

If the cache has to be cleaned when marc structure is updated.

Before this patch, if the age restriction was not mapped, Reserves.t
failed with:
  Tag "" is not a valid tag. at t/db_dependent/Reserves.t line 523.

Test plan:
Just confirm that the tests still pass and that the changes make sense.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
It seems that only removing the key MarcSubfieldStructure- should be
enough, but it does not hurt either to remove those four keys.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 116301ae473075a6e183beb0027bd3657816b5e6)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 18136: Fix ExportRemoveFields pre-fill behaviour
Jonathan Druart [Fri, 17 Feb 2017 09:59:22 +0000]
Bug 18136: Fix ExportRemoveFields pre-fill behaviour

Looks like it's caused by bug 13190.
Variable export_remove_fields is not sent to the template, let's
retrieve the syspref's value using the TT plugin.

Test plan:
Fill ExportRemoveFields with something (100a for instance)
Go on a checkout list page
At the bottom, the "do not export fields" input box should be pre-filled
with the content of the syspref

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c6e09ca3877ced4afb05ea27175c46aa134dc3b3)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 18025: Simplify logic and avoid 1 call to ValidateBorrowernumber
Jonathan Druart [Wed, 15 Feb 2017 17:14:11 +0000]
Bug 18025: Simplify logic and avoid 1 call to ValidateBorrowernumber

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
This is fine with me.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a471ad80bb70ed790cf7f544a45cdd3e61672ff4)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 18025: Fix test
Jonathan Druart [Wed, 15 Feb 2017 17:13:41 +0000]
Bug 18025: Fix test

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Seems to work fine

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 01f69eb8a258cead5f448c70e1efddc87a341299)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 18025 - Expired password recovery links cause sql crash
Liz Rea [Tue, 31 Jan 2017 21:59:01 +0000]
Bug 18025 - Expired password recovery links cause sql crash

When a user gets an email, but doesn't act or visit it within two days,
     attempting to create a new one causes a collision. We should just
     delete the old one, assuming they still want to reset their
     password.

To test:
create yourself a borrower with a userid and password.
Attempt a password recovery on the OPAC
update the entry in the database for that user to have an expired token
e.g. update borrower_password_recovery set valid_until = '2017-01-25
03:25:26' where borrowernumber = 12;
Attempt another password recovery operation - should error
apply the patch
Try it again - no error, new token is generated and additional email
with new link is sent.

Issue reproduced - is resolved by patch
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e87dab6411a40ae0eba3d56032760d705ef62eaf)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 18119: Fix comment in cataloguing.js
Josef Moravec [Wed, 15 Feb 2017 06:52:32 +0000]
Bug 18119: Fix comment in cataloguing.js

Test plan:
Go to cataloging, and try something which depends on javascript -
collapse/uncollapse fields, open authority search window, ...
    -> without patch it is not working
    -> with patch it is working correctly

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7698f6453c6c14b4986d573c33f0e49cd73652c6)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 17988: Add a comment to explain the line
Jonathan Druart [Thu, 2 Feb 2017 09:28:21 +0000]
Bug 17988: Add a comment to explain the line

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e9cd82e4ca754024009608242d7c9930ac248cff)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 17780: Add a comment to explain the line
Jonathan Druart [Wed, 15 Feb 2017 08:11:41 +0000]
Bug 17780: Add a comment to explain the line

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 762188646904156e4b1c12bb4d2e04a060674e59)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 17780 - When choose an author in authority results new window shows a blank screen
Oleg Vasylenko [Tue, 24 Jan 2017 15:58:39 +0000]
Bug 17780 - When choose an author in authority results new window shows a blank screen

Select2 (Bug 13501) introduced divs and inputs that broke some assumptions about the expected HTML structure.
This patch checks if input has name attribute, because some inputs in Select2 have not.

To test:
Try to add info from the authorities to field that has subfield with Select2 (subfield with authorised values on Koha 16.11+)

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
(cherry picked from commit 444bdcc2a50c64037c0f463200683009d8ae0b6e)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 18026 - URL to database columns link in system preferences is incorrect (16.11.x)
Mason James [Wed, 15 Feb 2017 03:11:09 +0000]
Bug 18026 - URL to database columns link in system preferences is incorrect (16.11.x)

Here's a patch for the 16.11.x branch

modified:   koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref
modified:   koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
modified:   koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref

7 years agoBug 17913: Database update - Add system preference AuthorityMergeMode
Katrin Fischer [Tue, 14 Feb 2017 21:11:51 +0000]
Bug 17913: Database update - Add system preference AuthorityMergeMode

7 years agoBug 17913: [16.11.x] followup
Josef Moravec [Wed, 8 Feb 2017 20:45:51 +0000]
Bug 17913: [16.11.x] followup

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

7 years agoBug 17913: [16.11.x] Authority merge fix
Marcel de Rooy [Mon, 23 Jan 2017 13:06:48 +0000]
Bug 17913: [16.11.x] Authority merge fix

[PUSHED_17.05]

Squashed into one patch for 16.11.x

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

7 years agoBug 18095: Batch item modification: Better message if no item is modified
Marc Véron [Fri, 10 Feb 2017 15:07:13 +0000]
Bug 18095: Batch item modification: Better message if no item is modified

If no item is modified, the result page of Batch item modification says:
"item(s) modified (with fields modified)."
The message should be: "No items modified"

To reproduce:
- Go to Tools -> Batch item modification
- Put a barcode in and click Continue
- Do not make any changes and/or deselect all item(s)
- Click "Save"
=> Result message reads: "item(s) modified (with fields modified)."

To test:
- Apply patch
- Repeat steps above
- Verify that message makes sense.

NOTE: Also tested positive case with actual field change.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit adca73545e75c31198e3d094512da7961460ed02)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 15584 - Staff client list errors are incorrectly styled
Chloe [Thu, 21 Jan 2016 03:20:58 +0000]
Bug 15584 - Staff client list errors are incorrectly styled

To Test-
1. In the Staff Client, go to Lists
   (/cgi-bin/koha/virtualshelves/shelves.pl) and create a new list with
   the same name as an existing one. --note that it has some red in it
   like an error
2. apply patch
3. In the Staff Client, go to Lists
   (/cgi-bin/koha/virtualshelves/shelves.pl) and create a new list with
   the same name as an existing one. --note that now it should be just
   yellow with black writing as an alert

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 4bd2188affee568de81342d0af24fcf0239d9f01)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 18047 - JavaScript error on item search form unless LOC defined
Nick Clemens [Fri, 3 Feb 2017 11:38:53 +0000]
Bug 18047 - JavaScript error on item search form unless LOC defined

If LOC is not present, the item search form will raise a JS error:
SyntaxError: expected expression, got '}'

This patch fixes it by handling this specific case.

Note that the "Status" column is still displayed.

Test plan:
Remove your LOC authorised values
Go on the item search form
=> You will not get the JS error and the "Shelving location" bloc is no longer
displayed. There is no need to display it if empty.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit da3ccdc14379816ea849eeb56ab321d8e7db59a2)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 8306: Patrons statistics, fix for patron activity choice
Adrien Saurat [Thu, 13 Dec 2012 09:13:19 +0000]
Bug 8306: Patrons statistics, fix for patron activity choice

The "inactive" for "patron activity" choice is now effective.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 680e6ce7d1aa53e716ea9fdab9c67e621fb828e2)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 18089: Remove warnings from tests using DBIx::Class fixtures
Jonathan Druart [Thu, 9 Feb 2017 12:13:50 +0000]
Bug 18089: Remove warnings from tests using DBIx::Class fixtures

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 2e315c0cc6f31991868b17276807f28cdcce4306)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 18089 - All XSLT testing singleBranchMode = 0 fails to show even if install has...
Kyle M Hall [Thu, 9 Feb 2017 11:48:40 +0000]
Bug 18089 - All XSLT testing singleBranchMode = 0 fails to show even if install has only 1 branch

Due to the way it has been implemented, singleBranchMode is set to an
empty string rather than 0 if there is only one branch. This causes any
block that tests for singleBranchMOde to be 0 to never appear.

Test Plan:
1) Apply this patch set
2) prove t/XSLT.t

Signed-off-by: Jenny Schmidt <jschmidt@switchinc.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit ed5cb5fc9727ca09deb392f4392c1aa35b4e47a5)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 18089 - Unit test
Kyle M Hall [Thu, 9 Feb 2017 11:48:08 +0000]
Bug 18089 - Unit test

Signed-off-by: Jenny Schmidt <jschmidt@switchinc.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 99cc3bdd0ec676d29205fb09d1a4e4b1e8889df0)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 17838 Availability limit broken until an item has been checked out.
Zoe Schoeler [Wed, 18 Jan 2017 00:55:43 +0000]
Bug 17838 Availability limit broken until an item has been checked out.

TEST PLAN

1. Make sure you have no items checked out.
2. Run sudo koha-rebuild-zebra -f -v kohadev.
3. Go to search the catalog and search.
4. Check items availability and then click on limit to currently
available items.
5. This should return no results.
6. Apply patch and reload.
7. Results should show.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Attribute 14: " Specifies whether un-indexed fields should be ignored. A
zero value (default) throws a diagnostic when an un-indexed field is
specified. A non-zero value makes it return 0 hits."
From http://www.indexdata.com/zebra/doc/querymodel-zebra.html

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 543dc8e0365240441114359b7ddfa74863a318b6)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 4126 - Exit bulkmarcimport if -a and -b given
Magnus Enger [Thu, 10 Nov 2016 14:32:44 +0000]
Bug 4126 - Exit bulkmarcimport if -a and -b given

Currently it is possible to spceify both --biblios and --authorities
as command line switches to bulkmarcimport.pl. This does not make sense
so we should exit early and explain that these switches are mutually
exclusive.

To test:
- Run one of these and check that there is no complaint about missing
  options:
  perl misc/migration_tools/bulkmarcimport.pl -a -b
  sudo koha-shell -c "perl misc/migration_tools/bulkmarcimport.pl -a -b"
  kohadev
- Observe that this displays the perldoc, but does not complain about
  mutually exclusive switches.
- Apply the patch
- Rerun the command(s) from earlier.
- Verify that the script is now halted and a small explanation given.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit dbada67196818834f158890c0c348c0259085f7e)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 18009 - IssueSlip.t test fails if launched between 00:00 and 00:59
Mason James [Sat, 28 Jan 2017 11:47:20 +0000]
Bug 18009 - IssueSlip.t test fails if launched between 00:00 and 00:59

to test patch...

1/ set date between 00:00 and 00:59
$ sudo date -s 'Sun Jan 29 00:41:55 NZDT 2017'

2/ run prove, see fail
$ prove -v t/db_dependent/Members/IssueSlip.t
...
t/db_dependent/Members/IssueSlip.t (Wstat: 65280 Tests: 1 Failed: 0)
Result: FAIL

3/ apply patch

4/ run prove, see pass
$ prove -v t/db_dependent/Members/IssueSlip.t
...
All tests successful.
Result: PASS

NOTE: for code obscurity you could have also done a modulus 24. ;)

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit add15799229df7a1910d759f487c0006bf3f30ae)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 17788: (MARC21) Add $9 fields to Koha-Auth-Number:w index
Tomas Cohen Arazi [Sat, 17 Dec 2016 12:25:54 +0000]
Bug 17788: (MARC21) Add $9 fields to Koha-Auth-Number:w index

Looking at the default framework's fields that are linked to authority
records, there's a divergence with the Zebra index definitions.

This yields to authority usage count be incorrect for users searching
for authority records.

MariaDB [koha_kohadev]> SELECT tagfield,tagsubfield,authtypecode FROM
marc_subfield_structure WHERE authtypecode IS NOT NULL AND
authtypecode<>'' AND frameworkcode='' GROUP BY
tagfield,tagsubfield,authtypecode ;
+----------+-------------+--------------+
| tagfield | tagsubfield | authtypecode |
+----------+-------------+--------------+
| 100      | a           | PERSO_NAME   |
| 110      | a           | CORPO_NAME   |
| 111      | a           | MEETI_NAME   |
| 130      | a           | UNIF_TITLE   |
| 440      | a           | UNIF_TITLE   |
| 600      | a           | PERSO_NAME   |
| 610      | a           | CORPO_NAME   |
| 611      | a           | MEETI_NAME   |
| 630      | a           | UNIF_TITLE   |
| 648      | a           | CHRON_TERM   |
| 650      | a           | TOPIC_TERM   |
| 651      | a           | GEOGR_NAME   |
| 654      | a           | TOPIC_TERM   |
| 655      | a           | GENRE/FORM   |
| 656      | a           | TOPIC_TERM   |
| 657      | a           | TOPIC_TERM   |
| 658      | a           | TOPIC_TERM   |
| 662      | a           | GEOGR_NAME   |
| 690      | a           | TOPIC_TERM   |
| 691      | a           | GEOGR_NAME   |
| 696      | a           | PERSO_NAME   |
| 697      | a           | CORPO_NAME   |
| 698      | a           | MEETI_NAME   |
| 699      | a           | UNIF_TITLE   |
| 700      | a           | PERSO_NAME   |
| 710      | a           | CORPO_NAME   |
| 711      | a           | MEETI_NAME   |
| 730      | a           | UNIF_TITLE   |
| 796      | a           | PERSO_NAME   |
| 797      | a           | CORPO_NAME   |
| 798      | a           | MEETI_NAME   |
| 799      | a           | UNIF_TITLE   |
| 800      | a           | PERSO_NAME   |
| 810      | a           | CORPO_NAME   |
| 811      | a           | MEETI_NAME   |
| 830      | a           | UNIF_TITLE   |
| 896      | a           | PERSO_NAME   |
| 897      | a           | CORPO_NAME   |
| 898      | a           | MEETI_NAME   |
| 899      | a           | UNIF_TITLE   |
+----------+-------------+--------------+

This patch adds the missing ones to the authority number index as it is
done for the rest of the fields.

To test:
- Verify that
etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml
contains intries pointing the $9 subfield of all the fields in the
'tagfield' column above, to the Koha-Auth-Number:w index.
- Sign off :-D

Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 21d63c8fb0c2ae3a8ca7caaf0d4041b7189213c3)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 17512: Improve handling dates in C4::Items
Marcel de Rooy [Thu, 27 Oct 2016 13:07:29 +0000]
Bug 17512: Improve handling dates in C4::Items

This is a follow-up on the internal server error on 0000-00-00 in the items
column onloan. This patch deals with preventing to have such dates at all
in the date fields of items.

It is accomplished by:
[1] Adding a (private) subroutine _mod_item_dates. It takes an item hash
    and replaces date values if needed.
[2] AddItem and ModItem call _koha_new_item resp. koha_modify_item. In these
    routines a call to the new _mod_item_dates is inserted.
[3] Although the routine is actually private, I have added some unit tests
    to Items.t.

Test plan:
[1] Add a new item. Fill a correct date in dateaccessioned and an invalid
    date in Price effective from (=replacementpricedate).
[2] Verify that dateaccessioned is saved correctly and replacementpricedate
    is still null (does not contain 0000-00-00).
[3] Edit the item again. Fill some text in dateaccessioned and put a correct
    date in replacementpricedate. Verify the results.
[4] Run t/db_dependent/Items.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 137cbd8d09be549c9ae97dfad746a9c52d27b9a6)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 17988 - Select2 prevents correct tag expand/minimize functionality
Oleg Vasylenko [Wed, 25 Jan 2017 10:01:05 +0000]
Bug 17988 - Select2 prevents correct tag expand/minimize functionality

Overview:
Select2 (Bug 13501) introduced divs and inputs that broke some assumptions about the expected HTML structure.
Because of that, expanding fields to show all hidden subfields does not work properly.

Steps to Reproduce:
1. Open some book in the editor or create new (cataloguing/addbiblio.pl)
2. Try to minimize or expand fields, that have among subfields the following:
— Thesaurus driven subfield → subfield with Select2
— Hidden subfield.

Actual Results:
 — some fields become hidden, some not, and vice versa
 — in the console, you'll see «Uncaught TypeError: Cannot read property 'match' of null»

Expected Results:
 — all subfields should minimize/maximize completely

Additional Information:
This happens because Select2 adds some divs, that do not have ID property.
The following patch adds check for the needed attribute existance.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 317abac238147cf20f09d2aa0b0dc069c12b0892)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 17134: Replace item types codes with category in facets (opac)
Emma [Wed, 18 Jan 2017 21:37:23 +0000]
Bug 17134: Replace item types codes with category in facets (opac)

To test:
-Search in OPAC for two or more items
-Note that item types display category codes rather than names
-Make change to file and test in OPAC

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 908163754010df8d78acf463d6777ba2c4c3a2e9)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 16984: Do not clone the item block for standing orders
Jonathan Druart [Tue, 22 Nov 2016 09:35:07 +0000]
Bug 16984: Do not clone the item block for standing orders

If AcqCreateItem is set to ordering and the basket is marked as
"standing orders", when ordering a JS error is raised:
additem.js:176 Uncaught TypeError: window[events[i]] is not a function

The item block should not be displayed in that case.

Test plan:
- Set AcqCreateItem to "ordering"
- Create a basket and tick the "Standing orders" checkbox
- Add an order to this basket
=> Without this patch you get the JS error
=> With this patch applied you will not get it

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit ba89de5837bbe3055a8b0a04517332d8aee68da7)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 17940: (follow-up 14695) Fix - Mark holds as waiting when transfer is done
Jonathan Druart [Wed, 8 Feb 2017 16:49:41 +0000]
Bug 17940: (follow-up 14695) Fix - Mark holds as waiting when transfer is done

When an item from Library A is reserved and set to be picked up at
Library B, the hold buttons fail to confirm or cancel during check in at
Library B when the item is transferred from Library A.

Test plan:
* Create a hold for item at Library A to be picked up at Library B.
* Check in item at Library A to trigger the transfer.
=> item shows in transit
* Switch to Library B and check in item.
* Confirm the hold.
=> item shows waiting

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit ae2c1e6a83fab8b76606cc84a306b37d3b7403e4)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 18076: Replace holds_to_place_count with an input type=text
Jonathan Druart [Wed, 8 Feb 2017 11:41:37 +0000]
Bug 18076: Replace holds_to_place_count with an input type=text

From http://www.template-toolkit.org/docs/manual/Directives.html#section_WHILE

"""
The Template Toolkit uses a failsafe counter to prevent runaway WHILE loops which
 would otherwise never terminate. If the loop exceeds 1000 iterations then an undef
exception will be thrown, reporting the error:

WHILE loop terminated (> 1000 iterations)

The $Template::Directive::WHILE_MAX variable controls this behaviour and can be set
to a higher value if necessary.
"""

I do not think we want to increase this value, and I do not think we want to display a
dropdown list with 1000 entries.

This patch replaces the dropdown list with an input text.

Test plan:
- Set circulation conditions - holds per record = 999
- Search for record with items
- Go to the holds tab
- Search for a patron
- Verify that when you send your search, the 'internal server error' is not shown
and you see the input text.
You should be able to enter a value > than 999 and < 1

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit ac99f64010c6bdbe40abc2b823c2180b9b223425)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 16115: Remove JS error on item search if NOT_LOAN values do not exist
Jonathan Druart [Sat, 21 Jan 2017 07:48:20 +0000]
Bug 16115: Remove JS error on item search if NOT_LOAN values do not exist

If NOT_LOAN is not present, the item search form will raise a JS error:
SyntaxError: expected expression, got '}'

This patch fixes it by handling this specific case.

Note that the "Status" column is still displayed.

Test plan:
Remove your NOT_LOAN authorised values
Go on the item search form
=> You will not get the JS error and the "Status" bloc is no longer
displayed. There is no need to display it if empty.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 27a4149625252e4c28dc97df998d82fd6f2652b8)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 11450: Hold Request Confirm Deletion
Luke Honiss [Thu, 19 Jan 2017 02:55:31 +0000]
Bug 11450: Hold Request Confirm Deletion

==TEST PLAN==
1) Go to an item with a hold and click on the holds tab on the
left
2) Click the red 'X'
3) The hold will be deleted immediately
4) Apply patch
5) Return to an item with a hold and click the 'X'
6) There will now be a confirmation dialog
7) Click cancel and the dialog will disappear and the hold will not be
deleted
8) Click OK and the hold will be deleted

Restored indentations - Mark Tompsett

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6ce97d9b06843fa65d6fb4a6d7c8cecd322bc8d6)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 17731: Remove noxml option from rebuild_zebra.pl
Jonathan Druart [Tue, 6 Dec 2016 14:37:50 +0000]
Bug 17731: Remove noxml option from rebuild_zebra.pl

The removal of the noxml is a logical follow-up of bug 16506 (which
make xml the default).

Actually this option should have been removed by bug 10455 (it removes
the biblioitem.marc field).

Test plan:
Make sure the rebuild_zebra.pl script works as before.

Signed-off-by: Emma Smith <emma.nakamura.smith@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7a2cbfba1f271d307045d867654ff0d7de939aa6)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 17782: Fix tests
Jonathan Druart [Fri, 27 Jan 2017 09:14:46 +0000]
Bug 17782: Fix tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 185256deba961c2595ce934afbb910cf3ad952e0)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 17782 - (QA Followup)
Nick Clemens [Wed, 25 Jan 2017 15:59:42 +0000]
Bug 17782 - (QA Followup)

Fix tests

prove t/db_dependent/Koha/Patrons.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b68557148d17295557cae449e5617166950ac47f)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 17782 - Patron updated_on field should be set to current timestamp when borrower...
Nick Clemens [Thu, 15 Dec 2016 14:17:55 +0000]
Bug 17782 - Patron updated_on field should be set to current timestamp when borrower is deleted

To test:
01 Find a patron
02 Get the updated_on value from the db in borrowers table
03 Delete the patron
04 Get the update_on value from the db on deletedborrowers table
05 Values from 02 and 04 are the same
06 Apply patch
07 Repeat 01-04
08 Values should now be different

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 92a4e0e5f36fd4c5c817db96f8206b3ad903436e)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 16387: Fix default shortened loan period time
Lari Taskula [Mon, 12 Dec 2016 14:49:44 +0000]
Bug 16387: Fix default shortened loan period time

When a loan period is shortened due to using decreaseLoanHighHolds* the time is
always set to the current time in X days, even if the original loan period is
given in days and not in hours.

It should default to 23:59 as is normal for loan periods given in days.

As original due date time defaults to 23:59 when given in days, this patch
modifies the hours and minutes of shortened due date to be equal to original due
date.

To test:
1. prove t/db_dependent/DecreaseLoanHighHolds.t

Signed-off-by: Grace McKenzie <grace.mcky@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 21ac9fcdc2ca449a491cc79e68cc854ee248d911)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 17922: Use correct number of digits when replacing date placeholders
Julian Maurice [Wed, 18 Jan 2017 10:29:57 +0000]
Bug 17922: Use correct number of digits when replacing date placeholders

This patch also fixes a typo ("<<MM><" should be "<<MM>>")

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 95e94766af653de4bc721af64981140cacecf567)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 18015 - On shelf holds allowed > "If all unavailable" ignores notforloan
Mirko Tietgen [Mon, 30 Jan 2017 14:59:59 +0000]
Bug 18015 - On shelf holds allowed > "If all unavailable" ignores notforloan

If in the circ rules matrix you set "On shelf holds allowed" to "If all unavailable",
items with status "Not for loan" are considered available and break the functionality.

Test plan:

- Set "On shelf holds allowed" to "If all unavailable" for your patron and item
  category (or everyone and everything)
- Have two items for a record. Check out one
- Set 7 - Not for loan: "Not For Loan" for the second item
- Try to place a hold. Does not work.

- Apply the patch
- Try to place a hold. Should work now.

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 844cf7a748c2b4f567bec2e5088665a9edf94468)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 17871: (followup) Remove zebra::* from the packages templates
Tomas Cohen Arazi [Tue, 24 Jan 2017 11:34:44 +0000]
Bug 17871: (followup) Remove zebra::* from the packages templates

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 58e7a0a5d510de6a035329ea86a130996dda5849)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 17871: Remove zebra::snippet to allow access to facets in YAZ 5.8.1+
David Cook [Tue, 10 Jan 2017 01:36:25 +0000]
Bug 17871: Remove zebra::snippet to allow access to facets in YAZ 5.8.1+

This patch restores access to zebra facets (or zebra::snippet) with YAZ 5.8.1 or higher.

It was failing due to The <retrieval syntax="xml" name="zebra::*" /> entry in
retrieval-info-bib-dom.xml which IndexData said it wasn't even needed to
get that access.

Edit: I amended the commit message (tcohen)

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
I tested on kohadevbox and found no regression or behaviour change. I
will provide a followup for the packages.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0eb5d8491ebbf44f213d0cbe05695521dafc6dd9)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 18044: Add a test
Jonathan Druart [Mon, 6 Feb 2017 08:18:29 +0000]
Bug 18044: Add a test

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 80a43833f89ea1f31753245cb2d6f20acb7216a4)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 18044: Label Batches not displaying
Chris Nighswonger [Sun, 5 Feb 2017 21:11:30 +0000]
Bug 18044: Label Batches not displaying

SQL expects lists to be comma separated. A trailing comma must also
be avoided.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 544cf17d6f3279d95835ba42d40d49982e97f0a2)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 17775 - Add new user with LDAP not works under Plack
Dobrica Pavlinusic [Mon, 30 Jan 2017 11:42:09 +0000]
Bug 17775 - Add new user with LDAP not works under Plack

This patch fixes internal server error:

Undefined subroutine &C4::Auth_with_ldap::AddMember called at /srv/koha_ffzg/C4/Auth_with_ldap.pm line 213.

It occurs only under plack, and it's strange since C4::Members
does EXPORT AddMember and we are importing it into Auth_with_ldap.pm
(and it does work under CGI).

Signed-off-by: Liz Rea <liz@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
I did not test but trust author and signoffer. The change cannot hurt.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 4740438b41573d24c6e83d182e2ce1cf6fc54545)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 15030: Add tests
Jonathan Druart [Thu, 12 Nov 2015 12:28:38 +0000]
Bug 15030: Add tests

This test will prevent regression on the lost of data when
items.itemcallnumber is linked with a plugin.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit eee1f23bc49d233bca6c8a8004dd6e79e2425484)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 15030 - Fixes the serials fields associated with a plugin, to not overwrite the...
Blou [Wed, 21 Oct 2015 18:35:18 +0000]
Bug 15030 - Fixes the serials fields associated with a plugin, to not overwrite the previously saved value

This fixes the remaining fields from serials-edit.pl that were seeing their previously entered values
be oblitarated with each new edit.  The fields associated to a plugin (dateaccessioned and barcode) were
always displaying <empty> with each new edit, losing the previous effort.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1017edad1c27d2624fb8ed6f8fb0018985b33295)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 15030 - Certain values in serials' items are lost on next edit
Blou [Mon, 19 Oct 2015 16:16:05 +0000]
Bug 15030 - Certain values in serials' items are lost on next edit

When editing serials subscription, we can edit them but some values are not pulled from the DB correctly to be put in the edit box.  If not noticed, the value will be overwritten on the next save.

Test:
- Create a subscription
- Edit itemcallnumber (952o?) and make sure to have a different value than the default one.
- Save.
- Edit it again
- The saved value is not there.

This is true for itemcallnumber and a few other fields.

This was caused by calls to ->field($subfield).  This would always fail, of course.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 4cdcdb3cb5ebefedcb44766745078a949227f0a5)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 7533: Add a warning to the about page if template_cache_dir is not set
Jonathan Druart [Wed, 28 Dec 2016 13:51:17 +0000]
Bug 7533: Add a warning to the about page if template_cache_dir is not set

We need to tell the administrators that it would be great for them to
set this config entry.

Test plan:
- Do not set template_cache_dir and confirm that you see the warning
- Set template_cache_dir and confirm that you do not see the warning

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Both templates for koha-conf.xml are updated. After applying the
patach a warning was correctly displayed. After adding
template_cache_dir to koha-conf.xml and restarting memcached it
went away.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7d140258a051921d78f46ac1d9e9443cbcfbd51b)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 7533: Add the template_cache_dir entry to koha-conf.xml
Jonathan Druart [Wed, 28 Dec 2016 13:49:59 +0000]
Bug 7533: Add the template_cache_dir entry to koha-conf.xml

And comment it, as we don't know what are the sysop's preferences

Signed-off-by: Magnus Enger <magnus@libriotech.no>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 819cea62f222286b016941d8ba08da0996289668)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 17487: Styling moved from style attribute into staff-global.css
radiuscz [Sun, 23 Oct 2016 22:57:03 +0000]
Bug 17487: Styling moved from style attribute into staff-global.css

Test plan:
1) Apply patch
2) Display Z39.50 search dialogs:
   - cataloguing / new from Z39.50
   - authorities / new from Z39.50
   - acquisition / new from an external source
3) Select all / Clear all should be placed below "Search targets" header
4) [Optionally] Set some style in IntranetUserCSS for class z3950checks

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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit aaf6b6724f5c7c6e29433600d55b9f1e8836a77b)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 17487: Links to "select/clear all" moved below the header tag
radiuscz [Sun, 23 Oct 2016 00:51:53 +0000]
Bug 17487: Links to "select/clear all" moved below the header tag

Test plan:
1) Apply patch
2) Display Z39.50 search dialogs:
   - cataloguing / new from Z39.50
   - authorities / new from Z39.50
   - acquisition / new from an external source
3) Select all / Clear all should be placed below "Search targets" header

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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f05b2986da26717f70134b07020c509821aeb3f7)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 17726: [QA Follow-up] Add test descriptions
Marcel de Rooy [Tue, 13 Dec 2016 13:10:45 +0000]
Bug 17726: [QA Follow-up] Add test descriptions

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit ddf1d9bcdde4790b713eca8040f0c9fce8fdcf6a)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 17726: TestBuilder - Add default values
Jonathan Druart [Mon, 12 Dec 2016 22:38:40 +0000]
Bug 17726: TestBuilder - Add default values

The items.more_subfields_xml is set to random data (generated by
TestBuilder), and so GetMarcBiblio does not manage to embed items (if
needed).

The error is:
  :1: parser error : Start tag expected, '<' not found

More precisely it explodes in
C4::Items::_parse_unlinked_item_subfields_from_xml when
MARC::Record->new_from_xml is called with an invalid xml

This patch adds a default values mechanism to TestBuilder to avoid
modifying all the existing calls.

Test plan:
Set SearchEngine to ElasticSearch
prove t/db_dependent/Circulation.pl
should return green with this patch

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 41358176e1d276e47d3034a37bd089b7e6c7e846)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 8361 (QA Followup) Add warnings
Nick Clemens [Fri, 13 Jan 2017 18:06:34 +0000]
Bug 8361 (QA Followup) Add warnings

 - Added message to circulation.tt to warn if rule undefined for
patron/itemtype combination

To test:
1 - Remove all circ rules
2 - Add one rule
3 - Checkout to patron an itemtype that is outside of rule
defined above
4 - Note explanation that no rule is defined

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 63f7cbc777521c33f8ada3e1068be01b98da9050)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 8361: Do not allow checkouts if no rules are defined
Jonathan Druart [Tue, 22 Nov 2016 11:23:23 +0000]
Bug 8361: Do not allow checkouts if no rules are defined

We should require a circulation rule to allow checkouts and reject them
if no rules are defined.

Test plan:
- Delete all issuing rules
- Check an item out
=> Without this patch the checkout is allowed
=> With this patch applied it is rejected

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 11dfb2e0b2d32c313f556b623ee8522b4342af26)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 17823: Add label for MARC 583 - Action note
Karen Jen [Tue, 17 Jan 2017 22:46:02 +0000]
Bug 17823: Add label for MARC 583 - Action note

test plan
Edit a record
Edit field 583a to add an action note
Save the record and confirm that the note does not show up in staff
client or opac
Apply patch and refresh page
Action note should now show up in staff client and opac

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 16dcea233008c0560c5a9783a3e6dd60470b06b1)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoAdd release notes for the 16.11.03 security release v16.11.03
Katrin Fischer [Mon, 30 Jan 2017 16:19:05 +0000]
Add release notes for the 16.11.03 security release

7 years agoBug 17902: Follow-up fixing SQL statement
Katrin Fischer [Mon, 30 Jan 2017 15:47:23 +0000]
Bug 17902: Follow-up fixing SQL statement

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 40cb8e3b7579987d0d461e8da6e350228722727c)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 17902: Fix possible SQL injection in serials editing
Jonathan Druart [Tue, 10 Jan 2017 17:06:51 +0000]
Bug 17902: Fix possible SQL injection in serials editing

/cgi-bin/koha/serials/serials-edit.pl?serstatus=*/+,2,3,'2016-12-12','2016-12-12',6,'jjj7','jjj8'%20--%20-&subscriptionid=1+and+1%3d2+Union+all+select+111+/*

The SQL query is not constructed correctly, placeholders must be used.
Subscription id and status list can be provided by the user.

This vulnerability has been reported by MDSec.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f42dbd67d1b960906fd2b98560e7e3724452bce9)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoIncrement version for 16.11.03 security release
Katrin Fischer [Mon, 30 Jan 2017 16:02:52 +0000]
Increment version for 16.11.03 security release

7 years agoBug 9569: Security patch for AutoLocation
Jonathan Druart [Thu, 19 Jan 2017 10:46:21 +0000]
Bug 9569: Security patch for AutoLocation

If a patron is not allowed to access the staff interface because its IP
address in the authorised range of IPs, the cookie should not contain
the CGISESSID.
If it is, the patron is logged in and will be able to access the staff
interface if he reload the page (or hit another one).

Test plan:
Confirm the that AutoLocation feature is now working as expected.

Note: It seems that this feature has never really worked as intended.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 93cc0956a923e94663ae74d1f435604844536571)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 9569: Update warning message
Jonathan Druart [Thu, 19 Jan 2017 09:00:40 +0000]
Bug 9569: Update warning message

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7afddcb157a8d8e27cfdee3cdbeb0eae483aa24c)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 9569: Do not check the IP for login at the OPAC
Jonathan Druart [Tue, 16 Aug 2016 13:01:40 +0000]
Bug 9569: Do not check the IP for login at the OPAC

At the OPAC, the AutoLocation feature should not be taken into account:
login to the OPAC from outside the IP range should work

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit af0af36bb9a520c31c31067b9b68fd565eef0e63)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 9569: Remove unused occurrence of AutoLocation
Jonathan Druart [Tue, 16 Aug 2016 12:56:25 +0000]
Bug 9569: Remove unused occurrence of AutoLocation

`git grep ManualLocation` does not return any results

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 936b23e17a4b7d76d94be276ed1ceb9be8872299)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

7 years agoBug 9569: AutoLocation should not depend on IndependentBranches
Jonathan Druart [Tue, 16 Aug 2016 12:56:19 +0000]
Bug 9569: AutoLocation should not depend on IndependentBranches

Those 2 prefs can be independent and it does not make sense to consider
AutoLocation only if IndependentBranches is set.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit acabdc87c9a883e36def78dcff6fccb4980d35ab)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>