Commit graph

5274 commits

Author SHA1 Message Date
Julian FIOL
975b055c08 Bug 13940 : Testing C4::OAI::Sets
Testing C4::OAI::Sets in t/db_dependent/OAI/Sets.t
Adding &DelOAISetsBiblio in @EXPORT at the beginning
of OAI/Sets.pm, it was the only one missing

TEST PLAN
---------

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

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

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

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

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

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

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-08 15:16:14 -03:00
Matthias Meusburger
bb63ef6a2e Bug 13507: Add intranet support for CAS authentication
This patch allows to use CAS authentication for intranet login.

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

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-08 12:04:26 -03:00
Jonathan Druart
a6facaa534 Bug 13850: Fix typo in C4::Ris
In C4/Ris.pm:
  @field_list = ('600', '601', '602', '604', '605', '606','607', '608',
  '610', '615', '620', '660'. '661', '670', '675', '676', '680', '686');

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

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

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

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

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

To test:

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

Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-08 10:44:50 -03:00
9570439c50 Bug 9580 Cover images from Coce, a remote image URL cache
Add to Koha support for displaying Book cover requested to Coce, a
remote image URL cache:

  https://github.com/fredericd/coce

With this enhancement, cover images are not fetched directly from
Amazon, Google, and so on. Their URL are requested via a web service to
Coce which manages a cache of URLs.

Three cover image providers are now available: Google Books (gb), Amazon
(aws), and Open Library (ol). Two system preferences enable this service:

  - CoceHost - URL of Coce server
  - CoceProviders - Ordered list of requested providers. For example
    gb,aws,ol, will return the first available URL from those providers.

Several advantages to this architecture:

  - If a book cover is not available from a provider, but is available
    from another one, Koha will be able to display a book cover, which
    isn't the case now
  - Since URLs are cached, it isn't necessary for each book cover to
    request, again and again, the provider, and several of them if
    necessary.
  - Amazon book covers are retrieved with Amazon Product Advertising
    API, which means that more covers are retrieved (ISBN13).

Test plan:

- Apply this patch, and test with 'Bootstrap' themes
- You can verify that nothing has changed on OPAC result and detail
  page, since new syspref haven't been filled
- Install Code: https://github.com/fredericd/coce
  Or ask me directly for the URL of a Coce server
- In sysprefs, tab Enhanced content, modify:
  CoceHost -- enter the URL of your Coce server
  CoceProviders -- fill with: gb,aws,ol
- Do a search. On result page, and detail page, you will see cover
  images originating from the 3 providers: fly over the image to see its
  URL. Try to compare with a Koha with just GoogleJacket or Amazon cover
  to confirm that you have more images. Verify that it's quick, and even
  quicker for cached images URLs.
- Check that Browse Shelf functionnality works properly.
- The ID sent to Coce is EAN or ISBN. Try with various type of biblios. DVD
  have often EAN, but no ISBN.
- You can try with those sysprefs:
    CoceProviders: aws,gb
    CoceHost: http://coce.tamil.fr:8080
  and this EAN (or ISBN): 3333297517744
  => OPACAmazonCoverImages enabled doesn't display a cover because, it's a DVD
  => Coce find and display the DVD cover.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: replaced 1 tab with spaces in C4/Shelfbrowser.pm

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-01 09:31:42 -03:00
f149636059 Bug 13852 - Manage C4::VirtualShelves in C4::Auth for performance
In C4::Auth there is a use C4::VirtualShelves.
Virtualshelves are displayed in all OPAC pages, but not in intranet.
For performance, we should move this into a require only for opac pages.

This patch adds a condition to fetch virtualshelves only if opac and moves the dependancy on C4::VirtualShelves into require calls.

On my desktop, I have those compilation times for C4/Auth.pm :
- Without patch : 0,41 seconds
- With patch : 0,22 seconds

This performance improvement is very usefull for pages that only use a few as dependancy, like errors/404.pl

Test plan :
- Be sure there are some public lists
- Apply patch
- Go to opac (not logged-in)
- Click on "Lists"
- Check you see the public lists
- Login with a user
- Be sure this user has some private lists
- Click on "Lists"
- Check you see the public and private lists
- Logout
- Go to /cgi-bin/koha/opac-reserve.pl
- You see the loggin page
- Click on "Lists"
- Check you see the public lists
- Go to intranet
- Check you can loggin

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-31 14:16:03 -03:00
faab00b88a Bug 13841 - Returns via backdating or SIP2 can create new fines with an amount outstanding of 0
Due to the way AddReturn and UpdateFine work, if you pass in a return
date to AddReturn, and that item has a calculated fine of 0, Koha will
insert the 0 amount fine into accountlines.

This is good behavior when we want to update an existing fine, but bad
behavior if there was no fine to begin with!

Test Plan:
1) Apply the unit test patch
2) prove t/db_dependent/Circulation.t
3) Note the test fails
4) Apply this patch
5) prove t/db_dependent/Circulation.t
6) Note the test passes

Signed-off-by: Jen DeMuth <jdemuth@roseville.ca.us>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Confirmed the problem in the staff interface and that the patch
fixes it. Also tested that fines still get calculated.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-31 11:36:07 -03:00
Jonathan Druart
9871417d44 Bug 11201: Display overdues in red
On the pending on-site checkout list, the date for overdues are now
displayed in red.

Test plan:
Make sure you have on-site checkouts created today and before.
The date for the ones created before today should be displayed in red.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-31 11:30:55 -03:00
Jonathan Druart
e887ae544d Bug 11201: Add a in-house use list pages
The circulation page has a new entry: a link to a list of the pending
in-house use.

Bug 10860 introduces a new way for managing in-house uses.
This patch adds a new page (from the circulation home page) to list all
pending in-house uses.

Test plan:
Go on the circulation home page and click on the in-house use link.
Verify all your in-house uses are listed and information are consistent.

Bug 11201: Display lib instead of AV code

This patch assumes that items.location is linked the the LOC
authorised values.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-31 11:30:55 -03:00
Jonathan Druart
2bf394e6d2 Bug 10328 - Rename opaccolorstylesheet to OpacAdditionalStylesheet
Test plan (from comment #1)
1) Apply this patch
2) Run updatedatabase.pl
3) Verify the system pref OpacColorStyleSheet still works
   i.e. no change should be noted

