]> git.koha-community.org Git - koha.git/log
koha.git
10 years agoBug 11489: (OPAC prog theme) show facets only if there is a result to display
Jonathan Druart [Thu, 9 Jan 2014 16:53:04 +0000 (17:53 +0100)]
Bug 11489: (OPAC prog theme) show facets only if there is a result to display

If all results are hidden, the facets are displayed.
With this patch, the facets are hidden too.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Michot <nmichot@voila.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script. Tested:

- Record with 1 lost item, result list = 1
  - Verified without both patches 404 error page is shown
  - Verified with 1st patch, no results page is shown
  - Verified with 2nd patch, the still showing facets are gone
- Record with 1 lost item, result list > 1
  - Record is hidden from result list, but
    - result count is wrong
    - result numbering is wrong
    > This is an old problem, just noting
- Record with 1 lost and 1 available item, result list = 1
  - Detail page is shown, only lost item is hidden
- Record with 1 lost and 1 available item, result list > 1
  - Only available item is shown in result list

Also checked that the lost item shows up with hidelostitems off.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 65fb03c0f439fdc8bef7ce0359afa75598c39147)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11489: in OPAC search, display "no results" when the only search result is suppressed
Kyle M Hall [Tue, 7 Jan 2014 17:19:37 +0000 (10:19 -0700)]
Bug 11489: in OPAC search, display "no results" when the only search result is suppressed

If hidelostitems is enabled, and the result of an opac search is a single
lost item, then the OPAC will display a 404 error, rather than a
"no results" screen.

Test Plan:
1) Catalog a record/item such that it is the only result for some search
   e.g. Give it the title 'zxcvb'
2) Enable hidelostitems
3) Mark this item as lost
4) Perform an OPAC search that should result in a redirect to this record
5) Notice you a redirected to a 404 error
6) Apply this patch
7) Repeat step 4
8) Note you new get a "No results found!" page instead

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Michot <nmichot@voila.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 2277a42c565e18475c49fde031268b8038575e1a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10138: (follow-up) FIX sql errors
Jonathan Druart [Tue, 24 Dec 2013 08:58:38 +0000 (09:58 +0100)]
Bug 10138: (follow-up) FIX sql errors

There were 2 INSERT in error.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I have gone ahead and fixed the typo pointed out by Mathieu:
Endommadgé-> Endommagé

Sample files install without problems, tests look good.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e81513199cba41a254820347442719a6fd50ec0b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10138: Add some authorized values in French installer; small fixes in frameworks
Mathieu Saby [Sun, 28 Apr 2013 17:06:11 +0000 (19:06 +0200)]
Bug 10138: Add some authorized values in French installer; small fixes in frameworks

This patch adds some categories of values in French installer :

- SUGGEST
- OPAC_SUG
- REPORT_GROUP
- LOST
- DAMAGED

SUGGEST and OPAC_SUG are used by Suggestions module.
REPORT_GROUP is used by Reports module.

It also adds a new status for "ETAT" (en commande)

It creates a 995$2 subfield in french frameworks when it did not exist.
It links existing 995$2 subfield with LOST category.

It cleans up the list of authorised values installed with "Lecture
publique" framework :

- some codes are moved in general 1-Obligatoire/authorised_values.sql
  (SUGGEST, REPORT_GROUP)
- some are suppressed, because they are also defined in
  1-Obligatoire/authorised_values.sql (langue, COUNTRY, statut)
- the code for inserting the ones left is changed (I suppress the `id`
  column)

To test :
1. Take a fresh new Koha
2. Install Koha choosing French installer and UNIMARC Lecture publique
3. Check the authorised values are imported
4. Check the cataloguing frameworks are usable :
   especially 995 $2 field, which must be mapped with LOST values :
   Perdu, Long retard, Perdu et remboursé, Introuvable
   you can also check 101$a (language codes), 102$a (country codes)
5. In OPAC, make a suggestion. See if you can select a cause for your
   suggestion ("Bestseller" or "'L'exemplaire en rayon est endommagé")
6. In staff interface, manage some suggestions. See if you can select a
   cause for rejection or acceptation ("Bestseller", "Budget
   insuffisant" etc)
7. In reports, see if you can sort reports according to values of
   REPORT_GROUP ("Circulation", "Catalogue", "Adhérents" etc)

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comments on second patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e5fe771cc9ebab7980cac27216d553952cb60277)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12098: (follow-up) put can_show_subscription() into use
Galen Charlton [Fri, 18 Apr 2014 20:47:48 +0000 (20:47 +0000)]
Bug 12098: (follow-up) put can_show_subscription() into use

This patch puts C4::Serials::can_show_subscription() into use.

Note that there is user-visible change: if a subscription has a
blank library, all users with serials permissions will be able
to view and/or edit it.  It remains to be determined whether
we *want* such subscriptions to exist, or if they should only
be tied to specific libraries.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit dc6d8a2199f79e36839a2769994883e04b61cb67)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12098: (follow-up) deal with FIXMEs in t/db_dependent/Serials_2.t
Galen Charlton [Fri, 18 Apr 2014 20:17:27 +0000 (20:17 +0000)]
Bug 12098: (follow-up) deal with FIXMEs in t/db_dependent/Serials_2.t

This patch nails down the number of tests to be run.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit be3ce1e7a2477b02d4c071543405898c21380926)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12098: Refactor can_*_subscription in C4::Serials
Jonathan Druart [Wed, 16 Apr 2014 14:58:36 +0000 (16:58 +0200)]
Bug 12098: Refactor can_*_subscription in C4::Serials

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested on top of patches for 12048 and 12080.

Subscription search
- superlibrarian, IndyBranches on/off - always sees all subscriptions
- superserials, IndyBranches on/off - always sees all subscriptions
- no superserials, IndyBranches on - only sees own subscriptions
Note: Subscriptions without branches will only show, when all subscriptions
      are visible. In a future enh it might be good to enforce setting a
      branch, when IndyBranches is used.
- no superserials, IndyBranches off - always sees all subscriptions

Subscription editing
- superlibrarian, IndyBranches on/off - can edit all subscriptions
- superserials, IndyBranches on/off - can edit all subscriptions
- no superserials, IndyBranches on - can only edit own subscriptons and
  subscriptions without branch
  NOTE: it would make sense to also allow Edit > Edit as new (duplicate)
  here, so one can copy the subscription from another branch to modify
  it for the own branch.

Passes tests in t, xt and QA script, also newly provided unit tests.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4d78b9588a9f5fc68142b9d1556686072e7b5dba)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12098: Fix C4::Serials::can_edit_subscription
Jonathan Druart [Wed, 16 Apr 2014 14:50:23 +0000 (16:50 +0200)]
Bug 12098: Fix C4::Serials::can_edit_subscription

This patch fixes a problem whereby staff users could
edit subscriptions they are not permitted to by going directly
to the subscription details page.

It also adds some unit tests for the can_edit_subscription routine
and add a new can_show_subscription routines.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Notes on second patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4f7803e469a41cafb993c6d41e6481499e6cca93)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12080: (follow-up) fix test failure and warnings in Bookseller.t
Kyle M Hall [Fri, 18 Apr 2014 12:27:35 +0000 (08:27 -0400)]
Bug 12080: (follow-up) fix test failure and warnings in Bookseller.t

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes the tests as promised.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b772969cddce53d72bfd27bfda0ee094b1332e9d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12080: restore effect of superserials permission
Frédéric Demians [Tue, 15 Apr 2014 08:10:07 +0000 (10:10 +0200)]
Bug 12080: restore effect of superserials permission

The superserials permission is meant to allow an operator
to see all subscriptions regardless of branch when IndependentBranches
is on without having to have full superlibrarian permissions.  This
patch restores this behavior.

TEST PLAN
---------
1) Apply the patch for bug 12048 (as needed -- it may be pushed)
2) Ensure you have two users: superlibrarian, non-superlibrarian
   with all access to the staff client except superserials.
3) Ensure you have serials belonging to a different branch than
   the non-superlibrarian.
3) Log into staff client as superlibrarian
4) Click 'Serials'
5) Click the 'Submit' button in the search area.
   -- note the number of results.
6) Log into staff client as non-superlibrarian
7) Click 'Serials'
8) Click the 'Submit' button in the search area.
   -- note the number should be less, note the number.
9) Give the non-superlibrarian superserials access.
10) Home -> Serials
11) Click the 'Submit' button in the search area.
   -- the number will still be the same at the one in step #8.
12) Apply the patch
13) Refresh the page
   -- the number should now match the one in step #5.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f0e574be4a834b28b0e19f2964f5de989f0e6665)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12048: restore ability of superlibrarian to see other libraries' subscriptions
Frédéric Demians [Tue, 8 Apr 2014 15:26:18 +0000 (17:26 +0200)]
Bug 12048: restore ability of superlibrarian to see other libraries' subscriptions

This patch fixes a regression in master and 3.14. When a user has
superlibrian permissions, a search on serials subscriptions should
display other libraries' subscriptions even when IndependentBranches
syspref is enabled.

To reproduce/test the bug/patch:

1. Enable IndependentBranches (i.e. 'Prevent' staff...)
2. Login as a user not having superlibrarian permission
3. Search for a serial subscription on:
   /cgi-bin/koha/serials/serials-search.pl
4. Search a title which has at least 2 subscriptions: one in the user
   branch, and one in another branch
5. On the result page, just 1 subscription is displayed: the one
   attached to the userbranch
   => this is normal
6. Login as a user having superlibrarian permission
7. Repeat step 3-5.
8. You get the same result as 5. You should have seen all subscriptions.
   That's what you get after applying this patch.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
NOTE: I tested a variation. My superlibrarian was a branch that
      was not the same as the non-superlibrarian. The serial was
      the same branch as the non-superlibrarian. Without the
      patch, the superlibrarian saw nothing, with the patch it
      saw the serial as expected.
      Also, remember the superserials permission can affect the
      results. I successfully changed the branch of the
      subscription, and then it ceased to show up with
      superserials not granted to the non-superlibrarian.
      I corrected the system preference name in the text here.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Superlibrarian permission now allows to see all subscriptions
independent from the branch.
Passes all tests and QA script.

