]> git.koha-community.org Git - koha.git/log
koha.git
8 years agoBug 17327: (QA followup) Remove Carp::Always which is not used
Tomas Cohen Arazi [Mon, 26 Sep 2016 17:55:16 +0000 (14:55 -0300)]
Bug 17327: (QA followup) Remove Carp::Always which is not used

This patch removes the need for Carp::Always in .../Reserves/MultiplePerRecord.t
which is not actually used.

It also removes 'undef' from Koha::Holds::forced_hold_level's last return, to comply with
our QA rules.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17327: Item level holds no longer enforced
Kyle M Hall [Wed, 21 Sep 2016 02:15:02 +0000 (02:15 +0000)]
Bug 17327: Item level holds no longer enforced

Reported by Katrin:

Example:
- on shelf holds allowed
- holds allowed 5
- holds on same record allowed 5
- FORCE item level holds

On a record with only one item, you can only place a record level hold
in OPAC now - which is against your circulation conditions.

Another example:
- record with 2 items
- circulation rules as above, 1 hold allowed on the record
- Item level holds: forced

I can only place record level holds in OPAC and staff. At the moment, I
am not able to place item level holds in any circumstances in my
installation.

Test Plan:
1) Apply the unit test patch
2) prove t/db_dependent/Reserves/MultiplePerRecord.t
   should fail
3) Apply the second patch
4) prove t/db_dependent/Reserves/MultiplePerRecord.t
   should pass
5) Attempt to replicate one of the examples above, you should be unable to

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17327: Add unit test for regression
Kyle M Hall [Wed, 21 Sep 2016 02:13:47 +0000 (02:13 +0000)]
Bug 17327: Add unit test for regression

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 2389: (followup) Add documentation and fix use case
Tomas Cohen Arazi [Tue, 13 Sep 2016 17:42:32 +0000 (14:42 -0300)]
Bug 2389: (followup) Add documentation and fix use case

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Barton Chittenden <barton@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 2389: Add --test switch to overdue_notices.pl
Tomas Cohen Arazi [Fri, 15 Jul 2016 13:18:13 +0000 (10:18 -0300)]
Bug 2389: Add --test switch to overdue_notices.pl

This patch adds the --test option switch to the overdue_notices.pl script
so it can be ran without doing any actual action.

To test:
- Have a patron with overdue items (simulate a checkout for a past date. Note it implies
  that the circ rules are defined so the patron is overdue)
- Run:
  $ sudo koha-shell kohadev
  koha-dev$ misc/cronjobs/overdue_notices.pl --test
=> SUCCESS: The script is ran but the patron isn't debarred and no notice messages are queued.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Barton Chittenden <barton@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17135 - DBRev 16.06.00.028
Kyle M Hall [Fri, 16 Sep 2016 10:50:33 +0000 (10:50 +0000)]
Bug 17135 - DBRev 16.06.00.028

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17135: [QA Follow-up] Changes as to reporting
Marcel de Rooy [Fri, 9 Sep 2016 08:53:48 +0000 (10:53 +0200)]
Bug 17135: [QA Follow-up] Changes as to reporting

We should at least report some grand totals when fixing fine records.
This patch also includes some cosmetic whitespace swapping.
Turned one last into an if statement.

Added a copyright statement too.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17135: [QA Follow-up] Change location of new script to fix fines
Marcel de Rooy [Fri, 9 Sep 2016 07:53:53 +0000 (09:53 +0200)]
Bug 17135: [QA Follow-up] Change location of new script to fix fines

The location of the script in misc/maintenance would be fine for
running it from the command line. But it will be a problem for several
install types when running it from the web installer.
Files from misc/maintenance go to bin/maintenance in a package install,
not to mention other installs than a dev install.

This patch moves the script to installer/data/mysql. Already there are two
other scripts run by upgradedatabase. I would rather move these three
scripts somewhere else, but we c/should do that on another report.

Fixed a small typo in a message too.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17135 - Maintenance script execution added as part of an atomic DB upgrade
Jacek Ablewicz [Wed, 31 Aug 2016 17:46:00 +0000 (19:46 +0200)]
Bug 17135 - Maintenance script execution added as part of an atomic DB upgrade

(plus warnings for 16.05+ production setups possibly already affected)

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17135 - Some minor changes & fixes in the script
Jacek Ablewicz [Wed, 31 Aug 2016 14:18:50 +0000 (16:18 +0200)]
Bug 17135 - Some minor changes & fixes in the script

- all non-fatal output redirected to STDOUT (as there is an intention
to run this script from updatedatabase.pl)

- added borrowernumber and itemnumber equality checks to the SELECT
statement in getFinesForChecking() - accountlines.issue_id alone is not
entirely trustworthy (because InnoDB forgets it's highest auto_increment
after server restart), in some rare cases it may point to some random
issue for different patron and different item

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17135 - Fine for the previous overdue may get overwritten by the next one
Jacek Ablewicz [Mon, 29 Aug 2016 10:51:21 +0000 (12:51 +0200)]
Bug 17135 - Fine for the previous overdue may get overwritten by the next one

External maintenace script for fixing unclosed (FU), non accruing fine
records which may still need FU -> F correction post-Bug 15675.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16752 [Revised] Remove the use of event attributes from some acquisitions templat...
Owen Leonard [Wed, 15 Jun 2016 14:51:34 +0000 (10:51 -0400)]
Bug 16752 [Revised] Remove the use of event attributes from some acquisitions templates - Uncertain prices

This patch modifies the acquisitions uncertain prices template to remove
event attributes onclick and onchange.

Also changed on the uncertain prices page: Added a label to the orders
filter, removed redundant form submit function.

- Locate a vendor which has orders with uncertain prices
- Click the 'Uncertain prices' tab in the left-hand sidebar
- Enter invalid data in the "price" field for any order. Confirm that an
  error is triggered when the field loses focus.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
QA Revision: Corrected input type of submit button.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16752 - Remove the use of event attributes from some acquisitions templates ...
Owen Leonard [Wed, 15 Jun 2016 14:23:41 +0000 (10:23 -0400)]
Bug 16752 - Remove the use of event attributes from some acquisitions templates - Transfer order

This patch removes the use of 'onclick' from the acquisitions transfer
order process. The patch also modifies the style of some links and
buttons to conform with current guidelines.

