Commit graph

20641 commits

Author SHA1 Message Date
Jonathan Druart
fe520d5b14 Bug 11170: make the pending order list only display orders to receive
The order status ordered is set when the basket is closed.
The parcel page should only display status "ordered" and "partial".

Test plan:
- create a basket.
- create an order.
- verify the order is not listed on the parcel page (i.e. you cannot
  receive it).
- close the basket.
- verify the order is listed on the parcel page.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-11 15:09:56 +00:00
Galen Charlton
6e1004544c Bug 11751: DBrev 3.15.00.022
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-11 15:06:04 +00:00
Jonathan Druart
f10ee65d88 Bug 11751: remove dead code related to handling members of institution patrons
This patch removes some dead code concerning the handling of patrons
that are members of other, institutional patrons.  This code did not
work; removing it clears the field if somebody wants to do a better
implementation of such relationships between patrons.

This patch:

[1] Removes the memberofinstitution system preference.
[2] Removes the following routines:

    C4::Members::get_institutions()
    C4::Members::add_member_orgs() (and removing this routine
    removes a reference to a borrowers_to_borrowers table that
    does not exist).

There should be no changes whatsoever to system functionality with this
patch (with the trivial exception of the absence of the
memberofinstitution system preference).

Test plan:

[1] Look at the code and use grep, git grep, etc. verify this patch
    does not remove something in use.
[2] Verify that there are no regressions upon adding or editing
    a patron record.
[3] Verify that the memberofinstitution system preference has been
    removed

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-11 15:05:14 +00:00
Galen Charlton
26cdaaae77 Bug 10777: (follow-up) improve CSS3 for Zebra-striping report email output
This patch improves the CSS used to attempt to Zebra-stripe the
output of emailed reports.  This will work with some email clients,
but other email clients (e.g., Gmail) don't handle style elements in the
body or head element.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-11 14:57:26 +00:00
Nicholas van Oudtshoorn
25076dec54 Bug 10777: email HTML reports with the proper Content-Type
The misc/cronjobs/runreport.pl allows for sending html reports
via email. The problem is that the Content-Type isn't set to
text/html, which means that the generated html email isn't
displayed properly.

This patch set the Content-Type, and also adds a tiny bit of
CSS to potentially alternate row colours (just to make long
reports a bit easier on the eye!)

TEST PLAN
----------
1. Run the script similar to this:
    ./misc/cronjobs/runreport.pl --format=html --to=YOUREMAIL --subject="Bad Formatting!" REPORTNUMBER
2. Look at the email - the html code should by visible and ugly.
3. apply the patch
4. Run the script again.
5. Look at the email - the data should look nicer now.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-11 14:57:23 +00:00
Nicole C. Engard
2f0aac8970 Bug 11918 : Fix typo on authorized values page
This is a small string patch. On Authorized values this patch fixes
the wording next to the library limit.

To test:

Visit Authorized Values
Click 'Add new' or 'Edit' next to a value
Make sure that the text next to the library filter is right

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Text change, works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-11 14:23:11 +00:00
Jesse Maseto
1c794eaeca Bug 11695 - Fixed typo in marc21_field_008.xml
"Tree-character alphabetic code", to "Three-character alphabetic code"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Trees are nice, but Three is better here.
String change, works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-11 14:21:23 +00:00
Jesse Maseto
b648425aee Bug 11731 - Fixed typo in message_transport_types.txt file.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
String change, all good.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-11 14:20:32 +00:00
Galen Charlton
7d39b3c72e Bug 10611: (follow-up) cache DBMS driver code in context object
Rather than use a package-level variable, use an object-level
one.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 23:17:26 +00:00
Jonathan Druart
4ae3665ad8 Bug 10611: Use mysql_auto_reconnect instead of ping
DBD::Mysql provides a mysql_auto_reconnect flag. Using it avoids
the time required to do a $dbh->ping().

Benchmarks:

use Modern::Perl;
use C4::Context;
for ( 1 .. 1000 ) {
    $dbh = C4::Context->dbh;
}

