koha.git
6 years agoIncrement version for 3.22.21 3.22.x v3.22.21
Julian Maurice [Mon, 22 May 2017 15:20:28 +0000]
Increment version for 3.22.21

6 years agoUpdate release notes for 3.22.21
Julian Maurice [Mon, 22 May 2017 15:18:50 +0000]
Update release notes for 3.22.21

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoTranslation updates for Koha 3.22.21
root [Mon, 22 May 2017 07:52:26 +0000]
Translation updates for Koha 3.22.21

(cherry picked from commit f926cd5a715c7852312e3cffd3765dfe902e1b46)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18578: Use subdirectory in /tmp for session storage during installation
Marcel de Rooy [Thu, 11 May 2017 07:10:50 +0000]
Bug 18578: Use subdirectory in /tmp for session storage during installation

Apply the change from bug 15553 to InstallAuth.pm too.

Test plan:
[1] Remove all cgisess_* files from your /tmp directory.
[2] Remove directory /tmp/cgisess_koha_[your instance], if there.
[3] Run the webinstaller
    /cgi-bin/koha/installer/install.pl?step=1&op=updatestructure
[4] Check if you have cgisess_ files in /tmp/cgisess_koha_[your instance].

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: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c9de665c294f0e4416a9f1ea751e2859eb065a9c)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 5d745a88f0450320493b7e33371b53799d87f677)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18536: [QA Follow-up] Tiny regex simplification
Marcel de Rooy [Fri, 19 May 2017 09:39:24 +0000]
Bug 18536: [QA Follow-up] Tiny regex simplification

Simplify regex for removing table name.
No need to escape a dot between the square brackets. No need to specify a
number of 1 between parentheses.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 63c6eaca8d649cb7864b90e5e1ee9ac019daffdf)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 3166154e876b871ed97c1eaf1f02c0c26fc65c26)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18536: Generating CSV using profile in serials late issues doesn't work as described
Josef Moravec [Thu, 4 May 2017 08:54:30 +0000]
Bug 18536: Generating CSV using profile in serials late issues doesn't work as described

Description on editing csv profiles says:

"You can also use your own headers (instead of the ones from Koha) by
prefixing the field name with an header, followed by the equal sign."

So the header should be optional, but in fact it's mandatory. Also the
regular expression to cut table name from beginning of db column is not
right.

Test plan:

0. Don't apply the patch
1. Make two CSV profiles for exporting late issues
    a) SUPPLIER=aqbooksellers.name|TITLE=subscription.title|ISSUENUMBER=serial.serialseq|LATE SINCE=serial.planneddate
    b) aqbooksellers.name|TITLE=subscription.title|ISSUE NUMBER=serial.serialseq|LATE SINCE=serial.planneddate
2. Export late issues, profile a) works as expected, profile b) doesn't
3. Apply the patch
4. Both profiles should work

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6b8f9d7e14a8b93143185e814464393ef275631d)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit e6af6ae62ab7ab950aaccf24f95dd52334d93218)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 16568 - Talking Tech generates phone notifications for all overdue actions
Kyle M Hall [Mon, 23 May 2016 14:05:58 +0000]
Bug 16568 - Talking Tech generates phone notifications for all overdue actions

Regardless of whether the phone transport has been selected for a given
overdue action or not, the Talking Tech outbound script generates and
sends a line for that action.

Test Plan:
1) Enable Talking Tech
2) Create one or more overdue actions without a phone transport selected
   and one or more with the phone transport selected
3) Generate the overdues csv file to send to Itive
4) Note the csv file has lines for actions that do not have the phone
   transport selected
5) Apply this patch
6) Repeat step 3
7) Note the csv file now only has lines for actions that have the phone
   transport selected

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.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 86678bbc26954e5e4eddf8b11b652b4c83e80425)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 60903c88dc17739548dde43b75078bf08f64a257)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 14625 - LDAP: skip extended patron attributes in 'borrowers' attribute update
Oliver Bock [Mon, 30 Nov 2015 12:57:58 +0000]
Bug 14625 - LDAP: skip extended patron attributes in 'borrowers' attribute update

* Any extended patron attributes will cause the update to fail as those attributes don't exist in the 'borrowers' table
* The update of the extended patron attributes is already dealt with in checkpw_ldap()
* Ergo: just skip those attributes here

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
I did not test this patch but code looks good

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 4c631a0824a38177279475f77e9246087fa97515)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit f5fbf222f4c947346f7c56938ff87388ea5fb136)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 17618: perl-modules Debian package name change
Mirko Tietgen [Sat, 12 Nov 2016 07:50:04 +0000]
Bug 17618: perl-modules Debian package name change

Newer versios of perl-modules have a version number in the package name.
This patch makes Koha aware of perl-modules-5.22 and perl-modules-5.24

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 0c5905843dfc55e422c667f9d0aa6f243f56f1a8)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 7b9bda5881e1a48fab029c0c0d78f4b0848ae545)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 17936: Update opac.css
Julian Maurice [Mon, 22 May 2017 11:32:48 +0000]
Bug 17936: Update opac.css

6 years agoBug 17936 - Search bar not aligned on right in small screen sizes
Owen Leonard [Sat, 29 Apr 2017 17:45:48 +0000]
Bug 17936 - Search bar not aligned on right in small screen sizes

This patch tweaks the OPAC's CSS so that the main search form's fields
have consistent width at small screen sizes.

To test, apply the patch and process the LESS files. View the OPAC main
page at a very narrow browser width and confirm that the text field
width matches that of the dropdown and button.

Signed-off-by: Marc Véron <veron@veron.ch>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e94709cd7efaf3151ef1bde9278bc063a6ddcac1)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 7ebca34861cb71ef17b6fd7f6cba7e7921a564da)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18504 - Amount owed on fines tab should be formatted as price if <10 or credit
Nick Clemens [Thu, 27 Apr 2017 19:39:35 +0000]
Bug 18504 - Amount owed on fines tab should be formatted as price if <10 or credit

To test:
1 - Give a patron a fine of 1
2 - View opac fines tab, it shows as '1'
3 - Give patron a credit of '1'
4 - View opac fines tab, it shows as '1'
5 - Apply patch
6 - Both now show as '1.00'

Signed-off-by: Lisa Gugliotti <lisa@hchlibrary.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6da7ed1d8c17960e1e90b8f197fe948d4ed25bad)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit f31d8f2946683d066ed1fba30dff13c2ef2d9ea4)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 16515: Update opac.css
Julian Maurice [Mon, 22 May 2017 11:28:05 +0000]
Bug 16515: Update opac.css

6 years agoBug 16515 - Did you mean? links don't wrap on smaller screens
Owen Leonard [Sat, 29 Apr 2017 18:45:30 +0000]
Bug 16515 - Did you mean? links don't wrap on smaller screens

This patch tweaks some CSS in the OPAC to give the "Did you mean" block
better layout on smaller screens.

To test, apply the patch and process LESS files. Enable "Did you mean"
plugins for the OPAC in Administration.

Perform a search in the OPAC and confirm that the "Did you mean" block
looks correct. Resize your browser to various widths and confirm that
the block handles all sizes well.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 893ead43f751df78bfdcb23ebb137b7975885ec9)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 505ba12bafb729b624e5ab183f3a5c9015d26084)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 17257: Fix add/edit patrons under MySQL 5.7
Jonathan Druart [Tue, 6 Sep 2016 09:12:20 +0000]
Bug 17257: Fix add/edit patrons under MySQL 5.7

If no guarantor is defined the patron won't be added/modified and an
error will be raised:

DBD::mysql::st execute failed: Incorrect integer value: '' for column
'guarantorid'

Test plan:
Using MySQL 5.7 (and/or sql_mode=STRICT_TRANS_TABLES)
Create a patron without guarantor

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>

