koha.git
9 years agoBug 12619 - Shipment date gets lost on finishing and/or editing the invoice
Jacek Ablewicz [Tue, 22 Jul 2014 15:57:01 +0000 (17:57 +0200)]
Bug 12619 - Shipment date gets lost on finishing and/or editing the invoice

To reproduce:
- Create a new shipment, make sure to add a shipment date
- Receive or not receive orders
- Finish receiving with the button at the bottom of the page
- Verify that shipment date is now empty

To test:
- reproduce the aforementioned issue
- apply patch
- confirm that the issue is no longer rerpoductible (= shipment date is
not getting lost any longer), and that there are no apparent regresssions
of any kind involving invoice shipment date entering and/or editing
- sign off

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script, fixes the issues, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12407: (QA followup) last occurence of 'Other phone' renamed to 'Mobile phone'
Tomas Cohen Arazi [Tue, 5 Aug 2014 23:39:03 +0000 (20:39 -0300)]
Bug 12407: (QA followup) last occurence of 'Other phone' renamed to 'Mobile phone'

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12407: [QA Follow-up] Rename Other Phone to Mobile in staff
Marcel de Rooy [Thu, 31 Jul 2014 12:22:37 +0000 (14:22 +0200)]
Bug 12407: [QA Follow-up] Rename Other Phone to Mobile in staff

Touches three member templates.
Changes label Other into Mobile.
This is consistent with database field name and OPAC.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12407: phone label or data switched
Brendon Ford [Fri, 13 Jun 2014 00:28:28 +0000 (20:28 -0400)]
Bug 12407: phone label or data switched

Fix for switched phone numbers on patron details page.

This patch fixes switched phone numbers on patron details page and also makes phone number labels more uniform.

To Test:

1. Apply the patch.
2. Create/modify a patron entering some unique data into the "Secondary phone:" and "Other phone:" fields (different data for each).
3. Save the patron record.
4. Go to the patrons details page and make sure the data entered into the "Secondary phone:" field is displaying next to the "Secondary phone:" label and that the data entered into the "Other phone:" field is displaying next to the "Other phone:" label.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11331 - CSV export for viewlog.pl is missing newlines - followup
Fridolin Somers [Tue, 29 Jul 2014 06:57:54 +0000 (08:57 +0200)]
Bug 11331 - CSV export for viewlog.pl is missing newlines - followup

Perl formatting and cleaning.
Also corrects the HTML of results table in viewlog.tt.

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>
9 years agoBug 11331 - CSV export for viewlog.pl is missing newlines
Fridolin Somers [Fri, 25 Jul 2014 15:01:42 +0000 (17:01 +0200)]
Bug 11331 - CSV export for viewlog.pl is missing newlines

When you try to export the result of tools/viewlog.pl in csv, file
cannot be correctly loaded :
  - newline is missing after each record,
  - strings should be enclosed in ""
  - columns are not the same as for screen output

This patch corrects this by using like other export Text::CSV.
Adds a header line made with the keys of first data. For that, all data
values are initialiszed with empty string.

Test plan :
- Use a database with some logs, see sysprefs
  /cgi-bin/koha/admin/preferences.pl?tab=logs
- Go to export page /cgi-bin/koha/tools/viewlog.pl
- Select a module
- Click on "To a file" and choose a file name
- Click on "Submit"
- Open file
   => Without this patch : newline is missing, multi-lines cells are not
      enclosed in "", there are no column headings
   => Without this patch : each line is a data line, complexe cells are
      enclosed in "", there are column headings
- Test the export of all modules to see that all headings are necessary
- Check the output to screen in the browser

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
The CSV export is significantly improved. I question the usefulness of
including biblioitemnumber in the output. A better inclusion would be
itemnumber.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
While this feature is still not perfect, this is a big improvement.
Passes tests and QA script, restores basic functionality.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12660:Correct mispelling of accomodate in comments
Brian Norris [Fri, 25 Jul 2014 02:55:04 +0000 (14:55 +1200)]
Bug 12660:Correct mispelling of accomodate in comments

View the file in your git checkout to see the misspelling of accomodate
do the patch
view the files again to see the correct spelling accommodate

Patch behaves as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes typos to correct spelling.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 10648 - In records merge greatest field can not be added
Fridolyn SOMERS [Fri, 26 Jul 2013 15:02:01 +0000 (17:02 +0200)]
Bug 10648 - In records merge greatest field can not be added

When merging 2 records (/cgi-bin/koha/cataloguing/merge.pl), the destination record is build using the fields and subfields checked in source records.
When a field is checked, the javascript code searches in destination record a field with a greater tag number to insert new field before.
When the new field tag number is greater than all existing field tag numbers, the field is not added.

This patch corrects this by adding at end if no greater field tag number exists. Also adds a sort of fields by tag number because all mergo code is based on this.

Test plan :
- Add to a framework a repeatable field with the greater non existing tag number. For example 998.
- Edit 2 records with this framework and add them a value in this tag.
- Put those records is a list
- Go to this list and check the two records
- Click on "Merge selected"
- Click on next
- Go to second source record
- Click on the greatest tag number. for example 998.
=> The field is added at the end of destination record

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as described, no regressions.

9 years agoBug 4013 [Revised] road type missing on search results
Owen Leonard [Wed, 16 Jul 2014 19:32:08 +0000 (15:32 -0400)]
Bug 4013 [Revised] road type missing on search results

On the patron search results page there are several patron fields which
do not show: street number, road type, and state. This patch adds them.

To test, go to Patrons -> Search patrons and perform a search. In the
table of patron search results each patron record should display the
correct information including street number, road type, and state.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as described.

9 years agoBug 12690 - opacuserjs gets loaded twice in self checkout
David Cook [Fri, 1 Aug 2014 06:42:34 +0000 (16:42 +1000)]
Bug 12690 - opacuserjs gets loaded twice in self checkout

This patch removes a second instance of "opacuserjs" in the opac
self-checkout.

_TEST PLAN_

1) Enable OPAC Self-checkout in the system preferences
2) Type the following code into your "opacuserjs" system preference:

alert("This is a test");

2) Visit /cgi-bin/koha/sco/sco-main.pl
3) Note that you get a pop-up saying "This is a test" twice.

4) Apply the patch

5) Refresh /cgi-bin/koha/sco/sco-main.pl
6) Note that you now only get a pop-up saying "This is a test" once.

Followed test plan, patch behaves as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
opac-bottom.inc already adds opacuserjs, so the additional line
in this template can be removed.
Works as described, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12673: Remove CGI::scrolling_list from C4::Items.pm
Bernardo Gonzalez Kriegel [Tue, 29 Jul 2014 18:00:56 +0000 (15:00 -0300)]
Bug 12673: Remove CGI::scrolling_list from C4::Items.pm

This patch removes only instance in this file

To test:
1. Apply the patch
2. (Esay way) Put on staff URL
/cgi-bin/koha/services/itemrecorddisplay.pl?biblionumber=N&itemnumber=M
3. Code replaced corresponds to pulldowns, verify information
is correct (check with another item edit view)

PrepareItemrecordDisplay() in Items.pm is filled with chunks of
HTML code that must be put on TT file. For now scrolling_list
is the only removed.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested different item edit displays and the URL given above,
no regressions found. Also passes all tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12675: Add unit test to GetFrameworksLoop
Bernardo Gonzalez Kriegel [Wed, 30 Jul 2014 14:31:39 +0000 (11:31 -0300)]
Bug 12675: Add unit test to GetFrameworksLoop

