koha.git
7 years agoBug 17312 - Typo in members-toolbar.inc / moremember-brief.tt / moremember.tt
Andreas Roussos [Fri, 16 Sep 2016 15:49:19 +0000 (18:49 +0300)]
Bug 17312 - Typo in members-toolbar.inc / moremember-brief.tt / moremember.tt

The following three templates are using [% guarantorborrowernumber %]
while they should be using [% guarantor.borrowernumber %]:

members/members-toolbar.inc
members/moremember-brief.tt
members/moremember.tt

This doesn't result in any breakage; just a couple of 'Edit' links that
do not pass the guarantorid in the URL, and one case where guarantor
information is not shown in the staff client.

This patch fixes that.

Test plan:
0) [PREREQUISITE] Create a patron with a guarantor if you don't have one.
1) Go to Home > Patrons and search for a patron that has a guarantor. In
   the Details page for that patron, the 'Edit' link in the toolbar does
   not pass the guarantor's id in the URL (...&guarantorid=&...).
2) In the same page, the 'Edit' link under the patrons name (immediately
   under 'Guarantor') again does not include the guarantor id in the URL.
3) Go to Home > Patrons and click on 'New patron'. Pick any category from
   the drop down menu. Enter the Surname, First name, and Date of birth
   of the patron you used in step 1). This triggers the 'Duplicate patron
   record?' warning -- click on 'View existing record' and notice how the
   guarantor information is missing.
4) Apply the patch.
5) Repeat steps 1), 2), and 3) above. The URLs are fixed and patron info
   is showing.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0f4644a5bf7a43b117fbf6642b6db0479fdc58ed)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17289: Holds awaiting pickup shows date unformatted
Andreas Roussos [Sat, 10 Sep 2016 08:54:06 +0000 (11:54 +0300)]
Bug 17289: Holds awaiting pickup shows date unformatted

In the Staff client, under Circulation -> Circulation reports,
the date shown in the heading of the 'Holds awaiting pickup'
report is not formatted according to the 'dateformat' system
preference.

This (trivial) patch fixes that.

Test plan:
1) In the Staff client, go to Circulation and under 'Circulation
   reports' click on 'Holds awaiting pickup'
   (cgi-bin/koha/circ/waitingreserves.pl).
2) Observe that the date shown in the heading is always formatted as
   yyyy-mm-dd regardless of the value of the 'dateformat' syspref.
3) Apply the patch.
4) Re-visit the 'Holds awaiting pickup' report. Confirm that the patch
   worked, i.e. the date shown in the heading is formatted according
   to the 'dateformat' system preference.

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

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f9e3639da7ef02a6ca08014179d216e1d938a401)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17245: Untranslatable abbreviated names of seasons.
Rafal Kopaczka [Sat, 3 Sep 2016 16:06:47 +0000 (18:06 +0200)]
Bug 17245: Untranslatable abbreviated names of seasons.

Because seasons strings are not available through DateTime module,
names of them where added in code, and templates. Bug 16289 adds new
abbreviated form to the code, but not to the templates. This patch
should fix the problem.

To test:
1. Apply patch.
2. Run "misc/translator/translate update" for you language.
3. Check if names are in po/ file for language.
4. Check if generating next issue for serial and prediction patterns
works correct.

NOTE: or "create {language code}" instead of update.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 4da3bf5e48fa3462d2f3eca0f3c45f64dc9bb5b2)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17322 - Translation breaks opac-ics.tt
Marc Véron [Tue, 20 Sep 2016 14:11:22 +0000 (16:11 +0200)]
Bug 17322 - Translation breaks opac-ics.tt

This patch adds newlines to opac-ics.tt that are preserved by the translating process.

To test:
- Apply patch
- Create a translation (perl translate xy-XY)
- With a text editor or poedit, translate misc/translator/po/xy-XY-opac-bootstrap.po
  (it is enough to translate "%s %s %s %s is overdue %sYour copy of........")
- Install language xx-XY and select it for OPAC (perl translate install xy-XY)
- Make sure you have at least a couple of loans, including one overdue
- Go to /cgi-bin/koha/opac-user.pl and click on the link labeled "Download as
  iCal/.ics file"
- Inspect the file in a text editor and/or view the result in a calendar
  appplication. Make sure the data makes sense. Compare it to the english version.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 756c0f93187174f22d95825f51c4dfa21b11803a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 10768 - Improve the interface related to itemBarcodeFallbackSearch
Andreas Roussos [Thu, 15 Sep 2016 08:37:19 +0000 (11:37 +0300)]
Bug 10768 - Improve the interface related to itemBarcodeFallbackSearch

When the itemBarcodeFallbackSearch syspref is on, the wording in the
interface should reflect that you can enter a barcode OR a keyword.
Additionally, in the results of a keyword search the "Fast cataloging"
link should be more descriptive. This patch fixes these issues.

Test plan:

0) [PREREQUISITES] Ensure you have a Fast Add ('FA') framework defined,
   and that your itemBarcodeFallbackSearch syspref is set to 'Enable'.
1) Go to Circulation -> Check out, search for a patron, then select a
   patron to Check out. Notice how the text above the textbox reads
   "Enter item barcode:".
2) Type something generic (not a barcode) in the textbox so that you'll
   get at least one item as a result. Notice how the text in the yellow
   warning box reads "The barcode was not found: <terms> Fast cataloging".
3) Apply the patch.
4) Repeat step 1), now the text above the textbox should read
   "Enter item barcode or keyword:".
5) Repeat step 2), now the text in the yellow warning box should read
   "The barcode was not found: <terms> Add record using fast cataloging".

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>
(cherry picked from commit 6fc03f1968f9e405d745b854577c953106fdbdfe)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 16816: Do not copy parameters used when duplicating a report
Jonathan Druart [Tue, 13 Sep 2016 13:41:51 +0000 (14:41 +0100)]
Bug 16816: Do not copy parameters used when duplicating a report

If a report is duplicated from the report list, the new report will
contain the tag (<<YEAR>> for instance), but from the reports results
page it copies the values used for the results.

Test plan:
Create a new sql report with tags
Duplicate it from the report list: no expected changes
Run it and duplicate it: the tags must not have been replaced

Signed-off-by: Andreas Roussos <arouss1980@gmail.com>
Ran and duplicated a report, the tags remained intact.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 50a37fbf5bc22bed843447be6a6603e7705fd28d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17300: Fix serials search
Jonathan Druart [Wed, 14 Sep 2016 13:41:20 +0000 (14:41 +0100)]
Bug 17300: Fix serials search