But the superserials permission appears broken to me before
and after this patch. If I have superserials - the search
doesn't show all subscriptions. If I don't have superserials
I can still edit any subscription accessing the subscription
detail page through the serial collection page or accessing
the detail page directly by manipulating the URL.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 214d6b8d13c553027c868a00a2dd6b313f56608b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12048: add regression test
Galen Charlton [Fri, 18 Apr 2014 19:56:51 +0000 (19:56 +0000)]
Bug 12048: add regression test

This patch adds a regression test for verifying that superlibrarians
can see all subscription when IndependentBranches is on.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9af0aa288c23a6722333adebba7b8b3e12ed78e2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11587: get rid of warnings generated by IsSuperLibrarian with anonymous sessions
Mark Tompsett [Tue, 21 Jan 2014 05:41:00 +0000 (00:41 -0500)]
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>
(cherry picked from commit bf3b1aac7b7bc422bea26bb2c045be69d93ef0bf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11587 - Add UT for IsSuperLibrarian if flags == 0
Jonathan Druart [Fri, 24 Jan 2014 12:00:37 +0000 (13:00 +0100)]
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>
(cherry picked from commit 850e7e58352fd1fcb2772308cbfc6375b6a45735)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
t/Context.t

10 years agoBug 11587 - IsSuperLibrarian generates warnings (UT)
Mark Tompsett [Tue, 21 Jan 2014 05:34:43 +0000 (00:34 -0500)]
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>
(cherry picked from commit 8ee0bc049a183e795fc37608a4b3790d4aef2267)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
t/Context.t

10 years agoBug 7002: fix some invalid superlibrarian permission checks
Galen Charlton [Mon, 30 Dec 2013 16:05:51 +0000 (16:05 +0000)]
Bug 7002: fix some invalid superlibrarian permission checks

This patch fixes a problem where if a staff user has superlibrarian
permissions, but also has module-specific permissions, they are
prevent from editing item records that they should be allowed to.

To test:

[1] Turn on IndependentBranches.
[2] Register a superlibrarian staff user at branch A.
[3] Give that new account at least one other module-level
    permission.  This cannot be done through the user interface,
    however, but can be done via SQL:

    UPDATE borrowers SET flags = 3 WHERE userid = 'XXX';

[4] Log in as that new superlibrarian.
[5] Bring up the item details (catalogue/moredetail.pl) page for
    an item at branch B.  Note that there is no 'Edit Item' link.
[6] Similarly, try editing that item (cataloging/additem.pl).  Note
    that the edit form forbids you from touching the item.
[7] Finally, try editing that item using the Tools | Batch item
    modification utility.  Note that it doesn't allow you to do so.
[8] Apply the patch.
[9] Repeat steps 5 through 7.  This time, the item actions should
    be allowed.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes QA script and test suite.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit bb750253644e0ba6ea04e36c80088626e8163bf2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10277: (follow-up) if no userenv is set, act like a superlibrarian
Galen Charlton [Mon, 30 Dec 2013 18:50:04 +0000 (18:50 +0000)]
Bug 10277: (follow-up) if no userenv is set, act like a superlibrarian

This patch fixes an error caught by t/db_dependent/Acquisition.t, and
adjusts C4::Context::IsSuperLibrarian() to return true if no
userenv is set. This is done on the basis that if no userenv is set,
calls to C4::Context routines are being made from a command-line script,
and if you have access to the command line of a running Koha instance,
you implicitly already have better than superlibrarian access.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 71b7d5629878bd5616dbb1db263a8fd943d3f7b9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10277: Add UT for C4::Context::IsSuperLibrarian
Jonathan Druart [Wed, 18 Dec 2013 15:12:00 +0000 (16:12 +0100)]
Bug 10277: Add UT for C4::Context::IsSuperLibrarian

Note that I modify the return value. Before this patch, it returned an
empty string or 1. Now it returns 0 or 1.

Test plan:
- same as the original patch
- verify that unit tests pass:
    prove t/Context.t

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script, including new tests.
Checked the code and tested superlibrarian behaviour in some places:

moremember.pl:
With IndyBranches only superlibrarian can delete borrowers from
other branches. Accessing the borrower with a direct link.
OK

C4/Members.pm
With IndyBranches only superlibrarian can search for borrowres
from other branches.
OK

tools/holidays.pl
With IndyBranches only superlibrarian can edit holidays for other
branches.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 3e866d216db008e1ed8c8614f6758ad5118321df)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10277 - Add C4::Context->IsSuperLibrarian()
Kyle M Hall [Wed, 15 May 2013 15:04:07 +0000 (11:04 -0400)]
Bug 10277 - Add C4::Context->IsSuperLibrarian()

The method of checking the logged in user for superlibrarian privileges
is obtuse ( $userenv && $userenv->{flags} % 2 != 1 ) to say the least.
The codebase is littered with these lines, with no explanation given. It
would be much better if we had one subroutine that returned a boolean
value to tell us if the logged in user is a superlibrarian or not.

Test Plan:
1) Apply this patch
2) Verify superlibrarian behavior remains unchanged

Signed-off-by: Joel Sasse <jsasse@plumcreeklibrary.net>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comments on second patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit fb4025b67b45e60154f67b9acca3d56e4f5eb7c5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11699: (follow-up) update one more test that uses ModReceiveOrder
Galen Charlton [Sat, 19 Apr 2014 15:39:52 +0000 (15:39 +0000)]
Bug 11699: (follow-up) update one more test that uses ModReceiveOrder

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e7433b970ce9187b8b073b9b2581950308dce22a)

10 years agoBug 11699: (follow-up) fix errors in the POD for ModReceiveOrder
Galen Charlton [Sat, 19 Apr 2014 15:12:08 +0000 (15:12 +0000)]
Bug 11699: (follow-up) fix errors in the POD for ModReceiveOrder

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 5629f4bc252698a102a1b581c3db0be124a4474a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11699: change ModReceiveOrder to used named parameters
Jonathan Druart [Wed, 5 Mar 2014 12:23:07 +0000 (13:23 +0100)]
Bug 11699: change ModReceiveOrder to used named parameters

Test plan:
prove t/db_dependent/Acquisition.t
prove t/db_dependent/Acquisition/Invoices.t
prove t/db_dependent/Acquisition/OrderFromSubscription.t

all should return green.

NOTE: Any error messages are the same between master and this
      patch, and are unrelated to the added/revised tests.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 36fc9a3e641b82cb9ef044c54872f68d5a7ebbf3)

Conflicts:
t/db_dependent/Acquisition.t

10 years agoBug 11699: fixed saving notes entered when receiving orders
Jonathan Druart [Wed, 5 Mar 2014 12:07:53 +0000 (13:07 +0100)]
Bug 11699: fixed saving notes entered when receiving orders

Revised test plan:
1/ Create an order with 2 items
2/ Receive 1 item and enter a note for the order
3/ Verify the note is not saved
    The note should be visible on the Mod Order Details screen,
    but it isn't there.
4/ Apply patch
5/ Receive the second item and enter a note for the order
6/ Verify the note is correctly saved
    The note is visible on the Mod Order Details screen.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Works as described. The note now saves correctly and also remains when
you undo a receipt.

Note: it would be nice to show the note on the receive page as well.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ab1a74897efb82b99ed3931dff719bb64b930bc4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
t/db_dependent/Acquisition.t

10 years agoBug 11069: increase title ranking in relevance when using QueryWeightFields
Fridolyn SOMERS [Thu, 17 Oct 2013 14:20:49 +0000 (16:20 +0200)]
Bug 11069: increase title ranking in relevance when using QueryWeightFields

When using QueryWeightFields to add ranking on a search without index,
the search actually uses:

 - rank 1 : Title-cover,ext :  exact title-cover
 - rank 2 : ti,ext : exact title
 - rank 3 : Title-cover,phr : phrase title-cover
 - rank >7 : queries without index

This relevance sets title as phrase in priority and then any index.

This patch adds title as words list before search on any index, so
that records with all searched terms in title, even not well ordered,
are more relevant.

Test plan :
- Enable QueryWeightFields syspref
- Perform a search, with sort by relevance, with two words ofen
  contained in title, but never one near the other.
  For example: 'History France'
=> Records with both words in title are first. For example:
   "Histoire de France" and "La France : 100 ans d'histoire"

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Relevance ranking and field weighting are hard to test,
as many MARC fields are indexed into the used indexes.
If we had an index that only indexed 245$a/200$a the
effect might be more visible.
I found no regressions by this patch, change reads
logical.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 2c658d882a5ca43c107c26396b09f11ad6e69f9b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11508: fix untranslatable pull-down in auth_subfields_structure.pl
Bernardo Gonzalez Kriegel [Fri, 4 Apr 2014 23:37:54 +0000 (20:37 -0300)]
Bug 11508: fix untranslatable pull-down in auth_subfields_structure.pl

This patch replaces occurrences of CGI::scrolling_list with
untranslatable labels. It also fixes capitalization.

To test
1. Go to Administration > Authority types,
click 'MARC structure' of any auth type,
click 'subfields' for any Tag >= 010,
clic 'Edit subfields'

Check pulldowns 'Managed in tab' and 'Select to display or not'

2. Apply the patch

3. Reload and verify functionality of both pulldowns

4. Check that strings are not present on staff PO file
egrep "^msgid \"(Show all|Hide all|ignore)" misc/translator/po/fi-FI-i-staff-t-prog-v-3006000.po

5. Update language file
(cd misc/translator/; perl translate update fi-FI)

6. Check that strings are now present, repeat 4.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
NOTE: drop-downs work identically. Show all, Hide all, and
      ignore were added to the po files too.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Works as described and improves the page to manage authority
subfields.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4a32a188ae0a1bf189d3e1a4865051400c39b31e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9216: (follow-up) Make description in columns.def more specific
Katrin Fischer [Sat, 19 Apr 2014 10:52:24 +0000 (12:52 +0200)]
Bug 9216: (follow-up) Make description in columns.def more specific

Changed "Category" to "Patron category" to ease correct
translation.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 35caf5070d2bad3d5ecaad47f1da715e5c040c36)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9216: make columns.def file translatable
Jonathan Druart [Tue, 29 Oct 2013 14:03:41 +0000 (15:03 +0100)]
Bug 9216: make columns.def file translatable

