]> git.koha-community.org Git - koha.git/log
koha.git
9 years agoMerge remote-tracking branch 'translator/3.14.13-translate' into 3.14.x
Fridolin Somers [Fri, 23 Jan 2015 14:14:41 +0000 (15:14 +0100)]
Merge remote-tracking branch 'translator/3.14.13-translate' into 3.14.x

9 years agoUpdate release notes for 3.14.13 release
Fridolin Somers [Fri, 23 Jan 2015 14:13:49 +0000 (15:13 +0100)]
Update release notes for 3.14.13 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 12428 [3.16.x] "OPAC info" is not displayed in the OPAC
Owen Leonard [Wed, 3 Dec 2014 14:22:11 +0000 (09:22 -0500)]
Bug 12428 [3.16.x] "OPAC info" is not displayed in the OPAC

This patch changes the footer include, adding an alias for the jQueryUI
tooltip function to prevent conflict with Bootstrap's function of the
same name.

To test, you must have at least two libraries configured with "OPAC
info" for display in the OPAC.

Modify the holdings of a title so that there is at least one item which
has different holding and home branches matching your library configured
above.

View the detail page for that record. Hovering your cursor over the
library name in the "Location" column should display the branch
information you configured for that library in a tooltip.

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Mason James <mtj@kohaaloha.com>
(cherry picked from commit 6d5e964168c597cf7abd844586afcce6cecc95be)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 10519: (followup) unit tests leave problematic cruft
Tomas Cohen Arazi [Mon, 14 Jul 2014 19:29:38 +0000 (16:29 -0300)]
Bug 10519: (followup) unit tests leave problematic cruft

On testing I've found that t/db_dependent/Suggestions.t leaves
cruft on the DB. Small followup for that.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 724a68540c4fdf634becae7e26094d03dfcf963b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
t/db_dependent/Suggestions.t

9 years agoBug 10519: Suggestions: 'Organize by' and correct display of tab descriptions broken
Jacek Ablewicz [Wed, 11 Jun 2014 06:51:34 +0000 (08:51 +0200)]
Bug 10519: Suggestions: 'Organize by' and correct display of tab descriptions broken

The tabbed display in suggestions offers different options to organize
the tabs. The descriptions on the tabs and some of the search options were
not working correctly, displaying as "Unknown".

To test:
- Add several suggestions to your installation, make sure you have:
  - suggestions from different users
  - suggestions managed by different users
  - suggestions with different statuses
  - suggestions with different selected item types

Test all the 'organize by' options (except "Organize by: Library"
- see note below), make sure that the tabs and search options
have correct descriptions and do no longer display as "Unknown".

- Add 1 or 2 custom status to SUGGEST_STATUS authorized value.
  - Verify display is still correct and your new status are displayed.

Note: "Organize by: Library" option is currently severely broken
(and not easily fixable, especially for 'IndependentBranches'
enabled). But this turns out to be a separate issue, with a different
underlaying causes, and it's outside the scope of this patch.
This should be dealt with later, in it's own bug report.

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 17c0c5f9a507d0b34d98e66540f40ebc9de42845)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 12371 - Links in every patron self-registration email points to a single borrower
Kyle M Hall [Fri, 15 Aug 2014 16:45:44 +0000 (12:45 -0400)]
Bug 12371 - Links in every patron self-registration email points to a single borrower

If multiple registrations are submitted, the first patron to register
will be used for the first patron to click the registration confirmation
link!

Test Plan:
1) Submit 2 new patron registrations
2) Use the confirm link from the 2nd registration
3) Note you end up registering as the first submitted registration
4) Apply the patch
5) Repeat steps 1 and 2
6) Note you are now confirmed correctly

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Test plan appears to work fine, I have a feeling the sql could be
written better but can't come up with it on a Sunday morning

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described and fixes a critical bug.
Passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 37fae3408b66d5b94f9fa4f4c2e5c02f360a8041)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 13609: Patch for 3.16.x and 3.14.x (3.16.x needs both, 3.14.x just this)
Chris Cormack [Thu, 22 Jan 2015 19:43:14 +0000 (08:43 +1300)]
Bug 13609: Patch for 3.16.x and 3.14.x (3.16.x needs both, 3.14.x just this)

To Test:

- Use an installation a reasonable amount of authorities, so that you
  can have a search result list with more than one page
- Activate OpacAuthorities
- Create an OPAC link like shown below, verify that an alert is shown
- Apply patch
- Refresh the page and no alert should appear
- Verify the paging still works correctly for 'numbers' and 'arrows'

URL: .../cgi-bin/koha/opac-authorities-home.pl?and_or=and&marclist=match&op=do_search&operator=contains&orderby=HeadingAsc2"><script>prompt(987898)</script>

Signed-off-by: Mason James <mtj@kohaaloha.com>
(cherry picked from commit 20dd347c4866226e29c4bbeeebf66a33f347302a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 13510 : Fixing the third XSS issue
Chris [Mon, 5 Jan 2015 06:37:51 +0000 (06:37 +0000)]
Bug 13510 : Fixing the third XSS issue

To test

1/ Make sure you have some items in your database, that have values in items.issue
If nessecary do something like

UPDATE items SET issues = 10 WHERE itemnumber=somenumber

2/ Hit a url like http://localhost:8080/cgi-bin/koha/opac-topissues.pl?do_it=1&timeLimit=3%3Cscript%3Eprompt%28924513%29%3C/script%3E

3/ Notice you will get a prompt
4/ Apply patch
5/ Test again

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 82e3bc7e21995172465c0482ba9af9a99cef5a78)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 13510 - Cross site scripting bug in opac-downloadshelf and opac-shelves
Liz [Mon, 5 Jan 2015 02:32:32 +0000 (02:32 +0000)]
Bug 13510 - Cross site scripting bug in opac-downloadshelf and opac-shelves

A specially crafted url causes XSS in Koha

To test:

cgi-bin/koha/opac-shelves.pl?viewshelf=2%22%3E%3Cscript%3Eprompt(987898)%3C/script%3E

cgi-bin/koha/opac-downloadshelf.pl?shelfid=2%22%3Cscript%3Eprompt(1)%3C/script%3E&showprivateshelves

These should cause a popup without the patch. With the patch, no popup.

You may need to create these lists, the xss will not be triggered if the list doesn't exist or you don't
have permission to view them.