- Locate an open basket with items in it
- Click the 'Transfer' link for a title in the basket
- In the pop-up window:
  - Confirm that the 'Cancel' button at the bottom of the window is a
    Bootstrap-style button.
  - Search for a vendor; Confirm that the 'Choose' link is a
    Bootstrap-style button.
  - Choose a vendor; Confirm that the 'Choose' link on the following
    page is a Bootstrap-style button.
  - Confirm that clicking the 'Choose' button transfers the item to the
    correct basket.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16752 - Remove the use of event attributes from some acquisitions templates ...
Owen Leonard [Wed, 15 Jun 2016 16:14:12 +0000 (12:14 -0400)]
Bug 16752 - Remove the use of event attributes from some acquisitions templates - Funds

This patch modifies the funds administration page and other files
related to the process of searching for and selecting fund owners and
users in order to remove the use of event attributes like 'onclick.'

Also changed in this patch: I have revised the way the "select owner"
and "select user" controls look. They are now links with Font Awesome
icons.

- Go to Administration -> Funds and open a fund for editing.
- Test the process of adding and updating an owner:
  - Click the 'Select owner' link.
  - Search for and select an owner in the pop-up window.
  - Save the fund and verify that the owner was saved correctly.
  - Perform the same test with the 'Remove owner' link.
- Use the same process to test the addition and removal of users.
  - Confirm that the 'Remove' link works correctly before and after
    submitting the form to save changes to the fund.

This patch changes a file which is used by both the funds template and
the template used when setting a guarantor on a patron. To test the
changes in that context:

- Open a 'child' type patron record.
- Under 'Guarantor information,' test the process of setting and
  removing a guarantor to confirm that data is saved correctly.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 13134: Fix template file to make category appear
Marc Véron [Wed, 10 Aug 2016 20:16:10 +0000 (22:16 +0200)]
Bug 13134: Fix template file to make category appear

This is a followup to rescue the bug.

To test: Follow test plan from comment #1

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 13134 - Add patron category to returns confirmation dialogs
Kyle M Hall [Fri, 14 Oct 2011 14:37:56 +0000 (10:37 -0400)]
Bug 13134 - Add patron category to returns confirmation dialogs

Some librarians find it useful to know what category a patron is before
confirming a reserve or transfer from the checkin screen.

This patch adds the patron category to the hold and transfer popups
to the patron information already displayed. The li tags that contain
the patron category have the class "patron-category" to allow this data
to be easily hidden.

Test Plan:
1) Apply this patch
2) Trap a hold for a patron, note the patron category is now displayed
3) Trap a hold for pickup at another loation, note the patron category
   is now displayed

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17266 - Update man page for koha-remove with -p
Magnus Enger [Thu, 8 Sep 2016 13:10:33 +0000 (15:10 +0200)]
Bug 17266 - Update man page for koha-remove with -p

Bug 9754 added the -p|--purge-all option to koha-remove, but this
was not documented in the man page. This patch fixes that.

To test:
Run these commands and look at the formatted man page:
$ xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl \
  debian/docs/koha-remove.xml
$ man -l koha-remove.8

Make sure this test passes:
$ prove -v xt/verify-debian-docbook.t

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12629 - Software error when trying to merge records from different frameworks
Kyle M Hall [Wed, 23 Jul 2014 16:43:54 +0000 (12:43 -0400)]
Bug 12629 - Software error when trying to merge records from different frameworks

Test Plan:
1) Choose a bib record that has the default framework.
2) Add a second record using that fast add framework.
3) Merge the records; switch to "Using framework: Default", and choose the original record (i.e. the one that had the default framework) as the merge reference. Clicking 'Next' will trigger the error.
4) Apply this patch
5) Repeat steps 1 - 3, no error should occur

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16556 - KohaToMarcMapped columns sharing same field with biblio(item)number are...
Olli-Antti Kivilahti [Thu, 19 May 2016 14:12:06 +0000 (17:12 +0300)]
Bug 16556 - KohaToMarcMapped columns sharing same field with biblio(item)number are removed.

REPLICATE ISSUE:

1. Map biblio.frameworkcode to 999$b
2. Map biblio.biblionumber to 999$c
3. Add a record with something in 999$b
4. 999$b is removed by C4::Biblio::AddBiblio()

After this patch, the field used by biblio.biblionumber or biblioitems.biblioitemnumber
is not removed and created anew, thus dropping all existing additions.

There is no point in dropping the field in any case, since we can just replace
the existing subfields in-place with no need to recreate the whole field.

UNIT TESTS INCLUDED

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17010 [Follow-up] Canceling a hold awaiting pickup no longer alerts librarian...
Owen Leonard [Tue, 9 Aug 2016 16:56:46 +0000 (12:56 -0400)]
Bug 17010 [Follow-up] Canceling a hold awaiting pickup no longer alerts librarian about next hold

This patch makes a minor change to the markup to make the button in the
confirmation dialog conform to the appearance of similar buttons.

To test, follow the original test plan for this bug and verify that the
"OK" button in the dialog looks correct.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17010 - Canceling a hold awaiting pickup no longer alerts librarian about next...
Kyle M Hall [Mon, 1 Aug 2016 14:17:04 +0000 (07:17 -0700)]
Bug 17010 - Canceling a hold awaiting pickup no longer alerts librarian about next hold

In previous versions of Koha, if a hold canceled from the "Holds over" tab had other holds on it,
the librarian would be alerted with the message "This item is on hold for pick-up at your library"
and directed to check it in to fill the next hold. This no longer happens.

Test Plan:
1) Apply this patch
2) Find a hold that has been waiting too long
3) Cancel that hold via waitingreserves.pl
4) Note you get the message "This item is on hold for pick-up at your library"
5) Confirm the ok button redirects you to the correct tab

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17146: Raise Wrong CSRF token warnin for the 'Delete' action
Jonathan Druart [Mon, 5 Sep 2016 09:44:06 +0000 (10:44 +0100)]
Bug 17146: Raise Wrong CSRF token warnin for the 'Delete' action

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17146: Fix CSRF in picture-upload.pl
Jonathan Druart [Thu, 18 Aug 2016 14:52:38 +0000 (15:52 +0100)]
Bug 17146: Fix CSRF in picture-upload.pl

If an attacker can get an authenticated Koha user to visit their page
with the
url below, they can change or delete patrons' images
/tools/picture-upload.pl?op=Delete&borrowernumber=42

