Commit graph

22908 commits

Author SHA1 Message Date
Jonathan Druart
5e688f5694 Bug 13417: Add the permission for all languages
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-13 13:52:20 -03:00
Jonathan Druart
4149055445 Bug 13417: (qa follow-up) Rename the permission to delete_public_lists
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-13 13:52:18 -03:00
Jonathan Druart
70586324c5 Bug 13417: Limit the permission to delete
It's preferable to limit the permission to delete shelves.

Apply both patches before testing, then follow this test plan

Currently a public list can only be deleted by its owner.
This means lists can exist infinitely.
This will introduce a new permission for list. With this permission, a
staff member will be allow to delete any public lists.

Test plan:
1/ Add the manage_shelves permission to a patron.
2/ Login with this patron
3/ Go on the public list view
4/ You should be able to delete all public lists

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-13 13:52:17 -03:00
Jonathan Druart
9c65bd8124 Bug 13417: Allow staff members to manage public lists
Currently a public list can only be deleted by its owner.
This means lists can exist infinitely.
This will introduce a new permission for list. With this permission, a
staff member will be allow to delete any public lists.

Test plan:
1/ Add the manage_shelves permission to a patron.
2/ Login with this patron
3/ Go on the public list view
4/ You should be able to edit all public lists

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

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-13 13:52:14 -03:00
a7da45099f Bug 13142 - Change "mobile phone" label back to "other phone"
Labeling a phone number field "mobile phone" eliminates the usefulness
of having the labels "primary" and "secondary." Generic labels let the
user populate the fields according to their importance rather than their
type.

To test I recommend editing a patron record so that the values in the
patron record contain a label matching the table column:

borrowers.phone : 555-555-1234 (primary - phone)
borrowers.phonepro : 555-555-5678 (secondary - phonepro)
borrowers.mobile : 555-555-9012 (other - mobile)

View this patron's information in the various affected templates and
verify that the labels correctly match the data:

 - OPAC "your personal details" (opac-memberentry.pl)
 - Submit changes to primary, secondary, and other phone via the OPAC.
   In the staff client, view the confirmation for those changes.
 - Patron details in the staff client (moremember.pl)
 - Patron entry/edit in the staff client (memberentrygen.pl)
 - Patron duplicate confirmation in the staff client
   (you can navigate directly to
   /members/moremember.pl?borrowernumber=XXXX&print=brief)

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-13 13:52:10 -03:00
7dacb45ce5 Bug 13545 [QA Followup] - Complete POD documentation
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-13 13:48:45 -03:00
3c73756856 Bug 13545: (followup) POD and error handling
This patch adds POD to the new /svc/barcode service, and also implements some
error handling.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-13 13:48:36 -03:00
ae592bd25a Bug 13545 - Add barcode image generator service
If we add a script to Koha that can be passed a barcode, we will be able
to easily embed item and patron barcodes into html printable slips and
notices. This can be very helpful for librarians, as it means scanning
an image instead of typing in the barcode manually.

This patch adds a barcode image generator that can be passed a barcode
and an optional type ( defaults to Code39, all GD::Barcode types should
work ). This image can be embedded in html slips and notices.
( e.g. <img src="/cgi-bin/koha/svc/barcode?barcode=<<items.barcode>>"></img> )

Test Plan:
1) Apply this patch
2) Browse to /cgi-bin/koha/svc/barcode?barcode=123456789 on your server
3) Note the barcode image

Signed-off-by: Brandon <brandon_h27@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-13 13:48:31 -03:00
b2ccd0f3a2 Bug 13189 - Patron card creator patron search browse by last name broken by extended attributes
The browse by last name letters on the patron search for the patron card
creator doesn't work quite right. If extended patron attributes are
disabled, it works fine, but if they are enabled, they are searched even
when using the browse last name. Thus, if a searchable attribute has a
"D" in it, and one clicks the "D" link for the last name browser, that
patron will show even if he or she has no "D" in his or her hame!

Test Plan:
1) Enable extended patron attributes
2) Add a new searchable patron attribute
3) Create a new patron with the last name "Ace"
4) Add the value "D" to the attribute for this patron
5) Browse to the patron card maker, start a new patron batch
6) Click "Add item(s)" to bring up the patron search
7) Click the letter "D" in the patron search box
8) Note that "Ace" shows in the results list
9) Apply this patch
10) Repeat step 7
11) Note that "Ace" no longer shows in the results list
12) Perform a regular search by putting the letter "D" in the "Name:"
    field, and hit the "Search" button