Tested with MariaDB 10.0.30 (sql_mode='STRICT_TRANS_TABLES')
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 720071004516ec4e119dc5ec7f9538b56313b186)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 63823bbfcd66191f88b5f9359b1a743e71d69348)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18444: Add TalkingTechItivaPhoneNotification to sysprefs.sql
Lari Taskula [Tue, 18 Apr 2017 12:24:26 +0000]
Bug 18444: Add TalkingTechItivaPhoneNotification to sysprefs.sql

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 3e1f21ae0ddcef1c351639e228410f8523f5efe4)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 6f4abb65f6eafa226e8327da64d7b77755645897)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18370: Use splice instead of splice
Jonathan Druart [Thu, 11 May 2017 15:37:24 +0000]
Bug 18370: Use splice instead of splice

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit ec822b855244cacf36757e9028779ad9d270c370)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 4e4b6fbcefdde07933c33f7c0b4c90d6cb8f29de)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18370: Columns visibility on patron search - Hide the correct column
Jonathan Druart [Mon, 3 Apr 2017 14:50:07 +0000]
Bug 18370: Columns visibility on patron search - Hide the correct column

When a column is hidden by default on the patron search result table,
if the logged in user does not have the "tools > manage_patron_lists"
permission, the wrong column will be hidden.

Test plan:
Edit the column visibility detail for "Patrons > id=memberresultst"
Set "Fines" hidden by default
Search for patrons
=> Without this patch, if the logged in user does not have the
manage_patron_lists permission, the wrong column will be
hidden/displayed.

Signed-off-by: Séverine Queune <severine.queune@bulac.fr>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0a2b14dd16292572e5163e5dfa491432be1660d2)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit e5d232e2084269ad9785b3b985edda1e14e40914)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18340: Fix progress bar length
Jonathan Druart [Mon, 27 Mar 2017 20:18:22 +0000]
Bug 18340: Fix progress bar length

The progress bar (for background jobs) should be fully filled when 100%
is hit, right? :)
It has been introduced quite long time ago when the size of the progress
bar has been changed from 150 to 200px, and the code has been
refactored.

Test plan:
Launch a big modification/deletion of records/items in a batch.
You should see the progress bar progressing to 100 and reach 100!

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e424bd0d84d4aa30ceae5e6cea0ee453413f0ef9)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 92aff81e1f15fc64af57cc851d703829783555ac)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18535 - Clicking 'edit printer profile' in label creator causes software error
Nick Clemens [Wed, 3 May 2017 20:43:22 +0000]
Bug 18535 - Clicking 'edit printer profile' in label creator causes software error

1) Go to Tools > Label creator
2) If you don't have a printer profile defined, create one.
3) Go to manage > Printer profiles
4) Click the 'edit' button on any of the profiles.
5) INTERNAL SERVER ERROR! "Can't use string ("fields") as a HASH ref
while "strict refs" in use at /usr/share/koha/lib/C4/Creators/Lib.pm
line 147"
6) Apply patch
7) Click the 'edit' button on any of the profiles.
8) Things work as expected

Bug reproduced, is fixed by this patch
Signed-off-by: Marc Véron <veron@veron.ch>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit af845c143a4f5a8fb1ea88cac3478ef91a1bdb9c)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 36e7e213fa4b1252b43fc402b238d8c835821995)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 4460: Amazon's AssociateID tag not used in links so referred revenue lost
Mark Tompsett [Tue, 21 Jun 2016 18:49:32 +0000]
Bug 4460: Amazon's AssociateID tag not used in links so referred revenue lost

Reworking based on output of:
git grep "gp\/reader"
Additionally, some changes might be in order though gp/reader works.
https://affiliate-program.amazon.com/help/topic/t64/a1
suggests using dp
A dp was discovered, so that part of the URL was left unchanged.
The "/ref..." part was changed to just an Amazon tag ("?tag={AAT}")
if defined.

TEST PLAN
---------
 1) Added:
     "100 years of Canadian foreign policy /
      edited by Robert Bothwell and Jean Daudelin."
 2) Added a second book with the word foreign in the title.
 3) Waited for reindex
 4) Checked out the Canadian foreign policy book.
 5) Applied patch
 6) Made sure that:
    - AmazonAssocTag was set to TEST (easy to notice)
    - AmazonCoverImages was set to 'Show'
    - OPACAmazonCoverImages was set to 'Show'
 7) Searched intranet for 'foreign' to find the detail page
    -- hovering over picture shows URL with ?tag=TEST in it.
 8) Went to the OPAC Detail page
 9) Toggling OPACURLOpenInNewWindow, confirmed that URL for
    the picture contained ?tag=TEST in it.
10) Logged into the OPAC
11) Confirmed the URL in the checked out list on your summary
    page contained ?tag=TEST in it.
12) Confirmed the URL in the checked out list on your reading
    history page contained ?tag=TEST in it.
13) Confirmed links worked (went to expected page)
14) run koha qa test tools

Followed test plan. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Marc Véron <veron@veron.ch>

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 463c5a0f25a1e2dfc3331319bd86f17b4114821e)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit cbacb0636ecd4ab30fdb0683cf55122f3e9f3811)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBUG 18505: opac-search-history does not respect opacPublic
Martin Renvoize [Fri, 28 Apr 2017 07:48:50 +0000]
BUG 18505: opac-search-history does not respect opacPublic

The opac-search-history page was available regardless of the opacPublic setting, this
patch corrects that.

Test plan, set opacPublic to 'No', test whether opac-search-history page is available
when not logged in, note that it is.
Apply patch, test whether opac-search-history is still available when not logged in,
note that you should be redirected to the login page.

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 94e09b6a186a4a8f1a2a470c41493ad228d0be20)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit f31a5b00e86dbba3156c0cff1bfcd251f5cc42da)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18233 - t/db_dependent/00-strict.t has non-existant resetversion.pl
Olli-Antti Kivilahti [Wed, 8 Mar 2017 16:12:59 +0000]
Bug 18233 - t/db_dependent/00-strict.t has non-existant resetversion.pl

Removes a warning.

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit fac7ba914d7f3071102563109ce843f1e97bc46f)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit eabdd18b2c099002b1164c3e65a46801e5806645)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18152: Add tests
Jonathan Druart [Wed, 3 May 2017 18:30:14 +0000]
Bug 18152: Add 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 a807d7199ea025aa507e0ca7e3ff2330902844f8)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 5016a854cc0cd151106aedee12f746e60d9c3ff2)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18152 : fix unimarc label in SetMarcUnicodeFlag
Stephane Delaune [Wed, 22 Feb 2017 11:25:33 +0000]
Bug 18152 : fix unimarc label in SetMarcUnicodeFlag

The standard UNIMARC requires than the 9th character (starting from 0) in
labels must be blank (while it may be 'a' in marc21)

the problem is that C4::Charset::SetMarcUnicodeFlag (called in particular when
we import a record) always add 'a' char in the 9th label'pos whereas it should
do it just for MARC21 and NORMARC (not for UNIMARC) :

C4::Charset::SetMarcUnicodeFlag add 'a' char in the 9th label character for
MARC21 and NORMARC (it's normal), but just before doing this it call
"$marc_record->encoding('UTF-8')" which is a MARC::Record function which, when
called with 'UTF-8' parameter, do only one thing : add 'a' char in the 9th
label character

This patch only removes this incorrect function call, so, when we import a bib
record in UNIMARC : it no longer adds erroneous character (this does not change
anything for MARC21 and NORMARC because SetMarcUnicodeFlag explicitly adds 'a'
char in the 9th label for them)

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit bf551a07222a7b9beffd7ca6cba38c675aa3ab28)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit a7c25ccdd52cc3ae467651cadd3b4b89e5f69ff8)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18442: Add a test
Jonathan Druart [Fri, 21 Apr 2017 21:44:05 +0000]
Bug 18442: Add a test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 9bf8142ee77dbacceca0cb17ed5f56ec07b3771c)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 6fa7c7d2bf7767427f9ccb421fe966097cbd34d7)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18442: Fix DB user loggin
Alex Buckley [Wed, 19 Apr 2017 23:29:28 +0000]
Bug 18442: Fix DB user loggin

Test plan:
1. Drop and recreate your db

2. Clear memcached

3. Go through the installer (to speed up this test plan install all
sample data so you dont have to create libraries, patron categories etc. later)