The SQL column headers is stored into the columns.def file.
This file is not managed by the translation script.

This patch makes possible the headers translation.
Note: The translation xml tags were added to avoid all lines being put
on a single line.

Test plan:
1/ update your po file
cd misc/translate;
perl translate -f columns update LANG # Replace by another language here
2/ translate header columns (search "columns.def" in your po file).
3/ install the translated columns.def
perl translate -f columns install LANG # Replace by another language here
4/ go on the report module > create a new report > next > next
5/ change the language
on the 3rd step, you should see the column header translated.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described, no koha-qa errors

[on es-ES about a third of the strings translated!! :-) ]

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described and fixes a long standing translation
problem.
Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit bece83f8ed59208e058dc87830cbab2aa19bb2f7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11231: remove reference to ambiguous notes column from two hold request reports
Francesca Moore [Tue, 14 Jan 2014 23:03:51 +0000 (12:03 +1300)]
Bug 11231: remove reference to ambiguous notes column from two hold request reports

The 'notes' column has been removed from the pending holds and hold
ratios reports as they were not displaying in the first place.

1.apply patch
2.verify that both reports work

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>
(cherry picked from commit cc34a816a10ca76004e079032f1a46aec1ccb1c4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9578: avoid a search crash when attempting to sort results of invalid query
Fridolyn SOMERS [Fri, 22 Nov 2013 10:00:21 +0000 (11:00 +0100)]
Bug 9578: avoid a search crash when attempting to sort results of invalid query

When searching with a sort (means not by relevance) and there is an error
in Zebra connexion (server is down or query is wrong), you get the message :

  Error : Can't call method "sort" on an undefined value at /home/kohaadmin/src/C4/Search.pm line 405.

This patch corrects by not performing sort if there are no no results.

Steps to reproduce the error without patch:

In OPAC go to Advanced Search
Choose "Title" in first "Search for:" end enter "ccl=( and )"
Display "More options"
Set "Sort by" to "Title (A-Z)"
Click "Search" at bootom of page

Result:
Error:
Can't call method "sort" on an undefined value at /usr/share/kohaclone/C4/Search.pm line 430.

After applying the patch, try that search again.  This time,
it should report not results found with out the error message.

Alternative Test plan :
- Set OPACdefaultSortField on something else than relevance
- Perform a simple search with a wrong CCL query. For example : ccl=( and )
=> You get the messge : No results found ...

Patch behaves as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Adds another check to prevent a bad Zebra error message.
Works as described, passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 3b402d04e1a321afac02da84bae12f0342b776ad)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9578: add regression test
Galen Charlton [Fri, 18 Apr 2014 22:33:11 +0000 (22:33 +0000)]
Bug 9578: add regression test

This patch adds a regression test for the condition noted
in bug 9578, where attempting a sort of a Zebra search that
fails because of an invalid query crashes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 70499239ba1780e872499d93fa624574d13fe7ff)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
t/db_dependent/Search.t

10 years agoBug 11680: (follow-up) fix unexpected tax rate changes on edit
Jacek Ablewicz [Mon, 10 Feb 2014 09:09:21 +0000 (10:09 +0100)]
Bug 11680: (follow-up) fix unexpected tax rate changes on edit

Follow-up to fix similar issue on vendor edit.

If the tax rates in Acquisitions -> gist system preference
are entered with trailing zeroes, given vendor tax rate value
may not be correctly handled on vendor edit.

Test plan for this follow-up:

1) insert some tax rates with trailing zeroes in gist
system preference (e.g: '0|0.080|0.12|0.20|0.23')
2) add some vendors, choosing 8.0% 12.0% 20.0% 23.0%
as gst rate
3) try to modify them
4) note that vendors with 12.0% and 23.0% tax rates are
preserving previously choosen rates on edit, while
the ones with 8.0% and 20.0% do not (they are defaulting
to the first defined tax rate)
5) apply the patch
6) repeat 2) and 3)
7) all tax rates configured in system prefrence shall now
behave properly while editing vendors

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f3cb186de5d60395d5d681dc5e83971d0717592a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11680: fix case where tax rate changes unexpectedly on editing an order
Jacek Ablewicz [Wed, 5 Feb 2014 10:16:14 +0000 (11:16 +0100)]
Bug 11680: fix case where tax rate changes unexpectedly on editing an order

If the tax rates in Acquisitions -> gist system preference are entered
with trailing zeroes, given order tax rate value may not be correctly
handled on order edit.

To test:

1) insert some tax rates with trailing zeroes in gist
system preference (e.g: '0|0.080|0.12|0.20|0.23')
2) place some new orders, choosing 8.0% 12.0% 20.0% 23.0%
as gst rate
3) try to modify them
4) note that orders with 12.0% and 23.0% tax rates are
preserving previously choosen rates on edit, while
the ones with 8.0% and 20.0% do not (they are defaulting
to the first defined tax rate)
5) apply the patch
6) repeat 2) and 3)
7) all tax rates configured in system prefrence shall now
behave properly while editing orders

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

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Confirmed the problem and that this patch fixes it.
Problem also exists for editing the default tax rate of a vendor.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 471215dc46e5a65360a3bde53666f62f809f0861)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10090: display item type description instead of code on acq ordered and spent...
Jonathan Druart [Thu, 4 Apr 2013 10:09:37 +0000 (12:09 +0200)]
Bug 10090: display item type description instead of code on acq ordered and spent pages

On ordered.pl and spent.pl, the itemtype codes are displayed, instead of
descriptions.

Links for the ordernumber should be changed. In ordered.pl, we are
redirected to the receive page. In spent.pl, the links are deleted.

Signed-off-by: Broust <jean-manuel.broust@gmail.com>
Revisited patch: The link to orderreceive was broken, so I undo the
changes.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works alright, itemtype descriptions are shown.
The removed link was potentially 'dangerous' as you shouldn't
get to the receive page for an order, without providing an invoicenumber
first.
Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 378bffa0ddbe793dff75a828e2bf5b03ad666b57)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11914: fix two issues when creating an order from a suggestion
Jacek Ablewicz [Mon, 10 Mar 2014 09:53:52 +0000 (10:53 +0100)]
Bug 11914: fix two issues when creating an order from a suggestion

When order is being created from purchase suggestion:
- Budget/fund stored in suggestion record (if any) is not retained
on order page, system always defaults to 'Select a fund' even if some
fund was already chosen for a suggestion on the earlier stage.
- If there was a price given to, and stored within suggestion record,
initial prices calculations on order page are not working properly
('Replacement cost', 'Budgeted cost' and 'Total' show as 0.00 or blank).
As a workaround - to force correct price recalculation - user needs
to manually alter and then re-alter some price-related fields (e.g.,
quantity or vendor price).

This patch fixes both issues.

Test plan:
1) create a suggestion: choose some buget, enter something in 'Price'
and 'Quantity' fields,
2) try to make an order from this suggestion, to confirm/replicate
aforementioned problems,
3) apply patch,
4) make an order from previously created suggestion again, observe
that both issues are now resolved.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 1b0c02376e772a6ad9d45e01bcbac106ee534c92)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11148: (follow-up) add more test cases
Galen Charlton [Fri, 18 Apr 2014 21:51:09 +0000 (21:51 +0000)]
Bug 11148: (follow-up) add more test cases

Add test cases to exercise output_pref's as_due_date option
when the time in question is not one minute before midnight.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9ccc602b7d5c41f27b09ff3aee437556eed680b1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11148: (follow-up) restore useful test removed by previous patch
Jonathan Druart [Mon, 13 Jan 2014 09:17:47 +0000 (10:17 +0100)]
Bug 11148: (follow-up) restore useful test removed by previous patch

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 8b76bec3db8a4d8051a8d506e1fba024a5f76e59)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11148: Add a as_due_date parameter to the output_pref routine
Jonathan Druart [Mon, 2 Dec 2013 16:21:13 +0000 (17:21 +0100)]
Bug 11148: Add a as_due_date parameter to the output_pref routine

This parameter is a boolean, if true, the hours won't be displayed if
the time is 23:59 (24hr format) or 11:59 PM (12hr format).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4ea09932ddbfbcc0e9201f7cc6b2a5e08a4efabf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11148: remove two superflous routines from Koha::DateUtils
Jonathan Druart [Mon, 28 Oct 2013 14:10:26 +0000 (15:10 +0100)]
Bug 11148: remove two superflous routines from Koha::DateUtils

There are 2 useless routines in the Koha::DateUtils
module:output_pref_due and format_sqlduedatetime. We can call
output_pref and format_datetime with dateonly = 0.

format_sqlduedatetime is only used in one place: opac-reserve.pl

Test plan:
1/ Verify on the opac-reserve.pl page that the date is correctly
displayed for for onloan items (you should use the "specific copy"
feature).
2/ Launch prove t/DateUtils.t UT file and verify all UT pass.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Due date on opac-reserve shown correctly. Unit tests pass.
Did a grep on both function names.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
No references to subs found. Passes koha-qa.pl, t and xt

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b9492e73f59439e218e7f657bdfcf67026834311)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11468: Remove given/when from Koha::Dateutils
Colin Campbell [Thu, 2 Jan 2014 14:42:16 +0000 (14:42 +0000)]
Bug 11468: Remove given/when from Koha::Dateutils

given and when give warnings due to their experimental
status as of perl 5.18. Replace the construct with
an if/elsif to avoid the keywords

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script, especially t/DateUtils.t.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b529ca00e0cac093fc32a1d123cdbcc84582c155)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11416: fix case where serials item editor was incorrectly hiding fields
Kyle M Hall [Wed, 18 Dec 2013 13:37:40 +0000 (08:37 -0500)]
Bug 11416: fix case where serials item editor was incorrectly hiding fields

In serials/serials-edit.pl, if an item field is hidden from the OPAC,
it will not display in the editor, even if the field is marked as
visible in the staff intranet and editor. However, the field is still
displayed correctly in the items editor ( additem.pl ).:

Test Plan:
1) Select an item-level field ( e.g. non-public note )
2) Create a serial using the default framework ( or one of your choice )
3) For that framework, mark the chosen field as visible from the
intranet and editor, but not the opac.
4) Receive an item for this serial, note your field does not display
5) Use the biblio item editor to add an item ( additem.pl ), not the
field displayes
6) Apply this patch
7) Repeat step 4, not the field displayes