13) Note this time the results *do* have Ace in them

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  Well described for a tricky bug. Reproducible. Fixed with this patch.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
This works as described, no problems or regressions found.
2015-02-12 15:35:07 -03:00
Jonathan Druart
a0e5d77a71 Bug 13343: Embed items when send a basket/shelf
When a basket/shelf is downloaded, items are embedded, but not when
sending it by email.

We would expect to get the same file.

Test plan:
On Opac and intranet:
1/ Add records with items to your basket and send it by email.
Verify the file contains items.
2/ Add records with items to a list and send it by email.
Verify the file contains items.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-12 15:33:11 -03:00
a23c551f30 Bug 13019 [QA Followup] - Fix stale unit test
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-12 15:21:19 -03:00
d792583186 Bug 13019 [QA Followup] - Allow chaining
By returning the object itself instead of a boolean, we can chain
methods together while retaining the exact same functionality.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-12 15:21:13 -03:00
089c08ea65 Bug 13019 [QA Followup] - Remove use of encode
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-12 15:21:10 -03:00
074428bb8a Bug 13019: [QA Follow-up] Rename new_from_dbic and few typos
Since new_from_dbic is not meant as a public method, this patch adds
a prefix to the name of this internal routine. For the same reason I
removed it from t/Borrower.t.
Removed one use overload-line in Objects (not used).
Resolved a few typos.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-12 15:21:08 -03:00
d562df4af2 Bug 13019 [QA Followup] - Allow find() and search() to be called as static methods
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-12 15:21:05 -03:00
Jonathan Druart
3107975ba9 Bug 13019: (follow-up) Remove smartmatch operator
This patch also adds 1 test.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-12 15:21:03 -03:00
6f0316a8d2 Bug 13019 - Add base classes on which to build Koha objects
The idea behind this is to have a pair of base classes on which to build
our new generation of Koha objects. Koha::Object is a base class, which
in it's most basic form, is to represent a row in a table. For example,
Koha::Borrower inherits from Koha::Object. So too could Koha::Biblio
and Koha::Item for example.

Koha::Objects is to represent a way to fetch and manipulate sets of
objects. For example, Koha::Borrowers has a method to get a
Koha::Borrower object by id and a method to search for an get a list
of Koha::Borrower objects. Right now Koha::Objects has only the
essentials but can easily be extended and those enhancements will be
passed down to all the child classes based on it.

By using these classes as a base, we will add consistency to our
code, allow us to keep our code DRY, reduce bugs, and encapsulate our
database access among other benefits.

Test Plan:
1) Apply this patch
2) prove t/Object.t t/db_dependent/Object.t t/db_dependent/Objects.t

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-12 15:21:01 -03:00
295fb70f62 Bug 13335 - Holds and priority display via OPACShowHoldQueueDetails confusing
No matter what the selection of OPACShowHoldQueueDetails is, if it is
enabled it displays a line "Holds and priority:" even if you've opted to
hide one of those!

Test Plan:
1) Apply this patch
2) Test each setting of OPACShowHoldQueueDetails
3) Ensure each setting displays the correct fields ( or lack thereof )

Signed-off-by: Christopher Brannon <cbrannon@debian.localdomain>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-12 15:20:59 -03:00
fcaa6f35c0 Bug 13636 - Staff search results item status incorrect for holds
Imagine this scenario: we have one record with four items. Two of those
items are checked out, one of those items is a waiting hold, and one of
those items is available. We would expect to see this on the search
results page. Instead, we will see both non-checked out items as
unavailable due to waiting holds.

This is due to a semantic issue GetReserveStatus.
C4::Search::searchResults uses GetReserveStatus to get the reserve
status of each item, but unlike all other calls to the sub, this one
passes in not only itemnumber, but biblionumber.

When no reserve is found for the available item, the subroutine uses the
biblionumber to grab what is essentially an arbitrary reserve to use for
the status. This makes no sense and this functionality should be
entirely removed from the subroutine so regressions like this will be
prevented in the future.

Test Plan:
1) Create one record with 4 items
   a) check two of the items out to patrons
   b) set one of the items as a waiting hold
   c) leave the fourth item as available
2) Run a search where this record will be in the results list
3) Note that the results list 2 items on loan, two unavailable
4) Apply this patch, reload the search results
5) Note that the results list 1 available, 2 on loan, 1 unavailable

Signed-off-by: John Andrews <jandrews@washoecounty.us>
Signed-off-by: Sheila Kearns <sheila.kearns@state.vt.us>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Note: This is for the staff search result list!

