Commit graph

703 commits

Author SHA1 Message Date
Chloe
47caf69a46 Bug 12045 - Transfer impossible if barcode includes spaces
have changed the code which strips the white space to only remove the leading and trailing white space instead

To Test-
1- go to circulation -> transfer
2- attempt to tranfer an item where the barcode has a space in the middle of it
3- it should fail
4- apply patch
5- try again
6- it should work

NOTE: I purposefully added: die "($barcode)";
      Before, all spaces were removed.
          '    white space    ' became '(whitespace)'
      After, only external spaces were remove
          '    white space    ' became '(white space)'

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

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-01-27 01:08:01 +00:00
879ee53be7 Bug 15560: Fix display of multiple item types in pending reserves report
Same fix as previous patch, but for item types.

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

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
2016-01-23 18:31:38 +00:00
Katrin Fischer
363cb9c02e Bug 15560: Fix display of multiple branches and locations in pending reserves report
The patches from bug 12152 broke the display on the pending reserves/
holds to pull report when items from multiple branches and with
multiple locations were displayed. The table cells were left empty.

To test:
- Add a record with at least 2 items from different locations and
  holdingbranches
- Open the 'holds to pull' report
- Verify all branches and locations show with their correct
  description

Signed-off-by: Natasha <tasham_8@hotmail.com>

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

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
2016-01-23 18:31:38 +00:00
Marc Véron
68dee0de8e Bug 15462 - Unable to renew books via circ/renew.pl
To verify: Got to circ/circulation.pl and try to renew an item.
Result: Can't call method "single" without a package or
        object reference at /usr/share/kohaclone/circ/renew.pl
        line 57

To test:
- Apply patch
- Try to renew items that are or are not checked out. Error
  no longer occurs.

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

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-01-07 18:21:21 +00:00
e2a3b93860 Bug 15344: Remove one occurrence in circ/circulation.pl
In C4::Circulation::CanBookBeIssued, $borrower->{flags} is called and
should be populated by GetMemberDetails

It fixes the following error on checking out:
Can't use string ("1900156") as a HASH ref while "strict refs" in use at
/home/koha/src/C4/Circulation.pm line 813.

Note: Error occurs with patrons with staff permissions, not with 'normal' patrons.
Error is fixed with this patch.
Signed-off-by: Marc Véron <veron@veron.ch>
2016-01-04 15:47:04 +00:00
19e3e89df8 Bug 13931 [QA Followup] - Fix whitespace error
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2015-12-31 13:40:29 +00:00
dad848a0a7 Bug 13931 - Date of birth in patron search result and in autocomplete
Test plan:
1) Apply the patch
2) Type into search form patron's name & check his date of birth in
   autocompletion
3) Go to intranet/cgi-bin/koha/members/member.pl & submit
   a search with more than one result .. now should in the table appear
   patron's date of birth
4) Try show/hide columns section if it works correctly for date of birth
5) Go to intranet/cgi-bin/koha/admin/columns_settings.pl -> go to
   patrons section & check there is dateofbirth & it's functionality

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  Works as described. Syspref dateformat respected. Column dateofbirth
  configurable, but mandatory on autocompletion search result.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2015-12-31 13:40:29 +00:00
ff1579de6d Bug 15258: Fix Perl scripts declaring unused variables
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>

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

All affected files tested with `perl -c`.
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
2015-12-30 17:24:45 -07:00
010a32d95f Bug 15344: Remove some other calls of GetMemberDetails from pl scripts
Same as previously.
For these files it's a bit less obvious.
To make sure these changes won't introduce any regression, check that
the variable returned by GetMember is never used to get something
else than a borrower fields.
The 'flags' should not be get neither.
For opac-user.tt it's different, other keys are got but there are defined
in the pl script.

On the way:
- 'showname' is removed (never used)
- fix scope var issue in opac-user.tt (BORROWER_INF.OPACPatronDetails vs
OPACPatronDetails)

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2015-12-30 11:53:18 +00:00
cd46c5dc75 Bug 15324: Do not display 'Waiting holds:" if no holds are waiting
Test plan:
- Make sure that you have a patron A with waiting holds and a patron B
  without waiting holds
- Go to the checkout page for patron A (Home > Circulation > Checkouts
> ...)
- At the right, there is a title "Waiting holds:" and a list of
  holds waiting
- Go to the checkout page for patron B
=> Without this patch "Waiting holds:" is displayed