Signed-off-by: Chris <chris@bigballofwax.co.nz>
Fixes the two listed problems

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Confirmed patch fixes the problem.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
(cherry picked from commit 0718ced5e452a3d295597d1b5ef976a6772610eb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt

9 years agoTranslation updates for 3.14.13 release
Bernardo Gonzalez Kriegel [Thu, 22 Jan 2015 12:32:24 +0000 (09:32 -0300)]
Translation updates for 3.14.13 release

New language Esperanto
Renamed Kurdish files, ku -> ku-Arab

9 years agoBug 12596: (followup) add reference to bug # and license note
Tomas Cohen Arazi [Fri, 25 Jul 2014 12:55:14 +0000 (09:55 -0300)]
Bug 12596: (followup) add reference to bug # and license note

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c2ddcf83b64c1d23d3d9f83b40f578ca243e75bf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
t/db_dependent/Circulation.t

9 years agoBug 12596 - Backdating returns with SpecifiyReturnDate causes fines for items not...
Kyle M Hall [Thu, 17 Jul 2014 14:57:06 +0000 (10:57 -0400)]
Bug 12596 - Backdating returns with SpecifiyReturnDate causes fines for items not overdue!

When using the backdating of returns feature, an item that is not
overdue is treated as being as many days overdue as it is *not* overdue.
This is due to the fact that _get_chargeable_units appears to return the
difference between the return date and the due date without
consideration the return date being earlier than the due date.

Test Plan:
1) Apply the unit test patch
2) prove t/db_dependent/Circulation.t
3) Note the failure
4) Apply the second patch
5) prove t/db_dependent/Circulation.t
6) Note there are no failures

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Fixes some badly named variables also

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
In order to test this, you need to activate SpecifyReturnDate.
I confirmed the problem and verified that the bug fixes it
by running the tests, but also by testing in staff.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 462c33aeb6a71eb8c5d9afa98d05b7f48b7d742f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 12596 - Unit Test
Kyle M Hall [Thu, 17 Jul 2014 16:17:48 +0000 (12:17 -0400)]
Bug 12596 - Unit Test

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 90328d0811c8c253188a4cb6192d9a6915fcd68a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
t/db_dependent/Circulation.t

9 years agoBug 13296: (follow-up) permit grep on AUTHUNIMARC
Jonathan Druart [Wed, 10 Dec 2014 15:15:26 +0000 (16:15 +0100)]
Bug 13296: (follow-up) permit grep on AUTHUNIMARC

I would prefer not to hide this "stuff".

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Mason James <mtj@kohaaloha.com>
(cherry picked from commit 7960efe1a1c2653cfc5d757fdc0392f8a910419b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 13296 - error when using z3950 with UNIMARC authorities
Fridolin Somers [Wed, 19 Nov 2014 10:56:54 +0000 (11:56 +0100)]
Bug 13296 - error when using z3950 with UNIMARC authorities

When using a z3950 connexion with UNIMARC authorities, you get an error :
Unsupported UNIMARC character encoding [ ] for XML output for UNIMARCAUTH; 100$a -> 20141119

I've seen thant Bug 2060 when adds authorities import adds a special behavior for UNIMARC : marc flavor must be UNIMARCAUTH instead of just UNIMARC.

This patch adds the same behavior when using z3950 connexion and import.

Test plan :
 - Use a UNIMARC install
 - Define a z3950 connexion for UNIMARC authorities
 - Go to Authorities module
 - Click on "New from Z39.50"
 - Perform a search
=> Without patch : you get the error
=> With patch : you get results
 - Import one result
=> You get the authoritie creation form with all datas
You may check same plan with MARC21 install

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
NOTE: depending on the target, the syntax in the configuration
might not be UNIMARC, but MARC21/USMARC instead!
Signed-off-by: Mason James <mtj@kohaaloha.com>
(cherry picked from commit 08a938597e3649d80eea63347787d7bbbe6d0086)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 12849 - fix URLs in sent lists
Robin Sheat [Fri, 29 Aug 2014 04:19:22 +0000 (16:19 +1200)]
Bug 12849 - fix URLs in sent lists

This brings back the http(s) to the URLs in sent lists.

Test plan:
* make a list
* send it to yourself
* see that the URLs aren't clickable
* apply the patch
* repeat, except now the URLs are better

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
By removing this bit of code, the code in Auth.pm is used
instead. The code there is not perfect, but the solution
works and both list and cart use the same code.

Passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 6073d8943c74dcb2319fbd8415f819521d5b1092)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoIncrement version for 3.14.12 release v3.14.12
Fridolin Somers [Mon, 22 Dec 2014 16:46:30 +0000 (17:46 +0100)]
Increment version for 3.14.12 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoMerge remote-tracking branch 'translator/3.14.12-translate' into 3.14.x
Fridolin Somers [Mon, 22 Dec 2014 16:41:33 +0000 (17:41 +0100)]
Merge remote-tracking branch 'translator/3.14.12-translate' into 3.14.x

9 years agoUpdate release notes for 3.14.12 release
Fridolin Somers [Mon, 22 Dec 2014 16:41:12 +0000 (17:41 +0100)]
Update release notes for 3.14.12 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 12025 - Inventory tool fails with "Could not reads headers", or sometimes a timeout
Kyle M Hall [Wed, 21 May 2014 11:14:50 +0000 (07:14 -0400)]
Bug 12025 - Inventory tool fails with "Could not reads headers", or sometimes a timeout

For libraries with large numbers of records, using a file of barcodes in
the inventory tool without selecting filters to limit the catalog
selection to compare against can result in an error of "could not read
headers" or a page timeout.

When you upload a file of barcodes, and do not specify any filters on
the rest of the form, it effectively runs GetItemsForInventory() such
that *every* item in the database is returned.  On a large enough
database, this takes so long that the script times out.

The current documentation in the manual implies that if you upload a
file of barcodes, the *only* thing it does is set the date-last-seen
field.  This is not entirely true; it also tries to compare the list of
scanned items to what is expected to be seen in the list of items.

The work-around for libraries with a large number of item records is to,
when uploading a file of barcodes, to also set the filters (e.g.,
library, shelving location, call number range, etc.) to
specify the range of items that the file of barcodes corresponds to.

This patch adds a warning when a librarian attempts to upload a
barcode list file for comparison without selecting any filters
to limit the catalog selection.

Test Plan:
1) Apply this patch
2) Browse to the inventory tool
3) Click the "Choose File" button, select a file
4) Click the "Submit" button
5) You should see a warning message
6) Click "Cancel"
7) Select one of more filters
8) Click the "Submit" button
9) This time the script should proceed without triggering the warning.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4b9409863eab03072212308e386b3dd622eb9b46)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11014 - Slip Print Problem in Chrome
David Cook [Wed, 21 May 2014 03:22:10 +0000 (13:22 +1000)]
Bug 11014 - Slip Print Problem in Chrome

Currently, slips cannot be printed in circulation, members, or the
self check out when using Chrome.

This patch adds a timer of 1ms which allows Chrome's custom code to
prevent "window.close" occuring before the user has dealt with the
print window.

This patch also allows admins to use the 'IntranetSlipPrinterJS'
system preference to override the slip printing code by centralizing
all the slip printing code in slip-print.inc, and including this JS
anywhere it's needed in the staff client.

I haven't used this include in the OPAC SCO but perhaps it would make
sense to do so as well (even if it isn't referred to in the syspref's
name).

_TEST PLAN_
1) Using Chrome on Windows (not sure if this is an issue on other OSes),
try to print a slip in the following locations:

Fines Tab -> Print button
koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt:

Details tab -> Print button -> Print slip || Print quick slip
koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt:

Details tab -> Print button -> Print summary
koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt:

Fines tab -> Accounts tab -> Print (Manual invoice of $5 sundry)
koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt:

Checkout tab -> Print button
koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt:

Finish button
koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/printslip.tt

2) Note that each time you try to print, a new print page is created
but closed before you have a chance to print.