Test plan:
1/ Hit /tools/picture-upload.pl?op=Delete&borrowernumber=42
And confirm that you get a "Wrong CSRF token" error
2/ Go on the patron detail page with a patron's image
3/ Click on the Delete link (note the csrf_token param)
4/ The image will be deleted and you are redirected to the patron detail
page.

Regression tests:
Upload an image from the patron detail page and from the "upload patron
images" tool.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17114: Fix XSS in picture-upload.pl
Jonathan Druart [Fri, 12 Aug 2016 09:42:28 +0000 (10:42 +0100)]
Bug 17114: Fix XSS in picture-upload.pl

To reproduce:
1/ cp your_image.jpg 'test<svg onload=alert(1)>.jpg'
2/ Use the upload picture tool to upload this file
=> Without this patch, the alert is show
=> With this patch, the filename is correctly displayed and no alert

Note that the cardnumber var was not escaped neither, it's now.

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16554: Fix encoding on it-IT file
Bernardo Gonzalez Kriegel [Fri, 12 Aug 2016 19:28:41 +0000 (16:28 -0300)]
Bug 16554: Fix encoding on it-IT file

This patch only fixes encoding of file
installer/data/mysql/it-IT/necessari/sample_numberpatterns.sql

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16554: rewrite mandatory and sample data - de-DE
Bernardo Gonzalez Kriegel [Wed, 25 May 2016 01:14:13 +0000 (22:14 -0300)]
Bug 16554: rewrite mandatory and sample data - de-DE

More changes to de-DE files

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16554: rewrite mandatory and sample data - it-IT
Bernardo Gonzalez Kriegel [Wed, 25 May 2016 01:25:56 +0000 (22:25 -0300)]
Bug 16554: rewrite mandatory and sample data - it-IT

More changes to it-IT files

Checked marc21 and unimarc files
unimarc_relatorterms.sql had bad encoding, others minor
errors

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16554: More i18n changes - en, es, nb and pl files
Bernardo Gonzalez Kriegel [Sat, 28 May 2016 15:54:30 +0000 (12:54 -0300)]
Bug 16554: More i18n changes - en, es, nb and pl files

Mostly fixes bad values in auth files ( '' -> 0 )

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16554: rewrite mandatory and sample data - pl-PL
Bernardo Gonzalez Kriegel [Wed, 25 May 2016 02:31:25 +0000 (23:31 -0300)]
Bug 16554: rewrite mandatory and sample data - pl-PL

More changes to pl-PL files

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16554: rewrite mandatory and sample data - nb-NO
Bernardo Gonzalez Kriegel [Wed, 25 May 2016 02:30:14 +0000 (23:30 -0300)]
Bug 16554: rewrite mandatory and sample data - nb-NO

More changes to nb-NO files

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16554: rewrite mandatory and sample data - es-ES
Bernardo Gonzalez Kriegel [Wed, 25 May 2016 01:22:24 +0000 (22:22 -0300)]
Bug 16554: rewrite mandatory and sample data - es-ES

More changes to es-ES files

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16554: Fix I18N sample files
Bernardo Gonzalez Kriegel [Thu, 19 May 2016 01:59:27 +0000 (22:59 -0300)]
Bug 16554: Fix I18N sample files

Needs Bug 13669

This patch fix web installer for
de-DE, es-ES, fr-CA, nb-NO and pl-PL

To test:
1) Apply patch
2) Try web installer for any/all listed languages.
a) de-DE, es-ES, fr-CA and pl-PL
There must be no problems for marc21 + all sample files
b) nb-NO
There must be no problems for normarc + all sample files

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16554: Fix fr-FR sample files
Bernardo Gonzalez Kriegel [Thu, 19 May 2016 02:55:41 +0000 (23:55 -0300)]
Bug 16554: Fix fr-FR sample files

Needs Bug 13669

Rewrite autorites_norme_unimarc.sql to
use only one INSERT IGNORE.

New load method complains about duplicate keys,
and both auth files are mandatory!

Also removed blank space from sample_labels.sql

Tested with unimarc_complet and all sample files.

To test
1) Apply the patch
2) Try fr-FR web installer, unimarc_complet + all sample files
There must be no errors

Don't know if fr-FR marc21 and unimarc_lecture_pub are used,
need a look from french users.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17299: Display date due correctly on SCO
Jonathan Druart [Wed, 14 Sep 2016 12:25:58 +0000 (13:25 +0100)]
Bug 17299: Display date due correctly on SCO

Unless it's an hourly loan, date due should not display the time part
(23:59).
Because of bad code in GetPendingIssues, date_due is replaced with a
DateTime object and is copied into date_due_sql.
We need to use this date_due_sql to correctly display the date due in
the sco module.

Test plan:
1/ Enable WebBasedSelfCheck syspref
2/ Check out an item to User A -- Do not use an hourly loan.
3/ Log in to Koha self check ( {OPAC URL}/cgi-bin/koha/sco/sco-main.pl).
4/ Enter User A's cardnumber.
Without this patch, checkouts are
   MM/DD/YYYY 12:00 AM (Timeformat: 12 hour)
or MM/DD/YYYY 00:00    (Timeformat: 24H)
With this patch applied, only the date is displayed

Followed test plan, works as expected.
Signed-off-by: Marc <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16276 - Update schema
Kyle M Hall [Tue, 13 Sep 2016 17:36:14 +0000 (17:36 +0000)]
Bug 16276 - Update schema

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16276 - DBRev 16.06.00.027
Kyle M Hall [Tue, 13 Sep 2016 17:30:41 +0000 (17:30 +0000)]
Bug 16276 - DBRev 16.06.00.027

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16276: [QA Follow-up] Only track when pref is enabled
Marcel de Rooy [Fri, 19 Aug 2016 10:23:01 +0000 (12:23 +0200)]
Bug 16276: [QA Follow-up] Only track when pref is enabled

Do not track when the pref has not been enabled.
This patch moves the conditional update in Auth.pm to Koha::Patron.
And adds a test for the new track_login method.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16276: [QA Follow-up] Number of tests corrected
Marcel de Rooy [Fri, 19 Aug 2016 09:16:33 +0000 (11:16 +0200)]
Bug 16276: [QA Follow-up] Number of tests corrected