to test:
1. Apply the patch
2. Run the test, prove t/db_dependent/Koha.t
3. Check that it pass

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>
9 years agoBug 12675: Remove CGI::scrolling_list from labeledMARCdetail.pl
Bernardo Gonzalez Kriegel [Tue, 29 Jul 2014 18:49:44 +0000 (15:49 -0300)]
Bug 12675: Remove CGI::scrolling_list from labeledMARCdetail.pl

This patch removes only instance in this file.

Also updates getframework POD on C4/Koha.pm,
adds new GetFrameworksLoop() func on same file from
suggested code, but with ordered result.

To test:
1. Apply the patch
2. Enable viewLabeledMARC syspref
3. On staff, search for a record, goto detail view
4. Clic on Labeled MARC
5. Framework pulldown was replaced, check changing
framework.

A bug was fixed, because selecting any fw and then Default
tries to load values from 'Default' fw code, which does not
exists.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12677: Use Bootstrap "label" style for inline OPAC renewal messages
Owen Leonard [Mon, 28 Jul 2014 15:35:47 +0000 (11:35 -0400)]
Bug 12677: Use Bootstrap "label" style for inline OPAC renewal messages

This patch revises the styling of the renewal success message to use a
default Bootstrap style more suited to inline messages. I think this is
preferable to using the alert style because the alert is designed to be
a block-level element.

http://getbootstrap.com/2.3.2/components.html#labels-badges

Because Koha's CSS already uses a "label" class for something else I
duplicate the Bootstrap "label" class in opac.css as "blabel." The
Bootstrap color definitions are included.

To test, follow the test plan already provided:

1) Apply this patch
2) From the OPAC, renew some items
3) Note the "Renewed!" message in the "Renew" column of the checkouts
   table

Patch works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12668 - Stray dollar ($) -sign in opac-reserve.pl
Olli-Antti Kivilahti [Tue, 29 Jul 2014 09:04:52 +0000 (12:04 +0300)]
Bug 12668 - Stray dollar ($) -sign in opac-reserve.pl

A dollar sign is hard-coded in opac-reserve.pl and becomes apparent when trying to place a reservation
 when one has "too_much_oweing" or too much fines.

Removing the dollar sign so we just get

<"Käyttömaksujen katto ylitetty. Et voi tehdä varauksia. Sinulla on maksamattomia maksuja 9.50.">

instead of

<"Käyttömaksujen katto ylitetty. Et voi tehdä varauksia. Sinulla on maksamattomia maksuja $9.50.">

Patch removes hard coded $ sign.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
The dollar sign is gone and the message still displays correctly.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12554: (tests followup) need to mock GetCurrency
Tomas Cohen Arazi [Sun, 3 Aug 2014 19:41:18 +0000 (16:41 -0300)]
Bug 12554: (tests followup) need to mock GetCurrency

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12685: Add help file for staff search history
Nicole C. Engard [Thu, 31 Jul 2014 16:40:22 +0000 (11:40 -0500)]
Bug 12685: Add help file for staff search history

This patch adds a missing help file for the staff search history page.

To test:
* Turn on EnableSearchHistory
* Do a search in the catalog
* Click your username in the top right and choose 'search history'
* Click 'help' in the top right
* Confirm that help file is there
   * note: link to manual won't work until after 2014-08-01 in the USA

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

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12554: Fix GetMarcPrice for NORMARC
Petter Goksoyr Asen [Fri, 11 Jul 2014 08:54:11 +0000 (10:54 +0200)]
Bug 12554: Fix GetMarcPrice for NORMARC

When doing aquisitions and ordering from external z3950 targes, the item price is not inferred from the MARC record when the NORMARC framework is set.

This patch makes GetMarcPrice treat NORMARC the same as MARC21.

Test plan

* Setup Koha with NORMARC framework
* Add a norwegian z3950 search target (ex: z3950.bibsys.no:2100, database=BIBSYS)
* Create a new basket, and add order to basket from external source
* Search for a tile (ex: ISBN 8205341834) from the bibsys z3950 server
* Click to order the title
* Observe that vendor price is not set
* Apply patch, repeat search for same book
* Order, and observe the vendor price is filled in from the MARC record

http://bugs.koha-community.org/show_bug.cgi?id=12554
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described. No errors.

Tested changing marcflavour syspref to NORMARC,
and following test plan, bug exist and is fixed.

Changed bug description on patch, too long :)

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patch adds a check for NORMARC to provide the same functionality
as for MARC21. No regressions found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12554: (regression test) C4::Biblio::GetMarcPrice does not handle NORMARC
Tomas Cohen Arazi [Tue, 29 Jul 2014 18:53:10 +0000 (15:53 -0300)]
Bug 12554: (regression test) C4::Biblio::GetMarcPrice does not handle NORMARC

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12672: GetMarcISBN should return the corresponding subfield
Tomas Cohen Arazi [Tue, 29 Jul 2014 16:55:44 +0000 (13:55 -0300)]
Bug 12672: GetMarcISBN should return the corresponding subfield

The current GetMarcISBN implementation returns an array of ISBN
in which all subfields of a ISBN field occurence are appended.

For example, in MARC21, if you have $a and $c defined, they will
be appended for output. This happens for $z.

To reproduce:
- Run the regression tests attached to this bug.

To test:
- Apply the patch, regression tests pass.
- Sign off

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Now test pass, no koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12672: (regression test) GetMarcISBN should return the corresponding subfield
Tomas Cohen Arazi [Tue, 29 Jul 2014 16:36:03 +0000 (13:36 -0300)]
Bug 12672: (regression test) GetMarcISBN should return the corresponding subfield

Run:
 $ prove -v t/db_dependent/Biblio.t
=> FAIL: GetMarcISBN doesn't return the expected value for ISBN
         in MARC21, NORMARC and UNIMARC

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

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12687 - Remove CGI::scrolling_list from circulation.pl
Bernardo Gonzalez Kriegel [Thu, 31 Jul 2014 19:47:30 +0000 (16:47 -0300)]
Bug 12687 - Remove CGI::scrolling_list from circulation.pl

This patch removes the only instance in this file

To test:
1. Apply the patch
2. Search for patrons on staff CheckOut,
use a string that gives multiple results
3. Results are displayed on a select,
that was replaced.

4. Check for regressions: select a patron and press 'Select',
or do double click on a patron name, verify you go
to patron's checkout tab.

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>
9 years agoBug 12398: Fix CAS authentication validation
Julian Maurice [Tue, 10 Jun 2014 10:47:37 +0000 (12:47 +0200)]
Bug 12398: Fix CAS authentication validation

CGI::url_param() also returns deleted parameters so we have to check
with CGI::param() too.

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Took a while to get it working, but I can confirm CAS login is not
working without this patch, but does with it.

Some notes:
In order for this to work you have to add http:// in front of your
OpacBaseURL.
You will also need a CAS test server and install the certificate
on your system.

Tested with CAS test server provided by Biblibre.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12398: (followup) tidy unit tests
Tomas Cohen Arazi [Fri, 1 Aug 2014 12:41:35 +0000 (09:41 -0300)]
Bug 12398: (followup) tidy unit tests

This followup removes unnecesary warnings generated by the test,
and also prints a proper message for the tests.

Added a can_ok test for all the exported functions btw.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12398: Add test for C4::Auth_with_cas::_url_with_get_params
Julian Maurice [Wed, 30 Jul 2014 12:02:11 +0000 (14:02 +0200)]
Bug 12398: Add test for C4::Auth_with_cas::_url_with_get_params

Run `prove t/db_dependent/Auth_with_cas.t` to run the test

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12174 follow-up of the patch (a missing print statement)
Zeno Tajoli [Sat, 3 May 2014 09:53:33 +0000 (11:53 +0200)]
Bug 12174 follow-up of the patch (a missing print statement)