3) Apply the patch

4) Repeat Step 1

5) Note that the print page now doesn't close until after you've
chosen to print or cancel.

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit dc38bf4f6ccaaef36ebc098949170e0d8d55ba3c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt

9 years agoBug 12086: qa-followup: remove warning on launching unit tests
Jonathan Druart [Mon, 23 Jun 2014 09:43:48 +0000 (11:43 +0200)]
Bug 12086: qa-followup: remove warning on launching unit tests

Without this patch, the following warning appears:
  t/db_dependent/Holds/RevertWaitingStatus.t .. Subroutine
  C4::Context::userenv redefined at
  t/db_dependent/Holds/RevertWaitingStatus.t line 25.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 8e1b6f76d60efd4b7806788ec44c73348dcbdd51)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 12086 - Hold priorities incorrect, when waiting status was reversed
Kyle M Hall [Thu, 17 Apr 2014 16:10:21 +0000 (12:10 -0400)]
Bug 12086 - Hold priorities incorrect, when waiting status was reversed

1) Test record has 1 single item, checked out to patron X
2) Place 3 holds for patrons A, B and C, all title level hold this time
   A, B, C, item branches and staff branch are the same.
3) Return item, confirm hold
4) Confirm item is now waiting for patron A
   Priorities are: A = Waiting, B = 1, C = 2
5) Open patron account of user B, checkout book
   Koha asks: Item X has been waiting for patron A... Revert
   waiting status
   Confirm.
6) Check priorities:
   Hold list shows: A = 1, C = 1
   Database says: A = 1, C = 3
7) Apply this patch
8) Repeat steps 1-6
9) Note the priorities are correct

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Test plan correctly predicts the error and the correction made by the
patch.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit de89021646c4eda33703af9516541bd69758573e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 12405 - Search links on callnumber fails on intranet results page
Fridolin Somers [Wed, 11 Jun 2014 10:25:19 +0000 (12:25 +0200)]
Bug 12405 - Search links on callnumber fails on intranet results page

On intranet results page, the callnumber of items is a search like :
/cgi-bin/koha/catalogue/search.pl?idx=callnum&amp;q=[% result.itemcallnumber |url %]

The callnumber should be URI-escaped to avoid special URI characters like & , ? ...
If the callnumber contains some CCL words or parenthesis, the search will fail, it should be wrapped with double-quotes.

This patch adds this to catalogue/results.pl and catalogue/shelves.pl :
- uri TT filter instead of url
- adds double-quotes using there URI code %22 since its in a HTML attribute using double-quotes

Test plan :
- Edit an item callnumber with : & ABC 123
- Index zebraqueue
- Perform a search returning this item
- Click on the callnumber
=> Without this patch you get no result, because URL parameters are : idx=callnum&q=& ABC 123
=> With this patch you get results
- Set syspref QueryWeightFields off (because this is no bug if on)
- Edit an item callnumber with : AB(C) AND OR
- Index zebraqueue
- Perform a search returning this item
- Click on the callnumber
=> Without this patch you get no result, because the search contains CCL words "OR" and "AND"
=> With this patch you get results

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Tested all with and without queryweightfields -
all searches from clicked call numbers for given callnumbers fail without the patch, all are successful with the patch.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described - no problems found.
Passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 05ace0b38085a11fbdd7c031a8a251243544b564)

9 years agoBug 12451 - circulation rule cant be edited if itemtype contains a space character
Fridolin Somers [Thu, 19 Jun 2014 08:17:53 +0000 (10:17 +0200)]
Bug 12451 - circulation rule cant be edited if itemtype contains a space character

When an itemtype description contains a space character like " Book"
(often used to set this itemtype as first in sorted lists), the edition
of an existing circulation rule does not work, it selects the default
itemtype. Same for patron category.

It's because the JavaScript code performs a trim on value existing in
table itm = itm.replace(/^\s*|\s*$/g,''); This patch adds trim on select
options in editing line.

Test plan :
- Create an itemtype with a leading or trailling space in description :
  ie " Book"
- Go to cgi-bin/koha/admin/smart-rules.pl
- Create a rule with this itemtype, Unit=hours and Hard due date=Exactly
  on 31/12/2015 (any date)
- Click on Edit on this rule line
  => Without this patch, the default itemtype is selected in edition
     line
  => With this patch, the correct itemtype is selected in edition line

Check others selects are ok :
  - Create a rule with Unit=hours and Hard due date=Exactly on
    31/12/2015 (any date)
  - Click on Edit on this rule line
    => The correct options are selected
Same tests with a patron category containing a leading or trailling space in description

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4b316bf85681fca76b45463b7152f2e34a018c55)

9 years agoBug 12211: fix wrong home link in bootstrap public catalog login page
Fridolin Somers [Wed, 7 May 2014 15:58:45 +0000 (17:58 +0200)]
Bug 12211: fix wrong home link in bootstrap public catalog login page

In bootstrap opac-auth.tt, the link to "Home" in breadcrumbs leads
to #, it should lead to opac-main.pl like in all other pages.

Test plan :
 - Use boostrap opac theme
 - Go to cgi-bin/koha/opac-user.pl when not logged
=> without patch, clicking on Home does not change the page
=> with patch, clicking on Home leads to opac-main.pl

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Link ok, no errors.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c5de0df104c65289a04d7d16f5b56daa7667b13b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 10893: fix location facet in UNIMARC
Mathieu Saby [Mon, 16 Sep 2013 09:42:44 +0000 (11:42 +0200)]
Bug 10893: fix location facet in UNIMARC

Location facet in UNIMARC is void. In the code, it is build
on 995$c, while location is store in 995$e (see record.abs).
This patch replace 995$c with 995$e in Koha.pm

To test :
1. Use a UNIMARC Koha instance with ONE branch, and SEVERAL
    locations
2. Make a search in opac and staff interface : no location
    facet on the left side of the screen
3. apply the patch
4. Make the same search : location facets will be displayed

NOTE: I, Mark Tompsett, rebased this. I confirmed that 995$c
      should be 995$e (wiki, Holdings_data_fields_(9xx) page)
      Also note that the code relocated based on bug 10078,
      causing the patch to not apply.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
NOTE: The location facet did not appear in master, but after
      applying the patch, it did appear.
      Because of the code being moved, it is no longer affected
      by the branch count or singleBranchMode.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes wrong subfield code for UNIMARC.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 81cc05cbd6ea31151a03989edd1ffb3f775c3582)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 12432 [QA Followup] - Make "All" tab work when switching back to it
Kyle M Hall [Wed, 6 Aug 2014 22:36:18 +0000 (17:36 -0500)]
Bug 12432 [QA Followup] - Make "All" tab work when switching back to it

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 911127588b4c0b71a18f1f474324f302447eba09)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 12432 - Saved reports tabs not working
Kyle M Hall [Mon, 28 Jul 2014 15:18:59 +0000 (10:18 -0500)]
Bug 12432 - Saved reports tabs not working

In release 3.14.05.000 the tabs on the Saved Reports page worked
correctly but after upgrading to 3.16.00.000 the tabs stop working.
Visually the tabs change but the table of reports is not filtered. There
are no errors reported in the browser console.