Works as expected.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-11 10:20:35 -03:00
Jacek Ablewicz
dbf0b358b9 Bug 13431 [QA Follow-up]: Shared FastMmap file causes issues
1) Removed 'use C4::Context;' because it can lead to introduction
of circular reference in the near future
2) Put fastmmap initialization code into an eval {} block, to catch
various kinds of errors which can still occur during it's init in
some [less usual] Koha setups and/or more unusual circumstances
3) Do not include UID in the sharefile name (it will be constructed
using namespace + database name + database host instead).

Test plan addendum:

   s/and UID//

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

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-11 10:18:56 -03:00
Jacek Ablewicz
9e701294dd Bug 13431 - Shared FastMmap file causes issues
Koha::Cache package does not take into account that, when using
fastmmap caching variant, mmaped cache file created in /tmp
(typically: /tmp/sharefile-koha-koha), would only be further
accessible to the one given OS user - the one which created it.
In many Koha setups, in the circumstances when various system scripts
are executed by 2+ users with diffrent UIDs (like multi-tenant servers,
for example) this may cause many kinds of issues. Observable symptom
is usually the appearance of the below error when searching, or looking
at MARC Framework pages and a few other places:

Open of share file /tmp/sharefile-koha-koha failed: Permission denied
at /usr/lib/perl5/Cache/FastMmap.pm line 640.

This patch:
- disables initialisation of fastmmap caching subsystem unless it is
explicitly requested by the user (CACHING_SYSTEM=fastmmap)
- disables fastmmap cache usage for command line scripts
(i.e. when GATEWAY_INTERFACE environment variable is not defined)
- adds the database name, host name and an ID of the OS user to the
mmaped file name created in /tmp, to prevent various kinds of
unintentional conflicts and/or permission problems from happening

To test:

1) remove the /tmp/sharefile-koha-* file[s] (if any)
2) do something which would lead to its re-creation (e.g., performing
any search in OPAC should be sufficient to cause that)
3) observe that /tmp/sharefile-koha-koha got created
4) remove it
5) apply patch
6) redo step 2)
7) observe that aforementioned file is no longer created in /tmp
8) set CACHING_SYSTEM environment variable to 'fastmmap'
9) redo step 2), observe that /tmp/sharefile-koha-* file got created
and that it's name now contains hostname, database name and UID
10) ensure that everything still works like it should and that there
are no regressions of any kinds anywhere in the system ;)

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

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-11 10:18:45 -03:00
155ce56ad8 Bug 13240 [QA Followup]
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-10 14:08:02 -03:00
Jonathan Druart
18c28fe36c Bug 13240: Remove commented warns
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-10 14:08:00 -03:00
Jonathan Druart
5bd9482550 Bug 13240: Remove some code obfuscation
my $bar;
my $foo = $bar->{borrowernumber} ||= {};
$foo->{one} ||= 'something';
$foo->{two}++;

What does $bar contain?

$VAR1 = {
          'borrowernumber' => {
                                'two' => 1,
                                'bar' => 'something'
                              }
        };

Not really obvious.

Maybe something I did not see is hidden.

Test plan:
Verify the digest for DUE and PREDUE work as before.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-10 14:07:59 -03:00
87bcc8b303 Bug 13670 - Patron holds table not loading when holds tab anchor is used
If a link to a patron record ends with #reserves, the holds tab is selected
on page load, but the holds table does not load.

Test Plan:
1) Build your holds queue
2) From the holds queue report, open any patron link
3) Note the patron's reserves do not load
4) Apply this patch
5) Clear your browser cache
6) Repeat step 2
7) Note the holds table now loads

Signed-off-by: Sean McGarvey <seanm@pascolibraries.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-10 11:25:03 -03:00
Jonathan Druart
f19a1777a0 Bug 13319: Fix Koha::Acq::Order should set parent_ordernumber
The tests highligh the problem: if the parent_ordernumber attribute is
not set on inserting an order, the object returned by the method does
not contain the value (undef).

Test plan:
Verify the tests are consistent and
    prove t/db_dependent/Acquisition/CancelReceipt.t
should return green.

You can also verify that receive partially an order and cancel the
receipt work as expected.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-10 11:24:08 -03:00
dc5b944863 Bug 12323 [SIGNED OFF] - Acquisitions search results fixed in order of biblionumber
The acquisitions search is exhibiting the same behavior as bug 11410.
Results are always fixed in order of biblionumber, among other possible
issues ( including the ampersand issue ).

Test Plan:
1) From an open basket, choose "Add to basket"
2) Run a search for "From an existing record"
3) Note the "View MARC" URLs are fixed in order of biblionumber
4) Apply this patch
5) Refresh the page
6) Note the results are no longer fixed in order of biblionumber

Signed-off-by: David Cook <dcook@prosentient.com.au>

Works as described.