Signed-off-by: Kim Schwant <kim.schwant@courts.in.gov>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
PrepareItemrecordDisplay is only used for editor (-4 < hidden < 4)

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f14020780836c5fbc65331b3918b843761481c36)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11752: display the correct frequency for serial subscriptions in OPAC details
Blou [Wed, 12 Feb 2014 17:03:08 +0000 (12:03 -0500)]
Bug 11752: display the correct frequency for serial subscriptions in OPAC details

This fixes bootstrap and prog by modifying the description displayed
in the OPAC's detail of serials.

RM NOTE: this patch does not cover the case where custom serial
frequencies have been defined.

TESTING to reproduce
- create/find a serial with a 1/week periodicity (4 in the database)
- Find it in the opac-detail.pl, click "more details" at the bottom
- validate the string.  Before the patch, it will say:
"The current subscription began on 2013-12-06 and is issued every 3
 weeks for 26 issues"

The "every 3 weeks" is clearly wrong.
In fact any periodicity chosen would display a wrong description, not
matching the staff interface.

After the patch, the display is corrected.

As a bonus, the "every 2 years" now has a description, where it had
none before.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7f1e949ea0e8d05b641ddbcb4582a3e1bc913ecd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12003: Do not calculate next pubdate for irregular subscriptions
Julian Maurice [Fri, 28 Mar 2014 13:38:25 +0000 (14:38 +0100)]
Bug 12003: Do not calculate next pubdate for irregular subscriptions

Show 'Unknown' when planneddate and publisheddate cannot be calculated

Also fixes SQL query in misc/cronjobs/serialsUpdate.pl that was still
using "periodicity != 32" to exclude irregular subscriptions from
results

Test plan:

1) Create a subscription in the serials module. Make sure to choose:
   Frequency = Irregular
2) Test the prediction pattern, first publication date is set to
   "First issue publication date" field, others will show as
   'unknown'
3) Save the subscription
4) Check the created issue - it will show a published date and a
   planned date (same as "First issue publication date" field)
5) Receive the issue and check the next generated issue, planned
   date and published date should show as 'Unknown'
6) Generate a next issue, planned date and published date should
   also show as 'Unknown'

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described following test plan.
No koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Also tested:
- multi receiving generates mulitple issues without dates - 'unknown'
- staff detail page shows the dates empty, which is fine
- OPAC detail page shows the dates empty, which is fine
- serial collection page shows 'unknown' and those issues appear
  on the 'manage' tab, as they did in the past
- Editing the issue from the serial collection page leaves the
  date fields empty.
- Receving the issue, setting the status to 'Arrived' the Expected on
  date is set to 'today' automatically. Date published has to be
  entered manually (maybe something we could improve later
- subscription detail > issues tab shows Uknown.
- t/db_dependent/Serials/GetNextDate.t pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 47a9afcb7ecedc805550f46e6373b9a8c8615bdc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10533: move JavaScript functions for basket groups to a separate file
Jonathan Druart [Wed, 3 Jul 2013 08:52:21 +0000 (10:52 +0200)]
Bug 10533: move JavaScript functions for basket groups to a separate file

This patch moves JavaScript functions used for managing basket groups
to a file.  This has the effect of putting the last (active) use of
the YUI JavaScript library by the staff interface in one file:

  koha-tmpl/intranet-tmpl/prog/en/js/basketgroup.js

Test plan:
- Try all actions for basketgroup ( drag/drop, add, delete, close, print,
reopen, edit, export as csv).
- Check that there is no regression on others acquisition pages:
  * acqui/neworderempty.tt
  * acqui/uncertainprice.tt
  * acqui/addorderiso2709.tt
  * acqui/basketheader.tt
  * admin/aqbudgets.tt
  * admin/aqcontract.tt
  * admin/aqbudgetperiods.tt
  * admin/aqplan.tt
  * suggestion/suggestion.tt

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b8f1b43966d178174583c7a3e0c36e58f988b161)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11955: Remove spaces in empty indicators when linking an authority to a biblio...
Frédérick [Tue, 18 Mar 2014 20:11:44 +0000 (16:11 -0400)]
Bug 11955: Remove spaces in empty indicators when linking an authority to a biblio record.

This patch removes spaces in indicators which are imported when we link an
authority to a biblio record. The spaces made the indicators harder to edit
after the linking, because we had to delete the superfluous space character
before a new value could be entered.

To test:
1. Open some authority on editor, save with empty indicators.
   They are saved as ind1=" " ind2=" " on auth_header tables, with spaces
2. Edit some record, link some tag with previous auth,
   indicators now have a space on it (or ind1 at last)
3. Apply the patch
4. repeat 2, space is gone

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No koha-qa errors.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit afc9549a6f58ddf36cf6d9a5399239385c377c90)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11258: fix another case where holds queue made transfer requests that contradict...
Kyle M Hall [Fri, 15 Nov 2013 16:29:23 +0000 (08:29 -0800)]
Bug 11258: fix another case where holds queue made transfer requests that contradict the library holds policy

This patch fixes a problem where the holds queue generator
was making requests where the pickup library is the
same as the item's library but not the patron's branch,
even if there is a "Default holds policy by item type" rule that states
this item can only fill holds for patrons of the same library as the
item.

Test Plan:
1) Create a test record with 2 items with different itemtypes
2) Set the Default holds policy by item type for the first
   item to "From any library"
3) Set the Default holds policy by item type for the second
   item to "From home library"
4) Place a record level hold for a patron from another library,
   but for pickup at the same library as the item is from
5) Rebuild the holds queue
6) View the holds queue, note the item is listed, though this
   patron cannot place a hold on this item
7) Apply this patch
8) Repeat step 5, note the hold is no longer in the queue

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
automated tests pass, functional tests pass. Bug replicated, eradicated by patch.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I finally managed to reproduce this, patch works as described.
Passes tests and QA script, provided tests fail without patch, but
succeed with the patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 79660377470e8d6ba9057eb59645886410852c92)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12058: make OverDrive search results page show cart, lists, and login links
Owen Leonard [Wed, 9 Apr 2014 16:15:56 +0000 (12:15 -0400)]
Bug 12058: make OverDrive search results page show cart, lists, and login links

The template for OverDrive search results in the Bootstrap OPAC doesn't
show the cart, lists, or login links because the template's checks of
related system preferences relies on [% USE Koha %], which is not
present. This patch adds it.

To test, enable the bootstrap theme and OverDrive integration
(OverDriveClientKey, etc.). Perform a search in the OPAC and click to
view results from your OverDrive library. Confirm that cart, lists, and
login links appear in the header.

Signed-off-by: Jesse Weaver <pianohacker@gmail.com>
Bug confirmed, and this patch fixes it.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b1e09cb0fa900964200f224cad771d95062bc48d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11484: (follow-up) standardize capitalization of "Z39.50"
Galen Charlton [Thu, 17 Apr 2014 15:31:33 +0000 (15:31 +0000)]
Bug 11484: (follow-up) standardize capitalization of "Z39.50"

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 5492d82bc2aa9c884fe67810ddb3cd08c83910fe)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11484: Add option to cleanup_database.pl to purge Z39.50 search records from...
Kyle M Hall [Mon, 6 Jan 2014 18:46:02 +0000 (13:46 -0500)]
Bug 11484: Add option to cleanup_database.pl to purge Z39.50 search records from reservoir

It would be good to be able to specifically target import records from
Z39.50 for cleanup.

Test Plan:
1) Apply this patch
2) Import one or more batch record sets into Koha
3) Perform some Z39.50 searches
4) Run this command: misc/cronjobs/cleanup_database.pl -v --z3950
5) Verify that only Z39.50 records were deleted

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f796d1002a39cd714433a219b35eefbce31b02d8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12081: make tmpl_process3.pl delete ts temp files
Bernardo Gonzalez Kriegel [Mon, 14 Apr 2014 22:35:35 +0000 (19:35 -0300)]
Bug 12081: make tmpl_process3.pl delete ts temp files

This patch enable deletion of temp files used by
tmpl_process3.pl.
Just removed coments on existing code

To test:
1. Do a count of files on /tmp ( ls /tmp | wc -l )
2. Update preferred language
3. Count again, new files on /tmp
4. Apply the patch
5. Update again, check, no new files

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
NOTE: I watched what temp files were actually in /tmp to make
      sure other processes didn't magically increase/decrease
      the number.
          $ perl translate update {lang code}
      generated 10 temporary files for me (2x5 po files). After
      removing those ten files, and applying the patch, no
      other files were generated.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
These lines has been commented by commit
a399dcefad193fc21ef2dc1fe31d07686ab2da46 without any apparent good
reason.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit de81d7abe43f3c2eed327b52e212bc790b406961)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12052: DBrev 3.14.09.001
Fridolin Somers [Wed, 6 Aug 2014 09:39:42 +0000 (11:39 +0200)]
Bug 12052: DBrev 3.14.09.001

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12052: New syspref to display message on the OPAC patron summary page
Jonathan Druart [Wed, 9 Apr 2014 08:24:24 +0000 (10:24 +0200)]
Bug 12052: New syspref to display message on the OPAC patron summary page

Test plan:

Fill the OPACMySummaryNote with HTML code or just text.
The content should be displayed at the OPAC on the summary page for
patrons.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes tests and QA script.
Rephrased the pref text a little bit, using 'logged in' instead of
'connected', also added " so the description appears correctly in the
pref editor.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f82d22b0df63e2924e9c8b35d2a4eb02edc2650e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10825: don't display enum/chron twice for items received via the serials module
Mason James [Mon, 16 Sep 2013 03:12:16 +0000 (15:12 +1200)]
Bug 10825: don't display enum/chron twice for items received via the serials module

TEST PLAN
---------
1) In the staff interface, display a bib that has one or more items
   that were received in the serials module.  The following query
   can identify them:
   -- in MySQL:
      SELECT items.biblionumber,items.enumchron,serial.serialseq
      FROM items,serial,serialitems
      WHERE items.itemnumber=serialitems.itemnumber
        AND serialitems.serialid=serial.serialid;
2) Note that in the holdings tab, the serial enumeration/chronology
   is displayed twice.