Test Plan:
1) Attempt to filter saved reports by group tabs
2) Note no matter the tab you select, all reports appear
3) Apply this patch
4) Repeat step 1
5) Note the reports are now filtered correctly

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script, works as described with the
second patch applied as well.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 273e86c045ad7e34a3eedeee0c5d3328af8a7605)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoTranslation updates for Koha 3.14.12 release
Bernardo Gonzalez Kriegel [Thu, 30 Oct 2014 14:02:01 +0000 (11:02 -0300)]
Translation updates for Koha 3.14.12 release

10 years agoBug 7442: (follow-up) adjust UNIMARC test case to match change in BuildSummary()
Galen Charlton [Mon, 5 May 2014 04:18:22 +0000 (04:18 +0000)]
Bug 7442: (follow-up) adjust UNIMARC test case to match change in BuildSummary()

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit cf7d0c3a99d42fae2d23f9dafba136814dafa492)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 7442: (follow-up) apply change to Bootstrap theme
Galen Charlton [Mon, 5 May 2014 01:30:45 +0000 (01:30 +0000)]
Bug 7442: (follow-up) apply change to Bootstrap theme

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 53114f0b21cd2f80947bec44a04a7c30cf118e57)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 7442: (follow-up) restore display of heading type for non-UNIMARC
Galen Charlton [Mon, 5 May 2014 01:27:33 +0000 (01:27 +0000)]
Bug 7442: (follow-up) restore display of heading type for non-UNIMARC

This patch restores the display of the authority type summary for
MARC21, where at present the heading type (i.e., "Topical Term",
"Personal Names") come over for display in the template.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9fe024667f03077cd9e07f3bcb0c7353d4e3cf4f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 7442 (follow-up) ensuring that summary is display when searching on all types...
Fridolyn SOMERS [Thu, 18 Jul 2013 16:13:12 +0000 (18:13 +0200)]
Bug 7442 (follow-up) ensuring that summary is display when searching on all types of authorities

This patch corrects a small bug :

Authorities search on all types does not show summary because it is computed
with selected type (which is empty) instead of using found authority type.

Test plan :
- Go to intranet autorities search
- Perform a search on all authorities types
- Look at results
  => Without this patch, results rows do not display the autority summary, only
     authorized headings

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ebcb64e9fa51fd7f02918d9543abeeac4f8ab46d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 7442: fix crash when selecting an authority with 200$x or 200$y (UNIMARC)
Fridolyn SOMERS [Thu, 18 Jul 2013 11:59:07 +0000 (13:59 +0200)]
Bug 7442: fix crash when selecting an authority with 200$x or 200$y (UNIMARC)

From a biblio record, if one wants to add a 600$a information, a pop-up
appears.  On this new window, on search terms typed and validated, a table
result is displayed, with a column "Get It!" allowing the selection of an
authority.  From here, different cases:

1) If we have a simple authority with 200$a and 200$b subfields, a link
   "choose" is displayed, working correctly.

2) If the authority has different occurences of 200$a/200$b, numeric links (1 2
   and so on) are displayed, one for each occurence.  In the example of my
   screenshot, the line with a "Paul, Korky -- Pauline, Korkette" summary
   possesses two links : "1" will add "Paul, Korky" whereas "2" will add
   "Pauline, Korkette" (couldn't come up with a better name ;)).

3) If the authority has 200$x or 200$y subfields defined, several links are
   also created, when it should not be the case.  In our example, "Niclausse,
   Paul -- Expositions" will create a link "1" for "Niclausse, Paul" and a link
   "2" for "Expositions".  Clicking on the 2nd link leads to the following
   error: Software error: Can't call method "subfields" on an undefined value
   at
   /home/asaurat/workspace/versions/community/authorities/blinddetail-biblio-search.pl
   line 86.  Only the cases 1 and 2 should be handled. The creation of links
   for subfields like 200$x or 200$y should be removed.

This problem is caused by the use of " -- " has separator of authorities with
several headings, but also in some heading between main part and subdivisions.
This patch corrects this by using an array in authorities summary so that
presentation is computed in template. I've choosen to use the pipe separator
between authorities with several headings. This may be changed to be
configurable.

Test plan :

- Edit an authority type summary : for example subject (heading on 250) :
  summary "[250a][ -- 250x]"
- Create an authority A1 with one heading and a subdivision : for example a
  subject : 250$a "History" 250$x "20th century"
- Create an authority A2 with several headings. for example a subject : 250$a
  "History" 250$a "Legends"
- Rebuild Zebra queue
- Go to OPAC and click on "Authority search" and search on "History"
  => You will find A1 and A2 :
    History -- 20th century
    History | Legends
- Go to intranet autorities search and search on "History"
  => You will find A1 and A2 :
    History -- 20th century
    History | Legends
- Edit a record using this autorities type as thesaurus : for example on 606$a
- Click on thesaurus link and search on "History"
  => You will find A1 and A2 :
    History -- 20th century ; 0 times ; choose ; Edit authority
    History | Legends       ; 0 times ; 1 2    ; Edit authority
- Click on link "2" to chosse "Legends"
  => You get "Legends" in heading field : for example 606$a

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
I can confirm the problem and the solution. I have tested the patch on a large
DB with authorities having multiples headings. There is no regression on bug
4838.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Without the patch I couldn't choose between multiple headings
in the authority plugin, but with the patch it works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 99dbc5cdf7d7e4d9e83378fbf4d0fb5d5c2de38e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12229: when exporting MARC records (as ISO2709), refuse to output records that...
Stéphane Delaune [Mon, 12 May 2014 14:58:14 +0000 (16:58 +0200)]
Bug 12229: when exporting MARC records (as ISO2709), refuse to output records that would be longer than the MARC limit

Test:
1. Edit a bib record, add 100.000 chars text to 500a
2. Go to Tools -> Export data (or run tools/export.pl on
   the command line)
3. Verify that exporting as XML includes the record
4. Verify that exporting as MARC does not include the record,
   and that you get the following warning:

export.pl: record (number 2025) length 102668 is larger than the MARC spec allows (99999 bytes) at...

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 1f72a1c2dd45c3a570746dd575b0fcfb38d13dc4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoIncrement version for 3.14.11 release v3.14.11
Fridolin Somers [Thu, 2 Oct 2014 12:38:40 +0000 (14:38 +0200)]
Increment version for 3.14.11 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoMerge remote-tracking branch 'translator/3.14.11-translate' into 3.14.x
Fridolin Somers [Thu, 2 Oct 2014 12:36:08 +0000 (14:36 +0200)]
Merge remote-tracking branch 'translator/3.14.11-translate' into 3.14.x

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoUpdate release notes for 3.14.11 release
Fridolin Somers [Thu, 2 Oct 2014 12:32:13 +0000 (14:32 +0200)]
Update release notes for 3.14.11 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12876: (followup) remove useless diags
Tomas Cohen Arazi [Wed, 24 Sep 2014 00:07:08 +0000 (21:07 -0300)]
Bug 12876: (followup) remove useless diags

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 18099ed18a4786896ae9e39cff58c176be95c23e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12876: Improve unit tests for CanReserveBeCanceledFromOpac
Jonathan Druart [Fri, 5 Sep 2014 15:40:05 +0000 (17:40 +0200)]
Bug 12876: Improve unit tests for CanReserveBeCanceledFromOpac