* without this patch on a local DB:
perl t.pl  0,49s user 0,02s system 98% cpu 0,525 total
* without this patch on a remote DB:
perl t.pl  0,52s user 0,05s system 1% cpu 37,358 total
* with this patch on a local DB:
perl t.pl  0,46s user 0,04s system 99% cpu 0,509 total
* with this patch on a remote DB:
perl t.pl  0,49s user 0,02s system 56% cpu 0,892 total

Testing the auto reconnect:
use Modern::Perl;
use C4::Context;
my $ping = $dbh->ping;
say $ping;
$dbh->disconnect;
$ping = $dbh->ping;
say $ping;

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Real improvement. No koha-qa errors

prove t/db_dependent/Circulation_issuingrules.t produces no error
prove t/db_dependent/Context.t produces no error

Test
1) dumped Koha DB, load it on a non-local server
2) run sample script whit and without patch, local and remote

use Modern::Perl;
use C4::Context;
for ( 1 .. 100000 ) {
    my $dbh = C4::Context->dbh;
}

Main difference I note is with remote server
a) without patch
real    0m16.357s
user    0m2.592s
sys     0m2.132s

b) with patch
real    0m0.259s
user    0m0.240s
sys     0m0.012s

I think this could be good for DBs placed on
remote servers

Bug 10611: add a "new" parameter to C4::Context->dbh

When dbh->disconnect is called and the mysql_auto_reconnect flag is set,
the dbh is not recreated: the old one is used.

Adding a new flag, we can now force the C4::Context->dbh method to
return a new dbh.

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

Bug 10611: Followup: remove useless calls to dbh->disconnect

These 3 calls to disconnect are done at the end of the script, they are
useless.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 23:15:35 +00:00
60d24754ee Bug 11465: Show counts and amounts on OPAC 'your summary' tabs
This patch adds counts and amounts to the tabs in the 'your summary'
page of the OPAC patron account.

_TEST PLAN_

Before applying:
1) Choose a test patron
2) Place a few holds
3) Check in one of the holds so that it is waiting for the patron
4) Check out a few items
5) Check out another item that can generate fines (backdate it a few
   weeks/months)
6) Run fines.pl to generate fines (make sure your finesmode syspref
   is set to prod)
7) Check your OPAC patron account.
8) Note the tabs "Checked out, Fines, Holds, and Waiting"

Apply the patch
1) Switch your OPAC to the bootstrap theme
2) Refresh your browser for the OPAC patron account screen
3) Note that the applicable counts and amounts appear on the tabs

--

At the moment, I just have a Bootstrap patch. This is an easy patch
though, so I can duplicate to the other themes if necessary...

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
All tests on bootstrap pass

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass.
"Waiting" doesn't appear to work for me with and without the patch.
"Checkouts", "Holds" and "Fines" work fine.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 21:46:24 +00:00
9d9a002432 Bug 11516: make OPAC search term highlighting work in results browser
When OpacHighlightedWords syspref is on, the current search terms are
highlighted in results and detail pages.

This workes in detail page with the URL param 'query_desc'.

This parameter must be managed in results browser (appears when
OpacBrowseResults syspref is on) links.

This patch adds query_desc parameter in results list and changes next
nd previous links to be build into TT instead of perl to manage
query_desc parameter only into TT.

Test plan :
- Edit sysprefs :  OpacHighlightedWords on, OpacBrowseResults on.
- Perform a search with a term existing into title
=> You see the term highlighted in search results
- Go to detail of a result with highlight
=> You see the term highlighted
- Click on "Next"
=> you see query_desc in URL, and if search term is present it is
   highlighted
- Same for "Previous"
- Click on "Browse results"
- Click on a result
=> you see query_desc in URL, and if search term is present it is
   highlighted

Signed-off-by: Aurélie <aurelie.fichot@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 21:30:38 +00:00
Galen Charlton
5c4ae8768d Bug 3445: DBRev. 3.15.00.021
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 21:13:14 +00:00
Fridolyn SOMERS
6f728fb050 Bug 3445: add more indexes on the action_logs table
This patch adds database indexes for action_logs table to speed up the
"log viewer" page.