http://bugs.koha-community.org/show_bug.cgi?id=12174
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12174 - Zotero connection with Koha: problem with UTF-8
Zeno Tajoli [Sat, 3 May 2014 09:09:25 +0000 (11:09 +0200)]
Bug 12174 - Zotero connection with Koha: problem with UTF-8

This patch solves the bug for UTF-8 output. MARC-8 works only if you save it as a file. In fact the standard Internet stack (browser, web server, etc.) doesn't know anything about MARC-8 or it's ISO base (ISO 2022).

To test the bug:
-- without the patch use Zotero on a recent Koha install with Apache.
You can use PTFS sandboxes. You can't use Biblibre sandboxes, they use Ngix.
-- Test a record with special chars.
-- Install the patch
-- Catch (using Zotero) the same record.
-- Test all directly download from Opac.
-- To check MARC-8, use a tool that support it. For example MarcEdit.

http://bugs.koha-community.org/show_bug.cgi?id=12174
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described
Tested with zotero add-on for firefox.
Before patch bad diacritics, after patch ok

Record exported as MARC-8, transformed using
yaz-iconv -f marc8 -t utf-8 bib.marc8 > bib.utf8
yaz-marcdump -i marc -o line bib.utf8, checking accents,
also comparing with direct utf-8 export

No koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested with Zotero in Firefox and with yaz-iconv as suggested by
Bernardo, no problems found.
Passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12568 [QA Followup] - Use ':' as separator instead of '|'
Kyle M Hall [Fri, 25 Jul 2014 11:53:40 +0000 (07:53 -0400)]
Bug 12568 [QA Followup] - Use ':' as separator instead of '|'

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12568 - Improve visibility of successful renewal via opac
Kyle M Hall [Mon, 14 Jul 2014 12:34:40 +0000 (08:34 -0400)]
Bug 12568 - Improve visibility of successful renewal via opac

Currently, when a patron renews an item via the opac, the only feedback
the patron receives when a renewal is successful is an updated value for
the due date of the item. This subtle indication of success may go
unnoticed by some patrons. We should add a more prominent way to
indicate an item was renewed successfully.

Test Plan:
1) Apply this patch
2) From the OPAC, renew some items
3) Note the "Renewed!" message in the "Renew" column of the checkouts table

Signed-off-by: Cathi Wiggins <cwiggins@ci.arcadia.ca.us>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script.
Makes successful renewals more visible to the user in the OPAC.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12662: (follow-up) Ajax-based check in does not work for some system preference...
Jonathan Druart [Fri, 25 Jul 2014 10:43:08 +0000 (12:43 +0200)]
Bug 12662: (follow-up) Ajax-based check in does not work for some system preference settings enabled

ModItem is needed too.

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>
9 years agoBug 12662: Ajax-based check in does not work for some system preference settings...
Jacek Ablewicz [Fri, 25 Jul 2014 08:56:52 +0000 (10:56 +0200)]
Bug 12662: Ajax-based check in does not work for some system preference settings enabled

To reproduce:

- enable "InProcessingToShelvingCart" or "ReturnToShelvingCart"
system preference,
- for a sample patron with 1+ checkouts, try to check in some item[s]
using checkboxes in the "Check in" column in the checkouts table
which is displayed in the "Check out" or "Details" patron account tabs,
- observe that clicking "Renew or return checked items" button only
results in ajax "spinning wheel" stuck in infinite loop; check-in
operation is not performed.

To test:

- follow the steps above to reproduce this bug
- apply patch
- redo the test; ensure that this issue is no longer reproductible.

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>
9 years agoBug 7462 - duplicate patron shows flags
Owen Leonard [Wed, 16 Jul 2014 13:13:34 +0000 (09:13 -0400)]
Bug 7462 - duplicate patron shows flags

When duplicating a patron the form fields for setting patron account
flags and restrictions should be hidden as it is when adding a patron.
This patch adds the correct logic to the template.

To test, duplicate an existing patron:

- Confirm that the "Patron account flags" and "Patron restrictions"
  sections are not visible.
- Confirm that saving a duplicated patron works correctly.
- Confirm that the edit and new patron entry forms are unaffected.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works ok, all three points confirmed
No koha-qa errors

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 10155: Patron search should remember search type options selected
Jonathan Druart [Tue, 15 Jul 2014 08:28:14 +0000 (10:28 +0200)]
Bug 10155: Patron search should remember search type options selected

The search type reset to the default.

Test plan:
1/ go on the patrons home page
2/ Launch a search in the header and select the second value for "search
type" ("contains").
3/ Verify the search type is set to "contains" on the results page.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 7237 - duplicating patron not using patron's branch
Owen Leonard [Fri, 18 Jul 2014 16:22:58 +0000 (12:22 -0400)]
Bug 7237 - duplicating patron not using patron's branch

When duplicating a patron the original patron's library should be
preselected.

To test, apply the patch and choose a patron to duplicate, noting which
library is set as their home library. Click the "Duplicate" button and
cnofirm that the patron's library is preselected on the patron entry
form.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11905 - when editing item, cursor is positioning in search box and not to item
Nick Clemens [Sat, 7 Jun 2014 15:18:13 +0000 (11:18 -0400)]
Bug 11905 - when editing item, cursor is positioning in search box and not to item

cataloging-search.inc had embedded js to set focus into the search box.
This patch removes that js from the cataloging-search.inc and adds it into
addbooks.tt and merge.tt to set focus on those pages and allow focus to be set
to the edit items form on additem.tt

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11888: Random password suggestion does not work twice
Juhani Seppälä [Thu, 17 Jul 2014 08:45:06 +0000 (11:45 +0300)]
Bug 11888: Random password suggestion does not work twice

This patch adds a simple ajax-call to pull a new suggested password
from the same perl script.

To test:
1) Search for a patron and select "Change password" from the moremember-view.
2) In the member-password-view, click on "Click to fill with a randomly generated suggestion".
3) Confirm that you get a new suggested password and click the same link again.
4) Note that you do not get another suggested password - nothing is happening.
5) Apply patch.
6) Repeat steps 1-3 and confirm that you can keep clicking for a new suggested password.

Patch works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script. Works as desribed.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12654 Correct incorrectly quoted regexp
Colin Campbell [Thu, 24 Jul 2014 16:12:42 +0000 (17:12 +0100)]
Bug 12654 Correct incorrectly quoted regexp