This patch fix the subroutine name and add a restriction on the
arguments: both argument are mandatory!

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
t/db_dependent/Reserves.t

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

10 years agoBug 12876 - Reserve in waiting/transfer status may be cancelled by user
Rafal Kopaczka [Fri, 5 Sep 2014 12:50:15 +0000 (14:50 +0200)]
Bug 12876 - Reserve in waiting/transfer status may be cancelled by user

User may cancel his own reservation at waiting or in transit status
through calling opac-modrequest.pl. Cancel button is disabled in
interface but possibility to cancel should be checked also in
opac-moderequest.pl, before calling CancelReserve().
Similar situation is with opac-modrequest-suspend.pl

This patch provides new soubroutine to chceck if user can cancel given
reserve. It's possible only when he's owner of hold and hold isn't in
transfer or waiting status.

Additionaly there are new test for this function in Reserves.t

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests, QA script and new tests.
Works as described, tested with:
.../cgi-bin/koha/opac-modrequest.pl?reserve_id=XXX

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
t/db_dependent/Reserves.t

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

Conflicts:
opac/opac-modrequest-suspend.pl

10 years agoBug 12873 - Reserve can be cancelled by any logged in user
Rafal Kopaczka [Thu, 4 Sep 2014 14:40:33 +0000 (16:40 +0200)]
Bug 12873 - Reserve can be cancelled by any logged in user

It is possible to cancel reservations through simply running opac-modreserve.pl with existing reserve_id number. This may provide remove even all reservations from system. The only limitation is that user have to be logged in. Simplest solution is to check whether reserve belongs to user or not.

Test plan:
1. Create reserves by 2 different users, and get their ID's
2. Before patch, hold may by cancelled by anyone who run site:
http://example.com/cgi-bin/koha/opac-modrequest.pl?reserve_id=XXX
3. After patch hold may by cancelled only by user whose reserve is.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 60875757c761a9ad59734e968cf34a831c65e9a6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoTranslation updates for Koha 3.14.11 release
Bernardo Gonzalez Kriegel [Wed, 24 Sep 2014 17:46:31 +0000 (14:46 -0300)]
Translation updates for Koha 3.14.11 release

Added new language Khmer.

10 years agoBug 12112: remove disused routine C4::Breeding::ImportBreeding()
Galen Charlton [Sat, 19 Apr 2014 21:57:08 +0000 (21:57 +0000)]
Bug 12112: remove disused routine C4::Breeding::ImportBreeding()

This patch removes the ImportBreeding() routine, which lost its
last caller as of the patch for bug 10462.

To test:

[1] Verify that prove -v t/Breeding.t passes.
[2] Perform a Z39.50 search in the staff interface.
[3] Perform a cataloguing reservoir search in the staff
    interface; verifying that cached records from the search
    done in step 2 are retrieved.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
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 990bb17e14efb8a2c16236c89ef5869dcfc48ad4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12105 - Remove duplicated plugin jquery.dataTables.columnFilter.js
Owen Leonard [Thu, 17 Apr 2014 19:18:36 +0000 (15:18 -0400)]
Bug 12105 - Remove duplicated plugin jquery.dataTables.columnFilter.js

This patch removes a redundant copy of the DataTables plugin
jquery.dataTables.columnFilter.js and corrects two templates.

The path to the plugin has been modified in acqui/parcel.tt:

- Go to Acquisitions and search for a vendor.
- Open the detail page for that vendor.
- Click the "Receive shipments" button.
- Select an invoice to view.
- In the table of titles, confirm that the column header search forms
  work to filter column data.

In the template for the Staged MARC management page the plugin has been
removed as it is unused. A couple of markup corrects have been made.
Confirm that table sorting is unaffected by going to Administration ->
Staged MARC management, clicking a staged MARC file, and viewing the
table of items in that batch.

There should be no more remaining instances of this path in the
templates:

[% themelang %]/lib/jquery/plugins/jquery.dataTables.columnFilter.js

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
NOTE: I believe the sort order of the Order Line column is
      strange, but unrelated to this patch. The search area
      functions (filtering, paging, page size, etc.) worked
      fine.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 45ce7431d42cd470d7f7326d8935333014b1f62c)

Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt

10 years agoBug 10782 - Add a koha-mysqlcheck script
Magnus Enger [Mon, 14 Oct 2013 19:10:31 +0000 (21:10 +0200)]
Bug 10782 - Add a koha-mysqlcheck script

This patch adds the koha-mysqlcheck script, as a "frontend" for
the mysqlcheck command. It can be used to check the integrity of
database tables, as well as to repair them. See "man mysqlcheck"
for more information.

The script takes a Koha instance name as its only required
parameter. Any other parameters provided before the instance
name are passed directly to mysqlcheck, which means that all
the functionality of mysqlcheck is available through this script.

To test the script:
- Apply the patch, build your own packages and install them, or
- copy koha-mysqlcheck to a server already running off packages

- Run some variations of the command, with and without arguments,
  and check that the output makes sense. E.g.:
    sudo koha-mysqlcheck myinstance
    sudo koha-mysqlcheck -e myinstance # Extended checks
    sudo koha-mysqlcheck -e -v myinstance # Extended checks and verbose
- See "man mysqlcheck" for other relevant options

To test the man page:
- Run these commands and look at the formatted man page:
    $ xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl \
      debian/docs/koha-mysqlcheck.xml
    $ man -l koha-mysqlcheck.8
- Make sure this test passes:
    $ prove -v xt/verify-debian-docbook.t

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 25c932967f9def41b689b07f4536f398b612944b)

10 years agoBug 11646: fix untranslatable confirm popup in field 006 and 008 builders
Bernardo Gonzalez Kriegel [Sat, 22 Mar 2014 17:50:03 +0000 (14:50 -0300)]
Bug 11646: fix untranslatable confirm popup in field 006 and 008 builders

This patch MARC21 modifies value builders 006 and 008 to make
confirm popup translatable

To test:
1) Update po files for your preferred language, xx-YY
cd misc/translator; perl translate update xx-YY
2) Check that confirm string is NOT present
egrep -B3 "Show values for|material type\?" po/xx-YY*po
3) Apply the patch
4) Repeat 1)
5) Repeat 2), now the strings are present

Also check that english or translated popup is right

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit a9f794a9c89465bdbf1b54ecd1c683c7825c8ae3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11639: fix untranslatable strings in 007 builder
Bernardo Gonzalez Kriegel [Sat, 22 Mar 2014 16:53:44 +0000 (13:53 -0300)]
Bug 11639: fix untranslatable strings in 007 builder

This patch modifies marc21_field_007.tt to make
some missing strings translatable