Removes the existing index on timestamp+user to add an index on each
column since search colums are separately defined in log viewer form.

Test plan:
- Update database
- Play with log viewer : /cgi-bin/koha/tools/viewlog.pl
- Perform searches with only one filter defined
- Also check you see indexes with SQL query :
    SHOW CREATE TABLE action_logs

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Rephrased the updatedatabase message a bit:
Add indexes to action_logs table
Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 21:12:04 +00:00
Frédérick
54a17d97dc Bug 11359: Add the borrower's cardnumber and phonenumber to the branch overdues report
The report also known as "Overdues with fines"

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

All tests pass, this adds data to the Patron column on the
overdues with fines report to show the patron's cardnumber
and phone number.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
This works as described and passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 20:25:26 +00:00
Galen Charlton
466cfd2b18 Bug 11343: tweak wording of the syspref editor for MaxItemsForBatch
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 19:17:49 +00:00
Galen Charlton
c5aac4e769 Bug 11343: DBRev 3.15.00.020
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 19:12:19 +00:00
Jonathan Druart
0e8f85a3b3 Bug 11343: The max number of items to process in a batch is hardcoded
Until now, the maximum number of item records to process in a batch was
hardcoded to 1000.
This patch adds a syspref MaxItemsForBatch in order to allow to adapt
this value.

Test plan:
- set the pref to 2
- try to delete a batch of 3 items: they are not displayed
- try to modify a batch of 3 items: you are not allowed to do that
- set the pref to 1000 and try again. Now items are displayed and you
  are allow to modify them.

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2014-03-10 19:10:27 +00:00
Galen Charlton
706e1380f9 Bug 11605: (follow-up) use DT defaults for the new Ajax staged batch page
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 19:07:15 +00:00
Jonathan Druart
e2ef2f51d0 Bug 11605: (follow-up) fix regression
Bug 11314 overrides the iDisplayLength and aLengthMenu values and should
be kept.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 19:07:00 +00:00
Jonathan Druart
bb96da8ff8 Bug 11605: fallback to default DataTables settings where possible
The default entry is 20 and can be apply to all tables.

Bug 11555 apply the menu entries to all tables, redefining it is
uesless and can be removed.

Test plan:
Test pages impacted by this patch and verify there is no regression on
the tables.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 19:05:51 +00:00
Jonathan Druart
8a7c31f766 Bug 11555: (follow-up) use 20 rather 25 for one of the default DT row counts
If you have a look at git grep aLengthMenu, you will see we choose 20
instead of 25.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 18:50:51 +00:00
b80b8fa40f Bug 11555: Make "All" one of the default options for datatables
There are many instances where librarians would like to have the ability
to see all the rows in a datatable at one. It seems prudent to make this
a default option for datatables, rather than change it on a case by case
basis.

Test Plan:
1) View the circulation history for a patron
2) Note you can select to view 10, 25, 50, or 100 entries
3) Apply this patch
4) Reload the circulation history page for a patron
5) Note the new "All" option
6) Verify the "All" option shows all the rows at once

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
I tested the translation for "All"

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 18:49:33 +00:00
Galen Charlton
03338b70e4 Bug 10955: (follow-up) improve usage information
This patch improves rebuild_zebra.pl's usage help
by explaining when --skip-deletes should be considered
and noting that it should be used in conjunction with
a cronjob to process deletions after hours.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 18:46:28 +00:00
b0870311e1 Bug 10955 - Add ability to skip deletions in zebraqueue
It seems that record deletions can cause extreme slowdowns for Koha
installations with extremely large numbers of records. It would be
helpful to be able to skip record deletions when processing the
zebraqueue with rebuild_zebra.pl so the deletions can be processed with
a lower frequency.