Additionally, I changed the path to an other stylesheet and verified that it worked.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described and no more occurences of opaccolorstylesheet were found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-31 11:30:54 -03:00
Jonathan Druart
316485b1c4 Bug 13740: Fix null vs not null in the query
The previous patch did not work, only patrons *with* guanrantees were
deleted!

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-31 10:54:30 -03:00
Jonathan Druart
b721b6f9f3 Bug 13740: Remove the NOT NULL clause in GetBorrowersToExpunge
C4::Borrowers::GetBorrowersToExpunge should not use a "NOT IN", it is
not efficient at all.

With only 1 guarantor and more than 136k patrons, the not in clause in
this subroutine takes ages:
mysql> select count(*) FROM   borrowers where  borrowernumber NOT IN
(SELECT guarantorid FROM borrowers WHERE guarantorid IS NOT NULL AND
guarantorid <> 0) ;
[...]

not ended after 5min

With the query modified by this patch, the results come after 1 sec :)

Test plan:
Verify the delete_patrons.pl cronjob or the cleanborrowers tools work as
before.
Especially with guarantors.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-31 10:54:23 -03:00
Jonathan Druart
29f3218c52 Bug 13601: get rid of DateTime::Format::DateParse
This module is used in C4::Members::GetPendingIssues too, but we can use
dt_from_string.

Test plan:
1/ Verify that
    prove t/db_dependent/Members/GetPendingIssues.t
returns green
2/ On the patron pending issue list, verify that the issue and the due
dates are correctly displayed.

Tested together with other patches (except "Fix special cases). Worked as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-30 13:40:00 -03:00
Benjamin Rokseth
e4d88bcf43 Bug 12344: QA followup: use next instead of return
Use next instead of return when generating templates.
In case patron has enabled a message type that misses a template,
next message type will be attempted instead of returning at once.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-30 13:38:35 -03:00
Koha instance knakk-koha
2ab4a4287b Bug 12344 - Multi transport types for issues and checkins
This small patch corrects the order of generating notices for issues and returns (checkout/checkin) so that borrower's notices are rendered correctly (for sms,email,etc.)

Test plan:

1) Edit SMSSendDriver syspref to use driver 'Test'
2) Edit CHECKOUT template for sms to 'SMS test'
3) select SMS for test patron's messaging prefs for item checkout
4) checkout an item
5) check the table message_queue, verify that template sms is
   not used (message content is not 'SMS test')

6) apply patch, make new checkout
7) check that message_queue table now has a correctly generated
   notice with 'SMS test'

For a real world test use a real SMS::Send driver and run the
cronjob process-message-queue.pl to send messages immediately.

Signed-off-by: Sophie Meynieux <sophie.meynieux@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-30 13:38:31 -03:00
de7e7d3033 Bug 12739: (QA followup) use 'UTF-8' instead of 'utf8'
This patch makes Encode::encode be passed the 'UTF-8' encoding
instead of the discouraged 'utf8'.

Please read:
http://wiki.koha-community.org/wiki/Handling_UTF8_in_development

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-30 13:36:48 -03:00
54731a0ce1 Bug 12739 - SendAlerts function does not take care of "html" format or UTF-8 Pt. 2
The emails sent via SendAlerts don't take into account HTML format.

_TEST PLAN_

Before applying:

1) Change system preference "AutoEmailOpacUser" to "Send"
2) Change "ACCTDETAILS" notice to HTML and add HTML to it
3) Create a new user with your email address
4) Note how the email displays the HTML tags as plain text

Apply patch

5) Create a new user with your email address
6) Note how the email displays the email as an HTML email

For thoroughness:

7) Change "ACCTDETAILS" notice to non-HTML
8) Create a new user with your email address
9) Note how the email displays the HTML as plain text

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-30 13:36:44 -03:00
63123ff36b Bug 12739 - SendAlerts function does not take care of "html" format or UTF-8 Pt 1
The UTF-8 charset in the content type is written as "utf8" instead of "utf-8"
in SendAlerts(), which causes UTF-8 characters to display incorrectly.

_TEST PLAN_

Before Applying:

1) Edit ACCTDETAILS
2) Add some UTF-8 characters
I recommend using the following website
http://www.ltg.ed.ac.uk/~richard/unicode-sample.html

In my tests, I added the samples from Hebrew, Arabic, Basic Latin,
Latin-1 Supplement, Latin Extended-A, and Latin Extended-B.

3) Set the system preference "AutoEmailOpacUser" to "Send"
4) Create a new user account with your email address

5) Note that the email in your inbox doesn't display the Unicode
characters correctly

Apply the patch

6) Create a new user account with your email address
7) Note that the email in your inbox _does_ display the
Unicode characters correctly.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-30 13:36:41 -03:00
Matthias Meusburger
0c6ba2d0c4 Bug 12887: User logged out on refresh after CAS authentication
If the user is already logged-in, do not trigger CAS authentication
even if there is a ticket in the parameters.

1) Authenticate to the OPAC through CAS.
2) Once redirected to your account, hit F5 or the refresh button of your browser.
3) You're logged out.

Signed-off-by: Koha Team Lyon 3 <koha@univ-lyon3.fr>
Signed-off-by: Luce Barbey <luce.barbey@cirad.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Added sign of lines according to bug.
Works as described, small change.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-30 13:35:50 -03:00
Dobrica Pavlinusic
5c4854a211 Bug 10773 - Add item-level descriptions for Label Printing
This patch adds new fields ccode_description, homebranch_description,
holdingbranch_description, location_description and
permanent_location_description which can be used in the Label Creator
to display names/descriptions instead of codes

Test Plan:

1) Edit a layout in the Label Creator so that it includes any of these
fields. I suggest including "homebranch_description" and perhaps
"ccode_description" if you have them in your item data.
2) Add items to a batch in the Label Creator.
3) Export the batch using the layout, and view as PDF
4) Verify that you see descriptions for fields which you added

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-30 13:22:35 -03:00
Jonathan Druart
0b350faa43 Bug 13894: Make reserve.pl not using C4::Members::Search
Important note: This will modify the UI.
The patron list will now be displayed in a table (instead of a select).

Test plan:
1/ Place a hold on a record
2/ Search for a patron
3/ Select a patron and submit
4/ The hold workflow should continue as previously

No behavior changes should be observed.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-30 12:56:53 -03:00
92dd223c3c Revert "Bug 10606: Remove MySQLism in GetUpcomingDueIssues"
This patch reverts a commit that breaks GetUpcomingDueIssues-related
tests.

This reverts commit 5ee0293ed6.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-30 12:13:05 -03:00
836a7eba0b Bug 12820: [QA Followup] Tab and whitespace cleanup
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-25 11:26:12 -03:00
Colin Campbell
fe179c737d Bug 12820: Handle rental fees in Sip issue and renew
Implement correct handling of fees associated with checking out
an item.
This is associated with fee acknowledged field (BO)