Sign-off on Jonathan's patch
Signed-off-by: Marc Véron <veron@veron.ch>

http://bugs.koha-community.org/show_bug.cgi?id=14324

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2015-12-30 03:41:33 +00:00
Marc Véron
466eebe9e5 Bug 15301: branchtransfers.tt: Remove ambiguous "To" and fix splitted sentence
The file intranet-tmpl/prog/en/modules/circ/branchtransfers.tt contains two
ambiguous words 'to' and a sentence splitted up by html tags, leading to weird
translations. Example in German: "Sie können keine Exemplare aus itemtype
transferieren BK für: Airfield"

To test:
- Apply patch

- Set up transfer policies for item types and collection codes in
  Home > Administration > Set library checkin and transfer policy
  Make sure that you have rules that deny and others that allow transfers

- Verify that syspref 'UseBranchTransferLimits' is set to 'Enforce'

- Set 'BranchTransferLimitTypes' to 'item type'

- Go to Home > Circulation > Transfers
- Transfer an item that is allowed for item type
  - Verify that the table of transferred items displays information
    about Item type, Collection code and Destination

- Transfer an item that is not allowed for the item type
  - Verify that the information about not allowing the transfer displays
    properly and is meaningfull

- Set 'BranchTransferLimitTypes' to 'collection code'

- Repeat the transfer steps above for allowed / not allowed collection code

(Amended to add ids to table and 8 columns, see comment #2)
(Amended for comment #5)
Followup for comment #8

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

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2015-12-29 21:24:50 +00:00
Marc Véron
186b4b7e09 Bug 15230: Remove unused file circ/stats.pl and stats.tt from system
This patch removes stats.pl and stats.tt from system.

To test:
- Verify that both files are not used and that the only reference in
  koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt
  is commented out.
- Apply patch
- Verify that the files are deleted and the reference is removed.
- git grep 'stats.pl', verify that there are no more references to
  this file.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
See the following commit for more info on this script:
  commit 60105bd692
  Date:   Tue Jul 8 20:02:34 2008 -0500
    fix for 2008: Daily reconciliation report broken

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2015-12-11 16:46:31 +00:00
353e30d73e Bug 13838 - Redirect to 'expired holds' tab after cancelling a hold
When canceling a hold from the holds over tab, you are redirected back to the holds waiting tab. Instead, we should the librarian should continue to see the list of holds past the waiting length.

Test Plan:
1) Apply this patch
2) Cancel a hold from the "Holds over" tab on circ/waitingreserves.pl
3) Note you are redirected back to the holds over tab

Signed-off-by: Tom Misilo <misilot@fit.edu>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2015-12-11 16:43:55 +00:00
Katrin Fischer
9e518de90f Bug 14349: Checkouts and Fines tab missing category description on the left
When navigating the tabs in the patron account, for 2 tabs the
patron category description is missing above the tabs.

To test:
- Go to a patron account in staff
- Click through the tabs
- Verify that for Checkouts and Fines the category description
  is missing above the tabs
- Apply patch
- Verify the description is now shown

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2015-12-11 15:22:03 +00:00
717878982f Bug 13024 - Nonpublic note not appearing in the staff client
The nonpublic note for items is not displayed in the staff client. It
should be displayed in the following areas:
1) Checkouts (circulation.pl)
2) Checkins (returns.pl)
3) Record details ( moredetail.pl )

Test Plan:
1) Ensure your non-public note field is mapped to the
   items.itemnotes_nonpublic database column
2) Edit an item, add a test nonpublic note
3) Check out the item, verify the note is visible in the checkouts table
4) Check in the item, verify the note is visible in the checkins table
5) View the item details, verify the note is visible and editable
   if your account has the rights to edit items

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>
2015-12-04 14:47:57 +00:00
Marc Véron
4c9894889b Bug 14870: (followup) Remove stray C4::Dates from circ/returns.pl
This patch removes 1 remaining / stray occurence of C4::Dates from
circ/returns.pl

To test:
- Apply patch
- Go to Home > Circulation > Check in
- Verfiy that check-ins with overriding return dates work as before.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-19 13:05:06 -03:00
Eivin Giske Skaaren
16213187d9 Bug 10067: decreaseLoanHighHolds messes with specify due date
To test:

1. On a branch up to date with master: apply the patch.