3) Apply the patch
4) Refresh the screen
4) Now, the enum/chron should be displayed only once per item.

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes tests and QA script.
Template change only.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 3f5636cac39ca1109a73b40be08d9dbef096a17c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11797: (follow-up) fix MARC21 branch of bug more idiomatically
Galen Charlton [Tue, 15 Apr 2014 15:16:42 +0000 (15:16 +0000)]
Bug 11797: (follow-up) fix MARC21 branch of bug more idiomatically

This patch puts the MARC21 variant of the bugfix in alignment
with the UNIMARC variant, removing the use of unnecessary
temporary variables.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit cc7a99ba7f23c7f77bb28c23613fbd9b4ab61cd5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11797: fix odd number of elements in hash (UNIMARC)
Jonathan Druart [Tue, 15 Apr 2014 09:08:54 +0000 (11:08 +0200)]
Bug 11797: fix odd number of elements in hash (UNIMARC)

I got the same warning for my UNIMARC DB.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit fa989631f6b6f2d4a6dc86e8b9535bd9ce786c1e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11797: fix odd number of elements in hash warning (MARC21)
Mark Tompsett [Thu, 6 Mar 2014 06:29:39 +0000 (01:29 -0500)]
Bug 11797: fix odd number of elements in hash warning (MARC21)

This was discovered when someone triggered an authority search
on an authority record that was missing what is assumed the
default subfield for a given field.

It, however, also can be triggered in an OPAC authority search
by looking at the record that lacks the default subfield for a
given field.

TEST PLAN
---------
1) Create an authority record with 180$x and NOT 180$v.
   See C4::AuthoritiesMarc::BuildSummary in the 1.. foreach loop
   for known tags and default values. The default subfields are
   the first letter of the $subfields_to_report string.
2) Trigger the bug:
   Method 1: /cgi-bin/koha/opac-authoritiesdetail.pl?authid=#
             Where # is the authority id of your tweaked record.
             The error occurs in Normal view.
   Method 2: Home -> Cataloging -> + New record
                  -> Click the 'Tag Editor' on 100$a
                  Editing of $a to $b and back may be required.
3) Notice there is an error log entry.
4) Apply the patch
5) Attempt to trigger the bug again
6) That specific error log entry is not generated.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Could generate the warning with a missing 151$a with both methods.
No warning anymore after applying this patch.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 129bc3281180d892659d3ad1ef253fbc7ec6f316)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11797: add regression test
Galen Charlton [Tue, 15 Apr 2014 15:38:49 +0000 (15:38 +0000)]
Bug 11797: add regression test

This patch adds unit tests for C4::AuthoritiesMarc::BuildSummary
for both UNIMARC and MARC21 and a regression test for the "Odd
number of elements in anonymous hash" warning.

To test:

[1] Run prove -v t/db_dependent/AuthoritiesMarc.t.  It should
    report one failure.
[2] Apply the main patch.
[3] Run t/db_dependent/AuthoritiesMarc.t again; it should pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f2b655dfabc4a4464099e7d9bc219b6714ef7de1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 5052: make it possible to pick a language if all choices are sublanguage
Bernardo Gonzalez Kriegel [Fri, 4 Apr 2014 01:37:09 +0000 (22:37 -0300)]
Bug 5052: make it possible to pick a language if all choices are sublanguage

This was tricky to catch. In current implementation, Bug 6755
introduced in C4/Templates.pm as condition to send the array of
hashrefs of languages that (@$languages_loop<2), but with one
language group that condition is false, there is only one
element in that array.

This patch changes that condition to have more than one language
selected, grouped or not.

Also send $bidi value always, that was only sent if there is
more than one group language.

To test:
1. Translate to en-GB and en-NZ, or simply do mkdirs
on intranet-tmpl/prog and opac-tmpl/bootstrap

2. Go to Administration > System preferences > I18N
enable those languages on staff/opac

3. Check that language chooser is nowhere to be found

4. Apply the patch

5. Reload staff/opac, now you can see language chooser

NOTE: I made little changes on staff, but can't replicate
bootstrap colors for selected/unselected language. Someone
need to touch css files to make it happen. But that is
current behavior.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Good catch!

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c212b9328edd69a8e8f5082674a9f29741d159ee)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12075: fix keyboard shortcuts broken by jQueryUI upgrade
Owen Leonard [Fri, 11 Apr 2014 16:40:20 +0000 (12:40 -0400)]
Bug 12075: fix keyboard shortcuts broken by jQueryUI upgrade

The recent jQueryUI upgrade broke keyboard shortcuts in the staff client
because of changes to the jQueryUI API. This patch fixes the problem.

To test, apply the patch and clear your browser cache if necessary.

- View any page in the staff which includes header search tabs for check
  out, check in, or catalog search (staff client home page or
  circulation page for instance).
- Test the keyboard shortcuts: Alt-q for catalog search, Alt-u for check
  out, Alt-r for check in.
- Each keyboard shortcut should select the correct tab.

Followed test plan, patch behaves as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Confirmed that the shortcuts were broken before the patch
and now work again after applying it.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit dcca71f0befa92d2212855aecfc0f473b6304832)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 7143: Updating history with new developers
Chris Cormack [Thu, 13 Mar 2014 20:20:34 +0000 (09:20 +1300)]
Bug 7143: Updating history with new developers

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c52b086d38cde98504457aa9f40f65ba20bbfbe1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12073: don't show link URLs when printing Bootstrap OPAC detail page
Frédéric Demians [Fri, 11 Apr 2014 15:23:50 +0000 (17:23 +0200)]
Bug 12073: don't show link URLs when printing Bootstrap OPAC detail page

On OPAC Bootstrap detail page, by clicking Print link on the right the
page is printed. But the printed page contains HTML <a> anchors URL
attribute. It's useless, and unreadable. It isn't the case with prog
theme.

This patch hides all <a> href attributes when printing any OPAC page.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described and improves the printed detail page's readability.
Currently there is no less file for the print.css.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit fe8242fc0383f9bafe1ead9033926c405ee5dfbe)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12069: redirect to staff login if you access members/mod_debarment.pl when logged out
Owen Leonard [Thu, 10 Apr 2014 19:50:40 +0000 (15:50 -0400)]
Bug 12069: redirect to staff login if you access members/mod_debarment.pl when logged out

members/mod_debarment.pl's call to checkauth should pass 'intranet' so
that if the user happens to be logged out they will be redirected to the
staff client login form, rather than the OPAC.

To test, apply the patch and log in to the staff client:

- Add a restriction to a patron's account.
- View the restrictions tab on the patron's account. You should see the
  restriction and a "Remove" link for that restriction.
- In another tab, log out of the staff client.
- In the first tab, click the "Remove" link. You should be redirected to
  the staff client login page.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Good catch! Works as described, passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit cbcfb847e0022f79b82f0601c955ae085917d377)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12076: better detect an untranslatable template construct
Galen Charlton [Fri, 11 Apr 2014 18:49:07 +0000 (18:49 +0000)]
Bug 12076: better detect an untranslatable template construct

Per bug 6458, template constructs of the form

<li [% IF (foo) %]selected="selected"[% END %]...

are forbidden as they can cause problems with translated templates.
However, the tt_valid.t test currently doesn't catch the variation
where '-' is used to suppress extra whitespace:

<li [%- IF (foo) -%]selected="selected"[%- END -%]...

This patch corrects the issue.

To test:

[1] Temporarily add the following line to a template file:

<li [%- IF a -%]a="a"[%- END -%] />

[2] Run prove -v xt/tt_valid.t.  Note that no error is reported.
[3] Apply the patch, and rerun the tt_valid.t test.  This time,
    an error should be reported.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works well, detects the forbidden pattern
No koha-qa errors.

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9a7eedce78af128772a36b5a16416fdad1a16fcc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11960: replace unnecessary call of GetMemberDetails by CanBookBeRenewed
Jonathan Druart [Wed, 19 Mar 2014 15:38:20 +0000 (16:38 +0100)]
Bug 11960: replace unnecessary call of GetMemberDetails by CanBookBeRenewed

C4::Circulation::CanBookBeRenewed called C4::Members::GetMemberDetails to
retrieve categorycode and branchcode.

- categorycode is used to retrieve the issuing rule
- the borrower information is passed to
  C4::Circulation::_GetCircControlBranch. Which only uses the branchcode
  parameter.

GetMemberDetails does a lot of calls/queries (patronflags,
account, etc.) that are not needed by CanBookBeRenewed.

This patch replaces it with a call to C4::Members::GetMember.

Note: I presented this small optimisation during a quick introduction to
NYTProf (hackfest 14 in Marseille).

Test plan:
- launch member unit tests
- check the code

Checking the code resulted in the following:
CanBookBeRenewed builds a hash reference from the borrowernumber
(2482). Note it is only used in this function and not passed in.

_GetCircControlBranch (2485) requires that hashreference to
have a branchcode key. As stated above.

The following line (2486) requires it have a categorycode key.

As such, C4::Members::GetMemberDetails is confirmed to be
overkill, and C4::Members::GetMember is sufficient.

Testing Done
------------
0) Back up DB
1) Make sure MPL is in the list of libraries.
2) Apply the patch.
3) run the koha qa test tool
4) prove -v t/db_dependent/Circulation.t

Patch applies cleanly. QA Test tool was all OK. All tests ran successfully.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9132f9befb36f32fc35a511c3829c224b42893bf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11441: (follow-up) improve utility help text
Galen Charlton [Fri, 11 Apr 2014 15:25:41 +0000 (15:25 +0000)]
Bug 11441: (follow-up) improve utility help text

This patch expands and reformats the help text displayed
when running remove_unused_authorities.pl -h.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f4633cc5e51e8859f93be397eaee1370afc54099)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11441: enhance remove_unused_authorities.pl ability to select records
Juan Romay Sieira [Tue, 21 Jan 2014 11:46:09 +0000 (12:46 +0100)]
Bug 11441: enhance remove_unused_authorities.pl ability to select records

remove_unused_authorities.pl previously required that --aut be supplied
to specify one or more authority types to check for unlinked authority
records.  If --aut was omitted, it would default to search for
records of authority type NC, which is not present in many (or any?)
Koha databases.