To quote from the Sip2 document
" If this field is N in a Checkout message and there is a fee
associated with checking out the item, the ACS should tell the
SC in the Checkout Response that there is a fee, and refuse to
check out the item. If the SC and the patron then interact and the
patron agrees to pay the fee, this field will be set to Y on a second
Checkout message, indicating to the ACS that the patron has acknowledged
the fee and checkout of the item should not be refused just
because there is a fee associated with the item"

So there are two Checkout requests the first with BO not set to Y is
rejected but the fee amount is returned. The Second Checkout with BO set
to Y should succeed.

Added a debug log message indicating why we block a checkout
when we dont otherwise indicate

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-25 11:26:06 -03:00
ebccf4099f Bug 5786 [QA Followup]
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-25 10:33:31 -03:00
Srdjan
1802aa9153 Bug 5786 - Move AllowOnShelfHolds and OPACItemHolds system prefs to the Circulation Matrix
C4::Reserves:
* Added OnShelfHoldsAllowed() to check issuingrules
* Added OPACItemHoldsAllowed() to check issuingrules
* IsAvailableForItemLevelRequest() changed interface, now takes
  $item_record,$borrower_record; calls OnShelfHoldsAllowed()

opac/opac-reserve.pl and opac/opac-search.pl:
* rewrote hold allowed rule to use OPACItemHoldsAllowed()
* also use OnShelfHoldsAllowed() through
* IsAvailableForItemLevelRequest()

templates:
* Removed AllowOnShelfHolds and OPACItemHolds global flags, they now
  only have meaning per item type

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

I have tested this patch left, right and upside down for the last
several months. All tests have passed.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-25 10:33:14 -03:00
Dobrica Pavlinusic
d149cd1d97 Bug 13709 - Patron cards creator utf-8 encoding and ttf fonts broken
This change is similar to Bug 8375 which introduced ttf fonts for
labels printing in order to support diacritics and utf-8 encoding,
but this change was never implemented for patron cards.

Test scenario:

1. make sure that you have <ttf> font mapping in koha-conf.xml
2. define partron card layout, template, profile and batch
   (with utf-8 chars, probably in patron firstname or surname)
3. verify that without this patch pdf export file is error message
   Wide character in compress at /usr/share/perl5/PDF/Reuse.pm line 820
4. apply this patch and verify that generated pdf has correct encoding

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-19 14:59:33 -03:00
Jonathan Druart
88816eebd9 Bug 13021: guarantor search - main patch
This patch is the main patch.
The "common" template is improved to allow different type of picking:
"add" or "select".
The first one appends a patron to a list, the second one selects the
patron and close the result search window.

The members/guarantor_search.pl has completly changed but is quite the
same file as acqui/add_user_search.pl. Both should exist: they don't
belong to the same module (acqui vs members), the picking type is
different (add vs select) and the columns are not the same.

The changes in the common template are very powerful, it's now possible
to list the column we want! This will be very useful for further
reusability.

Before this patch, all patrons mathing the pattern were return. Now only
the first 20 are (depends on the DataTables selected value).

For QA: This patch introduces a new template plugin "To", for now it
permits to convert a perl structure to json. In the idea, it could
permit to convert foo to bar too.

Test plan:
1/ Verify there is no regression in the guarantor search. When the
selection has been done, all data from the guarantor should fill the
form in the "main address" section.
Note that the request is done when the search input in not empty and the
user stop to write for 1 sec.
2/ Verify there is no regression on the 2 other pages where this patron
search is used: link a patron to an order and to a basket (in the
acquisition module).

Signed-off-by: Morag Hills <the.invinnysible.one@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-19 14:19:34 -03:00
Katrin Fischer
b5fac05bc3 Bug 13746: On creating a new subscription, notes fields get confused
For every subscription we have 4 notes fields in Koha, 2 are in the
subscription itself and another 2 are in the subscription history.

When creating a new subscription, the notes fields from the
subscription get copied to the fields of the subscription history,
leading to doubled up display of notes in the OPAC.

To test:
- Add a new subscription without patch
  - check manual history
  - Fill in both notes fields
- Verify that the notes fields got also saved into the
  subscription history (easy from the Summary tab)
- Apply patch
- Add another subscription, like above
- Verify now only the subscription notes fields are saved
- Edit subscription and notes - verify all is ok
- Edit subscription history (Planning tab) - verify all is ok

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-15 08:40:05 -03:00
Jonathan Druart
380e8d53f0 Bug 11430: delete search history by id - API changes
Bug 10807 adds a search history for authorities and bug 10862 adds the
search history on the staff interface.

This one allows the user to select the search history lines he wants to
delete.

This change is done for the OPAC and intranet interface. The user is now
allow to delete one or more lines of his/her search history.

Test plan (for intranet, opac: bootstrap and prog themes):
1/ launch some search (catalogue and authority)
2/ verify the lines is added to your search history
3/ delete one or more lines of the history and verify they have been
deleted
4/ at the OPAC: logout and do again steps 1-3.
5/ prove t/db_dependent/Search/History.t

Signed-off-by: sonia BOUIS <sonia.bouis@univ-lyon3.fr>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-11 15:02:37 -03:00
Jonathan Druart
a111ffb92e Bug 12648: (QA followup) Rename aqorderusers to aqorder_users
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Thanks Jonathan
2015-03-11 11:48:28 -03:00
Jonathan Druart
8e91a0f01d Bug 12648: The users added to basket should have a permission
Before this enh, the users to add to a basket should have the
acquisition.order_manage permission.
This patch reintroduces this behavior.

The code in acqui/add_user_search.pl was never used. The filter should
be done in the members/search service.

But it is not possible easily to filter using a sql query, so the filter
is done after. This means that we cannot use the DT pagination
(otherwise the results will become inconsistent).

Test plan:
1/ On adding patrons to a basket, verify that the search patron results contain
patron with the acquisition.order_manage permission.
2/ Verify that all patrons are return on the 'normal' patron search and
when adding patrons to an order.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-11 11:47:35 -03:00
Jonathan Druart
519c273643 Bug 12648: Link patrons to an order
This patch is the main patch.

This feature adds the ability to link patrons to an order.
On that way, they will be notified when the order is completely
received.