2. Try to check out items both with and without holds.
(The decreaseLoanHighHolds function should be configured and kick in when testing an item.

3. Expected results are:
The due date date field should be cleared after checkout if "Remember for session"
is not selected. If it is selected then the chosen date should stay in the field even
if the warning about reduced loan time for an item with too many holds is displayed.
Also the correct due dates are shown in the table after a checkout.

Known limitation: Does not work too well when jumping between different parts
of the system as it relies on the values sent to the circulation.pl script.

Sponsored-by: Halland County Library

Refactored to both fix specific issue where date is changed
and still have the old behaviour with date kept intact.

Rebase
Remove code whitespace cleanup

Remove one more code whitespace cleanup

Removed duplicate tag

Refactored stickyduedate session parameter

Fix datefield set by highholds if blanc

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-17 10:02:35 -03:00
220ff161e9 Bug 11431: Add additional sound options
This patch set replaces and extends Koha's current sound options.
This is implemented be removing the existing sound system, and
re-engineering using a table of selector/sound combinations such that
the highest precedence selector that is found in the DOM will trigger
and audio alert. The existing audio behaviors are implemented as a set
of default audio alerts.

Test Plan:
1) Apply this patch set
2) Run updatedatabase.pl
3) Enable the AudioAlerts system preference
4) Test existing sounds
5) Enter the new alerts editor in the admin section
6) Add a new audo alert with the following selector:
    "body:contains('Check in message')",
   choose any sound alert you wish, make sure it's not one of the 3
   sounds already used! Make this selector precedence 1
4) Browse to the checkins page, you should hear the default sound
5) Attempt to return an invalid barcode, you should hear your custom sound!

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
2015-11-04 12:32:57 -03:00
8122df1f87 Bug 14821: Do not list not returned items
On the checkin page, the table is always filled with info of the scanned
barcode, even if the checkin has failed.
When the checkin fails, there is already an error displayed, so there is
no need to keep a row for fails.

Test plan:
Confirm that the failed checkins don't appear anymore in the checkin
table.
- checkin an item which is not issued;
- BlockReturnOfWithdrawnItems is set and item is withdrawn;
- Not returned at the right place;
- privacy=2 and AnonymousPatron not correctly set;

Before this patch this behavior existed only for bad barcode.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  I confirm that the checkin table hasn't to be populated with info on items
  which haven't been checked in.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-03 14:12:47 -03:00
Marc Véron
b70e1cd053 Bug 14903: (followup)Remove C4::Dates from circ/circulation.pl
Follow up to fix QA issues from comment #15
...and amended for comment #18

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-29 11:57:49 -03:00
Marc Véron
421fae24f1 Bug 14903: Remove C4::Dates from circ/circulation.pl (and more)
Patch to remove deprectated C4::Dates from:
- circ/circulation.pl
- C4/Circulation.pm
- koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt

To test:
- Apply patch
- Go to the checkout site (Home > Circulation > Checkouts)
- Verify that data displays properly (including for users with a card
  that expires in the  near future, see syspref 'NotifyBorrowerDeparture')
- Search for regressions
- prove -v t/db_dependent/Circulation.t