Applies to t/db_dependent/Members.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16276: Add a new pref TrackLastPatronActivity and new column borrowers.lastseen
Jonathan Druart [Sun, 24 Apr 2016 15:03:49 +0000 (16:03 +0100)]
Bug 16276: Add a new pref TrackLastPatronActivity and new column borrowers.lastseen

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
https://bugs.koha-community.org/show_bug.cgi?id=12276

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16276: Make the batch patron deletion tool deal with last_seen
Jonathan Druart [Sun, 24 Apr 2016 16:51:56 +0000 (17:51 +0100)]
Bug 16276: Make the batch patron deletion tool deal with last_seen

This patch adds the same change as the previous one to the batch patron
deletion tool.

If the pref TrackLastPatronActivity is enabled, the librarians will be
able to delete patrons who do not have been connected since a given
time.

Test plan:
Define a date for the "who have not been connected since" options and
confirm that it works as expected.

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
https://bugs.koha-community.org/show_bug.cgi?id=12276

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16276: Change to GetBorrowersToExpunge to take last_seen into account
Jonathan Druart [Sun, 24 Apr 2016 16:38:57 +0000 (17:38 +0100)]
Bug 16276: Change to GetBorrowersToExpunge to take last_seen into account

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
With small change: number of tests in t/db_dependent/Members.t

https://bugs.koha-community.org/show_bug.cgi?id=12276

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16276: Make delete_patrons.pl deal with --last_seen
Jonathan Druart [Sun, 24 Apr 2016 16:39:13 +0000 (17:39 +0100)]
Bug 16276: Make delete_patrons.pl deal with --last_seen

This patch modify the delete_patrons.pl cronjob to deal with the
last_seen option.

To test it, you just have to use the --last_seen option and pass a valid
date (iso format)

Example:
  perl misc/cronjobs/delete_patrons.pl --last_seen="1984-02-04" --confirm
will delete all the patrons who do not have been active since this date.

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
https://bugs.koha-community.org/show_bug.cgi?id=12276

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16276: Update borrowers.lastseen when a patron is active
Jonathan Druart [Sun, 24 Apr 2016 15:04:16 +0000 (16:04 +0100)]
Bug 16276: Update borrowers.lastseen when a patron is active

In order to add the ability to delete patrons who have been inactive for
more than a given time, we need to track down the last time they were
active.
To do that, we need a new DB column in the borrowers table (lastseen).
Note that the borrowers.lastseen column will not be initialised for existing
installations (set to NULL) so inactive existing patrons will never be
deleted.
A workaround would be to init them at the date when the new column will
be added.

Test plan:
0/ Set the new pref TrackLastPatronActivity on
1/ Log in as a patron (staff or OPAC)
2/ Check that the borrowers.lastseen field has been updated with the
current time

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
https://bugs.koha-community.org/show_bug.cgi?id=12276

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17147 [Revised] Streamline messages following batch record modification
Owen Leonard [Thu, 18 Aug 2016 15:04:38 +0000 (11:04 -0400)]
Bug 17147 [Revised] Streamline messages following batch record modification

This patch changes the display of informational messages during and
after the batch record modification process. Instead of showing a
separate dialog for each record modified, messages are now grouped into
one dialog.

To test, apply the patch and clear your browser cache if necessary. You
must have at least one MARC modification template defined.

- Go to Tools -> Batch record modification.
- Submit a list of biblionumbers which contains at least one number
  which doesn't exist in your database.
- Confirm that warning and success messages are grouped instead of
  showing in separate dialogs.
- Submit a list of biblionumbers using a MARC modification template
  which contains no actions. Confirm that the resulting error message is
  correctly formatted.

Revision formats the error messages without the unordered list, which
was giving them padding which didn't look correct inside a dialog.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Edit for QA: Removed obsolete changes to CSS.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16949: Simplify the checkbox checked condition
Jonathan Druart [Tue, 13 Sep 2016 08:06:12 +0000 (09:06 +0100)]
Bug 16949: Simplify the checkbox checked condition

It's easier to use jQuery selector to know if checkboxes are checked.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16949: Batch record deletion says success when no records have been passed in
Aleisha [Wed, 20 Jul 2016 22:14:05 +0000 (22:14 +0000)]
Bug 16949: Batch record deletion says success when no records have been passed in

The reason this happens is because the page will say success when the
total number of records given equals the total number of successful
deletions. If you pass in no records, there are no successful deletions
--> 0 = 0 --> it thinks it has been successful. This patch adds a check
that validates if any checkboxes were selected before submitting the
final form.

I have removed the check for if any records were selected AFTER the form
has been submitted because it seemed unnecessary if the form can't be
submitted without selection of records anyway.

To test:
1) Go to Tools -> Batch record deletion
2) Put in a record number and click Continue
3) Deselect the record so that it doesn't actually delete and click
   Delete selected records
4) Page says 'All records have been deleted successfully!'
5) Apply patch. Go back and repeat step 3
6) Form should not submit and you should receive an alert saying that no
   records have been selected.
7) If you try selecting and deleting a record after this alert, it
   should still work

Note: Have also changed the wording of error in Step 1 when you are
entering record numbers to delete.

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16732 - Add audio alerts (custom sound notifications) to web based self checkout
Nick Clemens [Mon, 15 Aug 2016 19:58:52 +0000 (19:58 +0000)]
Bug 16732 - Add audio alerts (custom sound notifications) to web based self checkout

This patch adds the infrastructure needed to allow audio alerts, as
configured in administration, to affect the sco module

This patch allows only for the use of sounds with a full URL to be used
and does not allow for the Koha standard sounds to be accessed via the
SCO

To test:
Ensure you have the preference AudioAlerts enabled
Ensure you can hear normal sounds from the staff module
Define an audio alert such as:
    Selector: .sco_entry
    Sound: https://archive.org/download/Doorbell_1/doorbell.ogg
Load the SCO module
You should hear the doorbell noise (everytime you reload even!)
Test that the default sounds are not activated for the SCO, you must
sepcifically define them

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 14752 - (QA followup) Remove annoying modal, use dialog box instead
Nick Clemens [Mon, 6 Jun 2016 14:11:36 +0000 (10:11 -0400)]
Bug 14752 - (QA followup) Remove annoying modal, use dialog box instead

- Uses a dialog box to warn of unique fields not copying, dialog was in
place for barcode generation so removed the extar modal completey
- Fixes a problem when barcode was undefined and autobarcode on
- deleted an extra space in Barcodes/hbymmincr.pm

