Commit Graph

25632 Commits

Author SHA1 Message Date
Jonathan Druart 3bf89dd047 Bug 16770: Remove 2 other occurrences of libmemoize-memcached-perl
Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 735789d71a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 927498a007)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-08-16 15:33:27 +02:00
Jonathan Druart d8ea53f319 Bug 16770: Remove Memoize::Memcached dependency
This module is no longer in use and can be removed.

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>

This part involves some changes in a bunch of mysterious debian|ubuntu
related files, not quite sure if I know what I'm doing
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 67e6efab5d)
(cherry picked from commit 998ea5d57a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-08-16 15:33:24 +02:00
Jonathan Druart f852461ab0 Bug 16770: Remove wrong caching of 3 subroutines in C4::Lancuages
Looking at this code, you might think these subroutines are cached, but
actually they are not.

The eval surrounding the code hides a bug, if you remove it, you will
get:
  Invalid memcached argument (expected a hash)

Test plan:
Do not apply this patch and confirm that the code does not work

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 44fb6e7225)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 0a09cb7d09)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-08-16 15:33:10 +02:00
Nick Clemens 3cd210a13e Bug 16651: Notes field blank for 952$z in opac-course-details.pl
This patch changes course reserves to check for item notes form the
course reserve and fallback to itemlevel notes if they are empty

To test:
1 - Enabvle course reserves
2 - Add some items
3 - Make sure the items have notes at the item level and not at course
reserves
4 - Notes don't display in staff or opac
5 - Apply patch
6 - Notes display in staff and opac
7 - Add notes at course reserves level
8 - These override the item level notes

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 62508428cd)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit d09b015e97)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-08-16 15:31:14 +02:00
Marcel de Rooy b4673a9da0 Bug 16751: What is sitemaper?
s/sitemaper/sitemapper/

Test plan:
Run t/db_dependent/Sitemapper.t

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 3e566de51f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 1db9defdec)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-08-16 15:14:43 +02:00
Marc Véron 473735370c Bug 16718 - Translatability: Fix problems with sentence splitting by <strong> in about.tt
This patch removes sentence splitting by <strong> tags in
koha-tmpl/intranet-tmpl/prog/en/modules/about.tt for better translatability.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0712048030)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 992ac84f3e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-08-16 15:12:47 +02:00
Marc Véron b91944c3ff Bug 16697: Translatability: Fix problem with isolated "'s"in request.tt
This patch fixes translation problems with tag-isolated 's in
koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt

The patch fixes it at two places. In consequence, some other texts
ares sigthly changed to make them look similar.

To test:
- Inspect code changes and verify that the new wording makes sense.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 2289c8c930)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 4662519a09)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-08-16 15:11:46 +02:00
Hector Castro 01d68cd6a3 Bug 16742: (follow-up)Remove unused template subject.tt
Delete extra useless comment line:
"# if its a subject we need to use the subject.tt"

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a4f80ab223)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 299f4e418d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-08-16 15:09:34 +02:00
Marc Véron 65c55b4415 Bug 16742: Remove unused template subject.tt
The template koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/subject.tt
is not used and can be removed.

To test:
- Apply patch
- Verify that catalogue/moredetail.pl works as before (go to a
  biblio with items and click 'Items' in left hand menu)

Signed-off-by: Hector Castro <hector.hecaxmmx@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 cf441013a5)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit a6843caa70)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-08-16 15:09:32 +02:00
Fridolin Somers 349b13750e Bug 16736 - Keep branch filter when changing suggestion
When changing suggestion, the selected tab is kept.
The same should be done with the selected branch.

Test plan:
- Go to suggestions table : /cgi-bin/koha/suggestion/suggestion.pl
- Select a branch in Acquisition information > For
- Select a pending suggestion
- Change status as accepted
- Click on Submit
=> without patch, the table is no longer filtered by branch
=> with patch, the table is filtered by branch

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0c1fa2f93c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit cc31338f26)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-08-16 15:08:07 +02:00
Marcel de Rooy bf384f4ef9 Bug 16644: Plack: Use to_app to remove warning about Plack::App::CGIBin instance
Using Plack with the debian psgi file, I get lots of warnings like:
WARNING: Automatically converting Plack::App::CGIBin instance to a PSGI
code reference. If you see this warning for each request, you probably
need to explicitly call to_app() i.e.
Plack::App::CGIBin->new(...)->to_app in your PSGI file.