A compile time warning was being generated because \ does not quote
{ Replace the plethora of \ before meta and presumed meta characters
by \Q \E which gets perl to generate all the necessary escapes, we can
assume it knows its regex engine as well or better than the human
programmer

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Verified change reading the perldoc and also checked that
./misc/link_bibs_to_authorities.pl is no longer showing
the warn and still works.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as described, running:
 prove t/db_dependent/AuthoritiesMarc.t
doesn't show the warning anymore.

9 years agoBug 12661: Fixing capitalisation from "Item Type" to "Item type"
Natalie Bennison [Fri, 25 Jul 2014 03:15:47 +0000 (15:15 +1200)]
Bug 12661: Fixing capitalisation from "Item Type" to "Item type"

To fix go to help>reports>manager

Find capitalisation error
"Item Type"

Change to
"Item type"

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9221 - contact note not showing
Owen Leonard [Wed, 16 Jul 2014 18:21:28 +0000 (14:21 -0400)]
Bug 9221 - contact note not showing

The contents of the contact note field are not displayed on the patron
detail page in the staff client. This patch corrects this.

This patch also corrects the case of the "Contact note" label in the
OPAC patron details form (Log in -> Your personal details).

To test, apply the patch and edit a patron to add data to the contact
note field. Save and view the detail page for that patron. The contents
of the contact note field should appear under the alternate address
data.

In the OPAC the contact note field label should have correct
capitalization.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12615: Remove CGI::scrolling_list from marc_subfields_structure.pl
Bernardo Gonzalez Kriegel [Sun, 20 Jul 2014 21:59:59 +0000 (18:59 -0300)]
Bug 12615: Remove CGI::scrolling_list from marc_subfields_structure.pl

This patch removes all instances on this file.

Also re-enable editor feature to show/change kohafield value, can't find when or why it was removed.
Up to QA or RM for consideration, simply to remove.
But is strange to have a non editable field on auth frameworks.

To test:
1. Apply the patch
2. Go to Administration > MARC frameworks
3. Clic MARC structure of any auth fw
4. Clic subfield on any tag, e.g. 020
5. Clic 'Edit subfields' button

Now the tests proper

6. On any subfield, check pulldown
'Managed in tab', was replaced, so test
if it works and search for regressions
Change, save, load, change again

7. Clic on 'Advanced constraints'
(2) scrolling list removed
At the bottom, check 'Koha link', was changed
Check assign/remove/save/load values, search for regressions

8. Clic on 'Other options' box
Eight(6) scrolling_list removed, they use to
feed three pulldowns, so check each one

'Authorised value',
'Thesaurus'
'Plugin'
Check assign/remove/save/load values, search for regressions
Check adding a new subfield

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, no regressions found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12487 [QA Followup] - GetContract must return undef with no params
Kyle M Hall [Fri, 18 Jul 2014 13:14:07 +0000 (09:14 -0400)]
Bug 12487 [QA Followup] - GetContract must return undef with no params

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12487: SQLHelper replacement - C4::Contract
Yohann Dufour [Mon, 30 Jun 2014 12:42:27 +0000 (14:42 +0200)]
Bug 12487: SQLHelper replacement - C4::Contract

With this patch, the subroutines GetContract, GetContracts, AddContract, ModContract and DelContract uses DBIx::Class instead of C4::SQLHelper

Test plan:
1) Apply the patch
2) Execute the unit tests by launching:
prove t/db_dependent/Contract.t
3) The command has to be a success :
t/db_dependent/Contract.t .. ok
All tests successful.
Files=1, Tests=43,  2 wallclock secs ( 0.04 usr  0.01 sys +  1.49 cusr  0.05 csys =  1.59 CPU)
Result: PASS

4) Log on with a superlibrarian permission
5) Go on the page acqui/supplier.pl (Acquisitions > Button "New vendor")
6) Record a vendor with a nonzero "name"
7) Go on the page admin/aqcontract.pl (click on the "Contracts" item in the menu)
8) Click on the button "New" > "Contract" and record a new one
9) Verify the displayed data are correct about the contract
10) "Edit" the contract with different values and verify the data are updated
11) Click on "Delete" in order to delete the contract, verify the displayed data are correct but cancel the operation
12) Click on "New" > "Basket" and verify there is the created contract in field "Contract", then record a basket by selectioning the created contract
13) Verify the contract name displayed is correct
14) Record an active budget and a fund linked to this budget
15) Go on the new basket (Home > Acquisitions > Search the created vendor)
16) Click on "Add to basket" then "From a new (empty) record" and verify the displayed contract name is correct, then cancel
17) Click on "Delete this basket"
18) Click on "Contracts" (in the left menu) in order to go on aqcontract.pl, then "Delete" the created contract
19) The contract is not displayed anymore in the vendor page

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described following test plan.
Tested on top of Bug 12493
Tests pass
No koha-qa errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12493: (followup) remove unnecessary output message
Tomas Cohen Arazi [Wed, 30 Jul 2014 13:42:58 +0000 (10:42 -0300)]
Bug 12493: (followup) remove unnecessary output message

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12493 : moving the subroutines GetContract and GetContracts from C4::Acquisition...
Yohann Dufour [Tue, 8 Jul 2014 07:16:48 +0000 (09:16 +0200)]
Bug 12493 : moving the subroutines GetContract and GetContracts from C4::Acquisition.pm to C4::Contract.pm

Fix in order to respect the coding guidelines

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12493: unit tests for the module C4::Contract.pm
Yohann Dufour [Mon, 30 Jun 2014 08:02:01 +0000 (10:02 +0200)]
Bug 12493: unit tests for the module C4::Contract.pm

This patch are the unit tests of the previous patch

Test plan :
Same as the previous patch

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comments on previous patch

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12493: moving the subroutines GetContract and GetContracts from C4::Acquisition...
Yohann Dufour [Fri, 27 Jun 2014 14:00:50 +0000 (16:00 +0200)]
Bug 12493: moving the subroutines GetContract and GetContracts from C4::Acquisition.pm to C4::Contract.pm

This patch includes:
- the subroutines GetContract and GetContracts has been moved from C4::Acquisition.pm to C4::Contract.pm and adapted for a general use
- adaptation of acqui/basket.pl, acqui/basketheader.pl, acqui/neworderempty.pl, acqui/supplier.pl and admin/aqcontract.pl
- the unit tests for the module C4::Contract.pm

Test plan:
1) Apply the patch
2) Execute the unit tests by launching:
prove t/db_dependent/Contract.t t/Acquisition/ t/db_dependent/Acquisition/ t/db_dependent/Acquisition.t
3) The command has to be a success :
t/db_dependent/Contract.t ................................. ok
t/Acquisition/CanUserManageBasket.t ....................... ok
t/Acquisition/Invoice.t ................................... ok
t/db_dependent/Acquisition/GetBasketsInfosByBookseller.t .. ok
t/db_dependent/Acquisition/GetOrdersByBiblionumber.t ...... ok
t/db_dependent/Acquisition/Invoices.t ..................... ok
t/db_dependent/Acquisition/OrderFromSubscription.t ........ ok
t/db_dependent/Acquisition/TransferOrder.t ................ 1/11 # Transfering order to basket2
t/db_dependent/Acquisition/TransferOrder.t ................ ok
t/db_dependent/Acquisition/close_reopen_basket.t .......... ok
t/db_dependent/Acquisition.t .............................. ok
All tests successful.
Files=10, Tests=284, 15 wallclock secs ( 0.11 usr  0.02 sys + 12.88 cusr  0.77 csys = 13.78 CPU)
Result: PASS

4) Log on with a superlibrarian permission
5) Go on the page acqui/supplier.pl (Acquisitions > Button "New vendor")
6) Record a vendor with a nonzero "name"
7) Go on the page admin/aqcontract.pl (click on the "Contracts" item in the menu)
8) Click on the button "New" > "Contract" and record a new one
9) Verify the displayed data are correct about the contract
10) "Edit" the contract with different values and verify the data are updated
11) Click on "Delete" in order to delete the contract, verify the displayed data are correct but cancel the operation
12) Click on "New" > "Basket" and verify there is the created contract in field "Contract", then record a basket by selectioning the created contract
13) Verify the contract name displayed is correct
14) Record an active budget and a fund linked to this budget
15) Go on the new basket (Home > Acquisitions > Search the created vendor)
16) Click on "Add to basket" then "From a new (empty) record" and verify the displayed contract name is correct

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested with both patches applied.
Works as described following test plan, all points (I did 14 first)
All test pass
No koha-qa errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12457: Allow UT on a non empty database
Yohann Dufour [Mon, 21 Jul 2014 07:27:17 +0000 (09:27 +0200)]
Bug 12457: Allow UT on a non empty database

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>
9 years agoBug 12457: Adding unit tests for Members.pm
Yohann Dufour [Mon, 23 Jun 2014 14:00:58 +0000 (16:00 +0200)]
Bug 12457: Adding unit tests for Members.pm