Signed-off-by: sonia BOUIS <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 14752 - Add multiple copies to a basket at once
Nick Clemens [Thu, 24 Dec 2015 14:53:16 +0000 (14:53 +0000)]
Bug 14752 - Add multiple copies to a basket at once

This patch add an 'Add multiple copies' button on the new order page in
acquisitions.  While processing the multiple copies a modal is
displayed.

To test:
1 - Add an order to an acquisitions basket
2 - Choose to add multiple items
3 - A modal shouold warn about ignoring UniqueItemFields from syspref
4 - When submitting the modal should popup until all items are processed.
5 - The modal should disappear after items are added.
6 - Items should be cloned, minus unique fields
7 - Enable autoBarcode for various formats, ensure you are warned that
barcodes will be generated, and ensure they are generated correctly

Sponsored by: Middletown Township Public Library (http://www.mtpl.org)

Signed-off-by: sonia BOUIS <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 10227 : Fix GetMessagingPreferences when digest is possible
Sophie Meynieux [Wed, 24 Aug 2016 12:56:54 +0000 (14:56 +0200)]
Bug 10227 : Fix GetMessagingPreferences when digest is possible

This bug is a bit tricky to test, as the result is somehow  random, depending on the order of rows returned by sql request. You've got to change the preferences several times to see bad results.

Enable EnhancedMessaging preferences
Set preferences for a borrower or a category.
run misc/cronjobs/advance_notices.pl and look in message_queue table the letter_code of the generated messages.
Change digest selection and do the test again several times

Without patch, for message where digest is allowed (Advance_Notice, Item_Due), for a borrower or a category with 'wants_digest' selected, GetBorrowerMessagingPreferences returns sometimes letter_code with DGST and sometimes not.

With the patch, letter_code returned is always correct depending on digest selected or not

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17295 - Missed variable removal in subscription-add.pl from Bug 15758
Nick Clemens [Tue, 13 Sep 2016 14:08:23 +0000 (14:08 +0000)]
Bug 17295 - Missed variable removal in subscription-add.pl from Bug 15758

To test:
Load subscription-add.pl
Get an error
Apply patch
Reload
Koha is less sad (page loads okay)
Verify that normal functions work

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 13914 : Fix UNION in SQL request for reserves statistics
Sophie Meynieux [Wed, 10 Aug 2016 14:06:35 +0000 (16:06 +0200)]
Bug 13914 : Fix UNION in SQL request for reserves statistics

Test plan
=========
On Reports > reservations, select all statuses as line, pickup library as column (empty) and a range of hold date. Keep the results
Run the same reports but with statuses as column and pickup library as line
You should get the same results on another display.

* Without patch, if you've got representative data, most of the time you can observe significant differences between both results

* With the patch, results are always the same (and right if you request directly your database)

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15407: Remove 'No method selected!' warnings
Jonathan Druart [Tue, 13 Sep 2016 08:47:14 +0000 (09:47 +0100)]
Bug 15407: Remove 'No method selected!' warnings

From reserves_stats.pl, there is no library pre-selected.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16274 - DBRev 16.06.00.026
Kyle M Hall [Mon, 12 Sep 2016 15:38:46 +0000 (15:38 +0000)]
Bug 16274 - DBRev 16.06.00.026

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16274: Limit the patron self registration to some libraries
Jonathan Druart [Sat, 23 Apr 2016 15:37:26 +0000 (16:37 +0100)]
Bug 16274: Limit the patron self registration to some libraries

Currently a patron can select a home library in the list of all
libraries defined in the system.
However some of these libraries might not accept self registration.
This patch adds a new pref to display only the allowed libraries.

Test plan:
0/ Apply the patch, do not fill the new pref
1/ Self register a new patron
=> All the libraries defined should be displayed in the "Home library"
dropwdown list
2/ Fill the pref PatronSelfRegistrationLibraryList with some of the
branchcode defined in the system
=> Self register a new patron and confirm that the dropdown list has
been filtered.

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16274: Add the new pref PatronSelfRegistrationLibraryList
Jonathan Druart [Sat, 23 Apr 2016 15:17:06 +0000 (16:17 +0100)]
Bug 16274: Add the new pref PatronSelfRegistrationLibraryList

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
8 years agoBug 16967: Remove the use of "onclick" from serial frequency and numbering management
Owen Leonard [Fri, 22 Jul 2016 18:48:36 +0000 (14:48 -0400)]
Bug 16967: Remove the use of "onclick" from serial frequency and numbering management

This patch removes instance of "onclick" from the templates for serial
frequency and numbering management. Events are now defined in the
JavaScript.

To test, apply the patch and go to Serials -> Manage frequencies.

 - In the list of frequencies, click the "Delete" button for a frequency
   which is in use by at least one subscription. In the confirmation
   dialog, clicking the "Show subscriptions" link should display a list
   of titles.
 - Edit or create a frequency.
 - To test that the form submission validation is still working
   correctly, enter non-numeric data in the "issues per unit" field and
   submit the form. This should trigger an error.

In Serials -> Manage numbering patterns:

 - In the list of numbering patterns, click the "Delete" button for a
   pattern which is in use by at least one subscription. In the
   confirmation dialog, clicking the "Show subscriptions" link should
   display a list of titles.
 - Edit or create a numbering pattern.
 - Confirm that the "Test pattern" button works correctly.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17285: (15758 follow-up) Fix advanced editor
Jonathan Druart [Mon, 12 Sep 2016 15:45:22 +0000 (16:45 +0100)]
Bug 17285: (15758 follow-up) Fix advanced editor

Little mistake from df97814, $branches is a hash { branchcode =>
branchname }

Test plan:
Edit a biblio with the advanced editor

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
The advanced editor works as expected

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17197: Remove misc/batchupdateISBNs.pl
Jonathan Druart [Thu, 25 Aug 2016 13:46:21 +0000 (14:46 +0100)]
Bug 17197: Remove misc/batchupdateISBNs.pl

This script has not been updated for ages and is UNIMARC specific.
Since I am working on bug 17196 to move marcxml out of biblioitems
table, I'd like not to rewrite unused scripts (and lost my time...)
So if someone complains later, I will rewrite it on top of bug 17196.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 7677 - Remove atomic update
Kyle M Hall [Mon, 12 Sep 2016 09:44:48 +0000 (09:44 +0000)]
Bug 7677 - Remove atomic update

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 7677 - Schema update
Kyle M Hall [Mon, 12 Sep 2016 09:39:54 +0000 (09:39 +0000)]
Bug 7677 - Schema update

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 7677 [QA Followup] - Fix issues with kohastructure
Kyle M Hall [Mon, 12 Sep 2016 09:38:06 +0000 (09:38 +0000)]
Bug 7677 [QA Followup] - Fix issues with kohastructure

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 7677 - DBRev 16.06.00.025
Kyle M Hall [Mon, 12 Sep 2016 09:15:38 +0000 (09:15 +0000)]
Bug 7677 - DBRev 16.06.00.025

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 7677: UT: Remove $dbh->rollback
Julian Maurice [Thu, 8 Sep 2016 07:15:48 +0000 (09:15 +0200)]
Bug 7677: UT: Remove $dbh->rollback

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 7677: QA followup
Matthias Meusburger [Tue, 30 Aug 2016 08:41:56 +0000 (10:41 +0200)]
Bug 7677: QA followup

 - Fix tests

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 7677: QA followup
Julian Maurice [Thu, 25 Aug 2016 14:08:45 +0000 (16:08 +0200)]
Bug 7677: QA followup

Fix 'unique contraint primary' error when receiving serials

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 7677 [QA Followup] - Replace GetItemnumberFromSerialId with use of Koha::Serial...
Matthias Meusburger [Fri, 3 Jun 2016 13:56:36 +0000 (15:56 +0200)]
Bug 7677 [QA Followup] - Replace GetItemnumberFromSerialId with use of Koha::Serial::Item(s)

 - use _type instead of type (see https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15446 )

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 7677 [QA Followup] - Replace GetItemnumberFromSerialId with use of Koha::Serial...
Kyle M Hall [Fri, 29 Jan 2016 01:46:02 +0000 (01:46 +0000)]
Bug 7677 [QA Followup] - Replace GetItemnumberFromSerialId with use of Koha::Serial::Item(s)

GetItemnumberFromSerialId has no unit tests. It would be better to start
using our object system here.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 7677 [Follow-up]: New areas in subscriptions and new functions when receiving.
Matthias Meusburger [Mon, 28 Sep 2015 14:29:16 +0000 (16:29 +0200)]
Bug 7677 [Follow-up]: New areas in subscriptions and new functions when receiving.

 - Various fixes.

Test plan:

Once the makePreviousSerialAvailable syspref is enabled, receive a serial, and then another, then check that:

 - the first received itemtype has been set to the "previous item type" value (set in the subscription).

 - the first received has been made available.

 - the last received serial itemtype has been set to the "item type" value (set in the subscription).

 - 995$l is automatically prefilled.

Configure the serialsFieldsToAV syspref. When creating or editing a subscription, check that:

 - the domain and/or origin and/or support fields are correctly displaying the authorized values configured in the syspref.

Signed-off-by: Chris <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 7677: Fix tests
Jonathan Druart [Tue, 23 Dec 2014 15:51:41 +0000 (16:51 +0100)]
Bug 7677: Fix tests

They don't pass since bug 12098 has been pushed.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
http://bugs.koha-community.org/show_bug.cgi?id=7767

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 7677: FIX QA issues
Jonathan Druart [Mon, 10 Mar 2014 10:58:33 +0000 (11:58 +0100)]
Bug 7677: FIX QA issues

 FAIL    C4/Serials.pm
   FAIL      forbidden patterns
    forbidden pattern: trailing space char (line 1501)
    forbidden pattern: trailing space char (line 921)

 FAIL    serials/serials-edit.pl
   FAIL      valid
        "my" variable $dbh masks earlier declaration in same scope

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
http://bugs.koha-community.org/show_bug.cgi?id=7767

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 7677: UT: add unit tests for GetPreviousSerialid
Jonathan Druart [Wed, 21 Aug 2013 12:38:34 +0000 (14:38 +0200)]
Bug 7677: UT: add unit tests for GetPreviousSerialid

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
http://bugs.koha-community.org/show_bug.cgi?id=7767

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBZ7677: New areas in subscriptions and new functions when receiving.
Matthias Meusburger [Thu, 9 Jan 2014 16:06:14 +0000 (17:06 +0100)]
BZ7677: New areas in subscriptions and new functions when receiving.

When enabling the makePreviousSerialAvailable syspref, the previously
 received serial's itemtype is set as defined in the subscription.
 (Please note that the item-level_itypes syspref must be set to specific item.)
 It is also made available.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
http://bugs.koha-community.org/show_bug.cgi?id=7767

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17281 Warning when saving subfield structure
Frédéric Demians [Fri, 9 Sep 2016 06:06:19 +0000 (08:06 +0200)]
Bug 17281 Warning when saving subfield structure

TO TEST:

1. Home > MARC Framework > Default > Actions > MARC structure
2. On 073 field (for example), click Edit
3. Click on Edit subfield button
4. Click on Save changes
5. Take a look in intranet logs. You find:
   Use of uninitialized value in string eq at
   ../admin/marc_subfields_structure.pl
6. Apply the patch, and repeat steps 3-5
   => no more warning in log

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16311 - Fix DBRev description
Kyle M Hall [Mon, 12 Sep 2016 09:09:59 +0000 (09:09 +0000)]
Bug 16311 - Fix DBRev description

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16311 - DBRev 16.06.00.024
Kyle M Hall [Mon, 12 Sep 2016 09:08:27 +0000 (09:08 +0000)]
Bug 16311 - DBRev 16.06.00.024

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16311 - Advanced search language limit typo
Andreas Roussos [Fri, 9 Sep 2016 16:46:33 +0000 (19:46 +0300)]
Bug 16311 - Advanced search language limit typo

In the OPAC -> Advanced Search, the Language drop down menu incorrectly
lists Romanian as "Român (Romanian)" while the correct value (as reported
by Barry Cannon) is "Română (Romanian)".

This patch fixes that:
a) for _new_ installations by modifying
   installer/data/mysql/mandatory/subtag_registry.sql (loaded by the web
   installer when koha is installed), and also
