Commit graph

23458 commits

Author SHA1 Message Date
ce71078435 Bug 11008: (RM followup) DBIx schema update
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-13 10:20:08 -03:00
eb2c2bee37 Bug 11008: DBRev 3.19.00.020 2015-04-13 10:20:04 -03:00
Jonathan Druart
742a12e41d Bug 11008: Drop column aqorders.supplierreference
It seems that this column has never been used.

Test plan:
1/ Execute the updatedatabase entry.
2/ git grep supplierreference should not return occurrence in the code (except
in Koha/Schema/*
3/ prove t/db_dependent/Acquisition.t should return green.

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2015-04-13 10:10:43 -03:00
Jonathan Druart
cbd02540f4 Bug 13865: Columns configuration - Orders search
This patch adds the ability to hide columns on the orders search page
(acqui/histsearch.pl).

Test plan:
Go on the orders search page and confirm you are able to hide columns.
You can also play with the columns configuration admin page and confirm
that the behaviors are consistent.

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-13 09:59:16 -03:00
Jonathan Druart
18c6b4e237 Bug 13069 - (follow-up) Enable sort by title to ignore articles
This should affect the relatives' checkouts table too.

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

NOTE: This is the one later in the javascript file.
      Checkout tab on the patron details page.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-13 09:54:47 -03:00
9b44647509 Bug 13069 - Enable sort by title to ignore articles on circulation and patron detail pages
With the conversion of the circulation and patron detail checkout
summary tables to AJAX recently we lost the ability to sort by title
while ignoring articles.

This patch corrects the problem by adding the "anti-the" configuration
to the relevant column in the DataTables initializtion script.

To test, apply the patch and clear your cache if necessary. Check out to
a patron who has multiple checkouts, some of which have titles beginning
with "a," "an," and "the." Sorting those checkouts by title should
ignore articles.

Test the patron detail page for that patron as well.

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

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

NOTE: This is the one early in the javascript file.
      This is the one visible by having multiple checkouts
      where the title excluding the articles is a different
      order than titles including the articles.
      Patrons -> Details (scroll down to check out area, view
      checkouts and toggle the title sort)

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-13 09:54:22 -03:00
653686cee9 Bug 13909: (QA followup) fix references to get_chargeable_units
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-12 10:54:50 -03:00
Jonathan Druart
27dda9782c Bug 13866: Columns configuration - Patrons search
This patch adds the ability to hide columns on the patrons search page
(acqui/lateorders.pl).

Test plan:
Go on the patrons search page and confirm you are able to hide columns.
You can also play with the columns configuration admin page and confirm
that the behaviors are consistent.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Small rebase was needed.
2015-04-10 10:31:21 -03:00
Jonathan Druart
cc119bd856 Bug 13372: Sort is done by DataTables
This patch removes the order by filter on the items lost report.
The sort can now be done by DataTables.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-10 10:22:59 -03:00
Jonathan Druart
03382a089d Bug 13372: Items lost report improvements
This enhancement adds new column to display the call number on the
items lost report.
On the way, DataTables and ColVis are added on the table.

Test plan:
1/ Go on the items lost report (reports/itemslost.pl) and verify that the
call number column is correctly filled.
2/ On the way, verify that the 'Library' and 'Current location' now contain
the name instead of the code.
3/ Go on the columns configuration in the admin module
(admin/columns_settings.pl), play with the ColVis plugin and confirm
that all works correctly.

Signed-off-by: David Roberts <david.roberts@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-10 10:22:53 -03:00
4094a235de Bug 13909: Suspension days calculation should respect finesCalendar
This patch make _debar_user_on_return respect the finesCalendar syspref.

It does so, by replacing the ad-hoc overdue days calculation in favor of
C4::Overdues::_get_chargeable_units (which is renamed C4::Overdues::get_chargeable_units
and exported). There's no behaviour change besides making the calculation simpler
and correct.

To test:
- Set finesCalendar = "directly"
- Have a circulation rule stating:
  interval for calculating fines = 1
  suspension days = 3
- Have the calendar set for sunday and saturday as holidays.
- Checkout an item with a branch/itype/borrower category that matches the defined circ rule with a hand-writen due date to (say) last friday.
- Check the item in
=> FAIL: Notice that the user is debarred using the calendar (skipping saturday and sunday).
- Apply the patch
- Repeat the previous steps
=> SUCCESS: calculation is correct (counting saturday and sunday as overdue days, i.e. 'directly').
- Set finesCalendar = "calendar"
- Repeat the test
=> SUCCESS: calculation is correct (skipping holidays).
- Sign off.

Sponsored-by: Universidad Nacional de Cordoba

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@gmail.com>
2015-04-10 10:19:24 -03:00
Jonathan Druart
eab9af7ee7 Bug 13936: Last patch contained wrong change
One of the 2 changes done in the last patch was not for this bug report.

The tt change was intended for bug 13926.

This patch reverts it.

BE CARE: This should NOT be pushed AFTER bug 13926!

Test plan:
Search for a patron using the 'check out' tab in the circulation module.

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
- use the checkout tab to search for a patron
  not using the autocomplete, but hitting enter
- without the patch, there won't be results
- with the patch there are

Passes all tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-10 10:19:02 -03:00
Jonathan Druart
68e4f96511 Bug 13934: C4::ItemType->get should return undef if no parameter given
The issue: If you try to check in an item with a non existent barcode,
the application will exploded with a software error:
"Can't bless non-reference at .../ItemType.pm Line 64".
It's caused by:
commit 7431f8cfe2
    Bug 11944: Fix encoding issue in C4::ItemType

and the following change:
@@ -105,9 +104,6 @@ sub get {
     my $data = $dbh->selectrow_hashref(
         "SELECT * FROM itemtypes WHERE itemtype = ?", undef, $itemtype
     );
-    if ( $data->{description} ) {
-        $data->{description} = Encode::encode('UTF-8', $data->{description});
-    }

because of the following:
  my $s;
  $s->{foo} = "bar" if $s->{foo};
  use Data::Dumper;warn Dumper $s;
=> {} # not undef

So later,
  bless $opts => $class;
will fail because $opts is undef and was not (i.e. {}) before.

More explicit test plan:
1) Log in to staff client
2) Circulation -> Check in
3) Type a non-existent barcode into 'Enter item barcode:' textbox
4) Click 'Submit'
   -- Should receive nasty error.
5) apply patch
6) repeat steps 2-4
   -- Should be told 'No item with barcode: {what you typed}'
7) prove -v t/ItemType.t
   -- All tests should run successfully.
7) run koha qa test tools

Note: Having tried to create and use an itemtype '0', this only
      demonstrates a lack of validation on the itemtype creation
      screen. Unable to use it without tweaking back end.
      That is beyond the scope of this bug.

Note for QA: C4::ItemType->get is only uses in circ/return.pl. So even
if the behavior is changed, it should not introduce any regression
somewhere else.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as expected. Fixes the problem and no regressions found.
It even has regression tests :-D

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-10 10:18:07 -03:00
Jacek Ablewicz
7c2fad1baf Bug 10906 - Reimported records into Koha are imported only as DEFAULT frameworks, not what they were originally
Existing framework code is currently not retained when local record
gets replaced during batch import, or when the restore/reverse function
is being used.

This patch fixes aforementioned issues by correcting outdated GetBiblio()
calls in C4/ImportBatch.pm

To test:

1/ try to replicate the issue: import some MARC records with
"Tools -> Stage MARC records for import" etc., using test setup,
matching rules and so on such that some existing records will get
replaced with imported ones
2/ observe that records replaced during import now open in the editor
with 'Default' framework, even if they have some other framework
set up previously
3/ apply patch
4/ redo 1/, confirming that this problem is no longer replicable
5/ try use 'restore' function with some freshly imported
records, ensure that original framework code got retained
in the records which had their imports reverted

NOTE: I confirmed this change by
1) git grep "=\s*GetBiblio\s*("
   -- this shows how GetBiblio is called elsewhere.
      It differed! So then...
2) vi C4/Biblio.pm
   /sub GetBiblio
   -- find the right one, notice it only returns a HASH ref,
      not an array.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-09 15:05:11 -03:00
Marc Véron
4f60138080 Bug 8796 - patron cards not starting on designated card
The patron cards always printed from position 1 on the print form, because patroncards/create-pdf.pl expected start_label as parameter and got star_card instead.

To verify and test:
1)
Go to Home > Tools >Patron card creator >Manage batches
2)
Select a batch anc click "Export"

3)
Set "Enter starting card number" e.g. to 5
4)
Export
5)
Download PDF and view it

Result: The first card is always printed on position 1 (top left) instead of position 5.

Apply patch
Repeat steps above
Step 3) should now read "Enter starting card position"

Result after step 5)
The first card ist printed at the correct position on the printing form.

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

Works as expected

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

Rebased for current master and tested. /MV

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-09 14:42:43 -03:00
0ab2ebfc59 Bug 13349 [QA Followup]
I don't think we need the library label. Also switched to displaying the
library name, rather than just the branchcode.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-09 12:07:27 -03:00
David Roberts
816508dcd1 Bug 13349 - Allow library code to display against users pending changes -update screen
http://bugs.koha-community.org/show_bug.cgi?id=13349

To test:
Ensure OPACPatronDetails is set to enabled
Apply the patch
Log into the OPAC and update your patron details (address, phone number etc)
Log into the staff client and view pending patron changes.
The branchcode of the library to which the patron belongs should display next to the user's name.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-09 12:07:20 -03:00
Olli-Antti Kivilahti
3da4fe2747 Bug 13611 - Serial enumeration not visible in the opac-user.pl when browsing own holds.
Having placed holds on Serial Items with an enumchron, and browsing the
opac-user.pl's "Holds"-tab, the user cannot see which numbers of
magazines/serials he has on hold.

This patch appends the koha.items.enumchron after the title component in the
opac-user.pl's Holds-view.

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-09 12:05:36 -03:00
1682815580 Bug 13166 - add all restrictions purge to cleanup_database.pl
Bug 12760 adds the ability to purge expired restrictions older than some days.

But if you want to purge all expired restrictions, using "--restrictions 0" does not work, it's like "--restrictions" so it uses default purge days.

This patch adds a new option "--all-restrictions" to purge all expired restrictions.

Test plan :
- Select a borrower
- Create a restriction with expiration date in the futur
- Create a restriction expired since 1 day
- Create a restriction expired since 10 days
- run without argument "misc/cronjobs/cleanup_database.pl"
=> You see help text for --all-restrictions option
- run "misc/cronjobs/cleanup_database.pl -v --restrictions --all-restrictions"
=> You get the message : You can not specify both --restrictions and --all-restrictions
- run "misc/cronjobs/cleanup_database.pl -v --restrictions 30"
=> no restriction is removed
- run "misc/cronjobs/cleanup_database.pl -v --restrictions 9"
=> restriction expired since 10 days is removed
- run "misc/cronjobs/cleanup_database.pl -v --all-restrictions"
=> restriction expired since 1 day is removed

Signed-off-by: Larry Baerveldt <larry@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-09 11:59:41 -03:00
Julian FIOL
7a94c50fa6 Bug 13940 : (QA followup) Add test for ModOAISet
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-09 11:56:53 -03:00
Julian FIOL
9be1d927bb Bug 13940 : (QA followup) Add tests for the 2 warnings which was not tested
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-09 11:56:47 -03:00
Julian FIOL
975b055c08 Bug 13940 : Testing C4::OAI::Sets
Testing C4::OAI::Sets in t/db_dependent/OAI/Sets.t
Adding &DelOAISetsBiblio in @EXPORT at the beginning
of OAI/Sets.pm, it was the only one missing

TEST PLAN
---------

1. Apply patch
2. prove -v t/db_dependent/OAI/Sets.t
-- All 145 tests should run successfully without any error or warning
3. Run koha qa test tools
   -- No issues found.

Additionally, I comfirmed why DelOAISetsBiblio was added in
the list of exported functions.

$ grep "^sub " C4/OAI/Sets.pm | sort > check1
$ for i in `grep "\&[A-Z]" C4/OAI/Sets.pm | xargs `; do echo $i; done | sort > check2

Of course the outputs have a little extra around them, so
$ vi check1
$ vi check2
$ diff check1 check2

Lo and behold, it was that one function. Necessary for 100% coverage.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-09 11:56:41 -03:00
bde795f8fa Bug 13939: ILS-DI function GetServices doesn't work when the item/biblio is available for hold for specific patron
Test plan:
1) Enable ILS DI (system preference 'ILS-DI')
2) Try to access the URL
http://<your_opac_url>/cgi-bin/koha/ilsdi.pl?service=GetServices&patron_id=<borrowernumber>&item_id=<itemnumber>
Choose the patron and item to be available for hold
You'll see an error instead of valid XML response
3) apply the patch
4) try to access the same URL, you should see valid XML response with services "title level hold" and eventually "item level hold" returned

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-08 15:16:14 -03:00
Nick Clemens
3e136b4f9f Bug 13800 - Diacritics not mapped
This patch adds a mapping for the lower case ð character to word-phrase-utf.chr ( Ð was already mapped to d)

To test:
1. Add a record with the  ð character (Arnaldur Indriðason is an example author)
2. Rebuild zebra
3. Search for your record using d instead of ð and verify it is not found
4. Apply patch and copy word-phrase-utf.chr to the appropriate folder
5. Restart and rebuild zebra
6. Search for your record using d instead of ð and verify it is found

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-08 15:13:46 -03:00
Jonathan Druart
fc100688a4 Bug 6950: Hide the resort option when searching for a tag
If you click a link from the Tag Cloud, the results page offers the
usual select menu to resort your results. However, doing so resubmits
the search as a standard keyword search.

Test plan:
1/ Click on a tag
2/ Confirm that the resort dropdown list does not appear.

Dropdown list disappears with tags 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-04-08 15:09:23 -03:00
05d57a1880 Bug 13896: (QA followup) fix koha-{stop|restart}-zebra too
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-08 14:56:44 -03:00
Jonathan Druart
94836adbfb Bug 13875: Columns configuration - Allow underscore in table name
This is a bug fix for bug the columns configuration feature, and
specialy for bug 13864.

Test plan:
Apply patches on bug 13864 and save columns for the late orders (in the
columns configuration admin page).
Confirm that they are correctly saved.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-08 14:51:59 -03:00
Jonathan Druart
53b3eebf5c Bug 13864: Fix height for Colvis entries
On the late orders page, the "Show/hide columns" displays the "estimated
delivery date" is a litle bit to long and overflows between 2 lines.

This patch fixes the height to 100%.

Test plan:
Go on the late orders page and confirm the "estimeated delivery date"
entry is correctly displayed.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-08 14:51:16 -03:00
Jonathan Druart
31df389337 Bug 13864: Columns configuration - Late orders
This patch adds the ability to hide columns on the late orders page
(acqui/lateorders.pl).

Test plan:
Go on the late orders page and confirm you are able to hide columns.
You can also play with the columns configuration admin page and confirm
that the behaviors are consistent.

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

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

http://bugs.koha-community.org/show_bug.cgi?id=13875
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-08 14:51:09 -03:00
Jonathan Druart
9bb2dc2ed7 Bug 2542: Replace default value "0" with ""
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-08 14:48:17 -03:00
Jonathan Druart
0e279fb2e0 Bug 2542: Validate the amount of a manual invoice/create
If a manual invoice/credit amount is not correctly set, it should not be
accepted.

Test plan:
Try to create a manual invoice and a manual credit with an amount containing
something else than numbers.
It should not be possible.

Followed test plan. Patch behaves OK, including that negative values are not allowed.
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-04-08 14:48:12 -03:00
Attila Kinali
c4a4575923 Bug 13896: Fix pid file creation, use proper directory instead of /tmp/
daemon uses by default /tmp/ for pid files, if they are unspecified.
Pass the right directory to daemon, so it knows where to put the pid file.

Signed-off-by: Attila Kinali <attila@kinali.ch>

TEST PLAN
---------
1) Roll a distribution and confirm it works.

OR

1) Hack all the /var directories to point to git directories
2) Add a dummy user for the instance name
3) sudo the script with the faked instance name.
   -- the daemon should be running and the pid file should be in
      the expected directory.

The first way is the proper way to test, I did the latter. :)

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-08 14:47:46 -03:00
2fa0f6f4ab Bug 11239 - show hour of due date in history circulation
The circulation history page (Patron -> Circulation history) does not
show the time when displaying the date of checkout, due date, and check
in. This patch adds the "with_hours => 1" flag to the KohaDates filter.

To test, apply the patch and view the circulation history page for a
patron with good circulation history data. Confirm that dates are
displayed correctly with times and that date sorting still works
correctly.

Signed-off-by: marjorie <marjorie.barry-vila@ccsr.qc.ca>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-08 12:21:05 -03:00
565b97924e Bug 13882: Tidy t/Borrower.t to fix whitespace errors
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-08 12:19:15 -03:00
Julian FIOL
49d16fe062 Bug 13882 : Adding new unit tests in t/Borrower.t
This adds testing for all the 'borrower' database fields.

TEST PLAN
---------
1) apply patch
2) prove -v t/Borrowers.t
   -- All 67 subtests for both the setter and accessor
      should run successfully.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-08 12:17:57 -03:00
Mark Tompsett
e8b8fb3519 Bug 13928: Clean up noisy t/Borrower.t tests
While testing bug 13882, noisy messages were noticed. Also,
Test::Warn was used, but no catching attempts were made. This
patch solves that problem.

TEST PLAN
---------
1) prove -v t/Borrowers.t
   -- There should be three noisy lines.
2) apply patch
3) prove -v t/Borrowers.t
   -- There will be 3 more tests and no noisy lines.
4) Run koha qa test tool
   -- There should be no issues.

NOTE: This will conflict with bug 13882 if either gets pushed
      to master, but fixing the conflict should be easy enough.

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-08 12:09:01 -03:00
Matthias Meusburger
bb63ef6a2e Bug 13507: Add intranet support for CAS authentication
This patch allows to use CAS authentication for intranet login.

 It works exactly the same as the OPAC login, except that the
 staffClientBaseURL syspref must be set for intranet login
 (like OPACBaseURL must be set for OPAC login).

Signed-off-by: Koha Team AMU <koha.aixmarseille@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-08 12:04:26 -03:00
Matthias Meusburger
c3ff4298fc Bug 13507: (regression test) Intranet URL returned by C4::Auth_with_cas::_url_with_get_params
C4::Auth_with_cas::_url_with_get_params should return the right
URL for intranet.

Signed-off-by: Koha Team AMU <koha.aixmarseille@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Edit: added a proper commit message. Sort of :-P
2015-04-08 12:02:26 -03:00
Jonathan Druart
c16e19b3fd Bug 7561: Redirect to the add items form if it's a fast cataloging
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@gmail.com>
2015-04-08 11:22:53 -03:00
Jonathan Druart
b3183f16e5 ug 7561: Fast cataloging - Allow add/edit items and delete record
With the fast cataloging permission, a librarian was not able to
add/edit items and to delete a record with the FA framework.

This patch fixes that.

Test plan:
0/ Set the permission fast_cataloging (and only this one under
editcatalogue) to a librarian
1/ Log in with this account
2/ Go to Circulation > Fast cataloging
3/ Confirm you can create a record
4/ Save and confirm you can create items
5/ Confirm you are able to edit items, remove all of them and delete the
record.
6/ Make sure it only works for records with the FA framework code.

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@gmail.com>
2015-04-08 11:22:44 -03:00
Jonathan Druart
2a8f84817f Bug 8246: Allow deleting record if no more items
The "Delete records if no items remain" was only available if the batch
did not contain "too many" items (see MaxItemsForBatch).
This limitation does not make any sense.

Test plan:
1/ Set MaxItemsForBatch=10
2/ Use the batch item deletion to delete 10+ items
3/ Confirm the checkbox "Delete records if no items remain" is displayed
4/ Check it
5/ Launch the job
6/ Run koha qa test tools

Verify that the records without items have been deleted also.

NOTE: My test db only had two biblios with items, so I set
      MaxItemsForBatch=1.
      Before patch, checkbox did not display.
      After patch, checkbox did display.
      This patch merely moves one line out of the IF/ELSE/END
      block, and reindents for more readability. Though, there
      is a missing <p> if you want to get picky.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-08 11:10:28 -03:00
Abby
80ffd8354b Bug 10887: Batch item deletion -- doesn't need Use default values section
To test:
1. Go to Home > Tools > Batch item deletion
2. Notice that there is an unnecessary option for "use default values
section" to "Populate fields with default values from default work"
3. Apply the patch.
4. Check that this section has disappeared.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-08 11:09:08 -03:00
Katrin Fischer
ab326b368b Bug 13380: Follow-up - only run database update, when it hasn't been run already
As the ORDER_CANCELLATION_REASON authorised value has been
backported to 3.18.5, we need to make sure that the database
update is only run once.

This patch adds a check for the existance of the authorised
value in order to decide if the databaes update can be run.

To test:
- Create a branch 3.19.00.016
- Make sure you have a few orders where the cancellationreason
  is set (cancel an order, enter a reason)
- Update your branch to master + this patch
- Run the web installer
- ORDER_CANCELLATION_REASON authorised value category is created
- Reset your system preference Version to 3.19.00.015
- Run database update again - no changes are made, all is fine

Or:
- Create a branch 3.18.04 with cancelled orders
- Update to latest 3.18.x
- Make sure ORDER_CANCELLATION_REASON has been created
- Dump database
- Switch to master without this patch
- Run update - verify more O_C_R were created (bad)
- Load database
- Update to master with this patch
- All should be fine

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2015-04-08 11:08:20 -03:00
Jonathan Druart
56a147da32 Bug 7480: Don't display current logged in user as basket manager
The "Managed by" field displayed on creating/editing an order is always
the name of the logged in user.

To reproduce:
1/ Log in with patron A
2/ Create a basket
3/ Create an order
4/ Log in with patron B
5/ Edit the order
6/ The "Managed by" line is "patron B"

Test plan:
Apply the patch and confirm that the "patron A" is always the basket
manager.

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@gmail.com>
2015-04-08 11:07:29 -03:00
Jonathan Druart
0526eb4dfb Bug 13879: Fix sort on patron search (guarantor and linked to orders)
This patch fixes a regression introduced by bug 13021.

Test plan:
1/ Go on a child detail page > edit
2/ Click on "Set a patron" as a guarantor
3/ Launch a search a confirm that you are able to sort on card, name and
date of birth.
Note that the Address column is not sortable (it's a limitation, could
be fixed later).
4/ Go on the acquisition module, create an order.
5/ Click on the "Add user" button.
6/ Launch a search a confirm that you are able to sort on card, name and
category

Without patch, I could not sort on names. With patch, sorting works as dexcribed in Test plan

Signed-off-by: Marc Veron <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-08 10:52:37 -03:00
Jonathan Druart
4fb73b9abf Bug 13923: The prefetch used on existing constraint
The belongs_to constraint has been removed by bug 13713.
Not sure if it was a good idea, but atm the easy and quick way is to
remove the prefetch.

Test plan:
Go on the circulation page, holds tab
Confirm that there is no regression
(Same on the patron details page > Holds tab)

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-04-08 10:52:10 -03:00
Jonathan Druart
a6facaa534 Bug 13850: Fix typo in C4::Ris
In C4/Ris.pm:
  @field_list = ('600', '601', '602', '604', '605', '606','607', '608',
  '610', '615', '620', '660'. '661', '670', '675', '676', '680', '686');

Note the
  '660'. '661'
instead of
  '660', '661'

Test plan:
Add a 660 and 661 field to a record and export it in RIS
The 660 and 661 field should be displayed (after "KW").

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-08 10:45:40 -03:00
Marc Véron
0700afa796 Bug 13954 - Patroncards: images show inadequate rough pixelation
This patch provides a much better quality of images on patron cards.
It inserts images at a higher resolution into the PDF file and then scales it down internally in PDF.

Additionaly, the patch removes the follwing warning:
"my" variable $template masks earlier declaration in same scope at /usr/share/kohaclone/patroncards/create-pdf.pl line 66

To test:

- Create patron cards, save them as PDF and display them with a PDF viewer, e.g. at 400%
- Without patch, the images are very pixelated.
- Apply patch
- Verify that in the PDF the images now display with a much better quality.

Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-08 10:44:50 -03:00
8905857a47 Bug 12210 - Baker & Taylor book jackets not disabled when BakerTaylorBookstoreURL is not populated
The description of the BakerTaylorBookstoreURL syspref says
"Baker and Taylor "My Library Bookstore" links should be accessed at
https://   isbn (this should be filled in with something like
ocls.mylibrarybookstore.com/MLB/actions/searchHandler.do?nextPage=bookDetails&parentNum=10923&key=).
Leave it blank to disable these links."

Leaving this syspref blank does not disable the links. Instead, they are
populated without the bookstore URL: the cover image for ISBN 1575725738
will cause koha to make a request to http://1575725738, which will, of
course, time out.

Leaving BakerTaylorBookstoreURL blank should disable any URL that
depends on this syspref, as stated in the syspref description.

Test Plan:
1) Apply this patch
2) Enable Baker & Taylor cover images, but *not* BakerTaylorBookstoreURL
3) Perform an OPAC search where you have B&T cover images in the results
4) Note the image links now direct you to the record details

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Only affects Baker & Taylor related parts of the code.
Read the code carefully, but couldn't test in the OPAC.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-08 10:09:45 -03:00
c76fbbe191 Bug 13908 - Checkouts table sorting is not honoring default sort preferences
The checkouts table no longer honors the system preferences
todaysIssuesDefaultSortOrder and previousIssuesDefaultSortOrder.

This causes much frustration for librarians who prefer a different sort
order. In particular, many librarians prefer to see the oldest previous
issues at the top of the list so those overdue items are visible "above
the fold".

Test Plan:
1) Apply this patch
2) Find a patron with many previous checkouts due on different days
3) Try all 4 combinations of todaysIssuesDefaultSortOrder and previousIssuesDefaultSortOrder
4) Note they all sort correctly

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-04-08 10:09:04 -03:00