This patch is aimed to eliminate the warns.

Test plan:
Run Plack with plack.psgi or koha.psgi and verify if you do not see
these warnings anymore.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
I tested on Jessie and I see no regressions.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d69d874a3f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 8b15c8328b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-08-16 15:06:39 +02:00
NguyenDuyTinh 486e74dac9 Bug 16705 - Add missing status to serials history in OPAC
The bug is related to 10851. Due to add of status in 10851, status added were
missing in opac-detail.tt and opac-full-serial-issues.tt. The patch just added
these missing status.

To test:
1) Create New subscription in Serials, in Intranet
2) Do a search of the new subscription by Title
3) Take Serial receive as Actions to edit the status to Missing (<something>)
4) Go to Opac and Search the subscription created, by its title and See missing status
5) Apply patch, status must be showed.
6) Sign off

Followed test plan, works as expected.
Amended to format commit title and message.
Signed-off-by: Marc Véron <veron@veron.ch>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e1d6974bff)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit d6484dfe2f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-08-16 14:41:18 +02:00
Jonathan Druart 319aef5ce9 Bug 16624: Fix regression displaying a letter with hours
Bug 13622 has introduced a bug, if pref TimeFormat is 12hr and a date is
displayed in both title and content of the letter.

Test plan:
1 - Checkout an item (with default time 11:59:00 PM)
2 - Generate a quickslip
3 - Notice the time is 'AM'
4 - Apply patch
5 - Generate quickslip
6 - Note time is correct

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6f0ce92543)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 917054eaf6)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-08-16 14:38:49 +02:00
Jonathan Druart 2c9820e3ea Bug 16624: Add regression tests
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 47e41ea1c2)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 91d6b787dd)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-08-16 14:38:44 +02:00
Kyle M Hall 10ff1cd101 Bug 16612 - Cannot set "Until date" for "Enrollment period" for Patron Categories
Attempting to set an "Until date" date for "Enrollment period" will
result in the date being accepted but not saved.

Test Plan:
1) Attempt to set an enrollment period until date for a new patron category
2) Note the period is not saved
3) Apply this patch
4) Attempt to set the enrollment period date again
5) This time it should save!

Signed-off-by: Andrew Brenza <abrenza@audubonlibrary.org>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 2af028bb13)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 90d3635fed)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-08-16 14:30:02 +02:00
Jonathan Druart eb991bfcf9 Bug 16593: Do not allow patrons to delete search history of others patrons
A malicious user can delete the search history of all other users by
correctly guessing the ID value assigned to the victim's search. As
searches are assigned values sequentially, an attacker could quickly
remove the searches belonging to all of the application's users.

To reproduce:
Login with patron A
launch a search
Note the id generated for this search history:
select id from search_history order by id desc limit 1;
Login with patron B
Hit /cgi-bin/koha/opac-search-history.pl?action=delete&id=<ID>
Note that the row is deleted in the DB

Test plan
Confirm that this patch fixes the issue.
The same test can be made at the staff interface

Reported by Alex Middleton at Dionach

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f01720808a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 0974bb3888)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-08-16 14:22:08 +02:00
Jonathan Druart b3266093f8 Bug 16527: Restore sticky due date behavior
Bug 10067 has introduced a regression on the sticky due date behavior:
If "remember for session" is checked and the due date is changed from 1
checkout to another, the old due date will be used.

The code added by bug 10067 is really confusing and it's hard to say
this patch won't introduce another regression.
The manipulation of $restoreduedatespec, $duedatespec and $stickyduedate
is not easy to follow.

Test plan:
Confirm that the regression is fixed and that this patch will not
introduced a regression on bug 10067 (good luck!)

Signed-off-by: Eivin Giske Skaaren <eivin@sysmystic.com>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 33f1354b7b)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit cb2895592a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-08-16 14:20:28 +02:00
Kyle M Hall 60d5763fa8 Bug 16534: (followup) - Tidy AddIssue
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f1fa65f637)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 16d14e1467)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-08-16 14:11:14 +02:00
Marc Véron 5a436b64c3 Bug 16534: (followup) Correct tiny typo
This patch corrects "...must be return..." to "must be returned..."

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit fe02c9fdf0)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit b067e2803b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-08-16 14:11:12 +02:00
Jonathan Druart 865ee18038 Bug 16534: Block AddIssue from issuing if the return is not possible
To make sure the return can be done, AddIssue must not trust callers (they
should have done their job, but we are not sure) and check that the issue can
be returned before issuing to the patron.