(Amended following comment #9 / #11  25.10.2015 /mv)

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-29 11:57:15 -03:00
304dd2b051 Bug 14918: [QA Follow-up] Correct enddate and use constant
Corrected enddate (subtraction in the revised code must be an addition).
Replaced hardcoded 2 days by a constant.
Renamed the constant TWO_DAYS to PULL_INTERVAL.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested all three date formats.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-23 10:13:21 -03:00
c43e10f06e Bug 14918: Remove C4::Dates from circ/pendingreserves.pl
This patch uses Koha::DateUtils instead of C4::Dates and Date::Calc. It
also sent DateTime objects to the template, which use the TT plugin to
display them.
If an invalid dates is entered, the default date is picked.

Test plan:
1/ Go to Home > Circulation > Holds to pull
2/ Verify that the the filter and the list behave as before
3/ Enter invalid dates and confirm that you do not get a software error

Counter patch works as expected and is a much cleaner solution.
Signed-off-by: Marc Veron <veron@veron.ch>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-23 10:13:16 -03:00
4353cd1958 Bug 14871: Extend the patrons search to search like %$term% (checkout tab)
The patrons search used by the checkout tab and the autocomplete is not
the same as the "search patrons" tab.
The main difference is the "contain" vs "start with".
So that if you have a patron with a patron with a surname "foo bar" and
you search for "foo bar", the autocomplete and the result of a search by
the checkout tab will search for "foo%" or "bar%" which won't return the
patron you are search for.

This patch replaces both autocomplete and checkout tab searches with a
"contain" search. The search will be "%foo%" or "%bar%".
Note that on big DB, this can cause unexpected results.

Test plan:
Create a patron with a surname "foo bar"
Search for "bar" using the checkout tab.
You should see the patron in the autocomplete result and the result page
after submitting the search form.

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-21 13:31:41 -03:00
2f02d4b74c Bug 11759: (QA followup) Sysprefs should be kosher
The introduced syspref was defined before we added new guidelines
for them. This patch puts them in sync with current standards. It also
splits them into:

 - A big on/off switch (BatchCheckouts)
 - Patron category filter (BatchCheckoutsValidCategories)

The latter is expected to go away if we move this into a boolean column
on the 'categories' table, which seems a better approach. I'm filling a
new bug for this last comment.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-20 10:46:42 -03:00
fb336f126e Bug 11759: (QA followup) Fix koha-qa errors
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
2015-10-20 10:01:02 -03:00
Jonathan Druart
63d61e7c50 Bug 11759: (follow-up) Some fixes
This is a squash of the following patches:

Bug 11759: (follow-up) Prevent access to the batch checkout if not allowed

If a user pass '&batch=1' to the url, he was allowed to access to the
batch checkout page even if the patron is not in an authorised
category.

This patch also fixes the link to "Batch check out" from the "Details"
tab (cf changes in circ-menu.inc).

Bug 11759: FIX Javascript error

The following JS error occurred:
  ReferenceError: MSG_ADD_MESSAGE is not defined

The circulation.js file is useless and should not be included.

Bug 11759: FIX the alert message if an item is on hold.

If an item is on hold, the hold is not cancelled.
This patch corrects the message displayed in this case.

Bug 11759: FIX issue list is empty

The issue list is empty after checking an item out to a patron without
existing checkout.

To reproduce:
- Search for a patron without checkout.
- Check an item out using the "normal" checkout.
- Verify the checkout list contain the checkout.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
2015-10-19 15:04:09 -03:00
Jonathan Druart
76ceaa9f2b Bug 11759: Batch checkout - Add the new template
This patch is the main patch.
It adds:
- the new template circ/circulation_batch_checkouts.tt
- the change into circ/circulation.pl

=== Why this feature is useful for some libraries? ===

Currently Koha does not allow to checkout several items at once to a
user. This can cause a waste of time when a user want to checkout more
than 10 items.

This development has been asked to have statistics on in-house use.
Every night, a librarian will enter a barcode list (from a file or a
scanner : the librarian scans the barcode of the documents that users
let on the tables). Barcodes will be added to a statistics patron in
order to count the number of items consulted.

The development has been expanded to cover another need: some special
libraries (BDP for "Bibliotheque departementale de pret": "Loan Regional
Library").
These libraries loan items to smaller libraries (municipal). The number
of items could be very important and the current way offered by Koha is
not adequate.

=== Test plan ===
0/ Apply all patches and execute the DB change entry.
1/ Verify you are abble to do some checkouts (with confirmations,
errors).

= Statistics way =
2/ Create a statistical patron (e.g. category code STATS).
3/ Update the batch_checkouts pref with the category code (STATS).
4/ Go on the member page and verify the new "Batch check out" tab
appears (and only for this user).
5/ Check some items out on the new page using the textarea or a file.
6/ Verify the table contains the item's information and the
"Information" column contains "Local use recorded".

= Real checkouts =
7/ Create a non statistical patron and update the pref.
8/ Check some items out on the new page using the textarea or a file.
9/ Verify the information in the table is consistent.
10/ Verify item without confirmation needed or impossible alert is
checked out.
11/ If the logged in user has the "force_checkout" permission, all
checkouts with a "confirmation needed" message can be done.
If the logged in user does not have it, there is no way to force the
checkout.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-19 15:02:21 -03:00
Jonathan Druart
78fedb52e3 Bug 11759: Batch checkout - prepare the ground
This patch does not introduce any changes.
It prepares the circulation script to accept several barcodes in
parameter.
A loop is done on all barcodes (until now, only 1) to generate a
structure to sent to the template.
At the end, only the first generated data is sent.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-19 15:02:21 -03:00
52bbc941ea Bug 14916: Display overdues if due on 23:59
If an item is due today 23:59 and the filter is from yesterday
to today, the overdue won't appear on the list.

Test plan:
Be sure you have an item due on DATE 23:59
Search for overdues from DATE-1 to DATE
Without this patch, the item won't appear.
With this patch, it will.

Regression test: test the CSV download.

Note: On the way, this patch remove the deps to C4::Dates
(which was the original goal of the bug report).

Issue reproduced, it's resolved with this patch.
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@theke.io>
2015-10-19 11:50:37 -03:00
5fd30dc5f2 Bug 15005: Remove CGI->url calls from pl scripts
Same as previous patch for calls in pl scripts.

Test plan:
- delete an entry of your search history from intranet and opac
- with IndependentBranches=OFF, go on the waiting holds and confirm that the
link next to 'Holds awaiting pickup for your library on' is correct.
- search for items, the pagination should work correctly

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-19 09:36:43 -03:00
7482d80068 Bug 14920: Simplify the date management on reserveratios
Note that the previous patch was wrong, the start date defaulted to yesterday,
the original behavior is to default to last year.

This patch removes some unecessary variable declarations and tests.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-13 11:39:11 -03:00
Marc Véron
388f69e5c9 Bug 14920: Remove C4::Dates from circ/reserveratios.pl
This patch removes C4::Dates from circ/reserveratios.pl

To test:
- Make sure you have many holds for biblios with not so much items (e.g. 5 holds, 1 item)
  or follow hint below
- Go to Home > Circulation > Hold ratios
- Verify that everything works the same without an dwith patch

Hint: To get a big table you can set 'Hod ratio' in the filter to 0.1  (default value is 3).
This was will trigger biblios with less holds than items.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. Tested with dateformat syspref, datepiker Ok

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-13 11:39:01 -03:00
Jonathan Druart
4d8489efba Bug 14045: Add specific quotas to on-site checkouts
This patch set adds the ability to defined independent quotas for on-site
checkouts.
This will be done using the circulation rules matrix where a new column
“Current on-site checkouts allow” will be added.

This feature is going to use the same method as the existing fields maxissueqty
("Current checkouts allowed"), the new fields will be added to the
different tables (see the "DB changes" patch) and will be named
maxonsiteissueqty (for consistency).

In order to keep the existing behavior and to let more flexibility,
a new system preference is added (ConsiderOnSiteCheckoutsAsNormalCheckouts).
This syspref will let the liberty to the library to decide if an on-site
checkout should be considered as a "normal" checkout or not.

To keep the existing behavior, the syspref will be disabled (i.e. an on-site
checkout is considered as a normal checkout) and the number of on-site
checkouts will be the same as the number of checkout (maxissueqty ==
maxonsiteissueqty).

Technically:
There are only very few tests for the Circulation module, and the 2
subroutines impacted by this patch set were not tested at all.
It is necessary to introduce non-regression tests for this area.
The 2 subroutines are: C4::Circulation::GetBranchBorrowerCircRule
and C4::Circulation::TooMany (only called by
C4::Circulation::CanBookBeIssued, so we will take the liberty to change
the prototype to raise a better warning to the end user).

Test plan:
I. Confirm there is no regression and the existing behavior is kept
 0/ Let the syspref disabled
 1/ Set a rule to limit to 2 the number of checkouts allowed
 2/ Do a normal checkout
 3/ Do an on-site checkout
 4/ Try to checkout (on-site or normal) an item again.
 You should not be allowed.

II. Test the new feature - pref disabled
 0/ Let the syspref disabled
 1/ Set a rule to limit to 2 the number of checkouts allowed and to 1
 the number of on-site checkouts allowed.
 2/ Do an on-site checkout
 3/ Try to do another one, you should not be allowed to do it.
 4/ A normal checkout should pass successfully
Note that it does not make sense to have the number of on-site checkouts
alowed > number of checkouts allowed.

III. Test the new feature - pref enabled
 0/ Enable the syspref
Now an on-site checkout is *not* counted as a normal checkout.
This means you can have the number of on-site checkouts > number of
checkouts allowed.
 1/ Set the values you want for the 2 types of checkouts (normal vs
on-site).
 2/ Even if a patron has reached the maximum of checkouts allowed, he
 will be allowed to do a on-site checkout (vice versa).

IV. Stress the developper
 Using the different configurations available in the circulation matrix,
 try to find one where the checkout is allowed and not should be.

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-13 11:13:22 -03:00
56ede58a86 Bug 14890: Simplify processing to display a date with hours
The KohaDates plugin does that, it's not necessary to split the output.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-08 10:59:05 -03:00
Marc Véron
790ef7052b Bug 14890: Remove C4::Dates from circ/bookcount.pl
This patch removes deprecated C4::Dates from circ/bookcount.pl

To test:
- Search for biblio with an item that has been checked out several
  times and that has been transferred
- In left navigation click on 'Items'
- In list of items click on 'View item's checkout history'
- Verify that dates in 'Date arrived at current library' and in
  column 'Last seen' display properly.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-08 10:58:58 -03:00
bb32502607 Bug 14842: Wrong call to GetBranchItemRule
From bug 7981:

GetBranchItemRule expects an itemtype, a scalar.
Here $itemtype is a hashref returned by C4::ItemType->get.
So $itemtype->{itemtype} should be passed.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-10-02 11:06:39 -03:00
Marc Véron
2fbaac98da Bug 13813: Remove deprecated module C4::Dates from system
Changes for QA comment #165

circ/transferstoreceive.pl
'iso' added

circ/waitingreserves.pl
'iso' added

members/printinvoice.pl
'iso' removed

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-09-18 12:40:56 -03:00
Marc Véron
5dceb851dd Bug 13813: Remove deprecated module C4::Dates from system
Test plan: See Bugzilla.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-09-18 12:40:55 -03:00
cb2151529e Bug 14655: Add a warning if the checkin will fail
On the checkin and checkout page, the checkin will fail if the patron
has requested the privacy and the AnonymousPatron is not correctly set.

This patch adds a warning message on both pages.

Test plan:
0/ Be sure you don't have any patron with privacy=2 (Never)
1/ Set OPACPrivacy, not AnonymousPatron
2/ Go on the checkin, you should a warning (same as before this patch).
3/ Set the privacy=2 for a patron
4/ Go on the circulation page, a warning should appear (for this
specific patron)
5/ Check an item out to this patron
6/ Check the item in on the checkin page.
The item is not checked in and you get a specific message for this
patron.

Confirm other/correct situations don't trigger the messages.

Followed test plan. 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: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-09-16 10:12:15 -03:00
Jesse Weaver
bb6277ffcc Bug 14464: Add ability to cancel waiting holds from checkin screen
Test plan:

    1. Ensure that ExpireReservesMaxPickUpDelayCharge is set to 0.
    2. Place a hold (doesn't matter whether it's a bib/item-level hold),
       then confirm the hold by checking it in.
    3. Check in the item again, and hit Cancel.
    4. The reserve in question should be cancelled.
    5. Repeat steps 2-4 twice, once after setting
       ExpireReservesMaxPickUpDelayCharge to a nonzero value and again
       after clicking the "Forgive fees for manually expired holds"
       checkbox.

A fine should only be applied when the syspref is enabled and the
checkbox is not checked. Also, the checkbox should only appear after
enabling the syspref. And finally, the checkbox should remember whether
it is checked across multiple checkins, same as the "Forgive overdue
charges" and "Book drop mode" checkboxes.

Signed-off-by: Jason Burds <jburds@dubuque.lib.ia.us>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended patch: Removed 2 debugging lines.
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-08-21 09:20:11 -03:00
062f34c55d Bug 13851: Replace waiting holds logic in circulation.pl with Koha Objects
This is the original patch for bug 12892 and replaces the older style of
fetching the holds data with Koha Objects. It will be used as a
foundation for future features.

Test Plan:
1) Apply this patch
2) Create a hold, set to waiting
3) Browse to circulation.pl for that patron
4) Note you see the list of waiting holds
5) Switch your logged in branch to a different branch
6) Note the "Waiting at" line is no longer emphasized.

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