b) for _existing_ installations by adding an atomicupdate file in
   installer/data/mysql/atomicupdate/

Test plan:
1) In the OPAC, go to Advanced search (cgi-bin/koha/opac-search.pl).
2) In the 'Language' drop down menu, observe that the value for Romanian
   is "Român (Romanian)".
3) Apply the patch, and run installer/data/mysql/updatedatabase.pl.
4) Refresh the Advanced search page in the OPAC. Confirm that the patch
   worked, i.e. the Language drop down menu lists Romanian as
   "Română (Romanian)" (notice the added 'ă').

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17284 - Patron details page ( moremember.pl ) show logged in library as patron...
Kyle M Hall [Fri, 9 Sep 2016 14:24:31 +0000 (14:24 +0000)]
Bug 17284 - Patron details page ( moremember.pl ) show logged in library as patron's home library

The patron details page always show the logged in library as the
patron's home library instead of the true home library. This bug is
particular to moremember.pl and does not affect other patron pages.

Test Plan:
1) Find a patron with a home library other than the logged in library
2) Note the patron home library as shown on moremember.pl matches
   the logged in library and not the patron's true home library
3) Apply this patch
4) Reload moremember.pl, the correct home library should display!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17206: Fix switch to default framework
Jonathan Druart [Wed, 7 Sep 2016 09:26:12 +0000 (10:26 +0100)]
Bug 17206: Fix switch to default framework