Test plan:
1/ Execute the updatedb entry and verify you have a new notification template in your table (tools/letter.pl).
code: ACQ_NOTIF_ON_RECEIV, module: acquisition
2/ You can edit it if you want
3/ Create a basket and create an order with 1 or more items
4/ Link 1+ patrons to this order
5/ Close the basket and receive the order
6/ When you have received all items for this order, all patrons attached
will be notified. Check the message_queue table to check if the letters
have correctly been added to the queue.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-11 11:47:30 -03:00
Jonathan Druart
bb1beb4f5d Bug 12648: Refactoring to prepare user search for reuse
A previous enhancement allows to link basket with patrons.
Next patches will use the same way to link order with patrons.

In order to avoir c/p of code, this patch refactores this part of code.

Test plan:
1/ Verify there is no regression on adding/modifying users to a basket.
(acqui/basket.pl?basketno=XXX, "Managed by", "Add user").
2/ Note that you get a friendly message if the user is already present in the
list and when the user has correctly been added to the list.
3/ Note that the list uses the member search service (ie. DataTable +
serverside processing).

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-11 11:47:25 -03:00
Adrien Saurat
dff7d28275 Bug 9848: SIP tests, fix in 10renew_all.t (additionnal checkin)
Adds a checkin operation at the beginning of the test.
Otherwise, a former test leaves the test item checked out
and this generates an error.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-05 11:47:31 +01:00
Benjamin Rokseth
7ba06aad68 Bug 12122: TransferSlip should accept both itemnumber and barcode
Added small patch to allow barcode as input in TransferSlip routine, mostly
to allow generating transfer slips where only barcode is present (aka.
javascript).

Test plan:
1) find book with <barcode> and <itemnumber>
2) generate transferslips with both:
  transfer-slip.pl?transferitem=<itemnumber>3967925&amp;branchcode=MPL&amp;op=slip
  transfer-slip.pl?barcode=<barcode>&amp;branchcode=MPL&amp;op=slip
and verify that the generated slips match.

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

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

Edit:
 - Added tests in t/db_dependent/Circulation_transfers.t

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Passes tests and QA script.
Works with both itemnumber or barcode as described.
Tested printing transfer slips with the URL examples given
and in the UI.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-05 11:47:12 +01:00
003993d547 Bug 13473 - Plugins fail
When trying to execute or configure the plugin on 3.18 I got:

Template process failed: file error - doc-head-open.inc: not found at
/usr/share/koha/lib/C4/Templates.pm line 129.

Test Plan:
1) Install the Kitchen Sink plugin
2) Go to the configuration page of the plugin
3) Note the template processing error
4) Apply this patch
5) Refresh the page
6) Note the page now loads

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

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-24 14:21:44 -03:00
00f27cb0b9 Bug 13645 [QA Followup] - Add DBIx::Connector to the list of dependancies
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Nice catch Kyle, I changed it to require Ubuntu 12.04's
2015-02-20 15:46:33 -03:00
Jonathan Druart
4883835816 Bug 13645: Use DBIx::Connector
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2015-02-20 14:37:08 -03:00
5db89aa1e9 Bug 13506 [QA Follouwp] - Fix POD
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-20 11:54:41 -03:00
Colin Campbell
5568f55a6c Bug 13506: Remove unused Sip/Configuration Classes
Sip::Configuration calls new on Account, Institution and Service
classes but does not store or subsequently use the returned objects
( which immediately go out of scope ). Their existence just obscures
the code and misleads the reader. Remobe them

Removed redundant commented out code from Configyration module which
was not serving any useful purpose

Ran Configuration.pm through perltidy to make layout more
consistent

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-20 11:54:36 -03:00
79e1008cef Bug 12858 [QA Followup] - Don't call webservice if we have no data
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-20 10:22:51 -03:00
acc7da6a5f Bug 12858: Add error handling to Syndetics Index
* Syndetics routines include a statement to check that the returned
  content from Syndetics is xml. The get_syndetics_index routine was
  missing this check and so when a 'not found' html page was returned
  the opac-detail page would take a long time to load whilst xml::simple
  attempted to parse the large html document.

  Test Plan
  1. Enable Syndetics indexes on opac.
  2. Head over to an opac-detail page on the opac.
  3. Remove the ISBN from the same item in the staff client.
  4. Reload the opac-detail page for the item noticeing a much slower
  page load.
  5. Apply the patch
  6. Reload the opac-detail page for the item and note that it now laods
  in a reasonable timescale again.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-20 10:22:46 -03:00
Jonathan Druart
aed056a636 Bug 12976: Fix some comment in tests
Previous comments were wrong.
Actually the main part of price values is correct.
Only some rounding and tax values are badly calculated.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-19 09:46:44 -03:00
Jonathan Druart
4318eeef5f Bug 12976: Use the centralize VAT and prices calculation - invoice.pl
Bug 12969 introduces a subroutine to centralize VAT and prices
calculation.
It should be use in the acqui/invoice.pl script.

Test plan:
0/ Don't apply the patch
1/ Create 4 suppliers with the different configurations
2/ Create a basket and create several orders
3/ Receive the items and create an invoice
4/ Go on the invoice page acqui/invoice.pl?invoiceid=XXX
5/ Verify you don't see any difference before and after applying the
patch on the invoice details table.
Note: The only different you should see is the price formating for
"Total tax exc.". Before this patch "432.10" was displayed "432.1".

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-19 09:46:26 -03:00
Jonathan Druart
b678301e46 Bug 13684: C4::Budgets should not be used in C4::Output
Bug 12844 removed the call to C4::Budgets::GetCurrency.
The use of this module can be completely removed from C4::Output.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
It makes sense and no runtime errors found.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
2015-02-16 23:36:40 -03:00
b280b4890c Bug 13603 - autoBarcode setting hbyymmincr not taking month into account when looking up next increment
The hbyymmincr autoBarcode builder looks up all barcodes that begin with
any number of letters ( the branchcode ) and a two-digit year directly
afterward ( e.g. MPL15 ), then grabs the last four digits as the
increment counter. The problem is, this does not take months into
account, so unlike the description that says the system is limited to
10,000 items a month, it is limited to 10,000 items per *year*.

This situation can easily be corrected my adding the month into the
lookup ( e.g. MPL1501 ).

Test Plan:
1) Enable autoBarcode, set to hbyymmincr
2) Catalog an item, let the barcode.pl plugin generate
   the next barcode.
3) Catalog an item with the barcode MPL15009999
4) Catalog another item, use the barcode.pl plugin to
   generate the next barcode.
5) Note the barcode is generated ends with '0001' instead of the
   correct increment
6) Apply this patch
7) Repeat step 4
8) Note the barcode now ends with the correct increment

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