I think the code could be a bit tidier, but I think it makes sense to
use buildQuery here. It'll detect CCL, CQL, and PQF queries, as well
as parsing a regular keyword search as one would expect when searching
the catalogue.

It also has the added bonus of performing relevance searching,
so long as QueryAutoTruncation is off, and so long as library staff
avoid using the "*" truncation wildcard (see bug 12430).

While there are simpler ways to fix this acq bug, I think this was
probably the best move, as it adds a bit to the consistency of what
librarians can expect from their search results.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Same result with and without the patch but I agree with the changes.
BuildQuery should be called before SimpleSearch if QP is not used.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-10 11:12:54 -03:00
Jonathan Druart
2df541712f Bug 13675: Do not set aqorders.budget_id to NULL
C4::Acquisition::ModReceiveOrder updates the aqorders with
budget_id=NULL if no budget_id given in parameter.
Actually the same budget_id should be used.
In tests (especially t/db_dependent/Acquisition/TransferOrder.t),
ModReceiveOrder is not called with a budget_id param and set to NULL the
budget_id value.

test plan:
  prove t/db_dependent/Acquisition/TransferOrder.t
should return green

Note that this bug should not appear using the interface.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
The fix makes sense, and running
 $ prove t/db_dependent/Acq*
returns all green. koha-qa.pl also likes it.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-10 08:45:44 -03:00
8f690a135e Bug 5511: DBRev 3.19.00.010
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 17:00:20 -03:00
Jonathan Druart
cf8cc47f6d Bug 10900: 2 occurrences more
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 17:00:17 -03:00
Mark Tompsett
bd769213eb Bug 10900 - Follow up, since more has been added to master
Booksellers.t and Koha_template_plugin_Branches.t both had
function calls to ::set_userenv added to them. This patch handles
those additions.

TEST PLAN
---------
1) Branch a new git branch
2) prove -v t/db_dependent/Bookseller.t
   -- It should work.
3) prove -v t/db_dependent/Koha_template_plugin_Branches.t
   -- It should work.
4) Apply only the first patch.
5) Repeat steps 2 and 3.
   -- They should both FAIL!
6) Apply the second patch as well.
7) Repeat steps 2 and 3.
   -- The should both work.

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

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 17:00:15 -03:00
Mark Tompsett
78d6d794fe Bug 10900 - Incorrect calling conventions accessing C4::Context
There were multiple calling conventions for C4::Context's
set_userenv routine. So the following commands were used to
find discrepancies:
    grep "::set_userenv" `find .`
    grep "\->set_userenv" `find .`

The first grep demonstrated that the smaller change is from
:: to -> as only C4/Auth.pm, installer/InstallAuth.pm, and
t/db_dependent/Circulation.t would need to be modified. This
patch corrects C4::Context's set_userenv routine to be object
call based (use ->) by using a shift to ignore the first
parameter, and modify the three files found with :: calls.

As the result of trying to roll a distribution,
t/Circulation_barcodedecode.t was discovered to be faulty. The
cause being incorrect parameters! This was hidden when there
was no shift in the set_userenv routine. However, with its
correction, the test broke.

This led me to read the POD documentation for the function
set_userenv in C4::Context and realize it was outdated as
well. It has been revised to match the current version of
the function.

Then intentionally bad parameters passed to the set_userenv
routine in C4::Context were hunted down. The biggest problems
were missing surnames or branch names.

Rebase required because of shibboleth change in C4/Context.pm

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 17:00:13 -03:00
Brandon
78994d2dda Bug 10177 - Whitespace is accepted within the password but leading and trailing spaces are not.
Test plan:
1: Go to your patron
2: Go to change username and/or password.
3: Change password to something with spaces in the middle. Notice it is invalid.
4: Apply this patch.
5: Change password again using spaces in the middle. Notice it is accepted.
6: Change password with leading and/or trailing spaces, notice they are not accepted.

Applied bothe patches. Followed test plan. Patch behaves as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 17:00:12 -03:00
Brandon
fe28561897 Bug 10177 - whitespace is a valid password causing pernicious perturbations.
Test plan:
Go to your patron, go to change username and/or password. change
password to whitespace, notice it is accepted, apply this patch,
change password again, to whitespace, notice password is not valid.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 17:00:10 -03:00
Katrin Fischer
57d411dcd6 Bug - 5511 [Followup]: QA Fixes
- Move database update entry to correct spot
- Fix version number in database update
- Fix capitalization in sys pref description
- Fix sequence in sysprefs.sql

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 17:00:09 -03:00
d556f6a9f2 Bug - 5511 [Followup]: Missed Instance
There was an instance of the pragma missed which meant the the original
patch set didn't actually solve the problem in a large number of cases