When editing a bibliographic record, if you switch the framework to
default, the page is reloaded but the framework is not changed.
From the pl script, you can see that the frameworkcode is set to the one
of the biblio if set to false. The empty string, which means default,
should be taken into account.

Test plan:
- Create a record using the Fast add framework
- Save the record
- Open the record for editing
- Use the "Settings" pull down to change the framework to default
- Try another framework
- Try changing to default from there

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17194 - When edit record, Button "Z39.50/SRU search" not work
Owen Leonard [Thu, 8 Sep 2016 14:11:56 +0000 (10:11 -0400)]
Bug 17194 - When edit record, Button "Z39.50/SRU search" not work

Bug 15859 introduced a problem in the basic cataloging editor by
removing a form field which the Z39.50 search button tries to use when
triggering the search window pop-up. This patch corrects the error by
changing where the script looks for the required framework code.

To test, apply the patch and got to cataloging.

- Edit a record which uses the default framework.
  - Confirm that the Z39.50/SRU search button works correctly to trigger
    the pop-up window.
- Repeat the test with a record which uses a different framework.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Working again, great!

Signed-off-by: Andreas Roussos <arouss1980@gmail.com>
Patch works fine.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 6852 [QA Followup] - Tidy AddItem
Kyle M Hall [Mon, 12 Sep 2016 08:58:02 +0000 (08:58 +0000)]
Bug 6852 [QA Followup] - Tidy AddItem

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 6852: Staged import reports wrong success for items
Marcel de Rooy [Thu, 8 Sep 2016 10:06:05 +0000 (12:06 +0200)]
Bug 6852: Staged import reports wrong success for items

If we import items that have a wrong branch code, the items will not
be imported but manage-marc-import reports them as imported. (A wrong
branch code probably occurs most, but other causes are possible too.)

The underlying cause is that AddItem does not look at the error
returned from _koha_new_item in Items.pm.

This patch deals with that omission in the most economical way. It adjusts
AddItem so that it returns undef if no item was added.
In ImportBatch.pm I check if an item was added and adjust the totals
accordingly instead of just always counting them.

Note: Several scripts like additem.pl use AddItemFromMarc to call
AddItem. They do not report an error, but fail silently. With this patch,
these scripts get undef and will still fail silently. (No change.)
Adding error checks around calls of AddItemFromMarc is outside the scope of
this report. Here we are taking care of correct imported item numbers.

Test plan:
[1] Verify that additem.pl still works by adding a new item.
[2] Run t/db_dependent/Items.t
[3] Add a new branchcode, say XXX.
[4] Pick a biblio record with a few items (n) and set one item to branch XXX.
[5] Export this biblio with items to a MARC file.
[6] Change the XXX item to the original branch and remove branch XXX.
[7] Import the MARC file. Verify that one item was not imported and that
    the number of imported items reflects that (equals n-1).

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 8030 - (QA Folllowup) Use Koha::Libraries
Nick Clemens [Fri, 9 Sep 2016 16:35:49 +0000 (16:35 +0000)]
Bug 8030 - (QA Folllowup) Use Koha::Libraries

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 8030 - (QA followup) Remove svc file no longer user Use animated gif for waiting...
Nick Clemens [Mon, 22 Aug 2016 15:43:57 +0000 (15:43 +0000)]
Bug 8030 - (QA followup) Remove svc file no longer user Use animated gif for waiting as elsewhere Remove confirmation

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 8030 (QA Followup) - Use REST api and provide feedback
Nick Clemens [Fri, 19 Aug 2016 20:51:07 +0000 (20:51 +0000)]
Bug 8030 (QA Followup) - Use REST api and provide feedback

Use REST API
If cancelled return to previous selection
If fail return to previous selection
Use fa spinning icon while waiting
Disable select while waiting

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 8030 - Change pickup location of a hold from patron record
Nick Clemens [Fri, 1 Jul 2016 19:27:19 +0000 (15:27 -0400)]
Bug 8030 - Change pickup location of a hold from patron record

To test:
1 - Place some holds for a patron
2 - Load the patron into checkout module
3 - View thier holds tab, should have a dropdwon for location
4 - Alter the location
5 - You should recieve a confirmation box
6 - Confirm that pressing cancel does not update holds
7 - Confirm that pressing Yes does update the hold
8 - Confirm that waiting holds are not updateable

Signed-off-by: Jason M. Burds <JBurds@dubuque.lib.ia.us>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16911 [QA Followup] - No need to 'use C4::Members'
Kyle M Hall [Fri, 9 Sep 2016 14:52:52 +0000 (14:52 +0000)]
Bug 16911 [QA Followup] - No need to 'use C4::Members'

For some reason, this is causing t/db_dependent/Circulation.t to fail if
run independently.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15758: (QA followup) Remove leftover reference to C4::Branch
Tomas Cohen Arazi [Fri, 9 Sep 2016 15:32:16 +0000 (12:32 -0300)]
Bug 15758: (QA followup) Remove leftover reference to C4::Branch

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15164 - Allow editing of the invoice number after initial saving
Kyle M Hall [Wed, 17 Aug 2016 13:43:01 +0000 (13:43 +0000)]
Bug 15164 - Allow editing of the invoice number after initial saving