Test Plan:
1) Disable any zebra indexing cronjobs you may have
2) Delete a record
3) Note the operation recordDelete in the zebraqueue table having done = 0
4) Run misc/migration_tools/rebuild_zebra.pl -b -z --skip-deletes
5) Note the delete still has done = 0
6) Run misc/migration_tools/rebuild_zebra.pl -b -z
7) Note the delete now has done = 1

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Also tested for authorities, no problems found.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>

RM note: this is at best a work-around, and I will emphasize that
--skip-deletes should be used only when absolutely necessary.

I hope that --skip-deletes can go away at some point soon, but
that may depend on changes to Zebra.
2014-03-10 18:44:10 +00:00
Galen Charlton
67d3985929 Bug 10452: (follow-up) remove duplicate check of damaged status
While reviewing the main patch for this bug to verify that the
holds queue routines and C4::Reserves had the same conception of
when a damaged item could fill a hold request, I noticed that
GetItemsAvailableToFillHoldRequestsForBib() duplicated the code
for adding an SQL clause to filter out damaged items.  This patch
removes the duplication and improves the POD for that routine.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 18:15:44 +00:00
2e6d44bd32 Bug 10452: [QA Followup] - Unit tests
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script. Also checked
  t/db_dependent/Holds.t
  t/db_dependent/HoldsQueue.t

Tested holds triggering with different settings of
AllowHoldsOnDamagedItems. Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 18:15:33 +00:00
cb45d4c218 Bug 10452: make AllowHoldsOnDamagedItems control using damaged items to fulfill holds
AllowHoldsOnDamagedItems will stop item-specific holds from being placed
on damaged items, but does not stop Koha from using damaged items to
fill holds. This seems like incorrect behavior.

Test Plan:
1) Set 'AllowHoldsOnDamagedItems' to "Don't Allow"
2) Pick an item, set it to damaged
3) Place a bib-level hold on this item's record
4) Scan the item though the returns system
5) Koha will ask to use this item to fill the hold, click "ignore"
6) Apply this patch
7) Repeat step 4
8) Koha will not ask to use this item to fill the hold

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 18:15:12 +00:00
e0b13056b2 Bug 11713 - Use new DataTables include in course reserves templates
This patch modifies two course reserves templates to use the new
DataTables include. This simplifies the inclusion of assets and updates
to the latest DataTables version. Also included:

- Adds a sorting filter on the course reserves detail table to excluding
  articles from sorting.
- Corrects the styling of toolbar buttons (buttons should have btn and
  btn-small classes).

To test you must have UseCourseReserves enabled and have multiple
existing courses, at least one of which should have items on reserve.

1. View the list of courses. Table sorting should work correctly. The
   "new course" button should look consistent with other staff client
   toolbar buttons.

2. View the list of reserves on a course.
   - Toolbar buttons should look consistent with other staff client
     toolbar buttons.
   - Sorting should work correctly, excluding sorting on the Edit,
     Remove, and "Other course reserves" columns.
   - Titles on reserve which begin with an article should be sorted
     correctly with article excluded
   - Test sorting with item-level_itypes on and off.
   - Test sorting using a patron whose permissions include various
     combinations of add_reserves and delete_reserves

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

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 17:51:36 +00:00
Galen Charlton
e51b441781 Bug 8918: (follow-up) tidy code and description of CalculatePriority()
This patch improves the formatting and the description of the new
CalculatePriority() routine.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 17:48:54 +00:00
5f8bef581d Bug 8918: (follow-up) support creating brief UNIAMRC bibs in Reserves.t
Changed title and author field for UNIMARC.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested for MARC21, NORMARC and UNIMARC by adding temporary set_preference..

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 17:35:38 +00:00
Julian Maurice
adc09764bc Bug 8918: (follow-up) allow t/db_dependent/Reserves.t to pass if marcflavour is UNIMARC
Set marcflavour to MARC21 to make tests pass.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Works for MARC21. But I would prefer a better fix for UNIMARC.
Will send a follow-up for that.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 17:35:17 +00:00
9b9fd85979 Bug 8918: (follow-up) more unit tests for CalculatePriority
Adding a few unit tests, including the following situations:
Placing a hold when there is a wait.
Placing a hold when there is a future hold.
Calculating priority with future date.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 17:35:00 +00:00
Julian Maurice
52924e7b0e Bug 8918: Add a unit test for CalculatePriority
Rebased on January 29, 2014 (marcelr)
Added text on the two 'is'-statements.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 17:34:50 +00:00
5372082724 Bug 8918: (follow-up) improve descriptions of two related sysprefs
Updating pref descriptions for ReservesNeedReturns and ILS-DI:AuthorizedIPs.
Just sideway related to this report, but not important enough to separate.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 17:34:12 +00:00
Julian Maurice
3e344d7e07 Bug 8918: Fix reserve priority in ILS-DI
The priority of new hold requests was not calculated when using ILS-DI.