This patch adds in the relevant statement.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 17:00:07 -03:00
129fb1fbe2 Bug - 5511 [Followup]: Switched defults
Agree with Chris that the defualt should maintain the higher security
and not reduce it.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 17:00:05 -03:00
Amit Gupta
2d4d65d526 Bug - 5511: Added new system preference: SessionRestrictionByIP
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 17:00:03 -03:00
Amit Gupta
e3bb139080 Bug - 5511: Check for Change in Remote IP address for Session Security. Disable when remote ip address changes frequently.
To Test:
1) Enable the system preference SessionRestrictionByIP
2) Change your system IP. It will not checkout your system IP or signout.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 17:00:01 -03:00
314523f949 Bug 13007: DBIC updates
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 15:52:24 -03:00
761527b026 Bug 13007: DBRev 3.19.00.009
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 15:50:41 -03:00
Jonathan Druart
f7220ba072 Bug 13007: Special case budgetid == ''
In this special case (the suggestion is linked to "all funds"), the
budgetid value should be NULL in DB.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes old and new tests.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 15:49:57 -03:00
Jonathan Druart
311afaaf91 Bug 13007: Add a foreign key for suggestions.budgetid
The DB field suggestions.budgetid should be linked to
aqbudgets.budget_id.

If the fund is removed, this column should be set to NULL.

Test plan:
1/ Using your SQL CLI (or equivalent), create or update 1+ suggestions and
set "0" in the budgetid field (or a nonexistent budget id).
2/ Execute the updatedabase script.
3/ Verify that your suggestion is unlinked to the nonexistent fund.
4/ Verify the constraint has correctly been added (show create table
suggestions).
5/ Check that this change does not affect the behavior on adding a
suggestion (linked to a fund or not).

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 15:49:50 -03:00
d8710b4feb Bug 12944: (QA followup) fix POD errors from koha-qa.pl
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 15:48:18 -03:00
Jonathan Druart
4d01620579 Bug 12944: Fix regression on translating
This patch fixes the translation for the "Remove" button.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Tested:
- acq history search with different searches
- patron lists patron search
Passes all tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 15:48:17 -03:00
Jonathan Druart
e30a020275 Bug 12944: The autocomplete should only be applied for the form
If it's the result view, the autocomplete should not be apply to the
input element (it does not exist).

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 15:48:15 -03:00
fed02a5fc8 Bug 12944 [Patron lists follow-up] There is no way to search orders by creator
This bug modifies not just the order search form but also the patron
lists feature, making use of the new script for building a patron
autocomplete form. However, the test plan does not specify that the
patron lists form be tested as well, and it doesn't work.

This patch corrects a minor flaw which broke the patron search
autocomplete when adding patrons to a patron list.

To test, create a new patron list if necessary. Click the "add patrons"
button to add patrons to the list. In the patron search form type a
partial patron name. You should get an autocomplete dropdown of existing
patrons. Selecting one should work correctly.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 15:48:13 -03:00
Jonathan Druart
ff7c87d345 Bug 12944: Search orders by basket creator
This patch adds the ability to search orders using the basket creator.

Test plan:
- go on the order advanced search form (acqui/histsearch.pl)
- use the autocomplete input to search patrons
- launch the search and verify the results are consistent with the
  values you have filled.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 15:48:12 -03:00
Jonathan Druart
c8053f3c8d Bug 12944: Refactor the patron autocomplete
The patron list feature uses an autocomplete field to search patron.
This will be reused in the next patch.
This patch should not introduce any behavior change.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>

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

Bug 12944 [QA Followup] - Rename patrons.pl to patrons.js

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 15:48:08 -03:00
Mark Tompsett
3cf7194335 Bug 11954 - Clean up currency default files
It makes no sense to have TRUNCATE or foreign key checks.

TEST PLAN
---------
1) Back up your database
2) in an mysql client:
     use kohadata;
     SET FOREIGN_KEY_CHECKS=0;
     TRUNCATE currency;
     source /home/mtompset/kohaclone/installer/data/mysql/ru-RU/optional/sample_currency.sql
     SET FOREIGN_KEY_CHECKS=0;
     TRUNCATE currency;
     source /home/mtompset/kohaclone/installer/data/mysql/uk-UA/optional/sample_currency.sql
     SET FOREIGN_KEY_CHECKS=0;
     TRUNCATE currency;
     source /home/mtompset/kohaclone/installer/data/mysql/it-IT/necessari/parameters.sql
     SET FOREIGN_KEY_CHECKS=1;
     QUIT
   -- These should all work without problem.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 15:47:24 -03:00