Now, if --aut is omitted, unlinked authority records of any type
are removed.

To test it:
Parse only PERSO_NAME authorities:
misc/migration_tools/remove_unused_authorities.pl -aut PERSO_NAME

Parse all authorities:
misc/migration_tools/remove_unused_authorities.pl

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 0f6652d62bd9053c87de5b94eb6a35f68a3af4bf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11995: restore ability of serialsUpdate.pl to calculate next serial issue dates
Jonathan Druart [Mon, 24 Mar 2014 14:25:05 +0000 (15:25 +0100)]
Bug 11995: restore ability of serialsUpdate.pl to calculate next serial issue dates

Bug 7688 changed the prototype for GetNextDate, but the serialsUpdate.pl
cronjob script had not been updated.  This patch fixes the problem.

Test plan:
Before applying the patch:
1/ Check that the following SQL query returns something:
SELECT serial.*
FROM serial
LEFT JOIN subscription ON (subscription.subscriptionid = serial.subscriptionid)
WHERE serial.status = 1
AND DATE_ADD(planneddate, INTERVAL CAST(graceperiod AS SIGNED) DAY) < NOW()
AND subscription.closed = 0;
2/ Run misc/cronjobs/serialsUpdate.pl -v
   It should die with an error message like this:
   Can't use string ("2011-03-05") as a HASH ref while "strict refs" in use
3/ Apply the patch
4/ Run misc/cronjobs/serialsUpdate.pl -v
   It should exit normally and print messages like this:
   Serial issue with id=XX updated
5/ Run the Koha QA test tools.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f71283bad5517757ee6b670c0edb5257d0a1bedc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 7267: Add account number to German PDF template
Katrin Fischer [Thu, 27 Feb 2014 09:16:21 +0000 (10:16 +0100)]
Bug 7267: Add account number to German PDF template

To test:
- Switch system preference OrderPdfFormat to pdfformat::layout2pagesde
- Create one or more baskets with some orders each.
- Add all baskets to one basket group
- Print the basket group
- Check the account number from your vendor shows up with the other
  vendor details

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ae030272a4f30104adefe9d6164eb99a0f4d8f73)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 7267: Add account number to English PDF templates
Katrin Fischer [Thu, 27 Feb 2014 09:13:33 +0000 (10:13 +0100)]
Bug 7267: Add account number to English PDF templates

To test:
- Switch system preference OrderPdfFormat to pdfformat::layout2pages
- Create one or more baskets with some orders each.
- Add all baskets to one basket group
- Print the basket group
- Check the account number from your vendor shows up with the other
  vendor details
- Repeat with pdfformat::layout3pages

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 62151ced35329f94e4508b4973521464d48307c9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 7267: Add account number to French PDF template
Katrin Fischer [Thu, 27 Feb 2014 09:17:44 +0000 (10:17 +0100)]
Bug 7267: Add account number to French PDF template

To test:
- Switch system preference OrderPdfFormat to pdfformat::layout3pagesfr
- Create one or more baskets with some orders each.
- Add all baskets to one basket group
- Print the basket group
- Check the account number from your vendor shows up with the other
  vendor details

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit a4841aae08cf60b4fcf628eee991738e2232cc80)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11828: (follow-up) add new option to OrderPdfFormat
Katrin Fischer [Sat, 1 Mar 2014 08:33:27 +0000 (09:33 +0100)]
Bug 11828: (follow-up) add new option to OrderPdfFormat

To test:
- Check appearance of the OrderPdfFormat system preference
  It will offer a pull down with options, including
  "German 2-page"

Followed test plan. Patch behaves as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 6372689f5dc7f0e9d34ffef3ad0c2a1ab6d6fb58)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11828: Add German translation of layout2pages PDF template
Katrin Fischer [Wed, 26 Feb 2014 16:50:10 +0000 (17:50 +0100)]
Bug 11828: Add German translation of layout2pages PDF template

To test:
- Switch system preference OrderPdfFormat to pdfformat::layout2pagesde
- Create one or more baskets with some orders each.
- Add all baskets to one basket group
- Print the basket group
- Check everything is translated into German and the formatting/layout
  looks ok

Followed test plan and compared English with German printout.
German version is OK.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ffeb666994327b97e26bc372fd574d05a40e8336)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11885: (follow-up) add a CSS class to set subfield code bold
Jonathan Druart [Fri, 11 Apr 2014 08:32:37 +0000 (10:32 +0200)]
Bug 11885: (follow-up) add a CSS class to set subfield code bold

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit eab5480614edf9cc5895bc076d4e31dc77c1fe40)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11885: (follow-up) remove tabs
Bernardo Gonzalez Kriegel [Wed, 9 Apr 2014 11:43:23 +0000 (08:43 -0300)]
Bug 11885: (follow-up) remove tabs

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 35142704d0a9831b6d4560cdf98a1bc9481414e9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11885: (follow-up) make default styling consistent with previous look
Mark Tompsett [Thu, 3 Apr 2014 00:22:44 +0000 (20:22 -0400)]
Bug 11885: (follow-up) make default styling consistent with previous look

Jonathan Druart raised the following three issues:
1/ subtags was bold before patch
2/ 1 dash existed between tag and tag name
3/ A space has been added ("606 #1 - Sujet nom commun"
    becomes "606 # 1 Sujet nom commun",  "101 ## - Langue"
    becomes "101 # # Langue")

This patch addresses them in the following way:
1/ You will note that @ was not bold on the 0 tab.
   Every other tab were bold. By making the similar template
   into a procedure based on the 0XX tab, bolding was lost.
   This patch bolds all subtags including the @, so that
   the visible change is minimized.
2/ The dash was programmatically added in at the code stage
   previously. This bug fix splits the the single concatenation
   mess into parts which can be styled. This puts the dash back
   into the template. However, it should be noted that the
   spacing for the 0 tab's tag and tag description will have an
   extra space after the hypen that was lacking before.
3/ <span>...</span><span>...</span> is different than
   <span>...</span>
   <span>...</span>
   The later puts that extra space. This patch fixes that.

See comment 1 for the test plan.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described.
Small koha-qa errors fixed in followup

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 377dbfc73fb2a06b8a0d50731e2c8ba14968d68e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11885: fix inconsistent HTML in MARC Details
Pasi Kallinen [Tue, 4 Mar 2014 06:57:11 +0000 (08:57 +0200)]
Bug 11885: fix inconsistent HTML in MARC Details

In Catalog > MARC Details, the HTML in the different tabs is slightly
inconsistent and doesn't differentiate different elements, making CSS
styling complicated or impossible:

* tab 0 has <p class="subfield_line"> whereas all the other tabs
  have just <p>

* all other tabs wrap the subfield character in <b> tags, except
  for tab 0

* the MARC tag title is a single div with the tag, the indicators
  and the field description.

Attached patch folds all the tab outputs into a single TT BLOCK,
which is then reused. It also marks the separate parts of the tag
title in their own spans.

The output should be nearly identical to previous behaviour, minus
a dash from the tag title descriptions - it was used to separate
the tag from the description. The description can now be styled
separately from the tag itself, so the dash can be added with CSS,
if necessary.

Revised test:
1) Find a biblio
2) Edit the record so that there is something in every tab (0-9).
3) Save and then click 'MARC' in the left pane to view the
    MARC details.
4) Note the contents of each tab.
5) Apply patch
6) Compare the MARC details output to what was noted. Should
   be the same, minus a dash in each of the tag title descriptions.

Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 0ea17a6a7689e7fb3d60ebb72cac72eefb142d8a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11951: fix OPAC search suggestions template error
Owen Leonard [Mon, 17 Mar 2014 13:34:03 +0000 (09:34 -0400)]
Bug 11951: fix OPAC search suggestions template error

If you have search suggestions enabled in the OPAC and click the "Check
for suggestions" link before it is replaced with the JS-rendered output
you will get a template error. This patch corrects it.

To test you must have the bootstrap theme enabled and at least one
OPAC plugin enabled in Administration -> Did you mean?

- Perform a search in the OPAC.
- Look for a box which says "Not what you expected? Check for
  suggestions"
- Click the "Check for suggestions" link before it disappears. If
  necessary disable JavaScript in your browser so that the link doesn't
  disappear.
- The search suggestions page should render without errors.

Signed-off-by: A. Sassmannshausen <alex.sassmannshausen@ptfs-europe.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
The non-Javascript fallback link now works correctly.
Passes tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c38cf38c973159af2d03c6956d7aede8aebb20d5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11184: correct attribute cloning for the patron editor
Srdjan [Fri, 1 Nov 2013 08:24:11 +0000 (21:24 +1300)]
Bug 11184: correct attribute cloning for the patron editor

This patch fixes Perl warnings logged when setting up the
patron attribute form in the patron editor.

To test - Patron details entry page:
* Have  ExtendedPatronAttributes enabled. Check that "Additional
  attributes and identifiers" section behaves.
* Verify that editing and saving a patron record does not
  result in the following sorts of entries in the Apache log:

  se of uninitialized value $_ in hash element at memberentry.pl line 798
  Use of uninitialized value in anonymous hash ({}) at memberentry.pl line 798

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested with different types of patron attributes:
- repeatable
- linked to an authorized value
- free text
Tested editing, adding, removing one of multiple, adding multiple,
etc. No regressions found.
Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 3334f03d779dc41bac3fe6e25a0d08733fc030ca)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10865: (Follow-up) Add CSS style for form hints
Owen Leonard [Wed, 9 Apr 2014 16:41:24 +0000 (12:41 -0400)]
Bug 10865: (Follow-up) Add CSS style for form hints

This patch adds a new "hint" class for displaying information relating
to a form field. On the list edit screen the hint also has an alert
class to highlight it.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script. Works as advertised.
Tested with Bootstrap and prog theme. Some notes:

- When OpacAllowPublicListCreation is turned off, the permissions
  don't show.
- When OpacAllowPublicListCreation is turned off, we could also hide
  the Category pull down in the [new list] pop up, as there is only
  Private left as an option.
- Maybe we should move the new list link outside of the tabs?
  When OpacAllowPublicListCreation is turned off, but public lists
  exist, the link 'new list' will still show on the public list tab,
  but a private list will be created.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9094b4a1bbff95e0f8e5747a805dacede165bc9a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