Since bug 16157, the location value is always "All" and the serial
search won't return anything.

Test plan:
Search for some serials.
Without this patch, it won't return any results
With this patch applied, the result search should be consistent

Reproduced with serial's "Advanced search" and search filter in
left hand column. Fixed by this patch.
Signed-off-by: Marc <veron@veron.ch>
Advanced search works fine again.
Signed-off-by: Andreas Roussos <arouss1980@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 613c83f4e3e92d9f5a51fd2d5eccefd0dd6d00de)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17296: Display warning if AnonymousPatron is not correctly set
Jonathan Druart [Wed, 14 Sep 2016 12:39:34 +0000 (13:39 +0100)]
Bug 17296: Display warning if AnonymousPatron is not correctly set

Bug 14655 added a warning to the about page ("System information" tab)
if the AnonymousPatron feature is not correctly configured.
But actually there is one case when it's not displayed.

Test plan:
Set AnonymousPatron to a non existing patron
Set at least 1 borrowers.privacy == 2
go on the about page.
Without this patch you do not get the warning
With this patch you will see "Some patrons have requested a privacy on
returning item but the AnonymousPatron pref is not set correctly. Set it
to a valid borrower number if you want that this feature works
correctly."

Signed-off-by: Marc <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1a2d804a8094ea05199803593698b4294f029913)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17294: Make reserves_stats.pl plack safe
Jonathan Druart [Tue, 13 Sep 2016 08:44:41 +0000 (09:44 +0100)]
Bug 17294: Make reserves_stats.pl plack safe

Lot of errors are raised by this script under plack because of var scope
issues:

Variable "$ccodes" is not available at
/home/koha/src/reports/reserves_stats.pl line 337.
Variable "$locations" is not available at
/home/koha/src/reports/reserves_stats.pl line 338.
Variable "$itemtypes" is not available at
/home/koha/src/reports/reserves_stats.pl line 339.
Variable "$Bsort1" is not available at
/home/koha/src/reports/reserves_stats.pl line 344.
Variable "$Bsort2" is not available at
/home/koha/src/reports/reserves_stats.pl line 350.
Variable "@patron_categories" is not available at
/home/koha/src/reports/reserves_stats.pl line 356.

The lazy way to fix that is that reinit them from the subroutines they
are used.

Test plan:
Execute the report, after this patch applied you won't see the error in
the log.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f66cc4dfcca243e6210c3323586efbfbd6cfe0cd)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17144: Fix variable scope issues in edi_account.pl
Marc Véron [Thu, 18 Aug 2016 12:14:47 +0000 (14:14 +0200)]
Bug 17144: Fix variable scope issues in edi_account.pl

To reproduce:
- In Staff client, go to Administration > EDI accounts
- Click "+ New account"
Result: Internal Server Error
Plack error log says:
Can't call method "param" on an undefined value at /home/marc/koha/admin/edi_accounts.pl line 157

To test:
-Apply patch
- Add an EDI account
- Edit an EDI account
- Delete an EDI account

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a055abe7c06e2efc9f0cdae89c2cbef28b7f3cb3)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17085 - Specify libmojolicious-perl min version
Mirko Tietgen [Tue, 9 Aug 2016 10:58:47 +0000 (12:58 +0200)]
Bug 17085 - Specify libmojolicious-perl min version

Set min version for libmojolicious-perl to 6.0 and regenerate debian/control

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 53f8916fe70f9401923872b7fcd05f63a1e5fdf1)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17316: Do not display the list's name if the user does not have permission -...
Jonathan Druart [Tue, 20 Sep 2016 09:03:42 +0000 (10:03 +0100)]
Bug 17316: Do not display the list's name if the user does not have permission - Staff

Same as previous patch but for the staff interface

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d26cda6f9e7e52bb899717ffe5f84c31b46feefc)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17316: Do not display the list's name if the user does not have permission -...
Jonathan Druart [Tue, 20 Sep 2016 08:55:25 +0000 (09:55 +0100)]
Bug 17316: Do not display the list's name if the user does not have permission - OPAC

At the OPAC, if a user manipulate the URL to show a list (s)he is not
allowed to view, the list's name will be displayed anyway.

Test plan:
- Create a private list with user A
- Copy the op=view URL and access it with user B logged in
=> Without this patch, you will see the rss icon, the list's name and
the "add list" button
=> Without this patch, only the "unauthorized" box will be displayed

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 31ca4849efd5539c6b287047ce2da560be7e1c53)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17315: (Bug 17210 follow-up) Fix "Save to lists" links from the result page
Jonathan Druart [Tue, 20 Sep 2016 10:06:23 +0000 (11:06 +0100)]
Bug 17315: (Bug 17210 follow-up) Fix "Save to lists" links from the result page

On bug 17210, the selector .addtoshelf should not have caught the
.addtoshelf nodes from the result list.
To fix this, we just need to make the selector more specific (and cannot
reuse it without more changes, the biblionumber variable is not the same
- vs SEARCH_RESULT.biblionumber).