4. On the installer page login as the database user and notice that it
does not work on the first attempt ( you get 'Error: You do not have
permission to access this page')

5. Try logging in as database user for a second time and notice you are
logged in successfully this time

4. In staff interface create a patron account with superlibrarian permissions

5. Logout of the staff interface

6. Login as database user

7. Notice you cant log in. You get the 'Error:: You do not have permission to access this
page' error

8. Try a second attempt and notice you get the same error

9. Open the URL in a new tab and notice the staff interface appears
showing that you are logged in

10. log out and log back in as the superlibrarian user you created and
notice it works on first login attempt

11. Apply patch

12. Log out and try logging back in as database user and notice that you
can login successfully on first attempt

13. Repeat steps 1,2,3 and login as database user and notice the login
works on first attempt

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 416029ff2f3c9c689a5ea24372f4d940ccc71817)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 53555de5ecf82e6c7b3c07c6d0933c15febd49a4)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18484 - opac-advsearch.tt missing closing div tag for .container-fluid
Owen Leonard [Mon, 24 Apr 2017 14:21:00 +0000]
Bug 18484 - opac-advsearch.tt missing closing div tag for .container-fluid

This patch corrects HTML validation errors by adding back a missing
</div> which was removed accidentally by Bug 9043 (2014!).

This patch also removes "border" attributes from <img> tags because the
attribute is obsolete.

To test, apply the patch and test the validity of the OPAC's advanced
search page. The only error should be one about 'Bad value
"api-server,"' which isn't really resolvable.

Signed-off-by: Barton Chittenden <barton@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 6f334aab06fd6e07f2ab8b399fbe50168d5818f4)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 21956001c7466e1b51f7268dfa1e841464d9537d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18376: Do not need to prepare a single statement, use do
Jonathan Druart [Thu, 18 May 2017 19:40:42 +0000]
Bug 18376: Do not need to prepare a single statement, use do

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 285dd883564eaf96737b2be153bbe6d30e1b64f7)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit f598d07f0d617fade96c35634bfad8d7c480fd03)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18376 - authority framework creation fails under Plack
Fridolin Somers [Tue, 4 Apr 2017 12:17:15 +0000]
Bug 18376 - authority framework creation fails under Plack

With plack, when creating a new authority framework from another, you get the error :
Can't call method "prepare" on an undefined value at (...)/src/admin/auth_tag_structure.pl line 267.

Looks like plack does not like when the var $dbh from the script is called inside a sub.

This patch adds a local var $dbh inside sub duplicate_auth_framework(), like in sub StringSearch().

Also correctes a redefine of my $sth.

Test plan:
- Go to Administration > Authority types
- Create a new type
- On this new type click on Actions > MARC Structure
- Select another type and click OK
=> You must get a table filled with the tag structure
Check with and without plack
You may not be able to reproduce the error with plack.

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6a82ff4b8907f17fb17af3201ab6e96320a995bf)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 3d37ed539f76005fe55f71f35def5c86d56db859)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18066: Update DBIx::Class Schema
Jonathan Druart [Thu, 23 Mar 2017 16:32:34 +0000]
Bug 18066: Update DBIx::Class Schema

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18066: Update DB rev (3.22.20.001)
Brendan A Gallagher [Thu, 23 Mar 2017 00:18:10 +0000]
Bug 18066: Update DB rev (3.22.20.001)

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18066: Remove warnings from translate script
Jonathan Druart [Mon, 24 Apr 2017 19:26:31 +0000]
Bug 18066: Remove warnings from translate script

This patch removes the following warnings:
Use of uninitialized value $pref_name in concatenation (.) or string at
LangInstaller.pm

(cherry picked from commit bcc04652762ff097623630432946ca9203f7519f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18066: Add the new geolocation column to kohastructure.sql
Jonathan Druart [Thu, 23 Mar 2017 16:31:24 +0000]
Bug 18066: Add the new geolocation column to kohastructure.sql

(cherry picked from commit 64812347c9536340484f17758c6881ca882987d6)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18066: Fix map positioning in admin/usage_statistics.pl
Julian Maurice [Tue, 21 Mar 2017 11:01:45 +0000]
Bug 18066: Fix map positioning in admin/usage_statistics.pl

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit c3db243ad459782362c7051a648730bc51fda83d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18066: Fix tests
Jonathan Druart [Tue, 21 Mar 2017 10:21:38 +0000]
Bug 18066: Fix tests

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 7aff8696614604960b7244fac798a28c4438fc36)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18066: Use https for ws
Jonathan Druart [Tue, 28 Feb 2017 17:13:07 +0000]
Bug 18066: Use https for ws

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit c302fd2bea710c960db7bc14aeac762c865f677a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18066: Do not use token for OSM tiles
Jonathan Druart [Tue, 28 Feb 2017 11:16:56 +0000]
Bug 18066: Do not use token for OSM tiles

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 0d479976af81df3a66024e4ffc18ecc2038c0103)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18066: Add the leaflet library
Jonathan Druart [Tue, 7 Feb 2017 08:31:28 +0000]
Bug 18066: Add the leaflet library

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit f3c4c7016128e6550230cd44f8efedf0374db25e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18066: Hea V2
Jonathan Druart [Thu, 2 Feb 2017 15:53:58 +0000]
Bug 18066: Hea V2

This patch is the Koha part of the Hea v2 project.
You can find the (testing) code for the server at
  hea-ws  - https://github.com/joubu/hea-ws/commits/v2
  hea-app - https://github.com/joubu/hea-app/commits/v2
They contain the different pull requests made over the last 6 months.

More information on Hea at https://wiki.koha-community.org/wiki/KohaUsageStat_RFC
The goal of this commit message is to provide an overview of what could
be a new version of Hea.

Prior to these changes, the Hea database was filled with 1 line per Koha
installation. System preferences were filled by the libraries and a
cronjob (share_usage_with_koha_community.pl) collected these values to send
them to a webservice (hea-ws/upload.pl).

With the need to collect more data we would want to collect data at the library
level (branch) and not at the installation level.
For instance the geolocation, the url or the country can be different from one
library to another, even if managed from the same Koha installation.
The Hea DB has been upgraded to reflect that change (see hea-app/sql/schema.sql).

The hidden goal of this patch is to make Hea sexier and explain
better to libraries how it can be useful to share their information
with the Koha community. I guess the main problem is the lack of
communication and explanations about what we are doing we these data.
To fill this gap I'd like to (TODO)
  1. Communicate on the ML about this new version of Hea (once it got
pushed and backported)
  2. Link the Privacy_Policy.md from the Hea interface
  3. Get help from a native English speaker to add
popup/help/info/whatever on "Home › Administration › Usage statistics",
to clearly explain what happens (and what will not happen!) when an option or
another is set.

You can find screenshot of this whole enhancement on bug 18066, comment 2.

What this patch does:
- Create a new branches.geolocation DB field
- Add 3 new sysprefs:
  * UsageStatsGeolocation
  * UsageStatsLibrariesInfo
  * UsageStatsPublicID
- Integrate the Leaflet JS library to get a fancy map to pick
geolocations

How does it works:
On the new administration page where statistics to share are configured,
there are several new things. It is now possible to share information either
per Koha installation or libraries. If UsageStatsLibrariesInfo is set,
the info at library level (url, name, country, geolocation) will be
sent to the Hea webservice. If it is not set, you can decide to fill
UsageStatsLibraryUrl, UsageStatsLibraryName, UsageStatsCountry,
UsageStatsGeolocation to share these information. Note that even if the
data are retrieved at installation level, it's better to fill the prefs
as well: On the Hea website the different libraries defined for a given
Koha installation could be displayed on the same page.
This page is a public page which will be attributed to every
installation (with the pref UsageStatsPublicID). On this page all the
info available publicly will be displayed.

TODO later:
- Add a button on the administration page to delete the info shared
publicly. It will be easy to show that the info are no longer displayed
on the public page.
- Add an icon per Koha installation to get a better "public page"
- Any suggestions?

Test plan:
We will need to test hea-ws, hea-app and the Koha-side code to test the
whole enhancement.
1/ To start, clone the hea-ws and hea-app project and checkout the
'master' branch (*not* 'v2')
2/ Create the hea database and user
  CREATE DATABASE hea
  CREATE USER 'hea'@'localhost' IDENTIFIED BY 'hea';
  GRANT ALL PRIVILEGES ON hea.* TO 'hea'@'localhost';
  FLUSH PRIVILEGES;
3/ Fill the DB with some data
  mysql hea < hea-app/sql/schema.sql
  mysql hea < hea-app/sql/sql/mock-data.sql