koha-tmpl/opac-tmpl/bootstrap/css/opac.css

10 years agobug 10865: (follow-up) allow patrons to make their public lists private when OpacAllo...
Galen Charlton [Fri, 21 Feb 2014 20:44:24 +0000 (20:44 +0000)]
bug 10865: (follow-up) allow patrons to make their public lists private when OpacAllowPublicListCreation is off

This patch ensures that patrons continue to have the ability to make
their public lists private for any public lists they control that were
created before the library turned the OpacAllowPublicListCreation
system preference off.

To test:

[1] Ensure OpacAllowPublicListCreation is on.
[2] As a patron, create a public list in the OPAC.  Also, create
    a private list.
[3] Turn OpacAllowPublicListCreation off.
[4] Back in the OPAC, verify that the public list can be edited
    and that there are drop-downs for category and permissions.
    Also verify that there is a warning that the patron cannot
    change it back if they convert a public list to private.
[5] Edit the private list created in step 2.  Verify that the
    category and permissions drop-downs are not displayed.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Broust <jean-manuel.broust@univ-lyon2.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7dd0e9a41fd639e86ed32d98d863d605a6ba63e8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10865: (follow-up) Move a li tag to avoid overlapping tags
Jonathan Druart [Wed, 12 Feb 2014 10:33:21 +0000 (11:33 +0100)]
Bug 10865: (follow-up) Move a li tag to avoid overlapping tags

With this patch, a li tag is empty (only using the bootstrap theme) if
the pref is disabled.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Broust <jean-manuel.broust@univ-lyon2.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c8085cb9c38f60b1152f4cf86c7ffcc82d3e8106)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10865: Don't show list permissions when adding public lists/sharing lists is...
Owen Leonard [Fri, 13 Sep 2013 14:50:27 +0000 (10:50 -0400)]
Bug 10865: Don't show list permissions when adding public lists/sharing lists is not allowed

If patron creation of public lists is disallowed by the
OpacAllowPublicListCreation system preference the "category" option
should be hidden altogether instead of showing a <select> with "private"
as the only option. This patch hides category and permissions controls
when OpacAllowPublicListCreation is set to "don't allow."

To test you must have the virtualshelves system preference enabled.
Apply the patch and log into the OPAC. Test:

- With OpacAllowPublicListCreation enabled, create a new list. You
  should see options for setting category and permissions. Saving the
  new list should complete correctly and save the right settings.
- With OpacAllowPublicListCreation enabled, edit an existing list. You
  should see the same options and saving your changes should work
  correctly.
- With OpacAllowPublicListCreation disabled, create a new list. You
  should only see fields for title and sort. Saving this list should
  complete correctly and save the right settings.
- With OpacAllowPublicListCreation disabled, edit an existing list. You
  should be able to edit only title and sort settings. Saving your
  changes should work correctly.

Repeat your tests for both prog and bootstrap themes.

Revision: Existing public lists can be edited and retain their public
status even if OpacAllowPublicListCreation has since been disabled. This
preserves the behavior previous to this patch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
This patch fixes a big ergonomic issue.
Note: to me, the "New list" action should be outside the tabs.
It is confusing to have a "new list" into the public lists tab when it
is not possible to create new public lists.

Signed-off-by: Broust <jean-manuel.broust@univ-lyon2.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9bb5238bcf55c1dabb3c1e41eee582df888ea80b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12056: fix untranslatable strings in calendar
Owen Leonard [Wed, 9 Apr 2014 13:08:27 +0000 (09:08 -0400)]
Bug 12056: fix untranslatable strings in calendar

In the calendar there are some strings in a JavaScript function which
are not properly wrapped in a function for translation. This patch
corrects this.

This patch also corrects some minor validation issues and spelling and
grammar issues, including those covered by Bug 12055.

To test, apply the patch and view the calendar in Tools -> Calendar.
When you hover your mouse over a day in the calendar you should see a
title tooltip indicating what kind of day/holiday it is and showing the
title of the holiday, if any.

To test that the strings are now being picked up for translation,
run translate update on a po file and confirm that the affected strings
are now present: "Weekly holiday," "Yearly holiday," etc.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works well. New strings on translation file. No koha-qa errors.

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 0837954cdda85549f5552dacefd3a5bc3e58292e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9865 (follow-up) give better usage examples in example SIPconfig.xml
Kyle M Hall [Fri, 10 Jan 2014 13:36:28 +0000 (08:36 -0500)]
Bug 9865 (follow-up) give better usage examples in example SIPconfig.xml

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7b295e9dd7a1f2a9b1d1cf1882edbc2a0e70fe3a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9865: make SIP msg encoding configurable via SIPconfig.xml
Adrien Saurat [Fri, 8 Nov 2013 10:49:56 +0000 (11:49 +0100)]
Bug 9865: make SIP msg encoding configurable via SIPconfig.xml

The accounts->login tag in SIPconfig.xml can now accept a new
parameter, "encoding". It will be mostly used to encode to utf8.

For this, simply add the parameter: encoding="utf8"

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Works as advertised, does nothing if encoding is not set.
Blows up all the machines that can't handled utf8 if it is set :) But
that's not Koha's fault. :)

Patch rebased by Christophe Croullebois  <christophe.croullebois@biblibre.com>

Signed-off-by: Petter Goksoyr Asen <boutrosboutrosboutros@gmail.com>
But now I did it the right way! And I can confirm that this patch solves
all issues with mangled characters in SIP messages. Confirmed that it
looks good with Norwegian characters in patron name and in book titles.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4a72f6b2375895c690dcaaaff26b07de53cfd518)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 8044: (follow-up) ensure Modern::Perl is imported first
Marcel de Rooy [Thu, 15 Aug 2013 13:19:32 +0000 (15:19 +0200)]
Bug 8044: (follow-up) ensure Modern::Perl is imported first

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit fe32727fc55823ab1a3edba70597b89856cd0ea3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 8044: (follow-up) add copyright block and use Modern::Perl
Julian Maurice [Mon, 20 Aug 2012 11:51:27 +0000 (13:51 +0200)]
Bug 8044: (follow-up) add copyright block and use Modern::Perl

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 061cff837d1667b0f714fbbfba59c2caed098d6b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 8044: (follow-up) fix warning and error messages in translate.pl
Julian Maurice [Mon, 20 Aug 2012 08:55:50 +0000 (10:55 +0200)]
Bug 8044: (follow-up) fix warning and error messages in translate.pl

CHARSET is now automatically replaced by UTF-8, and 'update' creates the
PO file if it does not exist.

Also do not try to create PO files if POT file creation failed (when
there is no messages to translate for example).

+ add some verbosity
+ add Locale::Maketext and Locale::Maketext::Lexicon to Koha
dependencies

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>
(cherry picked from commit 75bd34df7acba7b20bc7981f2484e79e19032d4a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
C4/Installer/PerlDependencies.pm

10 years agoBug 8044: new module for translating strings in Perl source files
Julian Maurice [Fri, 4 May 2012 12:33:10 +0000 (14:33 +0200)]
Bug 8044: new module for translating strings in Perl source files

You have to use the new module Koha::I18N

Code example:
  use Koha::I18N;
  use CGI;

  my $input = new CGI;
  my $lh = Koha::I18N->get_handle_from_context($input, 'intranet');

  print $lh->maketext("Localized string!");

PO files are in misc/translator/po/LANG-messages.po.
Creation of PO files are integrated to existing workflow, so to create
PO file for a language, just run in misc/translator:
  ./translate create LANG
To update:
  ./translate update LANG
You can then translate the PO with your favorite editor. Strings will be
localized at runtime.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Works as advertised. Some details needing further attention noted on bug
report.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 114f3dd49998be21643f83bec644f9837c6bdecc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9075: Rename "type" to "material type" on OPAC XSLT detail and results
Marcel de Rooy [Fri, 4 Apr 2014 15:11:15 +0000 (17:11 +0200)]
Bug 9075: Rename "type" to "material type" on OPAC XSLT detail and results

The label Material type better describes what the icon presents.
It is based on leader values of the MARC record.

Revised Test Plan
-----------------
 1) In the staff client, set the OPAC system preference
     OPACXSLTDetailsDisplay to 'default' and save.
 2) In the staff client, set the OPAC system preference
     OPACXSLTResultsDisplay to 'default' and save.
 3) In the staff client, set the OPAC system preference
     opacthemes to 'bootstrap' and save.
 4) In the OPAC, search for biblio used in previous patch testing.
    -- It should display "Type:"
 6) Look at the biblio details
    -- It should also display "Type:"
 7) In the staff client, set the OPAC system preference
     opacthemes to 'prog' and save.
 8) In the OPAC, search for biblio used in previous patch testing.
    -- It should display "Type:"
 9) Look at the biblio details
    -- It should also display "Type:"
10) Apply the patch
11) In the staff client, set the OPAC system preference
     opacthemes to 'bootstrap' and save.
12) In the OPAC, search for biblio used in previous patch testing.
    -- It should display "Material type:" this time.
13) Look at the biblio details
    -- It should display "Material type:" this time.
14) In the staff client, set the OPAC system preference
     opacthemes to 'prog' and save.
15) In the OPAC, search for biblio used in previous patch testing.
    -- It should display "Material type:" this time.
16) Look at the biblio details
    -- It should display "Material type:" this time.
17) Run the koha qa test tool.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Note: Just a simple string change.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
String change, works as advertised in staff, prog and bootstrap
OPAC.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 007c94ff20a5c9d9c3121849b42f820a0da5b869)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9075: Rename "type" to "material type" on staff XSLT detail and results
Marcel de Rooy [Mon, 11 Apr 2011 09:46:44 +0000 (11:46 +0200)]
Bug 9075: Rename "type" to "material type" on staff XSLT detail and results

The label Material type better describes what the icon presents.
It is based on leader values of the MARC record.

Revised Test Plan
-----------------
1) Set the Staff system preference XSLTDetailsDisplay to
   'default' and save.
2) Set the Staff system preference XSLTResultsDisplay to
   'default' and save.
3) Click 'Search the catalog' tab in the search area.
4) Search for something
5) Look for a biblio that has 942$c set to some type.
   -- It should display "Type:"
   Or take a result and modify it to have a 942$c.