Signed-off-by: Cathi Wiggins <CWIGGINS@ci.arcadia.ca.us>

Signed-off-by: Megan Wianecki <mwianecki@mplmain.mtpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-07-29 15:47:13 -03:00
Mark Tompsett
beef853472 Bug 14487: Noise best detected under Debian 8
The first error is caused by the fact that
$messages->{'IsPermanent'} is undefined.

The second error is caused by querying the CGI
parameter 'barcode' inside a function call. This is not required.
There is a variable $barcode set with the parameter. Changed to
use the variable.

TEST PLAN
----------
1) Test first patch.
2) Clear the log
3) Put in a barcode which is not checked out.
4) Check the log.
   -- should be two errors. One about a hash,
      the other will only be detectable under Debian 8.
5) Apply this second patch
6) Clear the log
7) Put in a barcode which is not checked out.
8) Check the log.
   -- should be empty.
9) run koha qa test tools

Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>
Signed-off-by: Nick Clemens <nick@quecheelibrary.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-07-28 10:18:45 -03:00
Indranil Das Gupta
0d632a606f Bug 14487: silence warns during checkin
Test plan
=========

1/ check out an item and then check it back in.
1/ check the logs after the check-in to see the warns from
   returns.pl line 623 of :
    (a) Use of uninitialized value $holdingBranch
    (b) Use of uninitialized value $collectionBranch