4/ Checkout the 'v2' branch for both hea-ws and hea-app
5/ Execute the upgrade DB script
  % cd hea-app
  % perl -p -i -e 's/REPLACE_ME/hea/' sql/upgrade.pl # Fill the DB info
  % perl sql/upgrade.pl
Now the DB is using the v2 structure. That means we have 1 installation
row per library previously defined. 1 library row has also been created.
5/ Configure hea-ws
% echo '192.168.50.1 hea.koha-community.org' >> /etc/hosts
<VirtualHost *:80>
  DocumentRoot "/path/to/hea-ws"
  ServerName "hea.koha-community.org"
  <Directory "/">
    Options +ExecCGI
    Require all granted
    AddHandler cgi-script .pl
  </Directory>
</VirtualHost>

And enable it with a2ensite, then restart apache.
The copy the database.yml.sample to database.yml and edit it to fill the
DB info.

6/ Launch the hea-app
  % cd hea-app
  % edit README.md # to install the missing modules
  % cp environments/config.yml environments/development.yml
  % edit environments/development.yml # to fill the DB info
  % perl bin/app.pl
Then hit localhost:3000
You should see a local version of Hea with sample data

7/ Back to Koha side
A. We will test that the webservice still works with previous version of Koha (without v2)
a. Do not configure Hea
  % perl misc/cronjobs/share_usage_with_koha_community.pl -f -v
Then hit localhost:3000
=> Nothing added
b. Configure Hea on admin/usage_statistics.pl
perl misc/cronjobs/share_usage_with_koha_community.pl -f -v
=> New library added
c. Modify the Hea configuration
perl misc/cronjobs/share_usage_with_koha_community.pl -f -v
=> Info are modified

B. Not we will test that it works with the new version (much more fun ;))
% git checkout hea-v2 # koha
a. Configure Hea using /admin/usage_statistics.pl
perl misc/cronjobs/share_usage_with_koha_community.pl -f -v
=> Check the result on localhost:3000
b. Share libraries's info
perl misc/cronjobs/share_usage_with_koha_community.pl -f -v
c. Continue to play a bit and share the info.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 63a1adff9097493be0329aebab5fb3bf8a627b80)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 14608: Move country list to an include file
Jonathan Druart [Sun, 12 Mar 2017 22:54:58 +0000]
Bug 14608: Move country list to an include file

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 6b626b64944dff0ba0adff99da26e3bbe8eb7544)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 14608: Follow up on labels and search box
Mark Tompsett [Fri, 13 Jan 2017 18:33:05 +0000]
Bug 14608: Follow up on labels and search box

This addresses concerns raised in comment #26 and comment #27.

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

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit ffbeae312bb472a58adf33e13b8c3d5f9124f0af)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 14608: Add a reference to Hea at the end of the installer process
Jonathan Druart [Tue, 20 Dec 2016 22:31:41 +0000]
Bug 14608: Add a reference to Hea at the end of the installer process

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 384b69462e6005e316680b88de304095a39a318b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 14608: Add a link from the admin home page
Jonathan Druart [Tue, 20 Dec 2016 22:31:25 +0000]
Bug 14608: Add a link from the admin home page

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 601312c6c80e82837869b4eb2c91686c6a1361b3)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 14608: Add a page to configure shared statistics
Jonathan Druart [Tue, 20 Dec 2016 22:29:53 +0000]
Bug 14608: Add a page to configure shared statistics

This patch set adds:
- a reference to Hea at the end of the installation process
- a link to the new page from the admin home page
- a new page to easily configure shared statistics

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 3d46c0c7bb8ce487f85cd0d0233cb7ceffcbbde3)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 17818 - Duplicating a subfield yields an empty subfield tag [follow-up]
Sophie Meynieux [Wed, 28 Dec 2016 14:04:51 +0000]
Bug 17818 - Duplicating a subfield yields an empty subfield tag [follow-up]

The problem is the same as Bug 17477 but also for dropdown selection list

Steps to reproduce error:
- On the cataloging screen (basic screen), create a new record
- Go to a field with repetable subfields and associated with authorised values
- Select a value for the subfield
 583$x)
 - Clone the subfield
 - select another value for the new subfield
 - Save the record
 - Edit the record to modify => the clone subfield has desappeared.
If you look in DB in marcxml, the subfield is present but without code

 - Apply patch
 - Clean cache browser and reload page
 - Repeat steps above
 - Verify that works as expected

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18443: Get rid of warning 'uninitialized value $user' in C4/Auth.pm
Marc Véron [Tue, 18 Apr 2017 07:21:45 +0000]
Bug 18443: Get rid of warning 'uninitialized value $user' in C4/Auth.pm

When logging out from OPAC, plack-error.log log and/or opac-error.log
complain about 'uninitialized value $user' in C4/Auth.pm line 187. The
warning is not necessary, this patch removes it.

To test:
- try to trigger warning
- apply patch
- verify that warning no longer occurs
- prove t/db_dependent/Auth.t
- verifiy that SCO still behaves like before (especially if
  you break out from sco path)

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Mason James <mtj@kohaaloha.com>
(cherry picked from commit ab4d7d6987fd1d8a3f6e42e5afa258845f8cf934)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18429 - Receiving an item should update the datelastseen
Nick Clemens [Thu, 13 Apr 2017 13:55:15 +0000]
Bug 18429 - Receiving an item should update the datelastseen

To test:
0 - Ensure AcqCreateItem is set to 'placing an order'
1 - Order some items, note entrydate and datelastseen match
2 - Alter those dates to be earlier than today (or wait some days)
3 - Recieve the item and note datelast seen not updated
4 - Apply patch
5 - Repeat 1-3
6 - Date last seen should be updated.

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Works as expected.
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Mason James <mtj@kohaaloha.com>
(cherry picked from commit f5558529ff52baeecda4b6ca293d73ee6982dffe)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18335 - Check in: Make patron info in hold messages obey syspref AddressFormat
Marc Véron [Sun, 26 Mar 2017 15:26:22 +0000]
Bug 18335 - Check in: Make patron info in hold messages obey syspref AddressFormat

When checking in, information about patrons with a hold always display
in an US style. Address information should opey the system preference
AddressFormat

To reproduce:
- Set syspref AddressFormat to German style
- Check out an item to a patron A
- Put a hold on this item for patron B
- Check in item using the Check in field in page header
- Result: In message 'Hold found', address does not display in German
  style

To test:
- Apply patch
- Repeat steps above
- Verify that address displays as expected

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Mason James <mtj@kohaaloha.com>
(cherry picked from commit 318f62227169215d8e6c1fcb4171025df1c87e3a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18460: Fix undefined itemtype warning in Serials.t
Tomas Cohen Arazi [Wed, 19 Apr 2017 15:15:46 +0000]
Bug 18460: Fix undefined itemtype warning in Serials.t

This patch makes the test create an itemtype, and use it for the created item so there's no warning.

To test:
- Run:
  $ prove t/db_dependent/Serials.t
=> FAIL: item-level_itypes set but no itemtype set... warning raised
- Apply the patch
- Run:
  $ prove t/db_dependent/Serials.t
=> SUCCESS: Tests pass and no warning is raised
- Sign off :-D

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Mason James <mtj@kohaaloha.com>
(cherry picked from commit e7ee2fd59f39f6092cb2420c8fed25df096e1529)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 12021 - SIP2 checkin should alert on transfer and use CT for return branch
Benjamin Rokseth [Tue, 1 Apr 2014 12:07:59 +0000]
Bug 12021 - SIP2 checkin should alert on transfer and use CT for return branch

This small patch corrects the SIP2 checkin response if branch transfer is needed.
It depends on bug 7981 and also removes an obsolete alert check in SIP2.

Test plan:
 - apply bug 7981
 - make sure syspref AutomaticItemReturn is false
 - check 'Return policy' in 'Default checkout, hold and return policy'
 - make a SIP2 checkout and checkin from a branch different than item's home branch.
 - verify that SIP2 response gives alert CV04 (=send to different branch)
 - also verify that response field CT gives correct branch according to 'Return policy'

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

Followed test plan, works as expected
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Mason James <mtj@kohaaloha.com>
(cherry picked from commit a98b5468baca4716357643c87f5cb9e02f62c343)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18423 - Followup - enable Add child button for institutional borrowers
Nick Clemens [Tue, 18 Apr 2017 18:03:37 +0000]
Bug 18423 - Followup - enable Add child button for institutional borrowers

If they can have guarantors and we shwo the button on one page I think
we should in fact show it on all.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 00b76faf0ac30601fb3ff12a6cd71bcdab1b7177)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18423 - Add 'Add child' button to files, housebound, and deletemem pages
Nick Clemens [Tue, 18 Apr 2017 17:53:54 +0000]
Bug 18423 - Add 'Add child' button to files, housebound, and deletemem pages

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c481c15a4fedd13b7f0f96d519313f744a425421)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18423 Follow-up - Add 'Add child' button to statistics tab
Nick Clemens [Mon, 17 Apr 2017 16:32:56 +0000]
Bug 18423 Follow-up - Add 'Add child' button to statistics tab

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 63c72da9483f26d88c1b287b93105cea7d6cdf89)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18423 follow up - fix display off add child on members/notices.pl
Nick Clemens [Wed, 12 Apr 2017 15:32:11 +0000]
Bug 18423 follow up - fix display off add child on members/notices.pl

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4cc1f7304f98886aa035fe194d5c5bc63409ff24)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18423 - Add child button not always appearing - problem in template variable
Nick Clemens [Wed, 12 Apr 2017 14:23:56 +0000]
Bug 18423 - Add child button not always appearing - problem in template variable