When you notice a typo in your invoice number after finishing with the
receiving process, the only way to correct it right now is in the
database - or by undoing all the steps and starting over.

It would be nice if the invoice number could be edited.

Test Plan:
1) Apply this patch
2) Browse to acqui/invoice.pl for an invoice
3) Note the new "Invoice number" field contains the existing invoice
4) Alter the invoice number
5) Save the invoice
6) Note the invoice number has been updated
7) Edit the invoice again
8) Attempt to save the invoice with an empty invoice number field
9) Note that you cannot save the invoice without having an invoice number

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 13949 - Item search should have holding library
Owen Leonard [Mon, 15 Aug 2016 18:54:16 +0000 (14:54 -0400)]
Bug 13949 - Item search should have holding library

This patch adds holding library ("current location") to the list of
fields available in the item search form.

To test, apply the patch and go to Search -> Item search.

- Perform a search using the "current location" option and verify that
  it returns the correct results.
- Try other searches to confirm that they work as before.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17211: Remove use of onclick from OPAC fines page
Aleisha Amohia [Mon, 29 Aug 2016 06:33:08 +0000 (06:33 +0000)]
Bug 17211: Remove use of onclick from OPAC fines page

To test:
1) Set the EnablePayPalOpacPayments syspref to Allow and the
PayPalSandboxMode to the appropriate mode
2) Go to OPAC fines
3) Confirm clicking the PayPal image link works the same before and
after the patch (opens pop up window)

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17193: Remove C4::Search::SearchAcquisitions
Jonathan Druart [Thu, 25 Aug 2016 09:41:52 +0000 (10:41 +0100)]
Bug 17193: Remove C4::Search::SearchAcquisitions

This subroutine is not used and can be removed

Test plan:
  git grep SearchAcquisitions
should not return any results.

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17191: Confirm message on deleting tag in OPAC
Aleisha Amohia [Wed, 24 Aug 2016 20:51:32 +0000 (20:51 +0000)]
Bug 17191: Confirm message on deleting tag in OPAC

Edit: removing use of onclick

To test:
1) Log into OPAC, go to your tags
2) Click Delete
3) Confirm message should pop up
4) Ensure clicking Cancel works as expected, ensure clicking OK works as
expected

Sponsored-by: Catalyst IT
Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17187 - DBRev 16.06.00.023
Kyle M Hall [Fri, 9 Sep 2016 14:06:17 +0000 (14:06 +0000)]
Bug 17187 - DBRev 16.06.00.023

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17187: Lower the timeout preference from 139 days to 1 day
Marcel de Rooy [Wed, 24 Aug 2016 13:45:54 +0000 (15:45 +0200)]
Bug 17187: Lower the timeout preference from 139 days to 1 day

Default timeout is now 12000000 seconds == almost 139 days !
Surely, your session will be shorter. But we should lower this
value.
Balancing usability and security, I propose 1d (1 day) now.
Current pref value will be affected only if it is NULL or equal
to the old default.

Test plan:
Check your current value. Optionally change to NULL or 12000000.
Run the dbrev and see what happens.
Beware of cached values while testing or flush the cache.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17183: Check if any checkboxes have been checked for 'Delete Selected' button...
Aleisha Amohia [Wed, 24 Aug 2016 03:43:22 +0000 (03:43 +0000)]
Bug 17183: Check if any checkboxes have been checked for 'Delete Selected' button in Koha News

To test:
1) Go to Tools -> Koha News
2) Click 'Delete selected' button without selecting anything
3) Notice you are asked to confirm if you would like to delete ... but
you didn't choose anything to delete
4) Apply patch and refresh page
5) Click 'Delete selected' button without selecting anything
6) Should see alert.
7) Select one or more news items to delete and click 'Delete selected'
button
8) Should be asked to confirm
9) Confirm that the delete works as expected

Sponsored-by: Catalyst IT
Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17174: Making z39.50 Authority search actions buttons
Aleisha Amohia [Tue, 23 Aug 2016 23:51:43 +0000 (23:51 +0000)]
Bug 17174: Making z39.50 Authority search actions buttons

Have changed the wording of the MARC button to Show MARC to be
consistent with other places in Koha.

To test:

1) Go to Authorities -> New from Z39.50
2) Put in any search terms and click Search
3) Confirm that both options (MARC and Import) now show as buttons "Show
MARC" and "Import" under one "Actions" column with approriate icons
4) Confirm buttons work as expected
5) Confirm buttons do not wrap on narrower browser

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17165: Improve heading on vendor search when searching for all vendors in Serials
Aleisha Amohia [Tue, 23 Aug 2016 03:28:20 +0000 (03:28 +0000)]
Bug 17165: Improve heading on vendor search when searching for all vendors in Serials

To test:
1) Go to Serials
2) Click New subscription or edit an existing one
3) Click Search for a vendor
4) Make a search that will return no results (i.e. has a typo etc.)
5) Confirm there is an appropriate message
6) Go back and make a search that will return results (i.e. putting in one letter
    'a' etc.)
7) Confirm that heading is worded better and search term is displayed
8) Go back and make search without entering any search terms
9) Confirm that heading is worded better, no search term is displayed

Sponsored-by: Catalyst IT
Patch behaves as dexcribed.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17163: Making MARC subfields structure actions buttons
Aleisha Amohia [Tue, 23 Aug 2016 01:28:32 +0000 (01:28 +0000)]
Bug 17163: Making MARC subfields structure actions buttons

To test:
1) Go to Admin -> MARC bibliographic framework
2) Go to Actions -> MARC structure for any framework
3) Click Subfields
4) Confirm Edit and Delete links show as buttons with appropriate icons
in one column called 'Actions'
5) Confirm buttons do not wrap on narrower browser
6) Confirm buttons behave as expected

Sponsored-by: Catalyst IT
Patch behaves as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17162: Moving MARC tags structure actions into a drop down menu
Aleisha Amohia [Tue, 23 Aug 2016 01:22:05 +0000 (01:22 +0000)]
Bug 17162: Moving MARC tags structure actions into a drop down menu

To test:
1) Go to Admin -> MARC bibliographic framework
2) Go to Actions -> MARC structure for any framework
3) Confirm that three links, Subfields, Edit and Delete, now show in
drop-down menu with appropriate font awesome icons
4) Confirm that Subfields takes you to the right page and Edit and
Delete work as expected

Sponsored-by: Catalyst IT
Patch behaves as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>