There is no test plan here, this should not be possible from the Koha
interface.
However, looking at the code, it may be possible using SIP.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1a9674fd3a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 2cc01d139a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-08-16 14:11:06 +02:00
Jonathan Druart fcdbe914cc Bug 16534: Add tests for AddIssue
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a879efb574)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit e974de2c69)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-08-16 14:11:02 +02:00
Jonathan Druart 19f88c75b9 Bug 16534: Make CanBookBeIssued test if the issue can be returned
If an issue is already checked out, CanBookBeIssued must check if the
issue can be checked in before processing the return.
In such cases (depending of the AllowReturnToBranch pref), the issue
should not be allowed.

Prior to this patch, the checkin was not done and the checkout failed
with "Duplicate entry '1204321' for key 'itemnumber'". Indeed since bug
14978, there is an uniq key on issues.itemnumber. Before bug 14978 the
issue existed but was hidden (and some weird behaviors certainly
happened!).

To avoid Koha to crash, a check is added to CanBookBeIssued (call to
CanBookBeReturned) and the librarian is not able to process the
checkout.

Test plan:

- Set AllowReturnToBranch to anywhere
- Check an item (homebranch Library 1, holding branch Library 1) out from Library 1
- Check the item out from Library 2
=> Confirm the checkout (should work with and without this patch)

- Set AllowReturnToBranch to holdinbranch ("only the library the item
  was checked out from").
- Check an item (homebranch Library 1, holding branch Library 1) out from Library 1
- Check the item out from Library 2
=> Without this patch, Koha crashed
=> With this patch, you will be warned that the checkin is not possible.

Try other combinations of the AllowReturnToBranch syspref

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 9427d44568)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit df9fbe0aef)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-08-16 14:09:42 +02:00
Jonathan Druart 79b35081a6 Bug 16534: Add tests for CanBookBeIssued & AllowReturnToBranch
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 2c88538946)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 141ada91cc)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-08-16 14:09:37 +02:00
Julian Maurice 4c41ad91b5 Increment version for 3.22.9 release
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-07-31 16:38:02 +02:00
Julian Maurice eb4b4c9d2b Translation updates for Koha 3.22.9
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-07-31 16:37:23 +02:00
Julian Maurice 775f1688fd Update release notes for 3.22.9 release
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-07-31 16:37:18 +02:00
Marc Véron a9cdbade43 Bug 16729: Use member-display-address-style*-includes when printing user summary
This patch replaces the address part in moremember-print.tt to print identical
address information as displayed on the screen (including street numer, formatted as required by syspref 'AddressFormat'

To test:
- Apply patch
- Search for a user with all address information filled
- Verify that 'Print summmary' displays the same information
  as displayed on the screen.
- Change value of syspref 'AdressFormat'
- Verify that address format on 'Print summary' changes
  as appropriate

Signed-off-by: mehdi <mehdi@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 555f40626a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 546b95aee4)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-07-01 09:44:47 +02:00
Julian Maurice 3788402fd2 Bug 16693: Remove reserve/renewscript.pl
It is not used since bug 11703

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 c92d0823f8)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 5fd657a8fc)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-07-01 09:42:30 +02:00
Owen Leonard f29b93e3ab Bug 16543 - Make edit and delete links styled buttons in patron attribute types administration
This patch modifies the Patron attribute types page, converting edit and
delete links to Bootstrap buttons with Font Awesome icons.

To test, apply the patch and go to Administration -> Patron attribute
types. The 'Edit' and 'Delete' buttons should look correct and work
correctly.

Signed-off-by: Jan Kissig <jkissig@th-wildau.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 ae4be45444)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 1dfbe758c2)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-07-01 09:41:00 +02:00
Owen Leonard 500ab63cb7 Bug 16541 - Make edit and delete links styled buttons in cities administration
This patch modifies the cities administration page, converting edit and
delete links to Bootstrap buttons with Font Awesome icons.

To test, apply the patch and go to Administration -> Cities and towns.
The 'Edit' and 'Delete' buttons should look correct and work correctly.

Signed-off-by: rainer <archiv@a-bibliothek.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 51a11d2794)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit ef948191c6)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-07-01 09:39:52 +02:00
Owen Leonard 2d3af770db Bug 16127 - Add discharge menu item to patron toolbar
This patch changes the "Discharge" menu in the patron sidebar to read
"Discharges," and adds a "Discharge" menu item to the patron toolbar.