This patch removes the retrieval of the syspref borrowerRelationship
from the scripts and moves it to a check using the Template Toolkit
plugin

To test:
1 - Apply patch
2 - Ensure 'Add child' button displays appropriately on all member pages.

Tested 3 pateches together, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Mason James <mtj@kohaaloha.com>
(cherry picked from commit 46fd998c85ea36291f5af6169f8860d36fb57a94)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 17911: Message and timeout mismatch
Mark Tompsett [Mon, 16 Jan 2017 04:26:33 +0000]
Bug 17911: Message and timeout mismatch

The installation step 3 has a meta refresh of 10 seconds,
but the message says 5 seconds. People could get impatient.

TEST PLAN
---------
1) Fresh install
   -- notice the discrepancy on the web installation.
2) drop and create the DB
3) apply the patch
4) run the web install
   -- notice it refreshes faster (5 seconds vs 10 seconds)
5) run koha qa test tools

Works as intended and passes qa test tool
 OK koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt
  OK    forbidden patterns
  OK     git manipulation
  OK      spelling
  OK   tt_valid
  OK    valid_template

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Mason James <mtj@kohaaloha.com>
(cherry picked from commit c7cfc20995d885c33f53e16ce01c09146efceab6)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 17814: koha-plack --stop should make sure that Plack really stop
pongtawat [Mon, 26 Dec 2016 10:50:50 +0000]
Bug 17814: koha-plack --stop should make sure that Plack really stop

koha-plack --stop doesn't ensure that Plack was really stopped before
returning

So in case that koha-plack --stop was quickly follows by koha-plack
--start (e.g. logrotate), it could leave Plack in stop state. This is
due to koha-plack --start think that Plack was already started, while it
actually is being stopped.

For me I think this is the cause why I got random Plack stop when
logrotate is run.

It should be similar to the case of Zebra in Bug #16885, and the
solution might be the same: adding "--retry=TERM/30/KILL/5;" to
start-stop-daemon command.

TEST PLAN
---------
1) Login to staff client and do something that will hold connection for
a long time, e.g. a batch import or a slow report.
2) sudo koha-plack --stop mykoha
3) ps aux | grep plack   <-- a Plack process will still running work in
1)
4) wait for 1) to finish and all Plack processes exit
5) sudo koha-plack --start mykoha
6) apply the patch
7) repeat step 1)-2)
8) ps aux | grep plack   <-- There should be no Plack process running
now
9) Note that work in step 1) might get terminated midway. Since we force
Plack to stop after some wait.

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Mason James <mtj@kohaaloha.com>
(cherry picked from commit b63f1c8b6ebfa24ae70745da7393cb1f15637dd4)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18364: [Follow-up] Also add an environment variable to prevent locking
Marcel de Rooy [Thu, 20 Apr 2017 10:52:47 +0000]
Bug 18364: [Follow-up] Also add an environment variable to prevent locking

The test in SendCirculationAlert is extended by adding an env var
called KOHA_NO_TABLE_LOCKS. If this var is set to a true value,
the table locking is skipped too.

This is useful when running a test without prove. The variable could be
set in a shell profile.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Mason James <mtj@kohaaloha.com>
(cherry picked from commit 15751085e950b38df235d11e958259e15ef48f37)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 18364: Do not LOCK/UNLOCK tables from tests
Jonathan Druart [Fri, 31 Mar 2017 16:43:38 +0000]
Bug 18364: Do not LOCK/UNLOCK tables from tests

From the MySQL doc:
"LOCK TABLES is not transaction-safe and implicitly commits any active transaction before attempting to lock the tables."
If the LOCK/UNLOCK statements are executed from tests, the current transaction will be committed.
To avoid that we need to guess if this code is execute from testsa or not (yes it is a bit hacky)

Better ideas are welcome!

Another fix would have been to revert
  commit be156d9ad9e5bcfadab34d44f90e04fd61e256ad
  Bug 15854: Use a READ and WRITE LOCK on message_queue
but theorically a race is still possible.

Existing tests seem to be safe, to test this patch you will need new
tests from bug 17964.
Test plan:
  prove t/db_dependent/Letters/TemplateToolkit.t
twice, and notice that changes have been comitted.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Mason James <mtj@kohaaloha.com>
(cherry picked from commit a2d5655093a7188028036ba439256d9f819c136e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

6 years agoBug 17821 - due date in intranet search results should use TT date plugin
Fridolin Somers [Wed, 28 Dec 2016 14:08:42 +0000]
Bug 17821 - due date in intranet search results should use TT date plugin

Intranet search results displays due date from item onloan.
This should use the TT date plugin.

Test plan :
- set syspref dateformat not on yyyy-mm-dd, for example dd/mm/yyyy
- checkout an item
- at intranet, perform a search where you see the item
=> You must see : "date due : dd/mm/yyyy"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Mason James <mtj@kohaaloha.com>
(cherry picked from commit a6315f2f4423a9b90203db72f74f69bfaa31815e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoIncrement version for 3.22.20 v3.22.20
Julian Maurice [Mon, 24 Apr 2017 07:29:18 +0000]
Increment version for 3.22.20

7 years agoUpdate release notes for 3.22.20
Julian Maurice [Mon, 24 Apr 2017 07:28:23 +0000]
Update release notes for 3.22.20

7 years agoTranslation updates for Koha 3.22.20
root [Mon, 24 Apr 2017 07:19:10 +0000]
Translation updates for Koha 3.22.20

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 12930: Web installer does not show login errors
Alex Buckley [Sat, 8 Apr 2017 23:18:23 +0000]
Bug 12930: Web installer does not show login errors

Implemented invalid_username_or_password template
variable being handed to Auth.tt. Removed indentation
changes and modification to return value of checkpw

Test plan:
See comment #2

Alternative test plan:
- Clear session cookies or close / open your browser
- Go to  [MY SERVER]/cgi-bin/koha/installer/install.pl
- Verify that message appears if wrong username/pw provided
- Verify that you can log in with databas administrator account

Tested with alternative test plan, works as expected. Title and
description in commit message adapted.
Signed-off-by: Marc Véron <veron@veron.ch>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 87eb80136d49451d0a9cc25e68db452a33f1771a)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 8c17314ef80cc54180446f7c3e85dbcf7125aebd)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 17872: Fix small error in GetBudgetHierarchy and one of its calls
Marcel de Rooy [Tue, 10 Jan 2017 09:03:36 +0000]
Bug 17872: Fix small error in GetBudgetHierarchy and one of its calls

In aqbudgetperiods.pl a commented line is removed that contains a
wrong userenv hash key. Should be branch instead of branchcode.

In aqbudgets GetBudgetHierarchy is called with the same wrong userenv
hash key. Should be userenv->{branch}.
This made another bug visible: if you call GetBudgetHierarchy with a
branch and without owner, the where clause should take into account
that the branchcode can be empty (not null).