Adding unit tests for the routines AddMessage, GetMessages, GetMessagesCount and DeleteMessage in t/db_dependent/Members.t
Adding unit tests for the routines GetPendingIssues and GetAllIssues in separate files : t/db_dependent/Members/GetPendingIssues.t and t/db_dependent/Members/GetAllIssues.t
The routine GetAllIssues has been modified because it does not test if the arguments was defined :
- the borrowernumber argument is required
- if the order argument is not given, it takes a value by default : 'date_due desc'
- the limit argument is optional

Test plan:
1/ Apply the patch
2/ Execute : prove t/db_dependent/Members.t t/db_dependent/Members/GetAllIssues.t t/db_dependent/Members/GetPendingIssues.t
3/ The result has to be a success without error or warning :
t/db_dependent/Members.t ................... ok
t/db_dependent/Members/GetAllIssues.t ...... ok
t/db_dependent/Members/GetPendingIssues.t .. ok
All tests successful.
Files=3, Tests=83,  5 wallclock secs ( 0.06 usr  0.01 sys +  4.68 cusr  0.26 csys =  5.01 CPU)
Result: PASS

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: perltidy on t/db_dependent/Members/*

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12457: Removal warning in t/db_dependent/Members.t
Yohann Dufour [Fri, 20 Jun 2014 12:31:53 +0000 (14:31 +0200)]
Bug 12457: Removal warning in t/db_dependent/Members.t

When I execute prove t/db_dependent/Members.t, this warning appears twice :
"Argument "Test" isn't numeric in modulus (%) at /home/yohann/koha/C4/Context.pm line 1256."

The warning is due to a invalid use of the routine set_userenv

Test plan:
1/ Execute : prove t/db_dependent/Members.t
2/ The warning appears twice :
"Argument "Test" isn't numeric in modulus (%) at /home/yohann/koha/C4/Context.pm line 1256."
3/ Apply the patch
4/ Execute : prove t/db_dependent/Members.t
5/ The result has to be a success without error or warning :
t/db_dependent/Members.t .. ok
All tests successful.
Files=1, Tests=26,  2 wallclock secs ( 0.04 usr  0.01 sys +  1.50 cusr  0.08 csys =  1.63 CPU)
Result: PASS

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All new and old tests pass now.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 7143: Add Prosentient Systems to contributing companies
David Cook [Fri, 25 Jul 2014 01:21:01 +0000 (11:21 +1000)]
Bug 7143: Add Prosentient Systems to contributing companies

Better late than never to add the company name to the list of
contributing companies.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Entry added. No errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tiny template addition, no problems.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9000: Followup to fix tabs & closing TT directive
Bernardo Gonzalez Kriegel [Mon, 28 Jul 2014 15:01:49 +0000 (12:01 -0300)]
Bug 9000: Followup to fix tabs & closing TT directive

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9000 [4] - Update to GPL v3
Kyle M Hall [Mon, 28 Jul 2014 14:12:08 +0000 (10:12 -0400)]
Bug 9000 [4] - Update to GPL v3

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9000 [3] - Change conf key from tmpl to template
Kyle M Hall [Mon, 28 Jul 2014 14:10:08 +0000 (10:10 -0400)]
Bug 9000 [3] - Change conf key from tmpl to template

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9000 [2] - Update included examples
Kyle M Hall [Mon, 28 Jul 2014 14:06:28 +0000 (10:06 -0400)]
Bug 9000 [2] - Update included examples

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9000 [1] - Update rss.pl to use Template Toolkit
Kyle M Hall [Mon, 28 Jul 2014 14:07:45 +0000 (10:07 -0400)]
Bug 9000 [1] - Update rss.pl to use Template Toolkit

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested using script with sample conf files
RSS feeds generated are 'well formed' xml
Some koha-qa errors fixed in followup

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12445 [QA Followup] - Clear issues table before clearing borrrowers table
Kyle M Hall [Fri, 25 Jul 2014 13:12:36 +0000 (09:12 -0400)]
Bug 12445 [QA Followup] - Clear issues table before clearing borrrowers table

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests pass, even more now than before.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12445: ading unit tests to test the routines : CountSuggestion, ConnectSuggestion...
Yohann Dufour [Thu, 19 Jun 2014 14:32:05 +0000 (16:32 +0200)]
Bug 12445: ading unit tests to test the routines : CountSuggestion, ConnectSuggestionAndBiblio, SearchSuggestion, GetSuggestionInfo, DelSuggestion, GetSuggestionByStatus

These routines were not tested

Test plan:
1/ Execute the command : prove t/db_dependent/Suggestions.t
2/ The result has to be a success without error or warning :
t/db_dependent/Suggestions.t .. ok
All tests successful.
Files=1, Tests=89,  1 wallclock secs ( 0.05 usr  0.01 sys +  1.52 cusr  0.08 csys =  1.66 CPU)
Result: PASS

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Test pass, no koha-qa errors

But now there are 91!
prove t/db_dependent/Suggestions.t
t/db_dependent/Suggestions.t .. ok
All tests successful.
Files=1, Tests=91,  2 wallclock secs ( 0.05 usr  0.00 sys +  1.77 cusr  0.10 csys =  1.92 CPU)
Result: PASS

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>
9 years agoBug 12445: Improving unit tests for C4::Suggestions.pm
Yohann Dufour [Thu, 19 Jun 2014 07:14:24 +0000 (09:14 +0200)]
Bug 12445: Improving unit tests for C4::Suggestions.pm

Now, the tests used 'is' instead of 'ok', the tests are wrapped in a transaction, adding tests for the routines NewSuggestion, GetSuggestion, ModSuggestion, GetSuggestionFromBiblionumber and GetInfoFromBiblionumber.

The tests for the routines DelSuggestionsOlderThan, CountSuggestion, ConnectSuggestionAndBiblio, SearchSuggestion, GetSuggestionInfo, DelSuggestion and GetSuggestionByStatus will be arrived in another patch.

Test plan:
1/ Execute the command : prove t/db_dependent/Suggestions.t
2/ The result has to be a success without warning or error :
t/db_dependent/Suggestions.t .. ok
All tests successful.
Files=1, Tests=32,  2 wallclock secs ( 0.03 usr  0.01 sys +  1.49 cusr  0.08 csys =  1.61 CPU)
Result: PASS

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
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>
9 years agoBug 12649: DBRev 3.17.00.011
Tomas Cohen Arazi [Tue, 29 Jul 2014 14:46:32 +0000 (11:46 -0300)]
Bug 12649: DBRev 3.17.00.011

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12649: followup to add Croatian into french
Bernardo Gonzalez Kriegel [Sat, 26 Jul 2014 14:11:18 +0000 (11:11 -0300)]
Bug 12649: followup to add Croatian into french

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12649: Add Croatian language
Dobrica Pavlinusic [Thu, 24 Jul 2014 12:28:31 +0000 (14:28 +0200)]
Bug 12649: Add Croatian language

Test scenario:
1. apply the patch
2. run updatedatabase.pl
3. install Croatian language
   cd misc/translator
   perl translate install hr-HR
4. go to Global system preferences > I18N/L10N preferences
   check that Hrvatski(hr-HR) is available

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works, no koha-qa errors.
Also tested translating to de-DE and on advanced search opac/staff
is listed translated.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Note: This also makes the language show up in the language pull
down in advanced search. Because the entry is the last in the file,
it will show last in the list. I am noting this here, the list
is not really consistently sorted right now and there is work under
way to change the way we handle this.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12560: Fixing capitalisation of Item Type
Natalie Bennison [Fri, 25 Jul 2014 01:58:17 +0000 (13:58 +1200)]
Bug 12560: Fixing capitalisation of Item Type

To test:
Go to reports>Statistics Wizard>Acquisition
Notice item type has incorrect capitalisation
Apply Patch
Refresh page
Notice it is now fixed

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described
koha-qa complains for a tab on line 220, fixed.

Natali, don't forget to assign the bug to yourself :)

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Small change, no problems found :)

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12562: fix capitalisation of Save Report button
Brian Norris [Fri, 25 Jul 2014 02:16:12 +0000 (14:16 +1200)]
Bug 12562: fix capitalisation of Save Report button

Test:
go to reports and then create report from SQL
the Save button has wrong capitalisaion of Report
add patch
refresh
should see button being Saved report

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

Brian, don't forget to assign the bug to yourself and set patch complexity :)

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Small template change, no regressions found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12563: capitalisation on detail pages item's tab
Evonne Cheung [Thu, 20 Nov 2014 23:59:48 +0000 (12:59 +1300)]
Bug 12563: capitalisation on detail pages item's tab

Test: go to a record in the catalog, go to detail page, switch to 'items'
tab, look for the 2 'Set status' buttons, check capitalisation should be
lower case for second word.

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

Evonne, assign the patch to yourself :)

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Small template change, no regressions found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12564: Fixing capitalisation buttons in inventory tool
Karl Menzies [Fri, 25 Jul 2014 02:27:32 +0000 (14:27 +1200)]
Bug 12564: Fixing capitalisation buttons in inventory tool

To Test
1/ Do a search in the inventory tool - view capitalisation errors in lower Buttons
2/ Apply patch
3/ Redo search in the inventory tool
4/ Confirm capitalisation errors are fixed

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described, no koha-qa errors
Fixed capitalization (and typo) on patch bug description :)

Karl, don't forget to assign the bug to yourself :)

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Small template change, no regressions found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12570: test for carped warnings in t/Biblio.t
Tomas Cohen Arazi [Mon, 14 Jul 2014 13:01:43 +0000 (10:01 -0300)]
Bug 12570: test for carped warnings in t/Biblio.t

To test:
- Run
  $ prove t/Biblio.t
=> Warnings printed to STDOUT
- Apply patch
- Run
  $ prove t/Biblio.t
=> No warnings

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No more warnings. No koha-qa errors

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12612: Remove CGI::scrolling_list from auth_tag_structure.pl
Bernardo Gonzalez Kriegel [Sat, 19 Jul 2014 17:47:00 +0000 (14:47 -0300)]
Bug 12612: Remove CGI::scrolling_list from auth_tag_structure.pl

This patch removes the only instance in this file.

Don't know if the feature is of some utility, seems
that does not work (no use of auth values as indicators
on MARC authority editor)

To test:
1. Apply the patch
2. Go to Administration > Authority types
3. Clic on MARC structure of any fw
4. Clic Edit on any tag
5. On tag editor check the pulldown 'Authorised value', that was replaced
6. Check for regressions: select a value, save, verify the value, change
again, etc.

Note: removed a SELECT, using now C4::Koha::GetAuthorisedValueCategories

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as expected, no regressions found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12613: Remove CGI::scrolling_list from koha2marclinks.pl
Bernardo Gonzalez Kriegel [Sat, 19 Jul 2014 19:44:11 +0000 (16:44 -0300)]
Bug 12613: Remove CGI::scrolling_list from koha2marclinks.pl

This patch removes all (2) instances from koha2marclinks.pl.
Also changes dropdowns width on mapping editor, from an
ugly ragged right to a fixed width view.

To test:
1. Apply the patch
2. Go to Administration > Koha to MARC mapping
3. Pulldown in this view has been replaced, check
for regressions: change table type and press Ok,
verify you get Koha fields and tag/subfield appropriate
for each table.
4. Now press 'Edit' on any field, go into mapping editor
5. Check that all pulldowns show tag/subtags relevant
for each group ( 000s ... 900s )
6. Check that current mapping is displayed correctly
7. Check for regressions: unmap, remap, press Ok,
verify, change again.
8. If you can, check display of mapping editor on several
browsers, just in case.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
I have tested with Firefox/Iceweasel only.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Also tested in Chromium.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12614: Remove CGI::scrolling_list from auth_subfields_structure.pl
Bernardo Gonzalez Kriegel [Sat, 19 Jul 2014 23:58:17 +0000 (20:58 -0300)]
Bug 12614: Remove CGI::scrolling_list from auth_subfields_structure.pl

This patch removes all instances on this file. Even removes some commented out instances.

Also re-enable editor feature to show/change kohafield value, can't find when or why it was removed.
Up to QA or RM for consideration, simply to remove.
But is strange to have a non editable field on auth frameworks.

To test:
1. Apply the patch
2. Go to Administration > Authority types
3. Clic MARC structure of any auth fw
4. Clic subfield on any tag, e.g. 031
5. Clic 'Edit subfields' button

Now the tests proper

6. 'Help input' box (editor bottom):
Eight(8) scrolling_list removed, they use to
feed the four pulldowns, so check each one
'Koha field' is new (for me at last)
'Authorised value',
'Thesaurus' (is this valid/useful here?)
'Plugin'
There is a difference between existing subtags and a new subtag,
the 'id' of the pulldowns (so the 8 scrolling list removed)
Check assign/remove/save/load values, search for regressions
If you edit subtag 942, it has a value on kohafield (default fw)

I think that this box could be prettified with fixed width for
pulldowns.

7. No more functional tests, there are 4 scrolling_list removed
that are commented (removed also commented code on tt file),
and two instances that are similar to previously removed
instances, evidently with no effect.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Not sure about the new Koha field entry... All works as expected.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All works as expected.
About Koha field: I think it makes sense to have it in the form,
so you can configure the fields for new authority types.
In my database I have mappings on authtypecode and authid.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12622: Fix export report as ods
Jonathan Druart [Tue, 22 Jul 2014 10:15:35 +0000 (12:15 +0200)]
Bug 12622: Fix export report as ods

Bug 11679 introduces an ods export for reports.

It looks quite buggy:
1/ You get a Perl error if the report has no results
2/ The ods file contains 1 lines less than the total results.

Test plan:
After applying this patch, try to export a report which has no results
and verify you get an ods file with headers only.
Try to export a report which has a least 1 result and verify the
generated ods has the right number of lines.

Signed-off-by: Robert Higgins <robert.higgins@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes the reported problem, passes all tests and QA script.
Added the sign-off line for Robert.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12642: t/SMS.t should not be db dependent
Jonathan Druart [Fri, 25 Jul 2014 08:59:11 +0000 (10:59 +0200)]
Bug 12642: t/SMS.t should not be db dependent

SMS.t should not dependent on the DB.

Test plan:
verify that prove t/SMS.t returns green even if the DB is not there.

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Turned off MySQL, tests still pass.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11230: dereference hashes in keys (QA followup)
Mathieu Saby [Sun, 13 Jul 2014 22:15:04 +0000 (00:15 +0200)]
Bug 11230: dereference hashes in keys (QA followup)

This followup replaces $params with %$params in keys function
It also fixes some wording

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11230 - Refactor C4::Stats::UpdateStats and add UT
Mathieu Saby [Sun, 10 Nov 2013 15:12:31 +0000 (16:12 +0100)]
Bug 11230 - Refactor C4::Stats::UpdateStats and add UT

This patch
- refactors C4::Stats::UpdateStats (it now takes a hashref as unique parameter, instead of a list of parameters)
- add UT for it
- change the calls made to this sub in C4::Accounts and C4::Circulation

Additionnaly it also
- adds POD to C4::Stats::TotalPaid
- adds some comments to C4::Stats::TotalPaid (I think I found some errors in it)

To test :
1. run "prove t/db_dependant/Stats.t -v"
2. make some circulation operations (checkout, checkin, renew, localuse)
check the operations are rightly recorded in Statistics table (with a SQL query like "SELECT * FROM statistics WHERE datetime LIKE "2013-11-15%", if you run your test on the 15th november)
3. make some fine payments operations (writeoff, payment)
check the operations are rightly recorded in Statistics table (with a SQL query like "SELECT * FROM statistics WHERE datetime LIKE "2013-11-15%", if you run your test on the 15th november)

Note that there is probably an issue to fix in Accounts.pm : the user is saved instead of the branch. But this is not the purpose of this patch, so I kept the previous behavior for the moment.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work, test pass, isse/return/writeoff recorded on statistics
Removed a "=back" to make happy koha-qa
No other errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12294 : Cancel replacing carriage return on notices
Sophie Meynieux [Tue, 20 May 2014 15:35:00 +0000 (17:35 +0200)]
Bug 12294 : Cancel replacing carriage return on notices

Cancel replacing carriage return with <br /> in printed html file as <br /> is needed in model for email notices when html format is checked

Test plan :
* define an OVERDUE notice with html activated, with <br /> at each end of line
* make sur you've got some borrowers with overdues meeting your notices triggering rules (some with valid email and others without)
* run overdue_notices.pl -html to generate html files for borrowers without email

Without patch
* email notifications are correctly formated as html content, with one <br /> at each end of line
* in html file, <br /> is duplicated at each end of line

With patch
* nothing changes for email notification
* html file is correctly formatted with only one <br /> at each end of line

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Copied test plan from comment.
No errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12583: (followup) rename new test file
Tomas Cohen Arazi [Sat, 26 Jul 2014 13:13:28 +0000 (10:13 -0300)]
Bug 12583: (followup) rename new test file

We should reserve the use of dirs for namespaces. Method specific tests
should be included in a single file with subtests, or stick to Package_method.t.

This should be discussed, so we rearrange the remaining tests.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12583: DelItem prototype - Add unit tests
Jonathan Druart [Wed, 16 Jul 2014 12:07:33 +0000 (14:07 +0200)]
Bug 12583: DelItem prototype - Add unit tests

DelItem should return 1 if the item has been deleted, otherwise 0.

Test plan:
Verify that t/db_dependent/Items/DelItem.t returns green

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12583: DelItem prototype - prefer hashref
Jonathan Druart [Wed, 16 Jul 2014 11:44:39 +0000 (13:44 +0200)]
Bug 12583: DelItem prototype - prefer hashref

To delete an item, only the itemnumber should be mandatory. The DelItem
routine can retrieve the biblionumber from the itemnumber.

Test plan:
Verify that t/db_dependent/Items/DelItem.t passes

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12583: DelItem prototype - Remove $dbh
Jonathan Druart [Wed, 16 Jul 2014 11:39:07 +0000 (13:39 +0200)]
Bug 12583: DelItem prototype - Remove $dbh

Since C4::Context->dbh shares the DB handler, it's useless to pass it to
routines.

Test plan:
Try to remove an item from the Koha interface.
Verify that unit tests pass.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9667 - Inventory scrolling to top with every click
Owen Leonard [Mon, 14 Jul 2014 13:05:05 +0000 (09:05 -0400)]
Bug 9667 - Inventory scrolling to top with every click

An "onclick" attribute on inventory results links causes the page to
scroll to the top each time. This patch updates the click handling to
use a progressive-enhancement method.

Unrelated changes: I added use of the Branches T:T plugin to output
library name instead of branchcode, and put a check around call number
to prevent output of empty [] in results.

To test, use the inventory tool to check a batch of items. On the
results page:

- Confirm that branch name is shown instead of code.
- Confirm that no [] shows for items without call numbers
- Confirm that clicking a title opens a pop-up window showing details
  for that title.
- Confirm that clicking a title opens a pop-up window whether you're on
  the first page of results or any subsequent page.

Signed-off-by: Ian Beardslee <ian@catalyst.net.nz>
Tested in Firefox and Chromium.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12639 - Z39.50 administration page should use "message" dialog for adds and updates
Owen Leonard [Wed, 23 Jul 2014 17:08:36 +0000 (13:08 -0400)]
Bug 12639 - Z39.50 administration page should use "message" dialog for adds and updates

This patch changes the style of a couple of message boxes to use the
"message" style instead of the "alert" style. This better reflects the
type and priority of the messages being displayed.

To test, got to Administration -> Z39.50 client targets and edit an
existing server. The confirmation message should be the blue "message"
type.

Test again by adding a new server. The confirmation message for this
operation should be of the same blue "message" type.

Signed-off-by: Petter Goksoyr Asen <boutrosboutrosboutros@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Small template change, tested ok.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12572: (followup) Small style fix
Tomas Cohen Arazi [Fri, 25 Jul 2014 21:57:44 +0000 (18:57 -0300)]
Bug 12572: (followup) Small style fix

Boxes show a bit overlapped. This fixes that.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12572 - Use jQueryUI Accordion to display message transport types
Owen Leonard [Mon, 14 Jul 2014 14:32:11 +0000 (10:32 -0400)]
Bug 12572 - Use jQueryUI Accordion to display message transport types

The notice edit view has separate sections for each of the various
message transport types. This patch groups them in a jQueryUI accordion
to simplify the view.

Also changed: Some label/id pairs have been changed to eliminate
duplicate ids.

To test, apply the patch an edit any notice under Tools -> Notices &
Slips.

- The message transport type fields for email, feed, phone, etc. should
  be correctly grouped in a collapsed accordion. The acccordion should
  look correct and work correctly.
- Clicking the label for any form field should correctly highlight the
  corresponding field.
- Submitting updates to the notice should work correctly for all message
  transport types.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
This works as described.
Something small: the top border of the uncollapsed/opened section
doesn't display correctly, but this is working a lot nicer than before,
as now changing a message requires a lot less scrolling.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
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>
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>
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>
9 years agoBug 12164: (followup) keys expects a hash parameter
Tomas Cohen Arazi [Thu, 24 Jul 2014 18:40:32 +0000 (15:40 -0300)]
Bug 12164: (followup) keys expects a hash parameter

As of http://perldoc.perl.org/functions/keys.html we should avoid passing
a scalar parameter as it is not backwards compatible with squeezze's Perl
version (5.10).

Cite:
"Starting with Perl 5.14, keys can take a scalar EXPR, which must contain a
reference to an unblessed hash or array. The argument will be dereferenced
automatically. This aspect of keys is considered highly experimental. The
exact behaviour may change in a future version of Perl."

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12164: (followup) MoveOrders description corrected
Tomas Cohen Arazi [Thu, 24 Jul 2014 15:11:31 +0000 (12:11 -0300)]
Bug 12164: (followup) MoveOrders description corrected

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12164: Fix decimal number display
Jonathan Druart [Mon, 30 Jun 2014 10:05:46 +0000 (12:05 +0200)]
Bug 12164: Fix decimal number display

If the funds are not moved, the amount is display like 123.000000.
This patch hardcodes the number of decimal numbers to display (2).

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and tests, especially all acquisition tests.

New routines in Budgets.pm:
  - CloneBudgetPeriod
  - CloneBudgetHierarchy
  - MoveOrders

OK t/db_dependent/Budgets.t

Some of the tests done:

1) Duplicate an existing budget

- OK Existing budget is active, duplicate it and mark it inactive
- OK Existing budget is inactive, duplicate and mark it inactive

2) Close budget
- OK Budget was created without funds - no changes are made
- OK Budget was created with funds, all orders moved correctly
  - moving the available money to the new budget is optional
- OK Budget was created with funds, but one fund deleted,
     all orders moved correctly, one missing fund reported,
     orders unchanged

3) Partial receiced undone
- OK Partial receive from last budget is undone, order lines
     are correctly recombined and fund is set to the current budget

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12164: Fix some typos
Jonathan Druart [Mon, 30 Jun 2014 09:38:27 +0000 (11:38 +0200)]
Bug 12164: Fix some typos

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12164: follow-up: various fixes
Jonathan Druart [Fri, 6 Jun 2014 10:53:53 +0000 (12:53 +0200)]
Bug 12164: follow-up: various fixes

This follow-up fixes issues raised on bug 12164 comment 17.

1/ The unreceived orders columns should only display "pending" orders
2/ Fix some typo from_budget_period_id vs budget_period_id vs
to_budget_period_id

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>
9 years agoBug 12164: Add UI report
Jonathan Druart [Fri, 2 May 2014 08:00:11 +0000 (10:00 +0200)]
Bug 12164: Add UI report

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>
9 years agoBug 12164: On closing budget period, move unspent amount
Jonathan Druart [Mon, 2 Jun 2014 08:19:58 +0000 (10:19 +0200)]
Bug 12164: On closing budget period, move unspent amount

On closing a budget (budget period), the user will be presented with an
option to move remaining unspent funds from the previous budget to the
newly created one - adding to the amounts already entered in those
funds.

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>
9 years agoBug 12164: Close a budget period (budget)
Jonathan Druart [Mon, 2 Jun 2014 08:18:04 +0000 (10:18 +0200)]
Bug 12164: Close a budget period (budget)

This is the main patch.

On closing a budget period, all unreceived orders are moved from the
old/previous fiscal year into the new fiscal year.

You can rollover funds unused in the previous fiscal year to the new
fiscal year.

This patch set is based on bug 12168 (bugfix) and can be tested on top
of bug 11578 (easier to see the fund structure).

The patch set is cut in 6 main patches:

- Move the budget period clone logic into C4::Budgets
  The code is moved from the pl to Budgets.pm and unit tests are provided.
  The original code should certainly be buggy since a typo existed.
- On cloning budget period, mark original budget as inactive
  Cloning a budget period is already possible in Koha, this patch adds a
  checkbox to mark as inactive the original budget. That avoids to edit
  the budget and click the "inactive" checkbox. Both do the same action.
- On cloning budget periods, add a "reset all funds" option
  Same as before, a new checkbox is added on cloning a budget period. If
  you check it, all fund amounts will be set to 0. Otherwise, no change
  compared to the existing behavior.
- Close a budget period (budget)
  The goal of this patch set is to move unreceived orders from a budget to
  another. This patch adds a C4::Budgets::MoveOrders routine which does
  this job.
  This action is only possible if the fund structure is the same for both
  budgets, the budget_code field should be the same.
- On closing budget period, move unspent amount
  Unspent amount will be move from the previous budget structure to the
  new one.
- Add UI report
  This patch only adds a report when closing a budget is done.

Test plan:
Wording: below, budget is a "budget period" and fund is a "budget".
Prerequisite: Having 1 active budget with some funds (with different
levels and different amounts). Order and receive some orders (not all).
1/ Go on the budgets administration page (admin/aqbudgetperiods.pl) and
duplicate the structure of this budget ("Duplicate" link in the
"Actions" column).
2/ Enter start and end date for this budget and mark the original budget
as inactive.
3/ Note that a new budget is created, with the same fund structures (and
same value) and that the old one is marked as inactive (see
admin/aqbudgets.pl page with patches from bug 11578).
4/ Try to close the new budget: it is not possible, there is no
unreceived orders for this budget.
5/ You can close the inactive budget ("Close" link in the "Actions"
column).
6/ Verify the number of "Unreceived orders" is correct and select the
new budget in the budget list. Click on the "Move remaining unspent
funds" if you want to move unspent amounts.
7/ A report view is displayed and show you the ordernumber which have
been impacted (grouped by fund).
8/ Try different configuration, depending on the selected checkboxes.

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>
9 years agoBug 12164: On cloning budget periods, add a "reset all funds" option
Jonathan Druart [Mon, 2 Jun 2014 08:16:13 +0000 (10:16 +0200)]
Bug 12164: On cloning budget periods, add a "reset all funds" option

This patch adds a checkbox "reset all funds" (budgets).
If it is checked, the new created budgets (funds) will be reset.

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>
9 years agoBug 12164: On cloning budget period, mark original budget as inactive
Jonathan Druart [Mon, 2 Jun 2014 08:14:52 +0000 (10:14 +0200)]
Bug 12164: On cloning budget period, mark original budget as inactive

This patch adds a checkbox "mark original budget as inactive" (budget
period).
If it is checked, the original budget will be marked as inactive.

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>
9 years agoBug 12164: Move the budget period clone logic into C4::Budgets
Jonathan Druart [Mon, 2 Jun 2014 08:10:53 +0000 (10:10 +0200)]
Bug 12164: Move the budget period clone logic into C4::Budgets

Note the typo InsertInTable "aqcudgets", note sure about the existing
behavior before this patch!

This patch adds a link "Duplicate" in the action list for budget
periods (budgets).

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>
9 years agoBug 11347: DBRev 3.17.00.010
Tomas Cohen Arazi [Tue, 22 Jul 2014 14:32:49 +0000 (11:32 -0300)]
Bug 11347: DBRev 3.17.00.010

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11347 - PROG/CCSR deprecation: Remove opacsmallimage system-preference
Owen Leonard [Tue, 1 Jul 2014 16:43:44 +0000 (12:43 -0400)]
Bug 11347 - PROG/CCSR deprecation: Remove opacsmallimage system-preference

The opacsmallimage system preference is unused in the bootstrap theme.
It can be removed now that prog and ccsr are deprecated. This patch does
so.

To test, apply the patch and run updatedatabase. Confirm that the OPAC
works properly and the preference can no longer be found.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 12519 - Convert OPAC list download pop-up to modal dialog
Owen Leonard [Wed, 2 Jul 2014 16:50:54 +0000 (12:50 -0400)]
Bug 12519 - Convert OPAC list download pop-up to modal dialog

This patch changes the OPAC list download process so that the download
link triggers a modal dialog instead of a pop-up window. This
streamlines the process a little bit and makes it work better on mobile
devices.

The download list page has been altered so that it works better as a
standalone page, as it might be seen if JavaScript is disabled. Simple
form validation has been added to help prevent submission of the form
without choosing a format.

To test the virtualshelves system preference must be enabled.

- View an existing list in the OPAC and click the "download list" link.
- A modal dialog should be displayed with the download form.
- Submitting the form without selecting a format should trigger either a
  browser-based form validation error (in HTML5-supporting browsers) or
  a JavaScript alert (if your browser doesn't support the "required"
  attribute.
- Choosing a download format and submitting the form should close
  the dialog and trigger the correct download.
- Clicking the "Cancel" link should close the dialog.

Test with JavaScript disabled:

- Clicking the "download list" link should take you to a page which
  contains the same form which appeared in the modal dialog.
- Submitting the form without selecting a format should trigger either a
  browser-based form validation error (in HTML5-supporting browsers) or
  a JavaScript alert (if your browser doesn't support the "required"
  attribute..
- Choosing a download format and submitting the form should result in
  the corect download.
- Clicking the "Cancel" link should return you to the correct list.

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and tests, works as described.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 12595: (regression tests)
Tomas Cohen Arazi [Fri, 18 Jul 2014 15:02:41 +0000 (12:02 -0300)]
Bug 12595: (regression tests)

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>