A new routine is added, C4::Reserves::CalculatePriority(), to calculate
the priority prior to placing a request.

A separate bug report, 11640, covers the changes in reserves to
use this new routine more generally.

This patch does therefore only affect ILS-DI.

Note: ILS-DI already allows you to generate multiple holds on a biblio or
item for the same patron. This patch does not change that behavior.

Test plan:
[1] Place multiple holds using ILS-DI HoldTitle service:
    /cgi-bin/koha/ilsdi.pl?service=HoldTitle&patron_id=BORROWERNUMBER&bib_id=BIBLIONUMBER&request_location=test
    Check the priority.
[2] Do the same using HoldItem service:
    /cgi-bin/koha/ilsdi.pl?service=HoldItem&patron_id=BORROWERNUMBER&bib_id=BIBLIONUMBER&item_id=ITEMNUMBER
    Check the priority again.
[3] Use a biblio with multiple items. Place item level holds on both.
    Check in one of these items in another branch. Confirm transfer.
    Check in the other item in the original branch. Confirm hold.
    Now you have a waiting and a transit hold.
    Test HoldTitle and HoldItem service again a few times.
[4] Enable AllowHoldDateInFuture and add a future hold.
    Now test HoldTitle and HoldItem again and check if these holds are
    inserted before the future hold (lower priority).

January 29, 2014: Rebased this patch and amended it to make a distinction
between fixing the ILS-DI bug and using the new routine.
Updated commit message and test plan (marcelr).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 17:31:05 +00:00
Galen Charlton
8d76441a4c Bug 11224: (follow-up) clean up unit test for bug 10723
This patch removes the remainder of the old unit test
for bug 10723 and updates the label of the new test that
now checks that SearchOrders({ pending => 1}) omits received
orders.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 16:44:00 +00:00
Galen Charlton
f4251e85fa Bug 11224: (follow-up) apply tidying
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 16:43:56 +00:00
Galen Charlton
b8173f2cd9 Bug 11224: (follow-up) incorporate test for bug 11777
This patch adds authorisedby to the list of expected fields
returned by SearchOrders().

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 16:28:59 +00:00
Mathieu Saby
575aa91ffa Bug 11224 : Add UT to routines of C4::Acquisition returning order(s)
C4::Acquisition need more UT, and more robust ones.  This patch
adds some.

This patch adds UT to
- GetOrder
- GetOrders
- GetCancelledOrders
- GetLateOrders

It refactors UT for SearchOrders

New UT use 2 new routines, used for check the list of fields returned
by a routine:
    _check_fields_of_order
    _check_fields_of_orders
These 2 routines could later be used by other UT

_check_fields_of_order has its own UT (tests n°14,15,16).