To test:
1) Using your preferred language, xx-YY, updatepo files
cd misc/translator
perl translate update xx-YY
2) Check that missing strings are NOT present
egrep -i "exact bit depth|pad with zero|use up to 6" po/xx-YY-i-staff-t-prog-v-3006000.po
3) Apply the patch
4) repeat 1)
5) Repeat 2), check that missing strings are present

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Template change, works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit d944728a917b5645ef3248e9689638f565388025)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12117 - Remove unused image myshadow.png from the staff client
Owen Leonard [Mon, 21 Apr 2014 16:55:23 +0000 (12:55 -0400)]
Bug 12117 - Remove unused image myshadow.png from the staff client

myshadow.png was used by a jQuery plugin which has long been removed.
This patch removes it.

To test, search the Koha source for references to myshadow.png.
There should be none.

Followed test plan, patch removed file as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 5c573a7ad8d50788d3b5a78e58efb8c758a9ec0c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11864: Show parent order line in received orders table
Julian Maurice [Thu, 25 Jul 2013 07:38:24 +0000 (09:38 +0200)]
Bug 11864: Show parent order line in received orders table

Test plan:
1/ Go to the receipt page of a bookseller
2/ Choose an invoice for which you have already partially
   received some orders (or create an order an receive it
   partially)
3/ In the received orders table, under column Order line,
   you should now see the parent order line number in
   parenthesis

Signed-off-by: remy juliette <juliette.levast@iepg.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 51c0e46033fffcbb07fb5456640e35fb41623707)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11864: (code cleanup) re-indent parcel.tt and rename a variable
Julian Maurice [Thu, 25 Jul 2013 07:25:21 +0000 (09:25 +0200)]
Bug 11864: (code cleanup) re-indent parcel.tt and rename a variable

Signed-off-by: remy juliette <juliette.levast@iepg.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed 2 additional tabs.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 906b7deffe88bf245d1b21c1e3b8df800034db2e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 7308: (follow-up) tweak style of child fund amounts
Galen Charlton [Mon, 21 Apr 2014 04:15:11 +0000 (04:15 +0000)]
Bug 7308: (follow-up) tweak style of child fund amounts

This patch changes the styling of the amounts of child funds
in the funds table to use a more visible indication (i.e.,
italics rather than a font color of grey) and to use a
a new CSS class, "child_fund_amount", rather than a hard-coded
style.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c3a52a9b200f3e87033ecd8f42938eaa6ddab410)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 7308: (follow-up) change color style for fund child
Jonathan Druart [Mon, 28 Oct 2013 11:15:27 +0000 (12:15 +0100)]
Bug 7308: (follow-up) change color style for fund child

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 773f28ac0d81ce9544fe8052da117e5b0c1da4c7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 7308: (follow-up) removing line breaks for better translatability
Katrin Fischer [Sun, 21 Jul 2013 08:07:26 +0000 (10:07 +0200)]
Bug 7308: (follow-up) removing line breaks for better translatability

Because of the lines breaks in the table headings the strings
were separated in translation. Example:

Base-level allocated
 - Base-level
 - allocated

If you look at a smaller screen the table headings will still break
without the additional <br />.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 3c54feb1b3e15ddeca23adad1bec45e29dfeb1d5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 7308: rework aqbudgets.pl table
Julian Maurice [Thu, 11 Oct 2012 12:14:20 +0000 (14:14 +0200)]
Bug 7308: rework aqbudgets.pl table

admin/aqbudgets.pl should have the following columns:

Base-level allocated (or just Allocated)
Base-level ordered
Total sub-levels ordered
Base-level spent
Total sub-levels spent
Base-level available
Total sub-levels available

Base-level is always calculated for one level, without children.
Total sub-levels should include child funds.
Available is calculated as "allocated - (ordered + spent)".

Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Seems to work alright for me.
Passes QA script and tests, after I fixed 2 tabs in admin/aqbudgets.pl.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 1e808f180540a7552a9c1467ee685ac037d8c042)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 7308: Show ordered amount in aqbudgets.pl
Julian Maurice [Fri, 13 Apr 2012 08:40:35 +0000 (10:40 +0200)]
Bug 7308: Show ordered amount in aqbudgets.pl

Signed-off-by: Cédric Vita <cedric.vita@dracenie.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit dc3a90c41160493e9dfbf3353d755825c7f403b8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12438 - Bad encoding in acquisition basket
Fridolin Somers [Tue, 17 Jun 2014 14:38:54 +0000 (16:38 +0200)]
Bug 12438 - Bad encoding in acquisition basket

We noticed a bad encoding (diacritics replaced by <?>) in acquisition basket when updating a server to Debian Wheezy.
We found it comes from a query containing biblio.title twice.
Maybe the mysql newer version creates this side-effect.

Test plan :
- Create an order on a record containing a diacritic in title
- Look at the basket : cgi-bin/koha/acqui/basket.pl?basketno=x
=> Without the patch the record title is bad encoded (with <?>)
=> With this patch the record title is well encoded
- Check also basket CSV export

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Good catch!
Works as expected, passes tests and QA script.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Duplicated biblio.title is a (minor) bug, and should be removed.

The side-effect of it solving an encoding problem might be seen
as problematic: it hides a real problem.
The efforts on 11944 actually solve this encoding problem (11944
merged into master actually fixes this), so I'm pushing it, for
a short term solution for stable, with the hope that we will soon
have 11944 pushed.
BTW, non-diacritic but non-ASCII characters are not broken either.

(cherry picked from commit 9fe36e0c705b958859babe565517554b722c66cd)

10 years agoBug 12046: Authentication using CAS - bootstrap
Fridolin Somers [Tue, 8 Apr 2014 14:48:31 +0000 (16:48 +0200)]
Bug 12046: Authentication using CAS - bootstrap

At the OPAC, if the bootstrap theme is used, the modal
dialog does not allow to use the CAS authentication.

This patch proposes, in case CAS is enabled, to
redirect to the opac-user.pl page (like prog theme).
This is because the popup content should stay small
(thinking about mobile surf), and that CAS url is
actually only computed in opac-user (see C4/Auth.pm)
and it would not be performant to compute it in all
pages.

Test plan:
- set syspref opacthemes to bootstrap
- enable the casAuthentication syspref
- fill the casServerUrl syspref with something like:
  https://localhost:8443/cas
- go on the opac home page
- click on "Log in to your account" link (top right)
=> You go to cgi-bin/koha/opac-user.pl page where you
  see the cas link
- disable the casAuthentication syspref
- go on the opac home page
- click on "Log in to your account" link (top right)
=> You see a popup for login and password

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Normal login still works with/without CAS.
Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4bc46dbbcb93ca43b2fd138cf65f51893978b3ad)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11292 [QA Followup] - Use noEnterSubmit instead of new keypress handler
Kyle M Hall [Mon, 16 Jun 2014 11:30:03 +0000 (07:30 -0400)]
Bug 11292 [QA Followup] - Use noEnterSubmit instead of new keypress handler

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 6f4baf2c59ff00b64a0beb891605c2dd4a7452a6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11292 - barcode scanner clicking 'save'
Kyle M Hall [Thu, 22 May 2014 12:35:16 +0000 (08:35 -0400)]
Bug 11292 - barcode scanner clicking 'save'

When cataloging a bib record if you scan an ISBN barcode in the barcode
scanner clicks the 'save' button before the cataloging is done. This did
not happen in 3.10, but is happening again in 3.12.