2/ apply patch
3/ check out and check-in again. no warns are recorded this time.

NOTE: Under Debian Jessie, there are other messages.
      Additionally, this only corrects the line 623 ones.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@quecheelibrary.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-07-28 10:18:38 -03:00
simith
8e04ea7282 Bug 11882: Add a new button to the checkout confirmation dialog when checking out a reserved item
This patch adds a "Don't Check Out and Print Slip" button to the dialog that appears
        when trying to checkout a reserved item.

Test case :
* Put a hold on an item for User A.
* Try to check out it item with User B.
* The "Please confirm checkout" box should appear. The "Don't Check Out and Print Slip" button should appear in this box.
* Click on the "Don't Check Out and Print Slip" button.
* A print popup will appear

Signed-off-by: Nick <Nick@quechelibrary.org>

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>

Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-06-26 15:07:32 -03:00
Jonathan Druart
198e6669ee Bug 14324: Display "Add Child" for Organisations on circ/circulation.pl
On moremember, the button is displayed for Organisations.
To be consistent, it should be displayed on the circulation page too.

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-06-23 10:19:35 -03:00
Katrin Fischer
e5cea455d0 Bug 14356: Improvements to the 'Transfers to receive' page
Patch makes several small changes to the template for the
'Transfers to receive page'

1) Show the branch name instead of the branchcode in the
   table of incoming transfers.