6) Look at the biblio details
   -- It should also display "Type:"
7) Apply the patch
8) Search for the same biblio again.
   -- It should display "Material type:" this time.
9) Look at the biblio details
   -- It should display "Material type:" this time.
10) Run the koha qa test tool.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Note: This is a simple string substitution.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4bdd8d9a69f72751f0429be5bc58afdd218a4bb0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11734 - Use new DataTables include in batch modification templates
Owen Leonard [Mon, 10 Feb 2014 17:26:34 +0000 (12:26 -0500)]
Bug 11734 - Use new DataTables include in batch modification templates

Bug 10649 introduced a new include file for adding DataTables-related
JavaScript assets. This patch adds use of this include file to the
batch modification and batch deletion pages.

Minor text changes: Corrected capitalization.

Apply the patch and test the following:

- On batch modification and batch deletion, submit multiple barcodes or
  item numbers. On the results page the title column has been configured
  to use the "anti-the" filter to exclude articles from sorting. Sorting
  on all columns should work correctly.

Edit: Put back checkboxes plugin which was accidentally removed.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7349f847fad28ada0eb98cd5ebb44d563d7ee0f7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11711 - Use new DataTables include in circ templates
Owen Leonard [Fri, 7 Feb 2014 19:06:50 +0000 (14:06 -0500)]
Bug 11711 - Use new DataTables include in circ templates

Bug 10649 introduced a new include file for adding DataTables-related
JavaScript assets. This patch adds use of this include file to all
circ-related pages which use DataTables.

Apply the patch and test the following pages to confirm that table
sorting works correctly:

- Circulation
  - The UseTablesortForCirc system preference must be enabled.
  - Check out to a patron with existing checkouts. Choose a patron who
    is a guarantor to another patron with checkouts in order to test the
    relatives' checkouts table.
  - The checkouts and relatives' checkouts tables have been modified to
    exclude articles when sorting of titles.

- Hold ratios - The title column has been configured to exclude articles
  from sorting

- Transfer to receive

- Holds queue
  - The title column has been configured to exclude articles when
    sorting
  - The date column has been modified to use the title-string filter for
    sorting. An unformatted date is now passed from C4::HoldsQueue.pm to
    the template, where the KohaDates filter is used for formatting.
    Sorting is based on the unformatted date.

- Holds awaiting pickup
  - The "available since" column has been configured for sorting on an
    unformatted date. waitingreserves.pl now passes the unformatted
    date to the template, and formatting is done using the KohaDates
    filter.
  - The title column has been configured to exclude articles when
    sorting.

Edit: Rebased on current master following commit of Bug 11605
Signed-off-by: A. Sassmannshausen <alex.sassmannshausen@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 612b33ae69adbed63e55c91f7314f6c2888f6d71)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11219: (follow-up) fetch only URL parameters
Fridolin Somers [Thu, 10 Apr 2014 11:12:19 +0000 (13:12 +0200)]
Bug 11219: (follow-up) fetch only URL parameters

This followup corrects the fact that when using $query->url(), both
GET and POST params are get.
Using $query->url_param() will only get params directly in URL.

Test plan :
- Enable CAS
- Go to login page : cgi-bin/koha/opac-user.pl
- Try to connect with local login using random login and password
  (they will be transmitted by POST)
- You stay to login page
- Look at CAS login URL
=> Without this patch it will contain the random login and password
   as parameters of opac-user.pl
=> With this patch it does not contain any parameter

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b57d98517c5a9572a54412f7f4e5d872acfa85c3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11219: make CAS authentication work with URL parameters
Fridolyn SOMERS [Fri, 8 Nov 2013 10:12:57 +0000 (11:12 +0100)]
Bug 11219: make CAS authentication work with URL parameters

Bug 10029 tries to fix the use of URL parameters in CAS authentication.
But is does not work.
The full URL must be used in all methods of C4::Auth_with_cas.
Also, in checkpw_cas(), the 'ticket' parameter must be removed to find
the original URL.

This patch removes the 'ticket' parameter from query before calling
checkpw_cas() since the ticket is passed as method arguemnt.
In C4::Auth_with_cas, many methods use the same code to get the CAS
handler and the service URI. This patch adds a private method
_get_cas_and_service() to do the job.

Test plan:
- Enable CAS
- Go to opac without been logged-in
- Try to place hold on a record
=> You get to /cgi-bin/koha/opac-reserve.pl?biblionumber=XXX showing
   authentication page
=> Check that CAS link contains query param "biblionumber"
- Click on CAS link and log in
=> Check you return well logged-in to reserve page with biblionumber
   param
- Check CAS loggout
- Check Proxy CAS auth

Signed-off-by: Koha team AMU <koha.aixmarseille@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests in t, xt, and t/db_dependent/Auth.t.
Also passes QA script.

As I have no working CAS server, I focused on regression testing:
Activated Persona and casAuthentication.
- Verified normal login against database still works.
- Verified Persona login works.
  Note: With Persona you are always forwarded to the patron
  account - so you have to search for the record again before
  you can place a hold.
- Verified that the CAS URL contains the biblionumber when
  logging in while placing a hold.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Retested 2014-04-12

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c8a18f5eefd81dc07512faa962064effdfb88de9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12079: ensure that CheckReserves() includes reserve_id in its response
Galen Charlton [Mon, 14 Apr 2014 18:44:07 +0000 (18:44 +0000)]
Bug 12079: ensure that CheckReserves() includes reserve_id in its response

This patch modifies _Findgroupreserve so that its one caller,
CheckReserves(), would include the reserve_id field in the
hold request it returns.

Failure to include reserve_id in every circumstance resulted
in bug 11947.  This patch is therefore a complementary fix for
that bug, but is not meant to preempt the direct fix for
that bug.

To test:

[1] Verify that t/db_dependent/Reserves.t passes.
[2] Verify that the following test plan taken from
    the patch for bug 11947 works for this patch
    *without* applying the patch for 11947:

* have a few borrowers, say 4.
* have a biblio with a single item (you can scale this up, it should
  work just the same.)
* issue the item to borrower A
* have borrowers B, C, and D place a hold on the item
* return the item, acknowledge that it'll be put aside for B.
* view the holds on the item.

Without the patch:
* the hold priorities in the UI end up being "waiting, 2, 1" when they
  should be "waiting, 1, 2".
* in the database "reserves" table, they're really "0, 2, 3" when they
  should be "0, 1, 2".

With the patch:
* the hold priorities in the UI end up being "waiting, 1, 2"
* in the database, they're "0, 1, 2"

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No koha-qa errors. Test pass

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 695fdebdee802387f45505a1350120727d3e2f7f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11947 - renumber reserves when hold is confirmed
Robin Sheat [Mon, 17 Mar 2014 05:33:00 +0000 (18:33 +1300)]
Bug 11947 - renumber reserves when hold is confirmed

Currently when a reserve is moved to "waiting" status because it's
acknowledged on checkin, the reserve priorities aren't renumbered. This
causes things to go a bit haywire in the UI, in particular, some
reserves can unjustly end up with priority 1 when they shouldn't. It
also seemed to mess with the logic of who should get it next, but I
didn't look too closely at that.

This patch forces a renumbering so that all the priorities remain
copacetic.

Test plan:
* have a few borrowers, say 4.
* have a biblio with a single item (you can scale this up, it should
  work just the same.)
* issue the item to borrower A
* have borrowers B, C, and D place a hold on the item
* return the item, acknowledge that it'll be put aside for B.
* view the holds on the item.
Without the patch:
* the hold priorities in the UI end up being "waiting, 2, 1" when they
  should be "waiting, 1, 2".
* in the database "reserves" table, they're really "0, 2, 3" when they
  should be "0, 1, 2".
With the patch:
* the hold priorities in the UI end up being "waiting, 1, 2"
* in the database, they're "0, 1, 2"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Test plan confirms that the problem exists and that the patch corrects
it.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script, especially t/db_dependent/Reserves.t.
Improves priority calculation.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 95056d17b715b74e3f7149d60e12d5a365d70eeb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12071: improve generation of Z39.50 search links
Fridolin Somers [Fri, 11 Apr 2014 08:54:57 +0000 (10:54 +0200)]
Bug 12071: improve generation of Z39.50 search links

This patch fixes two problems with the generation of
links to execute a Z39.50 search from the staff client
catalog and cataloguing search results page.

First, if using URI::Escape 3.30 or earlier, performing a simple search
with a double quote (e.g., "histoire algerie"), the Javascript is broken
in results page because of :

function GetZ3950Terms(){
  var strQuery="&frameworkcode=";
  strQuery += "&" + "title" + "=" + ""histoire%20algerie"";

Second, the encoding of non-ASCII characters in the search
term was broken.

This patch moves URI escaping from Perl to template with uri TT filter.

Test plan :
- To reproduce the issue with double quotes, the server
  must be running URI::Escape 3.30 or earlier; the current
  version of URI::Escape properly escapes double quote.
- In staff interface, perform a search with double quotes
  that will return no result, ie "aaa xxx"
=> Without patch, javascript is broken
=> With patch, javascript is not broken
- Click on Z3950 button on results page
=> Without patch, the Title input is empty
=> With patch, the Title input contains the search terms

Additional test:
Do a search with something like äöü and then click Z3950
button on results page.
Without patch, encoding is broken in Z3950 form
With patch, encoding is correct.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed a few tabs. Passes tests and QA script.
I can't reproduce the Javascript problem, but I can reproduce
the Z39.50 encoding problem and can detect no regression.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 064d5478d31b05442e19b7d57f0af94d3422731e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoIncrement version for 3.14.9 release v3.14.09
Fridolin Somers [Fri, 25 Jul 2014 12:54:32 +0000 (14:54 +0200)]
Increment version for 3.14.9 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoMerge remote-tracking branch 'translator/3.14.09-translate' into 3.14.x
Fridolin Somers [Fri, 25 Jul 2014 12:41:52 +0000 (14:41 +0200)]
Merge remote-tracking branch 'translator/3.14.09-translate' into 3.14.x

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoUpdate release notes for 3.14.9 release
Fridolin Somers [Fri, 25 Jul 2014 12:37:54 +0000 (14:37 +0200)]
Update release notes for 3.14.9 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>