Test Plan:
1) Open the marc editor
2) Focus on a field, hit the enter key
3) Note the record tries to save
4) Focus on an indicator, hit the enter key
5) Note the record tries to save
6) Apply this patch
7) Repeat steps 2 and 4, note the record no longer
   tries to save upon carriage return

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Patch tested with a sandbox.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit a52a0a8811f6ad03c422c62280bc184a9e16996d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoIncrement version for 3.14.10 release v3.14.10
Fridolin Somers [Wed, 3 Sep 2014 15:33:45 +0000 (17:33 +0200)]
Increment version for 3.14.10 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoMerge remote-tracking branch 'translator/3.14.10-translate' into 3.14.x
Fridolin Somers [Wed, 3 Sep 2014 15:29:54 +0000 (17:29 +0200)]
Merge remote-tracking branch 'translator/3.14.10-translate' into 3.14.x

10 years agoUpdate release notes for 3.14.10 release
Fridolin Somers [Wed, 3 Sep 2014 15:24:27 +0000 (17:24 +0200)]
Update release notes for 3.14.10 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoTranslation updates for 3.14.10 release
Bernardo Gonzalez Kriegel [Mon, 1 Sep 2014 16:36:20 +0000 (13:36 -0300)]
Translation updates for 3.14.10 release

10 years agoBug 11552: (follow-up) fix a typo in a comment
Galen Charlton [Mon, 21 Apr 2014 03:34:31 +0000 (03:34 +0000)]
Bug 11552: (follow-up) fix a typo in a comment

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 123f07cc8ac756c4d3bdeb4f38fa36a9bb6581bf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11552: allow searching on original order number after a transfer
Jonathan Druart [Tue, 14 Jan 2014 12:33:58 +0000 (13:33 +0100)]
Bug 11552: allow searching on original order number after a transfer

If an order is transferred from one basket to another, it should be
possible to retrieve it with the original order number (AKA order
line).  This patch makes it so.

Test plan:
- transfer an order
- note the original order number and the new one
- receive the order and, on the parcel page, try to find your order with
  the original order number and the new one.

Signed-off-by: sonia bouis <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
RM note: this works only for the most recent transfer, so if an order
gets transferred multiple times, earlier order numbers won't retrieve
it.

(cherry picked from commit 6eb69ed3ec7650b6298968c4a79e2cb4204ebb6f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9288: (follow-up) more tweaks
Galen Charlton [Sun, 20 Apr 2014 20:20:15 +0000 (20:20 +0000)]
Bug 9288: (follow-up) more tweaks

- add license and copyright statement
- tidy up help text

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

10 years agoBug 9288: (follow-up) remove function prototype
Kyle M Hall [Mon, 30 Dec 2013 13:22:33 +0000 (08:22 -0500)]
Bug 9288: (follow-up) remove function prototype

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 90f1814b9e83d37a29fdef011912741230a5cdfe)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9288: (follow-up) minor code tweaks
Kyle M Hall [Tue, 22 Oct 2013 16:32:44 +0000 (12:32 -0400)]
Bug 9288: (follow-up) minor code tweaks

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 887829613fd12c04694d80975c7a6c8244c2574e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9288: (follow-up) use specified terminator for both input and output
Kyle M Hall [Fri, 20 Sep 2013 14:04:41 +0000 (10:04 -0400)]
Bug 9288: (follow-up) use specified terminator for both input and output

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 8af35f89badacaf025226811c233f2cf44554910)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9288: (follow-up) add --terminator option; use Modern::Perl
Kyle M Hall [Mon, 8 Jul 2013 13:21:25 +0000 (09:21 -0400)]
Bug 9288: (follow-up) add --terminator option; use Modern::Perl

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 0f521663cf73b1c1122712d08094c65f1d59df6a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9288 - Add a script to test SIP from the command line
Kyle M Hall [Fri, 14 Dec 2012 16:56:36 +0000 (11:56 -0500)]
Bug 9288 - Add a script to test SIP from the command line

This is a very basic start to a sip server testing script.
I imagine we will want to make it interactive in end,
essentially replicating what a SIP based self-checkout machine does.

Signed-off-by: Adrien Saurat <adrien.saurat@biblibre.com>
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.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b2e8dfe816ad2f0b130a0b5fab07514c1464cee7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9972: (follow-up) enable Lexile searches to work using QueryParser
Galen Charlton [Sun, 20 Apr 2014 16:54:16 +0000 (16:54 +0000)]
Bug 9972: (follow-up) enable Lexile searches to work using QueryParser

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit eb139e4a8b2a517099a19d77708fa5ef40131274)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9972: (follow-up) add new indexes to the QueryParser config
Galen Charlton [Sun, 20 Apr 2014 16:47:28 +0000 (16:47 +0000)]
Bug 9972: (follow-up) add new indexes to the QueryParser config

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 26e2224409ef90d2ba334906d2729c4416a3b5b8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9972: Add/change some zebra indexes (MARC21)
Mirko Tietgen [Tue, 2 Apr 2013 13:03:53 +0000 (15:03 +0200)]
Bug 9972: Add/change some zebra indexes (MARC21)

This patch adds :w and :p versions to the index for »Lexile number«
(it has only :n so far) and adds indexes for 653 (Index term
uncontrolled), 655 (Index term Genre/Form), 041 (language-audio) and
041 (language-subtitle). It also adds the »curriculum«-index to
Search.pm.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 84bdb555491af52331ece7420e797e838c814229)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11248: (follow-up) fix template for translated list emails in staff
Katrin Fischer [Sun, 17 Nov 2013 17:37:59 +0000 (18:37 +0100)]
Bug 11248: (follow-up) fix template for translated list emails in staff

- Fixes some capitalization problems
- Adds an URL filter

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 5b8494dcc9256358865eb1b8a49a91d96cddb2bb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11248: fix encoding issue on emailing a list (OPAC)
Jonathan Druart [Thu, 14 Nov 2013 13:05:53 +0000 (14:05 +0100)]
Bug 11248: fix encoding issue on emailing a list (OPAC)

Test plan:
- send a list via email with the english version.
- translate templates and retry with another language.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely. Links to the OPAC are correct.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 394ece2e1012aebdc5543f739c5438f91c66d477)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11248: fix encoding issue on emailing a list (INTRANET)
Jonathan Druart [Thu, 14 Nov 2013 13:00:46 +0000 (14:00 +0100)]
Bug 11248: fix encoding issue on emailing a list (INTRANET)

Test plan:
- send a list via email with the english version.
- translate templates and retry with another language.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Sending an intranet list from translated templates requires
a new list template for the intranet. I have added the needed
changes in a follow-up.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9181636874a03cf43e7c26a89364279bfe2aa2ee)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 8258: Use patron's library's notice for DUEDGST and PREDUEDGST
Jonathan Druart [Wed, 5 Mar 2014 14:08:13 +0000 (15:08 +0100)]
Bug 8258: Use patron's library's notice for DUEDGST and PREDUEDGST

If a notice is defined for the library of the patron, it should be
used.

Without this patch, the notice used is the one defined for all
libraries.