Test plan:
[1] Run Budgets.t
[2] Run aqbudgets.pl from Administration
[3] Add the show_mine=1 parameter in the URL
[4] Change owner of one of the funds and repeat step 2 and 3.

t/Budgets.t returns green. Followed test plan, works as expected.
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 476179a12311b32643087cc8ec10c31409bb1b99)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 3079f7a72515a22062bd9a65ec546cfcd6d9bb66)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 18349: [QA Follow-up] Add four missing error messages
Marcel de Rooy [Fri, 7 Apr 2017 08:13:00 +0000]
Bug 18349: [QA Follow-up] Add four missing error messages

The error codes come from CanBookBeIssued.
The warnings speak for themselves. Note that the GNA message is similar
to the one used in opac-user.tt (gonenoaddress is translated to the patron
as contact information not up-to-date).

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 392641ff1ec0cf2b6480af134fd676edf64f4df7)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 042409941691b06db7e755247040781f867c0356)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 18349: Remove useless info in alert message
Jonathan Druart [Fri, 31 Mar 2017 16:25:13 +0000]
Bug 18349: Remove useless info in alert message

Empty tags should be removed, and message id
Note that not all error codes are covered here.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b61f73c48832e0f10ca799aa49682da37f1f44a1)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit fee024e18a0775c937671ca9c90e12a1992f1995)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 18349: If a confirmation is required, consider as blocker
Jonathan Druart [Fri, 31 Mar 2017 16:22:05 +0000]
Bug 18349: If a confirmation is required, consider as blocker

Only RENEW_ISSUE should not be considered as blocker, others should.
Note that this code is not robust and the whole script as well as the
return of CanBookBeIssued should be rewrittent completely.
We need a small patch to easy backport to stable releases

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d28d5a280d590bb19afbea23705802aa46af5e6d)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 9062df67c8df0e6416ee69c01bf10e0acf111bf7)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 18349: $borrower is a hashref
Jonathan Druart [Fri, 31 Mar 2017 00:51:28 +0000]
Bug 18349: $borrower is a hashref

I guess this code was never called before...

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6b75e5b4783cff1d14816ce363e8095569d67718)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 3ef6f12596d75ec2548e9081e89694df3536bb7e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 18349: SCO - Do not trust the confirmed flag
Jonathan Druart [Wed, 29 Mar 2017 21:25:40 +0000]
Bug 18349: SCO - Do not trust the confirmed flag

The "confirmed" flag is used to know if that user confirmed a situation
that needs a confirmation.
But if the issue/renew is impossible the CanBookBeIssued and the
'impossible flags' should be checked.

Otherwise a patron can checkout and renew bypassing the circulation
rules (Understand 'no limit' here...)

Test plan:
Want to renew?
Checkin $barcode, then
/cgi-bin/koha/sco/sco-main.pl?patronid=$cardnumber&barcode=$barcode&confirmed=1&op=checkout

Want to bypass the checkin?
Same url...

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 85bd15a83ffdab0c2e28eae54e50ce4dee9e608b)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit dbee200409d738fcf7c4fdcfb2cd19f5d6d36c04)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 17309 - Renewing and HomeOrHoldingBranch syspref
David Kuhn [Thu, 15 Dec 2016 00:02:26 +0000]
Bug 17309 - Renewing and HomeOrHoldingBranch syspref

The AddRenewal subroutine currently uses the circulation rules for the branch
stored in the Issues table (which is the holding branch) when calculating the new due date.

This patch replaces using the branch from the Issues table with the branch
specified by the HomeOrHoldingBranch syspref.

To test:
1. Set up 2 branches, Branch1 and Branch2
2. Set up a loan rule in Branch1 for DVDs with a 21 day loan period and a
   21 day renewal period.
3. Set up a loan rule in Branch2 for DVDs with a 14 day loan period and a
   14 day renewal period.
4. Checkout a DVD belonging to Branch1 while logged into Branch2. It will
   receive the correct 21 day loan period.
5. Renewing the same DVD while logged into either Branch1 or Branch2
   will give a 14 day due date, rather than 21 days.
6. Checkout a DVD belonging to Branch2 while logged into Branch1. It will
   receive the correct 14 day loan period.
7. Renewing the same DVD while logged into either Branch1 or Branch2
   will give a 21 day due date, rather than 14 days.
8. Apply the patch and repeat steps 4-7. The correct due date should be given
   when the item is renewed, regardless of where it is checked out or renewed.

This update removes reassignment of $branch variable.

Signed-off-by: Cédric Vita <cedric.vita@dracenie.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 7d35bdf58a0bcebab20df47b50b249cafe12ddb6)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 0a26e824ae3861fefb8a615c7e042fbfc83698f4)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 18266: Fix internal error when paying fine for lost item without.. item
Jonathan Druart [Tue, 21 Mar 2017 15:24:28 +0000]
Bug 18266: Fix internal error when paying fine for lost item without.. item

If a fine is created for a lost item but the itemnumber is not supplied,
the system will return it.
The item should not be mark as returned if there is no item linked to
the fine.

Test plan:
1. Turn StoreLastBorrower on
2. Create a manual invoice for a lost item, do not supply a barcode
3. Pay the fines 'Pay fines > Pay'

=> Without this patch applied you get
Can't call method "last_returned_by" on an undefined value at
/home/marc/koha/C4/Circulation.pm line 2188.

=> With this patch applied, you must not get the error.

(cherry picked from commit a59f056631e882ce166eed7eb6e366481449b148)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 17945 - Breadcrumbs broken on opac-serial-issues.pl
Luke Honiss [Thu, 19 Jan 2017 22:52:49 +0000]
Bug 17945 - Breadcrumbs broken on opac-serial-issues.pl

==TEST PLAN==
1) Make a subscription with a record
2) Search and view the record in OPAC
3) Click on the subscription tab and click more details
4) The breadcrumb will say 'Detals for' without the record name
5) Apply patch
6) Refresh the page
7) The breadcrumb will display the name of the record

(fixed small error)

Signed-off-by: Sonia BOUIS <sonia.bouis@univ-lyon3.fr>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 39bcba540a6c00fc374284dc025297a568befed6)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 9668331d4260928dbe91ec9710031e5ac63f5346)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 18263: Make use of syspref 'CurrencyFormat' for Account and Pay fines tables
Marc Véron [Tue, 14 Mar 2017 13:29:08 +0000]
Bug 18263: Make use of syspref 'CurrencyFormat' for Account and Pay fines tables

On Home > Patrons > Accounts for... and Home > Patrons > Pay fines for...,
make the amounts display as defined in syspref 'CurrencyFormat'

To test:
- Apply patch
- Give a patron a high fine or credit (e.g. 12345.67)
- Got to pages Home > Patrons > Accounts for... and
  Home > Patrons > Pay fines
- Verify that amounts display following syspref 'CurrencyFormat'
  (e.g. 12'345.67 for syspref set to 360'000.00 (CH)

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit db467287d174827e52c322cb86d75b8628df52fe)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 3db9848f1acb904f67312c55a35fd262c46829aa)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 18209: Add default, 'Actions' and fix case
Jonathan Druart [Thu, 9 Mar 2017 14:25:28 +0000]
Bug 18209: Add default, 'Actions' and fix case

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f14de0007c47ae66d0276186df073c0375d37610)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 168a10de25ad64830ed0c448571e0607b64d4bd9)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 18209 - Patron's card manage.pl page is not fully translatable
Blou [Fri, 3 Mar 2017 21:13:40 +0000]
Bug 18209 - Patron's card manage.pl page is not fully translatable

The headers of the tables displayed in patroncards/manage.tt are hardcoded in the .pl and thus cannot be translated.

This simple fix reuse the translate_card_element tool already in the code to make the strings translatable.

Applied patch and verified that table headers on manage.pl display the same as before.
Signed-off-by: Marc Véron <veron@veron.ch>

Re-tested, works as expected.
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 bb1492e9f67439753bf428bd06fa710791e70c74)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 0a3b7777bbeb88e39903ceee35464d5eaec231e3)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 12972 - Transfer slip and transfer message (blue box) can conflict
Nick Clemens [Fri, 3 Mar 2017 14:56:31 +0000]
Bug 12972 - Transfer slip and transfer message (blue box) can conflict

Instead of passing the homebranch to the slip, let's pass
TransferWaitingAt (the value we display)