Signed-off-by: Jeanne Heicher <nppublib@pa.net>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Problem confirmed - the continuing number bit was not reset
to start counting from 1 again on the beginning of a new month.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-13 14:11:59 -03:00
Jonathan Druart
020434f275 Bug 13417: Remove warnings
Without this patch
  perl -wc C4/VirtualShelves.pm
failed:
Constant subroutine C4::VirtualShelves::SHELVES_MASTHEAD_MAX redefined
at /usr/share/perl/5.20/constant.pm line 156.
Constant subroutine C4::VirtualShelves::SHELVES_COMBO_MAX redefined at
/usr/share/perl/5.20/constant.pm line 156.
Constant subroutine C4::VirtualShelves::SHELVES_MGRPAGE_MAX redefined at
/usr/share/perl/5.20/constant.pm line 156.
Constant subroutine C4::VirtualShelves::SHELVES_POPUP_MAX redefined at
/usr/share/perl/5.20/constant.pm line 156.
Constant subroutine C4::VirtualShelves::SHARE_INVITATION_EXPIRY_DAYS
redefined at /usr/share/perl/5.20/constant.pm line 156.
Subroutine GetShelves redefined at C4/VirtualShelves.pm line 103.
Subroutine GetAllShelves redefined at C4/VirtualShelves.pm line 159.
Subroutine GetSomeShelfNames redefined at C4/VirtualShelves.pm line 189.
Subroutine GetShelf redefined at C4/VirtualShelves.pm line 230.
Subroutine GetShelfContents redefined at C4/VirtualShelves.pm line 262.
Subroutine AddShelf redefined at C4/VirtualShelves.pm line 315.
Subroutine AddToShelf redefined at C4/VirtualShelves.pm line 353.
Subroutine ModShelf redefined at C4/VirtualShelves.pm line 394.
Subroutine ShelfPossibleAction redefined at C4/VirtualShelves.pm line
454.
Subroutine DelFromShelf redefined at C4/VirtualShelves.pm line 545.
Subroutine DelShelf redefined at C4/VirtualShelves.pm line 589.
Subroutine GetBibliosShelves redefined at C4/VirtualShelves.pm line 603.
Subroutine ShelvesMax redefined at C4/VirtualShelves.pm line 628.
Subroutine HandleDelBorrower redefined at C4/VirtualShelves.pm line 648.
Subroutine AddShare redefined at C4/VirtualShelves.pm line 683.
Subroutine AcceptShare redefined at C4/VirtualShelves.pm line 703.
Subroutine IsSharedList redefined at C4/VirtualShelves.pm line 731.
Subroutine RemoveShare redefined at C4/VirtualShelves.pm line 750.
Subroutine _shelf_count redefined at C4/VirtualShelves.pm line 764.
Subroutine _CheckShelfName redefined at C4/VirtualShelves.pm line 788.
C4/VirtualShelves.pm syntax OK

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-13 13:52:24 -03:00
Jonathan Druart
4149055445 Bug 13417: (qa follow-up) Rename the permission to delete_public_lists
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-13 13:52:18 -03:00
Jonathan Druart
70586324c5 Bug 13417: Limit the permission to delete
It's preferable to limit the permission to delete shelves.

Apply both patches before testing, then follow this test plan

Currently a public list can only be deleted by its owner.
This means lists can exist infinitely.
This will introduce a new permission for list. With this permission, a
staff member will be allow to delete any public lists.

Test plan:
1/ Add the manage_shelves permission to a patron.
2/ Login with this patron
3/ Go on the public list view
4/ You should be able to delete all public lists

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-13 13:52:17 -03:00
Jonathan Druart
9c65bd8124 Bug 13417: Allow staff members to manage public lists
Currently a public list can only be deleted by its owner.
This means lists can exist infinitely.
This will introduce a new permission for list. With this permission, a
staff member will be allow to delete any public lists.

Test plan:
1/ Add the manage_shelves permission to a patron.
2/ Login with this patron
3/ Go on the public list view
4/ You should be able to edit all public lists

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

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-13 13:52:14 -03:00
b2ccd0f3a2 Bug 13189 - Patron card creator patron search browse by last name broken by extended attributes
The browse by last name letters on the patron search for the patron card
creator doesn't work quite right. If extended patron attributes are
disabled, it works fine, but if they are enabled, they are searched even
when using the browse last name. Thus, if a searchable attribute has a
"D" in it, and one clicks the "D" link for the last name browser, that
patron will show even if he or she has no "D" in his or her hame!

Test Plan:
1) Enable extended patron attributes
2) Add a new searchable patron attribute
3) Create a new patron with the last name "Ace"
4) Add the value "D" to the attribute for this patron
5) Browse to the patron card maker, start a new patron batch
6) Click "Add item(s)" to bring up the patron search
7) Click the letter "D" in the patron search box
8) Note that "Ace" shows in the results list
9) Apply this patch
10) Repeat step 7
11) Note that "Ace" no longer shows in the results list
12) Perform a regular search by putting the letter "D" in the "Name:"
    field, and hit the "Search" button
13) Note this time the results *do* have Ace in them

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  Well described for a tricky bug. Reproducible. Fixed with this patch.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
This works as described, no problems or regressions found.
2015-02-12 15:35:07 -03:00
fcaa6f35c0 Bug 13636 - Staff search results item status incorrect for holds
Imagine this scenario: we have one record with four items. Two of those
items are checked out, one of those items is a waiting hold, and one of
those items is available. We would expect to see this on the search
results page. Instead, we will see both non-checked out items as
unavailable due to waiting holds.

This is due to a semantic issue GetReserveStatus.
C4::Search::searchResults uses GetReserveStatus to get the reserve
status of each item, but unlike all other calls to the sub, this one
passes in not only itemnumber, but biblionumber.

When no reserve is found for the available item, the subroutine uses the
biblionumber to grab what is essentially an arbitrary reserve to use for
the status. This makes no sense and this functionality should be
entirely removed from the subroutine so regressions like this will be
prevented in the future.

Test Plan:
1) Create one record with 4 items
   a) check two of the items out to patrons
   b) set one of the items as a waiting hold
   c) leave the fourth item as available
2) Run a search where this record will be in the results list
3) Note that the results list 2 items on loan, two unavailable
4) Apply this patch, reload the search results
5) Note that the results list 1 available, 2 on loan, 1 unavailable

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Note: This is for the staff search result list!

Works as expected.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-11 10:20:35 -03:00
Jonathan Druart
2df541712f Bug 13675: Do not set aqorders.budget_id to NULL
C4::Acquisition::ModReceiveOrder updates the aqorders with
budget_id=NULL if no budget_id given in parameter.
Actually the same budget_id should be used.
In tests (especially t/db_dependent/Acquisition/TransferOrder.t),
ModReceiveOrder is not called with a budget_id param and set to NULL the
budget_id value.