This adds some redunancy, but fits with the pattern of including "views"
in the sidebar and "actions" in the menu. The discharge feature can be
thought of either way.

To test you must have the 'useDischarge' system preference enabled.

- View the detail page for any patron.
- Confirm that the sidebar menu reads "Discharges."
- Confirm that the "More" menu contains a "Discharge" link which works
  correctly.

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 981302a473)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 43b4a740dc)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-07-01 09:09:13 +02:00
Jonathan Druart bcb1ecbb09 Bug 16717: Improve variable naming
$category was a categorycode, to help the readability it's better to
name it $categorycode or assign a Category to $category

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f8b73deaec)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 8ebe3a0a42)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-07-01 09:04:43 +02:00
Marcel de Rooy 772cde5e55 Bug 16717: Remove hardcoded category from Holds.t
There is actually no need to use the hardcoded patron category S in
this test.

Test plan:
Run t/db_dependent/Holds.t.

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

Test passes OK
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 a4690353d9)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 5321959b45)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-07-01 09:04:37 +02:00
Tomas Cohen Arazi ffd86f218e Bug 16720: Remove DBIx ActionLogs.pm
The update_dbix_class_files.pl script generates ActionLog.pm instead, which is
already on the source tree.

To test:
- Apply the patch
=> SUCCESS: Koha/Schema/Result/ActionLogs.pm is removed
- Run:
  $ mysql -uroot
  > CREATE DATABASE dbic; \q
  $ mysql -uroot dbic < kohaclone/installer/data/mysql/kohastructure.sql
  $ misc/devel/update_dbix_class_files.pl --db_name dbic --db_user root
=> SUCCESS: Koha/Schema/Result/ActionLogs.pm is not re-generated
- Run:
  $ git grep ActionLogs
=> SUCCESS: There's no code using it
- Sign off

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 b8c950a4c1)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit c0d3e6db11)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-07-01 08:50:24 +02:00
Jonathan Druart 6c65a1dce8 Bug 16670: (bug 15823 follow-up) CGI->param should not be called in list context
Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 5820744675)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 302ac5e2a8)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-07-01 08:44:05 +02:00
Marcel de Rooy b58e8642b0 Bug 16502: Replace a few other ok-calls by is-calls
Trivial changes that speak for themselves..

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 8204024f1c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 2b7a9479b6)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-07-01 08:37:37 +02:00
Marcel de Rooy d1dff4c3bd Bug 16502: Adjust test for GetPlugins
The current test assumes that GetPlugins will return the test plugin
as the first one in the array. This is not correct.
This patch adjusts the test to a grep.

Test plan:
Run the test.
Bonus: Add additional plugins. Run the test again.

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 6ad5770786)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 64382be0d4)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-07-01 08:37:36 +02:00
Marcel de Rooy e41863bfa9 Bug 16502: Add additional test to Plugins.t
In order to verify if the delete now really works, we add one test
in Plugins.t.

Test plan:
[1] Run the test.
[2] Bonus: Comment line 63 in Plugins.t where delete is called.
    Run the test again. It should fail now.

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 959d69fa01)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 0632256c1a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-07-01 08:37:35 +02:00
Marcel de Rooy 752e31425e Bug 16502: Table koha_plugin_com_bywatersolutions_kitchensink_mytable not always dropped after running Plugin.t
If you run Plugin.t, the above table will still be present (when you
did not enable UseKohaPlugins). This would trigger a warning when
running the test a second time.

Why? The uninstall call does its work not completely due to a small
inconsistency in Koha::Plugins::Handler::delete when calling run
without the enable_plugins parameter.

This patch resolves that inconsistency and also removes an unneeded skip
in Plugin.t in case the KitchenSink module already exists.
Note: This is a small fix. But I wonder if the Handler routines run and
delete should not have been implemented in Koha::Plugins::Base.
Also note that plugins/plugins-uninstall.pl will not be affacted by this
change, since it checks whether the pref is enabled before calling the
delete method.

Test plan:
[1] Do not yet install this patch.
[2] Verify that plugins are enabled in koha-conf.xml.
[3] Disable UseKohaPlugins in System Preferences!
[4] Run t/db_dependent/Plugins.t.
[5] Verify that table koha_plugin_com_bywatersolutions_kitchensink_mytable
    still exists. (It should have been deleted.) Remove it manually.