If there is a hold connected with the transfer:
2) Show the patron's name as 'surname, firstname'
   intead of 'surname  firstname'
3) Restore broken feature: Show a mailto: link with a
   generated subject of 'Hold: <title>'.

The mailto: feature actually existed in the templates, but
was broken to a misnamed database column. I made some small
changes to make the subject translatable (see bug 8330).

To test:
- Create a transfer by placing a hold with pickup at another library
- Craete a transfer manually
- Go to the circulation > transfers to receive
- Check the changes explained above, compare before and after
- Check the mailto: link works as expected

Bonus: Check the Hold: bit in the subject is really translatable now.

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-06-22 17:30:53 -03:00
Jonathan Druart
1f3e11c5bd Bug 7981: Reintroduce dropboxdate
The parameter was lost in previous commit.

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-06-11 10:41:50 -03:00
Jonathan Druart
074f8637e8 Bug 7981: Use The Branches TT plugin instead of GetBranchName
Note that homebranchname is never used in the template.

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

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-06-11 10:41:37 -03:00
Benjamin Rokseth
57608fdecb Bug 7981: Remove HomeOrHoldingBranchReturn syspref
This patch removes HomeOrHoldingBranchReturn syspref and makes circ/returns.pl respect branch
circulation rules from C4::Circulation::GetBranchItemRule. Also transfer slip notice should reflect this.

Default should always be to return item to home branch.

Test plan:
- make sure syspref 'AutomaticItemReturn' is set to 'false'
- unset 'Default checkout, hold and return policy' or set 'Return policy' to 'Item returns home'
- checkout an item and do a checkin from different branch than items homebranch
- verify that you're prompted with a transfer message to item's home branch and that print slip matches

- set 'Return policy' to 'Item returns to issuing library'
- do a checkout and a checkin from branch different than item's home branch
- verify that you're not prompted with a transfer message and that holding library is your current branch

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

Follow-up:
- Added 3 tests in t/db_dependent/Circulation_Branches.t to test AddReturn
  policies
- Removed HomeOrHoldingBranchReturn from sysprefs.sql
- Added notice on removing syspref in updatedatabase

QA edits:
- removed trailing whitespace in tests
- moved branchname lookup from returns.pl to template

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-06-11 10:24:22 -03:00