test plan:
  prove t/db_dependent/Acquisition/TransferOrder.t
should return green

Note that this bug should not appear using the interface.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
The fix makes sense, and running
 $ prove t/db_dependent/Acq*
returns all green. koha-qa.pl also likes it.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-10 08:45:44 -03:00
Mark Tompsett
78d6d794fe Bug 10900 - Incorrect calling conventions accessing C4::Context
There were multiple calling conventions for C4::Context's
set_userenv routine. So the following commands were used to
find discrepancies:
    grep "::set_userenv" `find .`
    grep "\->set_userenv" `find .`

The first grep demonstrated that the smaller change is from
:: to -> as only C4/Auth.pm, installer/InstallAuth.pm, and
t/db_dependent/Circulation.t would need to be modified. This
patch corrects C4::Context's set_userenv routine to be object
call based (use ->) by using a shift to ignore the first
parameter, and modify the three files found with :: calls.

As the result of trying to roll a distribution,
t/Circulation_barcodedecode.t was discovered to be faulty. The
cause being incorrect parameters! This was hidden when there
was no shift in the set_userenv routine. However, with its
correction, the test broke.

This led me to read the POD documentation for the function
set_userenv in C4::Context and realize it was outdated as
well. It has been revised to match the current version of
the function.

Then intentionally bad parameters passed to the set_userenv
routine in C4::Context were hunted down. The biggest problems
were missing surnames or branch names.

Rebase required because of shibboleth change in C4/Context.pm

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

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>
2015-02-09 17:00:13 -03:00
d556f6a9f2 Bug - 5511 [Followup]: Missed Instance
There was an instance of the pragma missed which meant the the original
patch set didn't actually solve the problem in a large number of cases

This patch adds in the relevant statement.

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>
2015-02-09 17:00:07 -03:00
Amit Gupta
e3bb139080 Bug - 5511: Check for Change in Remote IP address for Session Security. Disable when remote ip address changes frequently.
To Test:
1) Enable the system preference SessionRestrictionByIP
2) Change your system IP. It will not checkout your system IP or signout.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 17:00:01 -03:00
Jonathan Druart
f7220ba072 Bug 13007: Special case budgetid == ''
In this special case (the suggestion is linked to "all funds"), the
budgetid value should be NULL in DB.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes old and new tests.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 15:49:57 -03:00
d8710b4feb Bug 12944: (QA followup) fix POD errors from koha-qa.pl
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 15:48:18 -03:00
Jonathan Druart
ff7c87d345 Bug 12944: Search orders by basket creator
This patch adds the ability to search orders using the basket creator.

Test plan:
- go on the order advanced search form (acqui/histsearch.pl)
- use the autocomplete input to search patrons
- launch the search and verify the results are consistent with the
  values you have filled.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 15:48:12 -03:00
Jonathan Druart
ddf909ae24 Bug 13201: GetSuggestion takes suggestionid
Having $ordernumber as the parameter in a function which is
handling suggestions and it is used as a suggestion id is
confusing to the coder and person trying to read the code.
This patch corrects the confusion.

REVISED TEST PLAN
-----------------
1) perldoc C4::Suggestions
   -- notice it says ordernumber for the GetSuggestions example.
2) Ensure you have CPL in your branches table.
3) prove -v t/db_dependent/Suggestions.t
   -- if you have more than 8 itemtypes in your database, two
      tests at the end will fail, but that is not relevant to
      the modified GetSuggestions code.
4) apply patch
5) perldoc C4::Suggestions
   -- notice it is corrected now.
6) prove -v t/db_dependent/Suggestions.t
   -- it should run with the same results as in step 3.
      That is, if you have 8 itemtypes, all pass, otherwise
      those two tests fail.
7) run koha qa test tool

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 15:22:12 -03:00
Julian Maurice
f70ad43f8f Bug 13562: Fix item search on item MARC subfields
Test plan:
1. Add 4 item search fields (in Administration › Items search fields):
   a. 1 biblio field linked to a DB field
   b. 1 biblio field not linked to a DB field
   c. 1 item field linked to a DB field
   d. 1 item field not linked to a DB field
2. Make sure you have some data in those fields to search on.
3. Go to item search page and do a search using these new fields, make
   sure the result is correct.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 10:28:09 -03:00
Jonathan Druart
12eb3cb440 Bug 13418: Clean C4::VirtualShelves::Page - Part 2
I don't understand at all the usefulness of $privshelflist and
$privtotshelves in C4::VirtualShelves::Page
They look useless.

If you deep in the git history, you will find
    commit 25eb36f21f
    Bug #2531 Cannot delete private shelf

I am not able to reproduce this issue after this patch

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 10:20:51 -03:00
926e97b9e9 Bug 13418: [QA Follow-up] Use unshift instead of push
Some SQL parameters are added to the wrong side of the list.
This effectively clears all private lists from view :)

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 10:20:47 -03:00
Jonathan Druart
273ead3084 Bug 13418: Clean C4::VirtualShelves::Page a bit
I tried to reuse this package for a new development, I did not manage.
It's a really hard to read and to understand.

Here my first try, this patch only remove the call to _shelf_count in
the GetShelves subroutine.
Someone might want to get this value for another reason and from
somewhere else.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 10:20:29 -03:00
Jonathan Druart
74640683f0 Bug 13333: Fix Display basket group for already received orders
Bug 11111 adds a basket group column on the parcel page.
But it seems that the already received orders never contain the value
(always 'no basket group').

Test plan:
Receive an order which is in a basket group and verify the basket group
column is correctly filled.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-05 14:51:34 -03:00
Colin Campbell
d85f757ce7 Bug 7904 Change SIP modules to use standard LIB path
For historical reasons the SIPServer and SIP modules
have used an extra module path in addition to the
standard Koha one. This has caused numerous irritants
in attempting to set up scripts and basic tests. It
does not help in attempting to modify or debug
this code

This patch changes the package value in the modules
under the C4/SIP directory and makes calls to
them use the full package name.

Where the export mechanism was being short circuited
routines have been explicitly exported and imported
declarations of 'use ILS' when that module was
not being used and which only generated warnings
have been removed.

As a lot of the changes affect lines where
an object is instantiated with new. The opportunity
has been taken to replace the ambiguous indirect
syntax with the preferred direct call

In intializing ILS the full path is added as this
will not require any changes to existing configs.
I suspect this feature is unused, and adds
obfuscation rather than flexibility but have kept
the feature as we need this change in order to
rationalize and extend the testing of the server.