To test:
1 - Check in an item that will initiate a transfer (hold or automatic
        item return)
2 - Note the transfer message and receipt match
3 - Remove the reason for transfer (bot don't cancel transfer)
    i.e. cancel hold or change homebranch of item to current library
4 - Check the item in again
5 - Note the message displays the transfer destination and the slip
shows the homebranch
6 - Apply patch
7 - Repeat 5 but note slip and message match
8 - Test any edge cases for correctness
9 - sign off

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 f454013ec9beb8f6e4c382253b76bfac5ca65244)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 29526afcef6143ddafac8ffd00820ef9086ccaa0)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 7728: [QA Follow-up] Fix POD whitespace
Marcel de Rooy [Fri, 17 Mar 2017 12:24:41 +0000]
Bug 7728: [QA Follow-up] Fix POD whitespace

Resolves complaints from qa tools.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 53f2b56fa15fac2f0d2ef0777e95f436d6914ec7)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit b4ef4f4e3b1b6c2176d7faaa906d92b195dc4c55)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 7728: Fix subs history end date consistency
Paul Poulain [Wed, 9 Dec 2015 10:25:43 +0000]
Bug 7728: Fix subs history end date consistency

Without this patch, there is an inconsistency in subscriptions:
 * a new subscription has no history end date set (as expected)
 * if you renew it, a date is set.

This patch removes the setting of the history end date during renewal

Test plan:
 * create a subscription, go to subscription-detail.pl page, tab "Summary". No History end date is set
 * renew the subscription => a date has been set
 * apply the patch
 * create another subscription
 * renew it => no history end date has been set
 * sign-off

Signed-off-by: beroud <isabelle.beroud@univ-lyon3.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1843ee148b25a904d8baffbbe8f0ea504b539a64)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 30cfdb9096282175f4bf92b65021a8ef6e3fd052)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 18244: Patron card creator does not take in account fields with underscore (B_add...
Marc Véron [Fri, 10 Mar 2017 10:22:24 +0000]
Bug 18244: Patron card creator does not take in account fields with underscore (B_address etc.)

Fields with underscore like B_address do not print on patron cards.

To reproduce:
- Create patron card layout using fields with underscore in their name
  (e.g. <surname><B_address> )
- Print (export) patron card
- Verify that fields without underscore are replaced by their value,
  but fields with underscore do not replace but show the field name

To test:
- Apply patch
- Try to reproduce and verify that fields with underscore are replace
  as expected

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.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 a723de2ae0c393743fc111955ee81b5e6c5b7f4a)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit da9371a1d6a257d6d598c9299a33aedff183fc4c)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 14535: Update the supplier filter too
Marcel de Rooy [Mon, 6 Feb 2017 09:29:44 +0000]
Bug 14535: Update the supplier filter too

The combobox on the left side of late orders is filled by sub
GetBooksellersWithLateOrders. The same change as in the first patch
must be made here to include suppliers with late orders without a
price.

Bonus: Sort the list.

Test plan:
[1] Run t/db_dependent/Bookseller.t.
[2] Go to late orders. Use the filter on suppliers.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Srdjan <srdjan@catalyst.net.nz>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b76eac9ca2c32a5db51b9b8ca32a2cf4fa6397b5)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 92ddd4bbc7f3f40241202ae19750e93d5ee2d30b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 14535: Late orders does not show orders with price = 0
Marcel de Rooy [Mon, 6 Feb 2017 09:04:57 +0000]
Bug 14535: Late orders does not show orders with price = 0

This patch removes the filter of unitpricesupplier <> 0 and
unitpricelib <> 0 from GetLateOrders as used in lateorders.pl.
This allows you to claim late orders without a price entered.

Test plan:
[1] Run t/db_dependent/Acquisition.t
[2] Check if you see an order with no price in lateorders.pl. (If needed,
    remove prices from a few orders.)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Srdjan <srdjan@catalyst.net.nz>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 71f267fd3f3750510e3df5f2819d57ed45dcf919)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit f305629f14ae925cf58dc62e39f871fd6ec1c8f5)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 12913: [QA Follow-up] Reword 'change item status' and add zero status
Marcel de Rooy [Tue, 28 Mar 2017 14:39:25 +0000]
Bug 12913: [QA Follow-up] Reword 'change item status' and add zero status

The zero status should be added in @notforloans. It is a legitimate status
for available books. The zero status description can be translated in
the template.
The 'Change item status' is confusing. We mean that we saw a notforloan
status that we do not expect (read: does not exist in the table).

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 664d6534171677455f3cf1467e8726146714133a)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit dbb0b4a4b09233a7b68fc29deef8220f61fb5950)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 12913 - wrong inventory results when notforloan filter is not used
Fridolin Somers [Fri, 12 Sep 2014 13:21:18 +0000]
Bug 12913 - wrong inventory results when notforloan filter is not used

In inventory tool, there is a test on scanned items notforloan value : if the value is not one of authorized values, the inventory results displays the problem "Change item status".
The bug is that if notforloan filter is not used, the notforloan values array is not filled and so all scanned items are marked with this problem.

Test plan :
- Check you have in default framework an item subfield mapped with items.notforloan and with an authorized value catergory, for example 'NOTFORLOAN'
- Check the authorized value category has at least value '0'
- Create a new value in this category, for example '9'
- Create a biblio with default framework
- Create an item with barcode='000AAA1', callnumber='ZZZAAA1' and notforloan=0
- Create an item with barcode='000AAA2', callnumber='ZZZAAA2' and notforloan=9
- Delete new value created above, for example '9'
- Create a file 'barecodes.txt' containing 2 lines '000AAA1' and '000AAA2'
- Go to inventory tool : /cgi-bin/koha/tools/inventory.pl
- Choose file in 'Barcode file'
- Enter item callnumber between 'ZZZ' and 'ZZZZ'
- Check 'Compare barcodes list to results'
- Submit
=> without patch, you get 2 results with problem 'Change item status' even for item with notforloan=0
=> with patch, you get 1 result with 'Change item status' on item with notforloan=9

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 358fb744c74cc63b7d2ae7d7e406ada205502ea8)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit f75915336c072765a330ca7e39646326ef11212b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 17995 - HOLDPLACED notice should have access to the reserves table
Nick Clemens [Wed, 25 Jan 2017 17:00:34 +0000]
Bug 17995 - HOLDPLACED notice should have access to the reserves table

To test:
1 - Add reserves.reservenotes to HOLDPLACED message
2 - Enable emailLibrarianWhenHoldIsPlaced OpacHoldNotes sysprefs
3 - Place a hold via OPAC with a note
4 - view the messagequeue and note the reservenotes is blank
5 - Apply patch
6 - Place a hold with a note
7 - view the messagequeue and note the reservenotes is populated

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 3b794b1312d0cfac81b302d0e823e2c5683a1f0e)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 75ac2341774368975be08ee635851605f06a7b7d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 18022: Fix possible crash if CircAutoPrintQuickSlip=clear screen
Jonathan Druart [Fri, 24 Feb 2017 10:44:23 +0000]
Bug 18022: Fix possible crash if CircAutoPrintQuickSlip=clear screen

If CircAutoPrintQuickSlip is set to clear screen, the $borrowernumber variable
is reset but $borrower.
In 16.11.x and before that causes the app to crash, because
$borrower->{flags} is set to a hashref by GetMemberDetails, if
$borrowernumber is set.

This case is better handled in master (17.05) but side-effects could
happen: if $borrowernumber is reset, $borrower should be reset too.

The way to drive this behaviour is terrible and lot of things should be
done to clean this area. This patch is a quick and easy fix to make it
backportable easily.

Test plan:
On master, no change expected
On 16.11 and before:
0. Set CircAutoPrintQuickSlip=clear screen
1. Create a new patron
2. Set permission for this patron to 'reservesforothers' (or something
else).
3. Go on the circulation tab
4. Do not fill the barcode input and submit
=> Without this patch you will get an error
Can't use string ("64") as a HASH ref while "strict refs"....
=> With this patch apply you will get a blank screen (expected
behaviour).

I would recommend to test this patch with the other value of
CircAutoPrintQuickSlip as well

(cherry picked from commit 34565e7f7d38298d37f449520dd5bc20cec833f8)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 18058: Allow borrower_message_preferences to be truncated
Jonathan Druart [Tue, 14 Feb 2017 14:39:48 +0000]
Bug 18058: Allow borrower_message_preferences to be truncated