Test plan:
Make sure the 2 links (from detail and search result) "Save to lists"
and "Save to your lists" work as expected.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e422de7b62322b2637ac5623d102563dd3e82b36)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 16800: Fix XSS in additem.pl
Jonathan Druart [Wed, 14 Sep 2016 08:20:01 +0000 (09:20 +0100)]
Bug 16800: Fix XSS in additem.pl

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 9734726846f6fa652d88c8bc39c7b43595422465)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 16800: Fix XSS in catalogue/*detail.tt - isbn
Jonathan Druart [Tue, 2 Aug 2016 15:05:09 +0000 (16:05 +0100)]
Bug 16800: Fix XSS in catalogue/*detail.tt - isbn

Test plan:
catalogue a bibliographic record with a isbn=
  </title><script>alert('XSS')</script>

Go on the detail pages.
=> Without this patch you will see the alert
=> With this patch, no more alert

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 16800: Fix XSS in catalogue/*detail.tt - author
Jonathan Druart [Tue, 2 Aug 2016 15:03:37 +0000 (16:03 +0100)]
Bug 16800: Fix XSS in catalogue/*detail.tt - author

Test plan:
catalogue a bibliographic record with a author=
  </title><script>alert('XSS')</script>

Go on the detail pages.
=> Without this patch you will see the alert
=> With this patch, no more alert

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 3169434cfa7295025e4ff5fea58f7e9730a96650)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 16800: Fix XSS in catalogue/*detail.tt - title
Jonathan Druart [Tue, 2 Aug 2016 15:02:07 +0000 (16:02 +0100)]
Bug 16800: Fix XSS in catalogue/*detail.tt - title

Test plan:
catalogue a bibliographic record with a title=
  </title><script>alert('XSS')</script>

Go on the detail pages.
=> Without this patch you will see the alert
=> With this patch, no more alert

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
This of course means that any html in the title will no longer be
evaluated. :

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 515208d5ec308ade967efe04388bbedbf5f2b057)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 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>
(cherry picked from commit 9e22a9ced3db2ba0f27d45a551b455095cb910e5)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 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>
(cherry picked from commit 71454b4263f6e883f7e6246de06291531a7d5757)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoVersion 16.05.04 v16.05.04
Frédéric Demians [Thu, 22 Sep 2016 07:23:14 +0000 (09:23 +0200)]
Version 16.05.04

7 years agoUpdate translation files
Frédéric Demians [Thu, 22 Sep 2016 12:44:27 +0000 (14:44 +0200)]
Update translation files

7 years agoBug 17262: Inject MEMCACHED_* variables into Plack's env
Tomas Cohen Arazi [Tue, 6 Sep 2016 19:45:36 +0000 (16:45 -0300)]
Bug 17262: Inject MEMCACHED_* variables into Plack's env

This patch adds two functions to koha-functions.sh to read the MEMCACHED_*
variables from configured instances' apache files (the only source for that
info for now).

It then tweaks koha-plack's start_plack() function so it exports the variables
to env before launching starman.

The patch seems trivial, but it highlights a bigger problem with our Plack integration
as the starman server seems to hang if those environment variables are defined!

Sponsored-by: ByWater Solutions
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17135 - DBRev 16.05.03.002
Frédéric Demians [Fri, 16 Sep 2016 10:50:33 +0000 (10:50 +0000)]
Bug 17135 - DBRev 16.05.03.002

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 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>
(cherry picked from commit bc647bc21b3496fb6f7b509d57f516116178222d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 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>
(cherry picked from commit 8a7a7a034490ced2c2e7de062813645169c5cb71)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 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>
(cherry picked from commit 3ada0d104de609ae39f58a86d6406b9a1200d758)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 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>
(cherry picked from commit 4ddc8635347f978a354e6e332aede0abeeea310b)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 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>
(cherry picked from commit 812379bbc237e5c5fe6e954f666a7b1f0961a21c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 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>
(cherry picked from commit a5806c21d0ab58cf2879cb26b1fe52ba4e4c2139)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 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>
(cherry picked from commit e8fcc651a3aa9af9d1a49a6cec64fc9bde737a86)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 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>
(cherry picked from commit a9eb4005811882da0eb5e20b52861a3c85556dff)

7 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>
(cherry picked from commit 2e79c211db318969b7c9d5ff538dfd54ba1aaed2)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 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>
(cherry picked from commit b80a18ee2f059309a78087e48b9464d2352d444f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 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>
(cherry picked from commit da03dbd458c59da0b9213efacd3425e89b453332)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 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>
(cherry picked from commit a9caebc288463689d6c2a732ee8b900a3ab34a21)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 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>
(cherry picked from commit 9261fb4f5bd6fd4b25ce97de7be9262b3719544a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 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>
(cherry picked from commit be4cd79aea6908e0c3bb13b032edaf7a15d2e66e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 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>
(cherry picked from commit 6dc2f1ae7c8e60534b4d6dec979c96034aa17f5d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 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>
(cherry picked from commit 28191a538b8f3bed698f1e67acca156c5b64ebea)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 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>
(cherry picked from commit 4742f1035b9748dd869653f1c608fff1408353f9)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 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>
(cherry picked from commit 8cfa6f633a1be9a12a3a98524b05fae47fb4aa02)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 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>
(cherry picked from commit e38cad45e8ef2df88dc4a2c8345ac1d92f8dd8e8)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 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>
(cherry picked from commit b5ae31e7fdcdd932d1475e30fa73fba15c2b2815)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 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>
(cherry picked from commit 259679e9dece15b69b216b8e39f8e4ebd0b58800)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 16311 - DBRev 16.05.03.001
Frédéric Demians [Mon, 12 Sep 2016 09:08:27 +0000 (09:08 +0000)]
Bug 16311 - DBRev 16.05.03.001

7 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>
(cherry picked from commit fc9279774f69e8eb10e9d26202b43252fc777f28)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 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>
(cherry picked from commit bd0d1dd6b1eeb51540a6121c8ed84330e5f48eff)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 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>
(cherry picked from commit 6a78f6d0de242b0d6daa166a3b858ecbbb11371e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 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>
(cherry picked from commit 989904c7ab0a24ddbe29264671fc8b5ebb175af2)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 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>
(cherry picked from commit 48aba1533c7c55ed0f4b9e528ceccc9e0dd3d795)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17161: Add missing td tag
Jonathan Druart [Tue, 23 Aug 2016 12:49:06 +0000 (13:49 +0100)]
Bug 17161: Add missing td tag

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0f516c7efbad8b29f70dd950f4fe6b5f01e7abee)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17161: Making 'Preview MARC' links show as buttons in batch record modification
Aleisha Amohia [Tue, 23 Aug 2016 00:02:56 +0000 (00:02 +0000)]
Bug 17161: Making 'Preview MARC' links show as buttons in batch record modification

This patch removes the column heading and makes all links show as font
awesome buttons. I have also changed the wording from Preview MARC to
Show MARC to shorten the button and be consistent with other places in
Koha

To test:
1) Go to Tools -> Batch record modification
2) Put in some record numbers and click Continue
3) Ensure column heading 'Preview' no longer shows, and buttons are
showing with an appropriate icon. Confirm button still works as
expected.
4) Confirm button does not wrap on narrower browser

Sponsored-by: Catalyst IT
Works as described
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>
(cherry picked from commit 9dcebe402ad8d8d39c78ae39650eda22197a92a4)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 16981: Add EDI Admin to Acq Menu
Nicole C Engard [Tue, 26 Jul 2016 16:02:32 +0000 (16:02 +0000)]
Bug 16981: Add EDI Admin to Acq Menu

This patch adds the links to EDI Accounts and Library EANs
to the menu on the left of the Acq module.

To test:
* Log in to Koha
* Visit Acquisitions
* Confirm that EDI links show on the menu on the right
  if you have permissions to access EDI.

Signed-off-by: Marc <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 8b89364b38cc95b2f3cca852eb6199b8130e1379)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 16950: Serials subscriptions advanced search shows '0 found' pre-search
Aleisha [Wed, 20 Jul 2016 23:39:42 +0000 (23:39 +0000)]
Bug 16950: Serials subscriptions advanced search shows '0 found' pre-search

To test:
1) Go to Serials
2) Click Advanced Search in the toolbar at the top
3) Notice heading says Serials subscriptions (0 found) before a search has even happened
4) Apply patch and click Advanced Search again
5) Heading should now say Serials subscriptions search
6) Submit search
7) Heading should say how many subscriptions your search found (like before)

Sponsored-by: Catalyst IT
Signed-off-by: Marc <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 031219935c41643734de7836ed86b59ed6be5fd1)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 16937 [Revised] Remove "onclick" from the manage staged MARC records template
Owen Leonard [Mon, 18 Jul 2016 16:20:33 +0000 (12:20 -0400)]
Bug 16937 [Revised] Remove "onclick" from the manage staged MARC records template

This patch revises the manage staged MARC records template, removing
"onclick" attributes from the markup and defining those events in the
script.

To test, apply the patch and go to Tools -> Manage staged MARC records.

- If necessary, stage a MARC file for import.
- Click the name of the staged file and then the "Import this batch into
  the catalog" button. The batch should be correctly imported.
- Return to the list of staged MARC files.
- Click the name of an imported file and then the "Undo import into
  catalog" button. The import should be reverted.
- Return to the list of staged MARC files.
- Click the "Clean" button for any record. Confirm that the batch is
  cleaned.
- For any cleaned record, click the "Delete" button. The batch should be
  deleted.

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

QA revision: Corrected class name so that "delete" button triggers the
correct warning.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit caf6102db8e0e7fbb75be2c8c90b7ff07001a9f8)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 16875: OPAC - removing link to records if authority is not used by any records
Aleisha [Thu, 7 Jul 2016 23:26:12 +0000 (23:26 +0000)]
Bug 16875: OPAC - removing link to records if authority is not used by any records

To test:
1) Do an authority search. Notice that authorities not used by any records have a clickable link (under Biblio records) which redirects to a catalog search with no results
2) Go back to the authority search and click View full heading for an authority with no records. Notice that under the auth name, it says Number of records used in: 0, with a link to a catalog search
3) Apply patch
4) Repeat steps 1 and 2. Authorities not used in any records should no longer have clickable links nd authorities which have records should work as expected.

Sponsored-by: Catalyst IT
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>
(cherry picked from commit d8aae99a1cf69a019139debbbb18906956b0702a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 16842: Help for EDI accounts
Aleisha [Mon, 4 Jul 2016 01:34:19 +0000 (01:34 +0000)]
Bug 16842: Help for EDI accounts

To test:

1) Go to Admin -> EDI accounts
2) Click Help in top-right corner
3) Confirm that Help window opens with appropriate help text
4) Confirm links work as expected

Sponsored-by: Catalyst IT
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Fixed link to the manual: cat -> acq

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 33f670f5b314c2e73567ce0cbc7bcd2302127634)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 16841: Help for library EANs
Aleisha [Mon, 4 Jul 2016 01:24:58 +0000 (01:24 +0000)]
Bug 16841: Help for library EANs

To test:

1) Go to Admin -> Library EANs
2) Click Help in top-right corner
3) Confirm that Help window opens with appropriate help text
4) Confirm link to manual works as expected

Sponsored-by: Catalyst IT
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed link to the manual.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0a92669c229a04dc50b17569ae5d0c132a983fe2)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17011 - Remove "onblur" event attribute from some templates
Owen Leonard [Mon, 1 Aug 2016 14:20:00 +0000 (10:20 -0400)]
Bug 17011 - Remove "onblur" event attribute from some templates

Several templates have an "onblur" event attribute in the markup. This
patch moves the onblur event definition into the JavaScript.

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

In Administration -> Authority types:

  - Choose "New authority type."
  - Enter any text into the "Authority type" field.
  - Moving the cursor focus away from this field should convert your
    text to uppercase.

In Administration -> MARC bibliographic framework:

  - Choose "New framework."
  - Enter any text into the "Framework code" field.
  - Moving the cursor focus away from this field should convert your
    text to uppercase.

In Administration -> Currencies and exchange rates:

 - Choose "New currency."
  - Enter any text into the "Currency" field.
  - Moving the cursor focus away from this field should convert your
    text to uppercase.

In Administration -> Item types

 - Choose "New item type."
  - Enter any text into the "Item type" field.
  - Moving the cursor focus away from this field should convert your
    text to uppercase.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7293d812904ec0bae78d5ced5afd6c879063912f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 16738 - Improve EDIFACT messages template
Owen Leonard [Tue, 26 Apr 2016 18:09:58 +0000 (14:09 -0400)]
Bug 16738 - Improve EDIFACT messages template

This patch makes several improvements to the EDIFACT messages template
to make it more consistent with similar interfaces in Koha. Changes to
edimsg.tt are made to simplify the display of the data in a modal.

This patch also corrects a couple of markup errors.

To test you must have multiple rows of data in the edifact_messages
table. I tested with dummy data I inserted manually. Should should have
some rows which use 'QUOTE' and 'ORDERS' as the message_type.

To test deletions you may need to apply the patch for Bug 16737.

- Apply the patch and go to Acquisitions -> EDIFACT messages.
- In the table of messages, the date should be displayed according to
  your system preference.
- Sorting by date should work correctly regardless of date format
  setting.
- The 'Actions' column should contain 'View message' and 'Delete'
  Bootstrap-style buttons with Font Awesome icons. The column should be
  unsorted.
- Clicking the 'Delete' button should prompt you to confirm.
- Clicking the 'View message' button should trigger a modal which loads
  the message data.
- Test the page with no messages or when all messages have been
  deleted. The page should display a standard message dialog instead of
  an empty table.

Signed-off-by: Nicole C Engard <nengard@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 4e52b81247b852f9cda9838825148bb2696dc064)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 16576 [Revised] Remove the use of "onclick" from label templates
Owen Leonard [Tue, 24 May 2016 13:18:37 +0000 (09:18 -0400)]
Bug 16576 [Revised] Remove the use of "onclick" from label templates

This patch updates several label creator templates to remove the use of
"onclick" in favor of defining click events in JavaScript.

Also changed:
 - Replaced the non-existant element <icon> with <i>
 - Removed the use of <center> and 'align="center"';
 - In the item search results template:
   - The use of the checkboxes jQuery plugin has been replaced with
     straight jQuery for simplicity's sake.
   - Output of table headers has been modified so that translatable
     strings are in the template instead of having English strings
     passed from the script.
   - Moved the 'Add checked' and 'Done' buttons into a floating toolbar.

To test, apply the patch and go to Tools -> Label creator.

- Choose New -> Label batch
  - Click 'Add items'
    - Perform a search for items.
    - Confirm that 'select all' and 'clear all' links work.
    - Confirm that clicking an individual 'Add' button works.
    - Select multiple items and click the 'Add checked' button. Confirm
      that the selected items were added to your batch.
  - Click 'Add items' again to save the selected items to your batch.
  - Test that the 'Delete' and 'Export' buttons next to any item work
    correctly.
- Choose Manage -> Label batches
  - Test that the 'Delete' button works correctly.
  - Select one or more batches and test that the 'Export selected'
    button works correctly.

Revision: Removed changes to pagination in the item search results
template since it didn't work.

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b118074fe480ac2028d474d322713303648eb7d0)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 16507: Show play media tab first if record has no holdings
Aleisha [Thu, 30 Jun 2016 00:03:23 +0000 (00:03 +0000)]
Bug 16507: Show play media tab first if record has no holdings

To test:
1) Go to Admin -> Global sysprefs
2) Turn on HTML5MediaEnabled and HTML5MediaYouTube
3) Go to Cataloging and create a new record
4) Catalogue a YouTube link in 856$u and save record. Do not add any items (click Normal tab)
5) Confirm that Play media tab is the selected tab by default
6) View record on OPAC and confirm Play media tab is selected by default
7) Go back to staff client, add an item then go back to Normal tab
8) Confirm that Holdings tab is now selected by default
9) Confirm Holdings tab is selected by default on OPAC

Sponsored-by: Catalyst IT
Signed-off-by: Claire Gravely <c.gravely@arts.ac.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7da5fb81758777d4e8000c9688fab2814e82506d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17222: Use jQuery selector instead
Jonathan Druart [Wed, 7 Sep 2016 10:38:43 +0000 (11:38 +0100)]
Bug 17222: Use jQuery selector instead

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d57d09549eae73b425ce977ed1748f962d42c9e6)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17222: Remove use of onclick from OPAC member entry page
Aleisha Amohia [Mon, 29 Aug 2016 23:22:11 +0000 (23:22 +0000)]
Bug 17222: Remove use of onclick from OPAC member entry page

There is only one instance on onclick here, and that is the clear date
function.

To test, make sure clicking 'Clear date' next to Date of Birth works the
same before and after the patch.

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>
(cherry picked from commit 167be41dcc42f8456a69700475eb927593f78fb2)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17220: Change hold confirmation string from 'Place hold' to 'Confirm hold'
Lee Jamison [Mon, 29 Aug 2016 20:24:49 +0000 (16:24 -0400)]
Bug 17220: Change hold confirmation string from 'Place hold' to 'Confirm hold'

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 80981941256bab8ea5f921b7411d254c918e6b3a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 16843: Help for EDIFACT messages
Aleisha [Mon, 4 Jul 2016 01:41:57 +0000 (01:41 +0000)]
Bug 16843: Help for EDIFACT messages

To test:

1) Go to Acqui -> EDIFACT messages
2) Click Help in top-right corner
3) Confirm that Help window opens with appropriate help text
4) Confirm link to manual works as expected

Sponsored-by: Catalyst IT
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1c80cef03260351ef8b2f129e10c01f88986875a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17210: Add missing return false for print-large
Jonathan Druart [Wed, 7 Sep 2016 10:19:15 +0000 (11:19 +0100)]
Bug 17210: Add missing return false for print-large

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f246af0adf900456d34fcd4abdcbeeae64c81027)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17210: Remove use of onclick from biblio detail sidebar in OPAC
Aleisha Amohia [Mon, 29 Aug 2016 06:07:53 +0000 (06:07 +0000)]
Bug 17210: Remove use of onclick from biblio detail sidebar in OPAC

Four instances of onclick here:
1) Print
2) Save to your lists
3) Add to your cart
4) Remove from cart

To test:
Find a biblio detail page in OPAC and confirm all four events above work
as expected before and after the patch.

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>
(cherry picked from commit ac44b732e871808dab5e581f6ac6c4371dcef8b0)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 16822: Make koha-common call koha-plack without --quiet
Tomas Cohen Arazi [Tue, 26 Jul 2016 13:23:43 +0000 (10:23 -0300)]
Bug 16822: Make koha-common call koha-plack without --quiet

This patch removes the --quiet option switch in koha-common.init so
problem information is not hidden for sysadmin users.

To test:

- Have plack enabled for a koha instance:
  $ sudo koha-plack --enable kohadev
  $ sudo koha-plack --start  kohadev
- Run:
  $ cd kohaclone
  $ debian/koha-common.init {start|stop|restart}
=> SUCCESS: No behaviour change
- Disable the 'cgi' apache module:
  $ sudo a2dismod cgi
- Run:
  $ debian/koha-common.init {start|stop|restart}
=> FAIL: No warning is shown
- Apply the patch
- Run:
  $ debian/koha-common.init {start|stop|restart}
=> SUCCESS: Warnings show up
- Sign off :-D

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Perfect thanks :)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit eaa11da5624f308768c4eb2c7016b5cd32c35fb1)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17267 - Document koha-create --adminuser
Magnus Enger [Thu, 8 Sep 2016 12:55:58 +0000 (14:55 +0200)]
Bug 17267 - Document koha-create --adminuser

A description of --adminuser was missing from debian/docs/koha-create.xml
This patch adds a description in the Options section, as well as under
DEFAULTSQL in the list of configuration variables.

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-create.xml
$ man -l koha-create.8

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

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Edited commit message to fix typo - koha-mysql -> koha-create as that's what we're testing. :)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f31d3175b3f00dde49fced00e169cd2ea3cabcf5)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17231 - (QA Followup)
Nick Clemens [Wed, 7 Sep 2016 13:03:43 +0000 (13:03 +0000)]
Bug 17231 - (QA Followup)

Nicer grep

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 20fcac24e8c798fb2fb79bf84ebe39c18161d9b0)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17231 - HTML5MediaYouTube should recognize youtu.be links from youtube as well...
Nick Clemens [Wed, 31 Aug 2016 17:37:56 +0000 (17:37 +0000)]
Bug 17231 - HTML5MediaYouTube should recognize youtu.be links from youtube as well at the full links

To test:
Enable HTML5MediaYouTube and ensure WWW::YouTube::Download is installed
Add an 856$u to a record like: https://www.youtube.com/watch?v=tu0qtEwb9gE
Verify you can see the embedded player
Use the youtube shortened like (from the share button) like:
https://youtu.be/tu0qtEwb9gE
Verify you can see the embedded player

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>
(cherry picked from commit b1dc5092d82fd0952ce4e9b586842f5ccb7a4377)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17152: Do not copy value when duplicating a subfield
Hector Castro [Wed, 31 Aug 2016 19:33:53 +0000 (13:33 -0600)]
Bug 17152: Do not copy value when duplicating a subfield

When cataloguing, if you want to duplicate a subfield that is not
empty, the new subfield is created with a copy of data in it.
This is not the case when you duplicate an whole field. The new one is
created with subfields but without data in it.

Test plan:
Add or edit a bibliographic record
Fill a subfield
Duplicate the subfield
=> Without this patch the value of the input will be copied
=> With this patch the new input will be emptied

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 451fd67dd15b967471983c7c8dc601e0d1f65228)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17072: 006 not filling in with existing values
Jacek Ablewicz [Thu, 1 Sep 2016 16:13:50 +0000 (18:13 +0200)]
Bug 17072: 006 not filling in with existing values

When you use the 006 builder to view the existing values in the 006
tag, Koha is not pulling these existing values into the builder
window. Instead, Koha appears to be using defaults.

To reproduce:

1. Open a record in the editor
2. Switch from BKS to another material type.
3. Change as many settings as possible.
4. Close plugin.
5. Reopen plugin - notice your selections are not shown.

Trivial patch, heavilly inspired by Bug 9093.

To test:

1. Apply patch
2. Ensure that issue described above is no longer reproductible

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>
(cherry picked from commit a1fd726157c5857ecde1b66e79284f48142be7e5)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 5456 - Create a link to opac-ics.pl
Magnus Enger [Sat, 23 Jul 2016 18:31:11 +0000 (20:31 +0200)]
Bug 5456 - Create a link to opac-ics.pl

opac-ics.pl was added to Koha back in 2007, but there has not been a link to it
from anywhere. This patch adds the link from the main view on
/cgi-bin/koha/opac-user.pl, and makes some changes to opac-ics.pl itself.

Changes to opac-ics.pl:
- Update the code to use date and time for when a loan is due
- Use dt_from_string to turn a MySQL time and date into a DateTime
- Add a timestamp and a UID (these were reported as necessary by a couple of
  iCal validators)
- Remove DTEND from events, since we now have time as well as date for when a
  loan is due
- For loans that are overdue, set the DTSTART to now(), to avoid creating
  calendar events in the past
- Use a template to generate text strings, to make them translatable

To test:
- Apply the patch
- Make sure you have at least a couple of loans, including one overdue
- Go to /cgi-bin/koha/opac-user.pl and click on the link labeled "Download as
  iCal/.ics file"
- Inspect the file in a text editor and/or view the result in a calendar
  appplication. Make sure the data makes sense.
- Sign off and go thee merrily on thine way.

Update 2016-07-25
- Force date_due to UTC to avoid problematic timezone info like this:
  DTSTART:TZID=Europe/Zurich:20160724T235900
- Remove quotes from summary and description

Followed test plan, koha.ics file successfully imported to Thunderbird calendar
Signed-off-by: Marc <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 11315ef090948b22d0cb424e4119011eff8f5036)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17149 - EDI accounts: Add missing '>' to breadcrumb
Marc Véron [Thu, 18 Aug 2016 18:42:44 +0000 (20:42 +0200)]
Bug 17149 - EDI accounts: Add missing '>' to breadcrumb

To verify:
Breadcrumb on "EDI accounts" pages reads
Home > Administration EDI accounts > Modify account
instead of:
Home > Administration > EDI accounts > Modify account

To test:
- Apply patch
- Add, edit and delete an EDI account
- Verify that breadcrumb displays properly

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>
(cherry picked from commit bf053f3bfb82b2e70fe09a132add5283cbbd110e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17175: Typo in patron card images error message
Aleisha Amohia [Wed, 24 Aug 2016 00:16:43 +0000 (00:16 +0000)]
Bug 17175: Typo in patron card images error message

To test:
1) Go to Tools -> Patron Card Creator -> New Image
2) Click Upload without attaching anything
3) Notice typo
4) Apply patch and refresh page (resend information if prompted)
5) Notice typo fixed

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>
(cherry picked from commit ea13ea00830a8061842fa13b6110e0a4e75aa444)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17185: Staff client shows "Lists that include this title:" even if item is not...
Andreas Roussos [Wed, 24 Aug 2016 14:10:29 +0000 (17:10 +0300)]
Bug 17185: Staff client shows "Lists that include this title:" even if item is not in a list

In the staff client, the text "Lists that include this title:"
is always shown, regardless of whether the item is in a list
or not. This patch fixes that.

Test plan:
1) Log in to staff client.
2) Go to biblio details view:
   /cgi-bin/koha/catalogue/detail.pl?biblionumber=X
   Confirm that "Lists that include this title:" is
   shown even if the item is not in a list.
3) Apply the patch.
4) Repeat step 2. Confirm that the patch works, i.e.
   "Lists that include this title:" is only shown
   for biblios that are actually in a list.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Only applies to non-XSLT view.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit add90157eb859143dc782fded4b00a47a39d8abe)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 16809: Follow-up for scalarizing biblionumber
Marcel de Rooy [Wed, 17 Aug 2016 13:14:12 +0000 (15:14 +0200)]
Bug 16809: Follow-up for scalarizing biblionumber

Still resolves another multi_param warning.

Test plan:
Look at your logs before and after this patch when saving a biblio
record (you may have to start plack again).
If your biblionumber is mapped to 999c, you should no longer have a warn
about line 2563 (disclaimer: line numbers are subject to change).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 377feb9cdf5b4d490dee7640b50c374e28f4550f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 16809: Silence authority warnings C4::Biblio::TransformHtmlToMarc
Mark Tompsett [Fri, 24 Jun 2016 15:29:19 +0000 (11:29 -0400)]
Bug 16809: Silence authority warnings C4::Biblio::TransformHtmlToMarc

Most of the floodiness is caused by accessing the cgi parameters
in a context which is hard to determine. By purposefully saving
the value to a scalar variable and using the variable, the issue
disappears, and it will likely be a tiny tad faster as variable
access is faster than multiple function calls.

TEST PLAN
---------
 1) Back up your intranet error log
    -- for example:
       cp ~/koha-dev/var/log/koha-error-log ~/koha-error-log.backup
 2) Blank your intranet error log
    -- for example:
       echo > ~/koha-dev/var/log/koha-error-log
 3) Log into your staff client
 4) Click 'Authorities'
 5) Click 'New from Z39.50'
 5) Type 'Seuss' into 'Name (any):' and press enter
 6) Click 'Import' beside the first link
 7) Click 'Save'
 8) Check your koha-error-log
    -- floody!
 9) Apply patch
10) repeat steps 2-8
    -- blank!
11) restore your intranet error log
   -- for example:
      mv ~/koha-error-log.backup ~/koha-dev/var/log/koha-error-log
12) run koha qa test tools

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested with addbiblio.pl. I would have preferred the scalar option in terms
of simpler code, but this works too.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 28ad0ab51321955878082d363be2210589a8261f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 14612 - Overdue notice triggers should show branchname instead of branchcode
Owen Leonard [Thu, 18 Aug 2016 17:08:33 +0000 (13:08 -0400)]
Bug 14612 - Overdue notice triggers should show branchname instead of branchcode

This patch adds the Branches template plugin to the overdue notice
triggers template so that the library name can be shown instead of the
branchcode.

Also changed: Updated page title to match the name used in tools menus.

To test, apply the patch and go to Tools -> Overdue notice/status
triggers.

- Select a library.
- When the page reloads, the 'Defining overdue actions for...' and
  'Rules for overdue actions: ' headings should show the library name
  instead of the branchcode.

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>
(cherry picked from commit ead7b938d8da426798eb7337aa1b623fa545da5c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 16464: Add FIXME
Jonathan Druart [Tue, 23 Aug 2016 13:17:53 +0000 (14:17 +0100)]
Bug 16464: Add FIXME

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 931ed0ec9bbad4baa18547d361e2bed52140b637)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 16464 - If a patron has been discharged, show a message in the OPAC
Owen Leonard [Tue, 9 Aug 2016 13:49:33 +0000 (09:49 -0400)]
Bug 16464 - If a patron has been discharged, show a message in the OPAC

This patch adds a message to the patron home page in the OPAC to be
shown if the user is restricted because of a discharge.

To test, apply the patch and log into the OPAC as a patron who has been
discharged.
 - You should see a message which says so, including a link to
   the discharge notice.
 - Log in to the OPAC as a patron with a manual restriction and confirm
   that the correct notice is displayed.

Signed-off-by: Claire Gravely <c.gravely@arts.ac.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e67fc1806cbcb9fbe038b67ad0862f3f163a4313)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17141: Call config method to retrieve logdir
Colin Campbell [Wed, 17 Aug 2016 16:30:55 +0000 (17:30 +0100)]
Bug 17141: Call config method to retrieve logdir

Incorrect method call is causing runtime error and not
retrieving the correct logdir value
Change retrieves the value correctly

To test:
1) Run edi_cron.pl, notice error
2) Apply patch and run edi_cron.pl again, should work as expected

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Note: I did not test but changes make sense.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit af49b42219c6c2fb2f2a52cfb229d37b20b79e84)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17228 - Make two versions of SIPconfig.xml identical
Magnus Enger [Wed, 31 Aug 2016 08:47:43 +0000 (10:47 +0200)]
Bug 17228 - Make two versions of SIPconfig.xml identical

Several bugs have made changes to etc/SIPconfig.xml but not
updated debian/templates/SIPconfig.xml. This means that an admin
using the Debian packages who enables SIP2 for a site and looks at
/etc/koha/sites/<instance>/SIPconfig.xml will not see an up-to-date
version of that file, with the risk of missing possible config
opportunities.

Since debian/templates/SIPconfig.xml contains no placeholders or
other magic stuff related to the Debian packaging, this patch simply
copies etc/SIPconfig.xml to debian/templates/SIPconfig.xml

To test: diff etc/SIPconfig.xml debian/templates/SIPconfig.xml
There should be no difference between the files

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d0d8bd18225483c3c28ba9e0bd368301c6835a66)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17228 - Fix whitespace in etc/SIPconfig.xml
Magnus Enger [Wed, 31 Aug 2016 08:45:32 +0000 (10:45 +0200)]
Bug 17228 - Fix whitespace in etc/SIPconfig.xml

Remove trailing whitespace and replace tabs with 4 spaces.

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit cb72420b4672ec41ebaeb9a51b6387e6f8bb5313)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 14434: Display "Not renewable (on hold)" in OPAC
Holger Meißner [Thu, 11 Aug 2016 09:22:00 +0000 (11:22 +0200)]
Bug 14434: Display "Not renewable (on hold)" in OPAC

This patch makes the OPAC display "Not renewable (on hold)" when
a hold is placed.

Test plan:
1) Do not apply patch.
2) Issue an item with automatic renewal.
3) Issue an item with manual renewal.
4) Place a hold on both items.
5) Log in as patron and note that the column "Renew" says "Automatic
   renewal (x of y renewals remaining)" for the auto renewed item
   and "(On hold) for the other item.
6) Apply patch.
7) Refresh OPAC and note that now "Not renewable (on hold)" is displayed
   for both items.
8) Cancel the holds, then log in as patron again and confirm that the
   correct renewal conditions are displayed.

Sponsored-by: Hochschule für Gesundheit (hsg), Germany
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>
(cherry picked from commit 77b03f1e8b2afe0e9063b06785a0eb468fb029ed)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 16990: Display branch names instead of code in patron mod requests
Jonathan Druart [Fri, 19 Aug 2016 11:43:24 +0000 (12:43 +0100)]
Bug 16990: Display branch names instead of code in patron mod requests

To test:
- change your homebranch in the OPAC, submit
- change patron modification request in the staff client
- Verify that it shows the old and new branch name instead of the
  code

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 3f585d44e8f5f04b47a9f949dc6dcd8a1b3cbf7a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17128: Make summary-print.pl plack safe
Jonathan Druart [Mon, 15 Aug 2016 14:45:38 +0000 (15:45 +0100)]
Bug 17128: Make summary-print.pl plack safe

$borrowernumber is used in build_issue_data but not correctly defined
(Variable "$borrowernumber" is not available)

That may cause wrong charge displayed in the summary slip.

Test plan:
- Set rental charge for an item type
- Define a rental discount for that item type in the circ rules
- check in an item matching this rule
Without this patch the charge displayed in the summary slip won't be
calculated with the discount
With this patch applied, the warning in the logs will no longer appear
and the values will be correctly calculated.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 2cf1e97e5cb6531f0d1d504dda35a836d86466c2)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 16886: Make the 'Upload patron images' tool plack safe
Jonathan Druart [Sat, 9 Jul 2016 12:13:35 +0000 (13:13 +0100)]
Bug 16886: Make the 'Upload patron images' tool plack safe

Some vars are accessed from subroutine, but defined with my.
It causes at least the 2 followings errors:
Variable "$filetype" is not available at
/home/koha/src/tools/picture-upload.pl line 240.
Variable "$uploadfilename" is not available at
/home/koha/src/tools/picture-upload.pl line 241.

To avoid that, they are now declared with our.

Test plan:
Upload image for a patron and confirm that you get a "Result" table and
the errors do not longer appear in the logs.

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>
(cherry picked from commit 762415a2ff18e5a1b783f8eff2275e7d47216343)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17142 - Don't show library group selection in advanced search if groups are not...
Jacek Ablewicz [Wed, 17 Aug 2016 16:42:37 +0000 (18:42 +0200)]
Bug 17142 - Don't show library group selection in advanced search if groups are not defined

Even if library groups/search domains are not defined in the system,
(empty) select for "Groups of libraries" under "Location and
availability" section in OPAC advanced search is still visible; it
shouldn't. Side effect of Bug 15295 - 'searchdomainloop' variable
in the template is now an object, it needs a different kind of statement
(.count) for checking if it's empty or not.

To test:

1) apply patch
2) when there are no groups of libraries defined in Administration ->
Libraries and Groups, "Groups of libraries" selection should be
no longer visible in OPAC adavanced search page
3) add library group or two: "Groups of libraries" selection should
reappear.

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>
(cherry picked from commit 1c87129971ddcd4289c42083a6005638b0d5370d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17200 - Badly formatted "hold for" patron name on catalog detail page
Owen Leonard [Thu, 25 Aug 2016 18:06:11 +0000 (14:06 -0400)]
Bug 17200 - Badly formatted "hold for" patron name on catalog detail page

This patch adds a space between first name and surname on the
bibliographic detail page when there is "hold for" information in the
status column of the holdings table.

To test, apply the patch locate a title in the staff client catalog
which has one or more confirmed holds on it. Verify that the patron's
name in the "status" column of the holdings table looks correct, with a
space between first and last name.

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>
(cherry picked from commit f17b491f357267aa037480593158b13c426051ab)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 11019 - Require some fields when adding authorized value category
Owen Leonard [Thu, 18 Aug 2016 15:58:42 +0000 (11:58 -0400)]
Bug 11019 - Require some fields when adding authorized value category

This patch modifies the form for adding an authorized value so that
the category is a required fields.
Previously a new authorized value category could be saved with no data.

To test, apply the patch and go to Administration -> Authorized values.

- Click the "New category" button.
- Click the save button without filling in the category.
  You should be prevented from submitting the form.
- Verify that filling in the required field allows the form to be
  submitted.
- Perform the same test when editing an existing authorized value.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Follow-up for QA: Allow a blank authorised value to be created.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Amended test plan.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a5b0aa20e553d7444778b2ca3d90c6e067d6fce1)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 13921 - XSLT Literary Formats Not Showing
Owen Leonard [Fri, 19 Aug 2016 14:08:38 +0000 (10:08 -0400)]
Bug 13921 - XSLT Literary Formats Not Showing

This patch adds some missing literary formats to the staff client and
OPAC's search results XSLT display.

To test you must have DisplayOPACiconsXSLT and DisplayIconsXSLT system
preferences enabled.  XSLTResultsDisplay and OPACXSLTResultsDisplay
should be set to 'default.'

Perform searches in the staff client and the OPAC and confirm that the
following literary forms (defined in 008 position 33) display correctly:
Not fiction; Fiction; Dramas; Essays; Novels; Humor, satires, etc.;
Letters; Short stories; Mixed forms; Poetry; Speeches.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 8850540deafc471b9b356e35ae67780a51829271)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17157: Same for "More"
Jonathan Druart [Mon, 22 Aug 2016 12:48:59 +0000 (13:48 +0100)]
Bug 17157: Same for "More"

Here I decided to redirect to the mainpage.

Works as dexcribed.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit bfc72c91849b75a7ab4349f5d6a6798f3c6d0814)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17157: Fix middle click on "Search" drowndown menu
Jonathan Druart [Mon, 22 Aug 2016 12:36:39 +0000 (13:36 +0100)]
Bug 17157: Fix middle click on "Search" drowndown menu

If you save an item and right click on "Search" or "More" you will get
a software error:
Can't call method "fields" on an undefined value at
/usr/share/koha/intranet/cgi-bin/cataloguing/additem.pl line 742

You will now be redirected to the adv search form.

Wors as described.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1fe9c40da4e71bde460133ee6248503ce1025999)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 16903 - Multiple class attributes on catalog search tab
Owen Leonard [Tue, 12 Jul 2016 13:24:59 +0000 (09:24 -0400)]
Bug 16903 - Multiple class attributes on catalog search tab

cat-search.inc contains an element with two class attributes, which is
invalid. This patch corrects it.

To test, apply the patch and view any page which uses the cat-search
include file to display the header search boxes. For instance, the
bibliographic detail page.

In the header, the "Search the catalog" box should be selected, and any
text you type in the box should be carried over when you switch to
different search tabs.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a2a56ca441f33fb3772b89b85b0b40873b60e4e6)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17118: (follow-up 15381) Fix regression when clearing a linked authority
Jonathan Druart [Fri, 19 Aug 2016 15:09:55 +0000 (16:09 +0100)]
Bug 17118: (follow-up 15381) Fix regression when clearing a linked authority

Changes made on bug 15381 assumed that the authid was always set.
But if the user wants to clear the field of the authority, the script is
called with authid=0 (FIXME...)

To fix this issue, it's better to move the new calls to
  Koha::Authorities->find($authid)->authtypecode
and
  Koha::Authority::Types->find($authtypecode);
at the correct place

Test plan:
1. Edit a record which has a field linked to an
   authority record (100a for instance).
2. Click the link which triggers the tag editor.
   A pop-up window should be displayed.
3. In the pop-up window, click the "Clear field"
   button.
=> Without this patch A second pop-up window opens and displays an error:
  Can't call method "authtypecode" on an undefined value at /authorities/blinddetail-biblio-search.pl line 61.
=> With this patch applied the field is correctly cleared.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 58661d9b4be3398c24bbac8147a2d0b3f1f95d45)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
7 years agoBug 17223 Follow-up: updated control file
Mirko Tietgen [Tue, 30 Aug 2016 18:20:17 +0000 (20:20 +0200)]
Bug 17223 Follow-up: updated control file

This is the control file change for the master branch triggered by
the first patch.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1133d318c422d7fdfa4b1b093988e373ebb71222)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>