The visible difference is that with the normal Koha
PERL5LIB setting. Compilation of Modules under C4/SIP
should be successful and not fail with unlocated modules,
allowing developers to see any perl warnings

All the SIP modules can now be run through the tests
in t/00-load.t now except for SIPServer itself

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

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-05 14:44:54 -03:00
03335ab401 Bug 13432 - SIP Server does not respect timeout setting
Koha's SIP server accepts timeout parameters, but those parameters
are only used for the login portion of a telnet transport session.
Other than that, they are ignored, and as long as whatever opened
the connection keeps it open, it will stay open indefinitely.

Test Plan:
1) Set the timeout setting on your SIP server to 10 seconds
2) Modify misc/sip_cli_emulator.pl, add "sleep 100;" directly after line 91
3) Start your SIP server
4) Run the modified sip script with valid parameters
5) Watch the SIP server stderr
6) Note that even though the script waits far too long before continuing,
   the SIP server never kills the connection, and the requests the cli
   script makes come back with valid data.
7) Apply this patch
8) Restart your SIP server
9) Repeat step 4
10) Note that this time you see "SIP Timed Out!" in the SIP server
    stderr and when the script finally makes it's request, it doesn't
    come back with valid data.

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-05 14:44:20 -03:00
Frédérick
eed620c773 Bug 11961 - Add a "Z39.50 search" button to the authority creation and modification pages.
This button lets you replace existing authorities using a Z39.50 search.

http://bugs.koha-community.org/show_bug.cgi?id=11961
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
All tests pass

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-24 18:19:06 -03:00
229a3b329c Bug 12954: Failed login should retain anonymous session
A failed login should not leave the user in a half logged authenticated
state, but rather return them to an anonymouse session as per the
pre-login attempt state.

To replicate error:
1. Try to log in with some nonexisting user id or wrong password in the
   OPAC
2. Go directly to /opac-user.pl (e.g., enter it in the browser address
   bar, or just click on the "Log in" link)
3. Observe a DBI error displayed on the screen
4. You are now in the "deadloop" of sorts (opac/opac-user.pl refuses to
   display the login screen, no matter how many times you try to reload
   it); to break the deadloop, one needs to:
   - remove session cookie from the browser (or cause the session to
     expire in some other way - closing browser window would be probably
     enough for that)
   - remove offending session on the server (from mysql sessions table,
    ..)
   - log in with proper credentials using some other page (like
     opac/opac-main.pl right-side panel), which does not involve
     opac/opac-user.pl being called without "userid" CGI parameter.

To test:
1. Test as above, the DBI error should no longer be present
2. Check that search history works across failed and sucessful login
   attempts

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-22 18:37:03 -03:00
f73dc51a88 Bug 13521: Add missing semicolon
Add a missing semicolon to the end of a template variable assignment
line. This patch should not affect operation.

Note: With Bug 13499 we did a non-destructive perltidy, as such we only
affected indenting and whitespace to maintain blame history. However, a
number of minor code issues were also highlighted, in this series of
patches I hope to correct other minor style issues.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-22 18:36:16 -03:00
a36c7435f2 Bug 13521: Removed superflous semicolon
Removed an uneeded semicolon from the end of an 'if' block. This should
not affect operation of the script.

Note: With Bug 13499 we did a non-destructive perltidy, as such we only
affected indenting and whitespace to maintain blame history. However, a
number of minor code issues were also highlighted, in this series of
patches I hope to correct other minor style issues.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-22 18:36:05 -03:00
1926bf9d01 Bug 13499: Tidy of Auth.pm
This tidy should only change whitespace and not line breaks, thus
retaining history.

There are no code changes, and thus there should be no regressions to
test for koha wise.

To test the non-destrcutive nature of the patch, run a 'git blame -w' on
the file before and after the patch. The resulting blame should include
a comparabile history of the file, with only some additional blank
lines being attributed to this commit.

A 'git blame -wM' may also be useful for comparison purposes.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-22 18:35:10 -03:00
5ee0293ed6 Bug 10606: Remove MySQLism in GetUpcomingDueIssues
To test:

[1] Arrange to have at least one loan in your test database due
    one day from now.
[2] Run misc/cronjobs/advance_notices.pl -c -n -v -m=2
    and note the number of loans reported.
[3] Apply the patch.
[4] Run misc/cronjobs/advance_notices.pl -c -n -v -m=2 again
    and verify that the number of loans reported remains the same.

Sponsored-by: Universidad Nacional de Cordoba

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass.
Also tested with unit tests from bug 10719.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-21 11:06:24 -03:00
Olli-Antti Kivilahti
84064ae4e4 Bug 13025 - Software error: Undefined subroutine &C4::Circulation::HasOverdues called at /home/koha/kohaclone/C4/Circulation.pm line 1925
This error only appears when using the SIPServer, it doesn't manifest when using the SIP unit tests
or when using the staff client.

--------------------
 ------------------
  PREPARE THE TEST
 ------------------
--------------------

0a. Find a borrower.
0b. Find an Item (cardnumber 'debar123') and check-out to the borrower
0c. Find a borrower and add a manual debarrment to it, indefinetely in effect.
    This is the default behaviour.
0d. Configure and start a SIP-server which you can access with telnet.
    See http://wiki.koha-community.org/wiki/Koha_SIP2_server_setup
    In this example, the Borrower defined as the Check-out/in machine has the following credentials:
    username: herkules password: palautathan branchcode: JOE_JOE
    but you are free to use your own, it doesn't affect this test plan.
0e. access your server with telnet

-----------------------
 ---------------------
  REPLICATE THE ISSUE
 ---------------------
-----------------------
1. Paste the following SIP-command to login:
9300CNherkules|COpalautathan|CPJOE_JOE|
2. Paste the following SIP-command to check-in the Item of the debarred Borrower:
09N20140721    07501620140721    075016AP|AO|ABdebar123|AC|BIN|
3. The connection should die and in the SIP Server's error log you can find the following error:
Software error: Undefined subroutine &C4::Circulation::HasOverdues called at /home/koha/kohaclone/C4/Circulation.pm line 1925

--------------------
 ------------------
  AFTER THIS PATCH
 ------------------
--------------------

Redo steps 1-2.
3. No error is given and the connection doesn't die.