to test :
prove -v t/db_dependent/Acquisition.t

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Unit tests pass, passes koha-qa.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa and t

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 16:27:21 +00:00
Mark Tompsett
bf3b1aac7b Bug 11587: get rid of warnings generated by IsSuperLibrarian with anonymous sessions
This corrects line 1250 of C4/Context.pm to be:
    return ($userenv->{flags}//0) % 2;
And thus avoids an uninitialized value used in the modulus.

TEST PLAN
---------
1) Apply the first patch (to update t/Context.t)
2) prove -v t/Context.t
-- This should fail tests 7 and 8
3) Apply this patch (to fix C4/Context.pm)
4) prove -v t/Context.t
-- All tests should succeed

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 16:05:57 +00:00
Jonathan Druart
850e7e5835 Bug 11587 - Add UT for IsSuperLibrarian if flags == 0
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 15:56:22 +00:00
Mark Tompsett
8ee0bc049a Bug 11587 - IsSuperLibrarian generates warnings (UT)
Simply viewing OPAC detail triggers a modulus warning entry.
This first patch adds two test cases to t/Context.t to test for
this situation.

TEST PLAN
---------
1) Apply this patch (to upgrade t/Context.t)
2) prove -v t/Context.t
-- Tests 7 and 8 will fail
3) Apply main patch (to amend C4/Context.pm)
4) prove -v t/Context.t
-- All tests will succeed

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 15:55:12 +00:00
Galen Charlton
5479468948 Bug 10558: (follow-up) choose label for matching records correctly
This patch ensures that the record type of the import batch (i.e.,
biblio or authority) is consulted in order to choose the "Matches
biblio" or "Matches authority" labels.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 15:51:08 +00:00
0713f3bf03 Bug 10558 [QA Follow-up]
This patch addresses a number of issues with the main patch:

- regression on bug 2060 (i.e., displaying authority import batches
  correctly)
- regression on bug 10170 (translation of import record states)A
- use of datatables.inc
- lack of clarity as to the licensing of tools/batch_records_ajax.pl
- insufficent sanitizing of input used to generate an SQL statement

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 15:48:32 +00:00
3f028c72d4 Bug 10558: (follow-up) styling improvements
This patch makes improvements to the default DataTables CSS and corrects
a couple of errors in the original patch. CSS for the "full numbers"
type pagination, used by this and the quotes editor, has been cleaned up
and made more visually consistent with the brief pagination style.

Also changed:

- removed some hard-coded paths containing "http://staff.kohadev..."
- Added a column header to the column showing record match details. This
  provides both information and a clearer target for clicking to resort
- Expanding the default table pager controls for this page and the
  quotes editor (for consistency)
- Correction to quotes.css to fix pager display problem on wide screens

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 15:47:53 +00:00
4d32421634 Bug 10558 - Convert records table in manage-marc-import.pl to Ajax DataTable
Some libraries would like to sort by columns for the records of an
import batch. This seems like a good use of Ajax DataTables.

Test plan:
1) Apply this patch
2) Import a record batch into Koha
   a) Use some form of matching
   b) Have some records that will match and some that won't
   c) Have at least 30 records so you can test the pager
3) Verify the new table is functionally equivalent to the old static one

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

Tests fine and looks good with the exception of the corrections I put in
a follow-up.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 15:46:49 +00:00
15ad3061b2 Bug 11794 - restore functioning of opacSerialDefaultTab
The opacSerialDefaultTab system preference should control whether to
show the holdings or subscriptions tab by default on the detail page for
a serial. This behavior was broken when we last updated jQueryUI because
of a change in the jQueryUI active tab class name.

This patch corrects the class on the detail page and removes the old
class from the authorities detail page (where it was unnecessary
anyway).

To test, view a serial record in the OPAC under various settings of the
opacSerialDefaultTab preference. The default tab should correctly follow
the preference.

Test in prog and Bootstrap themes.

Edit: Rebased on current master. Note that the change to
opac-auth-detail.tt is because the page never has more than one tab,
hence doesn't need the "active" designation.

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested in prog and bootstrap.
All tests and QA script pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 15:29:04 +00:00
Galen Charlton
19e83d9b9f Bug 11860: (follow-up) standardize spelling of "call number"
It is "call number", not "callnumber".

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 15:24:43 +00:00
Julian Maurice
858bcedc1f Bug 11860: Display subscription callnumber in OPAC detail page
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2014-03-10 15:21:28 +00:00