[6] Apply this patch.
[7] Run the test again.
[8] Verify that the table does not exist.
[9] Run the test again (without warnings).

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 4263ac2b92)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 4ebe7b489c)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-07-01 08:37:33 +02:00
Tomas Cohen Arazi c2ef39e66e Bug 13074: (followup) remove useless diag
On running all Items-related tests some useless diag showed up. Removing it.

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit de6c1375f7)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 5185adc1ba)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-07-01 08:34:21 +02:00
Jonathan Druart 6a6a6e40c3 Bug 13074: Use Koha::Cache to cache the defaults values of a MARC record
With the global %default_values_for_mod_from_marc variable, the changes
made to the marc_subfield_structure table and especially the links
between MARC and DB fields are not safe and might be outdated (if a
field is linked/unlinked)

Test plan:
Under Plack:
- Link the barcode field, edit a record and set a barcode.
- Remove the mapping for the barcode field and then update again the
  barcode of the record.
The items.barcode DB field must not have been updated.

Without this patch, the field should have been updated.

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 8c14c25521)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit a50e5f141b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-07-01 08:34:12 +02:00
Jonathan Druart f44389f3a9 Bug 12748: findSerialByStatus has been renamed with findSerialsByStatus
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 30946eff3c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 9710f07575)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-07-01 08:24:10 +02:00
Jonathan Druart 3943b8ca44 Bug 12748: Code tidy
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 44062c07b7)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 69e4c39c21)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-07-01 08:24:09 +02:00
Jonathan Druart f2156852a7 Bug 12748: Remove warning 'masks earlier declaration in same scope'
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 273d5e5328)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 67b4f25a69)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-07-01 08:24:08 +02:00
remi a3557bba8b Bug 12748 - Add test for step 7 and 8 and rename findSerialByStatus
https://bugs.koha-community.org/show_bug.cgi?id=12478

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1bd5a177d0)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 2351db01d3)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-07-01 08:24:06 +02:00
remi ee4607cda1 Bug 12748 - Fixes duplicate serials with an "expected" status bug
Added a new sub to Serials.pm to be able to get serials with their statuses.
Now the sub ModSerialStatus checks for other serials with an "expected" status before doing anything.

Also modified Serials.t to be able to test those changes.

Test Plan
1) Apply patch
2) Run ./t/db_dependent/Serials.t
3) Validate that there are no errors
4) Go on "Serial collection information" page for a serial of your choice
5) Click on "Generate next"
6) Change the status of the original serial from "late" to "expected"
7) Change the newly generated serial from "expected" to "delete"
8) Validate that there are no new serials created by instruction 7 and that the serial was deleted
9) Run ./t/db_dependent/Serials.t

With QA Fixes

- Use the constant instead of the code (1 vs EXPECTED)
- Avoid interpolation in query
- use selectall_arrayref instead of fetchall_arrayref

Signed-off-by: Liz Rea <liz@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 10fd9f5ec0)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 695dc4c370)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-07-01 08:24:00 +02:00
Julian Maurice 64d2995789 Bug 10459: Update DB rev (3.22.08.001) 2016-07-01 08:19:50 +02:00
Jonathan Druart 341343a860 Bug 10459: Add tests for borrowers.updated_on
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit ff9de4138a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit b68e1038fe)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-07-01 08:13:24 +02:00
Mark Tompsett b49dddc04a Bug 10459 renamed timestamp to updated_on
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>

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

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f863e478b9)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 947690e232)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-07-01 08:08:31 +02:00
Marcel de Rooy 15041b7b3f Bug 10459: Borrowers should have a timestamp
This patch adds a timestamp column to the borrowers table in kohastructure
and updatedatabase. (And also to the deletedborrowers table.)
A timestamp may be useful in synchronizing with external systems (among other
reasons).

Test plan:
Run updatestructure on an existing database, or install a new one.
Verify that the borrowers table has a timestamp now.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested updatestructure and running kohastructure.sql.
Passed t/db_dependent/Members.t.

updatedatabase.pl did not apply. I edited and then run it. Columns were added as expected.
Signed-off-by: Marc Veron <veron@veron.ch>

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

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

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

Bug 10459: Follow up to update to atomic update methodology

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
New column created, no errors.

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

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

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

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 255596ae6c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit b4d40f7d00)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-07-01 08:07:10 +02:00