No unit tests included and never will, because setting up the test environment would be very tedious.
It is entirely possible but the scaffolding required is beyond the scope of this patch.

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

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Note: I did not test this patch with SIP, but I did not find any
regression on checking or renewing an item.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-21 11:02:08 -03:00
Jonathan Druart
acff264558 Bug 12861: (follow-up) Noisy warn in error logs
Completely get rid of warns.

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

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-21 10:47:47 -03:00
Chris Cormack
b2ce6347e5 Bug 12861 : Noisy warn in the error logs
To test
Hit a url like
cgi-bin/koha/opac-authorities-home.pl?op=do_search&type=opac&operatorc=contains&marclistc=mainentry&and_orc=and&orderby=HeadingAsc&value=FIRECLAY

Notice the warns in the error log
Apply patch
Reload the url
Still works but no warns

(cherry picked from commit c98d805e490a82b2ea9f3d4e0f7278640942ba6d)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Reformatted to fix error M Tompsett spotted

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Instead of 10 warnings, I now have only 4 warnings.
We're going in the right direction.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-21 10:47:41 -03:00
Jonathan Druart
ed7221102f Bug 12845: C4::Output::FormatData can be removed
Test plan:
  git grep FormatData
should not return any result in pl and pm files.

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-17 10:26:21 -03:00
Jonathan Druart
adcabe6f8f Bug 13393: Remove C4::VirtualShelves::Merge
This is empty (?)

Test plan:
  git grep 'VirtualShelves::Merge'
should not return anything.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-17 10:22:29 -03:00
शंतनू
124549b8ab Bug 12889: Updated pod for C4::Members::AddMember
Signed-off-by: Rochelle <Rochelle_healy@hotmail.com>

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-14 21:43:37 -03:00
Jonathan Druart
8b19fd4b0d Bug 12850: C4::Serials::GetLateIssues can be removed
This routine is not used and can be removed.

Test plan:
  git grep GetLateIssues
should not return any result

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-14 21:32:03 -03:00
Olli-Antti Kivilahti
fc4e9ab62e Bug 13222 - Accessors for import_record.status have variable names suggesting overlay_status
TODO:: Somebody who knows what these are about could write some documentation about it.

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>
2015-01-14 21:27:49 -03:00
Jonathan Druart
0f406a840a Bug 12792: C4::Reserves breaks my vim syntax color
C4/Reserves.pm is unreadable with my vim configuration.
It appears I am the only one having this problem.
For an incomprehensible reason, a string constructs with
  qq/my string/;
completely breaks the syntax color for all the rest of the file (~2300l).
If I replace it with
  qq{my string};
all is fine!

Test plan:
launch
  git show HEAD
and verify this patch won't break anything.

Additionally, prove t/db_dependent/Reserves.t
This will trigger the three functions that were modified.
The prove currently fails on test 8, but the other succeeding
tests prove that this change is fine.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests pass on my installation.
No problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-14 12:42:32 -03:00
44c2290e50 Bug 11944: (RM followup) Missing dependency in C4::Context
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-13 15:27:17 -03:00
2840c2fa75 Bug 11944: revert unneeded IsStringUTF8ish behaviour change
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-13 13:07:52 -03:00
Jonathan Druart
7431f8cfe2 Bug 11944: Fix encoding issue in C4::ItemType
There is no need to encode strings coming from DB.

To reproduce:
go on admin/item_circulation_alerts.pl
The headers contain bad encoded characters.

Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-13 13:07:33 -03:00
Jonathan Druart
447ca250dd Bug 11944: Fix encoding issue on search history
Newly introduced by patches from bug 10807, the string was decoded
before to be stored in session.

To reproduce:
Enable history search
Go at the OPAC and log out
Search for something with utf-8
Go on your search history
The search description should be correctly encoded

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-13 13:07:28 -03:00
Jonathan Druart
e20270fec4 Bug 11944: use CGI( -utf8 ) everywhere
Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-13 13:07:21 -03:00
Jonathan Druart
fe1e6d86ca Bug 11944: Authentication
The password should be encoded before hashing.

Test plan:
- Before applying the patch, create a user with utf-8 in password
- apply patches
- try to log in
- change the password
- log out
- try to log in

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-13 13:07:14 -03:00
Jonathan Druart
33d1281ef4 Bug 11944: Fix encoding issue on searching
The search patch should fix non-latin character searches.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-13 13:07:13 -03:00
Jonathan Druart
df74fe9be8 Bug 11944: FIX Error on editing an authority
Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-13 13:07:11 -03:00
Jonathan Druart
372816e8ef Bug 11944: Remove obsolete encoding routines
We don't need to decode manually which provide nice performance boost.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-13 13:07:05 -03:00
Jonathan Druart
3d59fc384d Bug 11944: replace uri_escape with uri_escape_utf8 everywhere
To reproduce, edit, index notice with utf-8 char and search for it

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-13 13:07:01 -03:00
Jonathan Druart
a82d7144bf Bug 11944: Library name variable should be decoded
Test on preferences.pl and on some others pages when mysql is used to
store session.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-13 13:06:59 -03:00
Jonathan Druart
48773f660e Bug 11944: Encoding UTF8 in C4::Templates
Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-13 13:06:48 -03:00
Jonathan Druart
55107741a2 Bug 11944: replace use of utf8 with Encode
See the wiki page for the explanation.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-13 13:06:45 -03:00
Jonathan Druart
99521c37fa Bug 11944: Remove all utf8 filter from templates
This patch
- removes all html_entity usages in tt file which hide utf8 bugs
- removes all encode utf8 in tt plugins because we should get correctly
  marked data from DBIC and other sources directly (cf plugin EncodeUTF8
  used in renew.tt)
- adds some cleanup in C4::Templates::output: we now use perl utf8 file
  handler output so we don't need to decode tt variables manually.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-13 13:06:42 -03:00
Mark Tompsett
483ad2aee5 Bug 12868: Wrong variable used for borrower number
When only the card number is passed to GetMemberDetail, the
value of $borrowernumber is undefined. Even after finding the
correct borrower and providing a nice hash ($borrower), the
GetMemberAccountRecords is called with the wrong borrower number,
even though it is in the hash ($borrower).

This was fixed by changing $borrowernumber to
$borrower->{borrowernumber}, so that the hash's value will always
be used, since it is correct regardless of whether borrowernumber
or cardnumber were used to find the borrower.

TEST PLAN
---------
1) Apply both patches
2) prove -v t/db_dependent/Member.t
   -- This time the previously failing test will pass.
3) run koha QA test tools.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-10 16:16:57 -03:00
Jonathan Druart
b454e1a894 Bug 13318: Delete C4::Acq::GetParcel
Test plan:
  git grep GetParcel
should not return use of this subroutine.

Signed-off-by: wajasu <matted@34813.mypacks.net>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-10 16:14:23 -03:00