Test plan:
1/ Set the advanced notice for a patron using digest.
2/ Check one item out to this patron (backdate the return date according
the days in advance value).
3/ launch advance_notices.pl -c
4/ Verify the notice used is the default one.
5/ Define a notice for the library of the patron for PREDUEDGST
6/ launch advance_notices.pl -c
7/ Verify the notice used is the one previously defined.
8/ Check one item out to this patron (date due = today)
9/ launch advance_notices.pl -c
10/ Verify the notice used is the default one.
11/ Define a notice for the library of the patron for DUEDGST
12/ launch advance_notices.pl -c
13/ Verify the notice used is the one previously defined.

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.
Test case: User from Library A, checked out books
- in library A from A and B
- in library B from B
Verified, that the 'all libraries' notice is still used,
when no specific notice is defined.
Verified, that the patron's home library noticed is used,
when defined.

Note: Before and after the patch we print the branch information
from the patron's home library, so also using the template from
this branch, seems logical. All items over all branches are
processed into one single reminder email, before and after the patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 836f3ce992ef2c3bffbcf80c73bcacbbe479ea85)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11243: UT: unit tests for GetBasketsInfosByBookseller
Jonathan Druart [Wed, 20 Nov 2013 09:12:56 +0000 (10:12 +0100)]
Bug 11243: UT: unit tests for GetBasketsInfosByBookseller

Verify prove t/db_dependent/Acquisition/GetBasketsInfosByBookseller.t
returns green.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 734846e4cb371cf45c5025e9d61e66bd4144936d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11243: update vendor list to also display canceled bib counts
Jonathan Druart [Wed, 20 Nov 2013 09:12:00 +0000 (10:12 +0100)]
Bug 11243: update vendor list to also display canceled bib counts

Same as previous patch but for the biblios count.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7ca91683854127be5f15d083d7c7e55a44325b74)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11243: make vendor list distinguish between active and canceled items
Jonathan Druart [Wed, 13 Nov 2013 13:57:55 +0000 (14:57 +0100)]
Bug 11243: make vendor list distinguish between active and canceled items

On the vendor result list, the "Item count" columns contain the sum of
all items ordered for a basket. But if an order is canceled, the item
count is not really meaningful.

This patch just adds, in parenthesis, the number of items canceled.

Test plan:
- create a basket and 3 orders with different number of items
- cancel 1 order
- verify on the supplier list that the number of items is correct and
  the number of canceled items is correct too.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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.

Note: In case the biblio was deleted when the order was cancelled,
the number of biblios will be off.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b62a793580292455e78dc21ca27df17e2748e95e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11254: make reservoir search normalize ISBNs
Fridolyn SOMERS [Fri, 15 Nov 2013 09:43:21 +0000 (10:43 +0100)]
Bug 11254: make reservoir search normalize ISBNs

When importing records, the ISBN is normalized and stored
into database (see C4::ImportBatch::_add_biblio_fields).  But when
searching with ISBN into reservoir, it is not normalized
(see C4::Breeding::BreedingSearch).  So search does not match.

This patch adds the normalisation to reservoir search.  Also, it
replaces call private method _isbn_cleanup by GetNormalizedISBN,
the correct public method.  Also allows the reservoir search
on ISBN with hyphens.

This is intended to fix only reservoir searches.

Revised Test plan
-----------------
 1) Back up DB
 2) Save copy of attached example somewhere findable
 2) Home -> Tools -> Stage MARC records for import
 3) Click Browse and select the example MARC file
 4) Click Upload file
 5) Tweak as desired then click Stage for import
 6) Click Manage staged records
 7) Click Import this batch into the catalog
 8) Home -> Cataloging
 9) In the Cataloging search text box type 978-0-691-14289-0 and
     click Submit
    -- ISBN13 with hypens not found in reservoir
10) In the Cataloging search text box type 9780691142890 and
     click Submit
    -- ISBN13 without hypens not found in reservoir
11) In the Cataloging search text box type 0-691-14289-0 and
     click Submit
    -- ISBN10 with hypens not found in reservoir
12) In the Cataloging search text box type 0691142890 and
     click Submit
    -- ISBN10 without hypens found in reservoir
13) Apply patch
14) Repeat steps 9-12, this time it is always found! :)

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 cac06afeb1f03200cfc7ab48162c184be8d1526b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11912: (follow-up) Use the common way to mock syspref
Jonathan Druart [Thu, 20 Mar 2014 10:14:58 +0000 (11:14 +0100)]
Bug 11912: (follow-up) Use the common way to mock syspref

t::lib::Mocks::mock_preference provides a simple way to mock syspref.

Test plan:
Verify that t/db_dependent/Biblio.t returns green.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c5f8bf244b9db2e3279774435ae75f7c4b4ab68a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11912: (refactoring followup) make GetMarcISBN implement its advertised API
Tomas Cohen Arazi [Mon, 10 Mar 2014 14:52:19 +0000 (11:52 -0300)]
Bug 11912: (refactoring followup) make GetMarcISBN implement its advertised API

The current implementation of GetMarcISBN contradicts the documented API.
It currently returns an array of hashes with only one key (marcisbn)
which doesn't add any value to it.

I chose to fix GetMarcISBN to honour the API instead of changing thex
 docs, because it seems a really silly change.

To test:
- Run:
  prove t/db_dependent/Biblio.t
=> SUCCESS
- catalogue/detail.pl should correctly show ISBNs.
- opac/opac-detail.pl should correctly show ISBNs in both prog and bootstrap.
- opac-opac-sendshelf.pl should correctly show ISBNs in the email.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 774483772b2a7ff8ebdb8a9aeac82881e7c858cf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11912: fix problem where GetMarcISBN wrongly prepends a space to ISBNs
Tomas Cohen Arazi [Sun, 9 Mar 2014 21:39:11 +0000 (18:39 -0300)]
Bug 11912: fix problem where GetMarcISBN wrongly prepends a space to ISBNs

This patch makes the logic inside GetMarcISBN simpler and
fixes the issue.

To test:
- Run the regression tests:
  prove -v t/db_dependent/Biblio.t
=> FAIL
- Apply the patch
- Run:
  prove -v t/db_dependent/Biblio.t
=> SUCCESS
- Verify that opac-detail.pl and catalogue/detail.pl look as usual regarding ISBN
- Sign off

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c4900dc448aa029749ab27f98b59d1be6eb8bb14)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11912: (regression tests) GetMarcISBN wrongly prepends a space to ISBNs
Tomas Cohen Arazi [Sun, 9 Mar 2014 20:21:48 +0000 (17:21 -0300)]
Bug 11912: (regression tests) GetMarcISBN wrongly prepends a space to ISBNs

This patch makes the tests run in both MARC21 and UNIMARC contexts.
It previously run only for MARC21. It mocks what needs to be mocked.

To test, run
 - prove t/db_dependent/Biblio.t
=> Notice the first ISBN has a space in front of it and those tests fails.

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit da7dd4ed8c2462597712a11b0a018db87b1fef87)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11489: (follow-up) fix tab
Galen Charlton [Sat, 19 Apr 2014 16:14:34 +0000 (16:14 +0000)]
Bug 11489: (follow-up) fix tab

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 6c6d21a8d040482b88b5b6752b32ed749089fbc9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>