borrower_message_preferences cannot be truncated because of the foreign.
DBMS fails with
  "Cannot truncate a table referenced in a foreign key constraint"

To avoid that we should remove the FK check and truncate the other table
as well.

I am wondering if we really need a truncate here
  DELETE FROM borrower_message_preferences;
should do the job, but leave it as it because of the param name.

Test plan
  perl misc/maintenance/borrowers-force-messaging-defaults --doit --truncate
Should no longer raise the error message

Signed-off-by: Mark Tompsett <mtompset@hotmail.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 dd88c8f710e4915dac6437355c356f0632b776fb)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit e2f860386dd811b2be3b2988b690c2d28d748336)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoIncrement version for 3.22.19 v3.22.19
Julian Maurice [Fri, 31 Mar 2017 14:03:25 +0000]
Increment version for 3.22.19

7 years agoUpdate release notes for 3.22.19
Julian Maurice [Fri, 31 Mar 2017 14:02:53 +0000]
Update release notes for 3.22.19

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoTranslation updates for Koha 3.22.19
root [Fri, 31 Mar 2017 13:46:48 +0000]
Translation updates for Koha 3.22.19

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 15854: Use a READ and WRITE LOCK on message_queue
Jonathan Druart [Thu, 9 Feb 2017 11:44:38 +0000]
Bug 15854: Use a READ and WRITE LOCK on message_queue

To make sure we will not never get a race conditions for these kinds of
notices, we need to add a LOCK on the message_queue table.

This does not smell the best way to do that, but I faced deadlock issues
when I tried to use "UPDATE FOR"

https://dev.mysql.com/doc/refman/5.7/en/innodb-locking-reads.html
https://dev.mysql.com/doc/refman/5.7/en/lock-tables.html
https://dev.mysql.com/doc/refman/5.7/en/commit.html

To test this patch, or another solution, you need to apply manually this
change:

         my $message = C4::Message->find_last_message($borrower, $type, $mtt);
         unless ( $message ) {
+            sleep(1);
             C4::Message->enqueue($letter, $borrower, $mtt);
         } else {

And repeat the test plan from first patch.
Do not forget to truncate the message_queue table.

Followed test plans, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit be156d9ad9e5bcfadab34d44f90e04fd61e256ad)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit ab23d1368343ad115a5072f7264b99c7bee68675)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 15854: Simplify the code to limit race conditions
Jonathan Druart [Thu, 9 Feb 2017 11:13:07 +0000]
Bug 15854: Simplify the code to limit race conditions

There is an obvious race condition when CHECKIN and RENEWAL are
generated from circulation.pl calling svc/renew or svc/checkin in AJAX.

The 2 first queries will try to get the id of the last message
(find_last_message) and if it does not exist, they will insert it.
Theorically that could be lead to have several "digest" messages for a
given patron.
I did not recreate more than 2 messages, from the third one at least one
of the two firsts existed in the DB already.

This patch just simplifies the code to make the SELECT and INSERT or
UPDATE closer and limit the race condition possibilities.

Test plan:
0. Set RenewalSendNotice and circ rules to have a lot of renewals available
1. Use batch checkouts (or one by one) to check out several items to a
patron
2. Empty message_queue (at least of this patron)
3. Renew them all at once ("select all" link, "renew or check in"
button)
4. Check the message_queue
Without this patch you have lot of chances to faced a race condition and
get at least 2 messages for the same patron. This is not expected, we
expect 1 digest with all the messages.
With this patch apply you have lot of chances not to face it, but it's
not 100% safe as we do not use a mechanism to lock the table at the DBMS
level.

Tested both patches together, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 607b14516a955c9989e4764c69527edbc1f36ba0)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit bdae6c9492ea8db223c03753090060592a330be7)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 18010: Remove potential exposure from gettemplate
Marcel de Rooy [Sun, 29 Jan 2017 14:40:14 +0000]
Bug 18010: Remove potential exposure from gettemplate

A similar bad template check from C4::Auth::get_template_and_user
should be applied in C4::Templates::gettemplate.

Before this patch it would be possible to expose files like:
my $template = C4::Templates::gettemplate(
    '/etc/passwd', 'intranet', CGI::new, 1
);
print $template->output;

Note that the is_plugin flag in the above call is the culprit. This patch
provides a quick security fix without touching get_template_and_user, and
can be backported to stable branches.
I will provide an enhanced and centralized check on report 17989, also
removing the is_plugin flag.

Note: We allow .pref here too for use in admin/preferences.pl.

Test plan:
[1] Run t/db_dependent/Auth.t (triggering get_template_and_user and
    gettemplate).
[2] Run t/db_dependent/Templates.t again (see first test plan).
    The tests should no longer fail.
[3] Open a page on opac or intranet.
[4] Open a systempreferences tab.
[5] Add a book to the cart and send it ([opac-]sendbasket uses gettemplate).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit fbbd4b40f0d71b79194fc186e66f985488be26c6)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 74fe3f5cda7cac22640f9ae3d68b3d62a6765dc0)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 18010: Unit test for gettemplate
Marcel de Rooy [Sun, 29 Jan 2017 14:52:22 +0000]
Bug 18010: Unit test for gettemplate

A trivial test, similar to the ones in Auth.t.
Without the check in gettemplate (added in the second patch), the passwd
file will be exposed and the test fails.

Test plan:
Run t/db_dependent/Templates.t without second patch. The two tests in the
last subtest should fail.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 5508897d5a2b73c30d50fed26a6bfed62bf49398)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Conflicts:
t/db_dependent/Templates.t

(cherry picked from commit 1161a67476b5b61358fdaecca57b012e663a7b02)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 18094: Only search in searchable patron attributes if searching in standard fields
Jonathan Druart [Tue, 14 Feb 2017 15:22:40 +0000]
Bug 18094: Only search in searchable patron attributes if searching in standard fields

Test plan:
- Add a new patron attrbute and mark it searchable
- Populate a new patron with 'potato' in that field
- Add/edit another patron to have email potato@invalidemail.com'
- Perform a patron search with query 'potato' (in standard fields)
=> Both patrons are returned
- Perform a patron search with filters 'Email' and query 'potato'
=> Only 1 patron is returned and you are redirected to the patron detail page.

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 5823d4ca6a71404d502eeb7f1bf5dd152fd98e22)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit b294550ac6db804193928af798500e18d83de9db)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 18246: Patron card creator: Unit not always displays properly in layouts
Marc Véron [Sat, 11 Mar 2017 18:17:37 +0000]
Bug 18246: Patron card creator: Unit not always displays properly in layouts

To reproduce:

1) Create a new layout
2) Select an unit in "Units selection"
3) Save
4) Edit layout again
5) Select other unit, e.g. 'SI Centimeter'
6) Save
7) Repeat
8) Edit again
Error: Latest unit seems to stick and can no longer be changed, because
in units drop down, multiple untis are marked as selected.

To test:
1) Apply patch
2) Repeat steps above, verify that value for units always display as expected.

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 37da40b323d8bc012724510fe4839dcb908c2b3b)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 95bccfbbb8f2b0d0de064ae34dca24e3d59852a4)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 8603: Patron card creator - 'Barcode Type' doesn't stick in layouts
Marc Véron [Sat, 11 Mar 2017 16:18:10 +0000]
Bug 8603: Patron card creator - 'Barcode Type' doesn't stick in layouts

To reproduce:

1. Make a new layout
2. Tick "Print card number as barcode"
3. Change 'Barcode Type' to anything other than Code39
4. Save
5. Edit it again
6. Its back to Code39

To test:
1. Apply patch
2. Repeat steps above
3. Verify that 'Barcode type' is selected as expected

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

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

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

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

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 20ad341eefc555e0cf2b0f2862347e8a48b28935)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 34a91f6e3d7da38aafb37a57a962c1d852f9101a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoIncrement version for 3.22.18 v3.22.18
Julian Maurice [Fri, 17 Mar 2017 08:31:49 +0000]
Increment version for 3.22.18

7 years agoUpdate release notes for 3.22.18
Julian Maurice [Fri, 17 Mar 2017 08:44:22 +0000]
Update release notes for 3.22.18