]> git.koha-community.org Git - koha.git/log
koha.git
6 years agoBug 19827: Removing &checkuniquemember from the export in C4/Members.pm
Zoe Bennett [Wed, 17 Jan 2018 23:16:38 +0000 (23:16 +0000)]
Bug 19827: Removing &checkuniquemember from the export in C4/Members.pm

Test Plan:
- Check that the line &checkuniquemember has been removed from the
export in C4/Members.pm

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20091: Moved FailedLoginAttempts out of Norwegian Patron Database heading
Nick Clemens [Fri, 26 Jan 2018 12:43:58 +0000 (12:43 +0000)]
Bug 20091: Moved FailedLoginAttempts out of Norwegian Patron Database heading

To test:
1 - View systempreferences patron tab
2 - Note FailedLoginAttempts is uner 'Norwegian Patron Database'
3 - apply patch
4 - Now it is under 'General'

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Maksim Sen <maksim@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 13990: (follow-up) silence warnings on testing
Mark Tompsett [Sun, 28 Jan 2018 06:41:01 +0000 (01:41 -0500)]
Bug 13990: (follow-up) silence warnings on testing

prove t/db_dependent/ILSDI_Services.t

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 13990: (QA follow-up) Add unit test coverage
Mark Tompsett [Sun, 28 Jan 2018 06:18:54 +0000 (01:18 -0500)]
Bug 13990: (QA follow-up) Add unit test coverage

prove t/db_dependent/ILSDI_Services.t

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 13990: (follow-up) fix various whitespace errors
Mark Tompsett [Fri, 26 Jan 2018 16:20:20 +0000 (16:20 +0000)]
Bug 13990: (follow-up) fix various whitespace errors

- tabs to 4 spaces
- trailing whitespace
- missing vertical whitespace before =head3

Without this patch, this bug fails qa test tools.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 13990: ILS-DI LookupPatron requires ID Type
Jon Knight [Tue, 7 Nov 2017 17:27:56 +0000 (17:27 +0000)]
Bug 13990: ILS-DI LookupPatron requires ID Type

Patch provides a constrained set of borrower attributes to try in turn if the
ID type is not specified.  Also added "email" to the POD documented list of
id types seeing as its quite a useful one for integration developers.

Test plan:

1) without the patch applied, turn on ils-di interface in your admin sysprefs
   and then try accessing the URL:

   https://your-server/cgi-bin/koha/ilsdi.pl?service=LookupPatron&id=Mabel

   replacing "your-server" your Koha dev test domain name (localhost:8080 if
   you're using a kohadevbox VM) and "Mabel" with the first name of a patron
   (Mabel is in the test database already if you're using that).

   You should get back an error message in the XML.

2) Apply the patch and repeat. This time you should get an <id> element in
   the XML with Mabel's patron ID in it.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19230: (follow-up) Preventing warn when deleting course
Jonathan Druart [Tue, 30 Jan 2018 17:06:27 +0000 (14:06 -0300)]
Bug 19230: (follow-up) Preventing warn when deleting course

Simplify 'unless' statement

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19230: Preventing warn when deleting course
Aleisha Amohia [Thu, 21 Dec 2017 00:57:21 +0000 (00:57 +0000)]
Bug 19230: Preventing warn when deleting course

To test:
1) Ensure UseCourseReserves is enabled
2) Go to Course Reserves, create a course
3) When you are taken to the course page, you should notice the
'Argument "" isn't numeric in numeric gt' warn
4) Delete course
5) Notice warn, and that no confirm message popped up
6) Apply patch
7) Create a course again. Confirm the 'Argument "" isn't numeric in
numeric gt' warn did not show
8) Delete the course
9) Notice no warn and the confirm message pops up

Sponsored-by: Catalyst IT
Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20041: ILL module missing from more menu in staff when activated
Liz Rea [Fri, 26 Jan 2018 02:01:39 +0000 (15:01 +1300)]
Bug 20041: ILL module missing from more menu in staff when activated

Apply this patch
Check that ILL requests are now listed in More menu when ILL requests syspref is enabled

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19986: 'Server name' doesn't appear as required
Grace Smyth [Wed, 17 Jan 2018 20:36:59 +0000 (20:36 +0000)]
Bug 19986: 'Server name' doesn't appear as required

Test plan:
[1.] Go to Admin -> z39.50/SRU servers
[2.] Make a new z39.50 server
[3.] Fill in the required field (hostname, port, database)
[4.] Save the server
[5.] Notice that the form does not submit, tells you that Sever name is
     required
[6.] Repeat steps 2 - 5 but this time make a new SRU server
[6.] Upload the patch and repeat steps 1 - 3 (make a new z39.50 server
     and a new SRRU server)
[7.] See that now 'Server name:' is red and on the right side of the box
     there is a required note
[8.] Save both servers and it should have created a new z39.50 server
and a new SRU server

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20003: (QA follow-up) use patron checkouts method instead of Koha::Checkouts
Nick Clemens [Fri, 26 Jan 2018 21:05:39 +0000 (21:05 +0000)]
Bug 20003: (QA follow-up) use patron checkouts method instead of Koha::Checkouts

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20003: Fix showing number of remaining checkouts during checking in
Josef Moravec [Thu, 18 Jan 2018 07:56:15 +0000 (07:56 +0000)]
Bug 20003: Fix showing number of remaining checkouts during checking in

Test plan:
0) Do not apply the patch
1) Have a patron with more then one checkout
2) Return one of patron's checkout and confirm the remaining number of
checkout is not shown
3) Apply the patch
4) Try it again and confirm the number is now shown

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19975: Fix search by tags at the OPAC
Jonathan Druart [Mon, 22 Jan 2018 20:04:28 +0000 (17:04 -0300)]
Bug 19975: Fix search by tags at the OPAC

This bug has certainly be caused by
  commit 091d6c513bcbee224ff06477e79be48cea7fe825
    Bug 17843: Replace C4::Koha::getitemtypeinfo with Koha::ItemTypes

The reason is quite simple, in Koha::ItemType->translated_description
(called in opac-search.pl l.229) there is an eval to know if we have
access to the translated description of the item type, to avoid
retrieving it again.

The evaluation of $@ later in opac-search.pl is supposed to test the 2
eval made few lines before (a "normal" search, without tags), but
$@ contains the error message from the *last* eval command.
So we are raising an error that have been correctly handled in
Koha::ItemType.

Test plan:
At the OPAC, click Tag cloud, then click any of the tags

=> Without the patch you get
Koha::ItemType::get_column generated this error: DBIx::Class::Row::get_column(): No such column 'translated_description' on Koha::Schema::Result::Itemtype at /usr/share/koha/lib/Koha/Object.pm line 307

=> With the patch applied the page is correctly displayed

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20072: Fix build-git-snapshot for Debian source format quilt
Mirko Tietgen [Tue, 23 Jan 2018 10:43:10 +0000 (11:43 +0100)]
Bug 20072: Fix build-git-snapshot for Debian source format quilt

With bug 18696 we need a few tiny changes to build-git-snapshot:
- Debian revision number for debian/changelog
- "orig" in the file name for the tar.gz archive

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoRevert "Bug 19669: (QA follow-up) Remove itemstypes.plugin"
Jonathan Druart [Tue, 30 Jan 2018 15:24:48 +0000 (12:24 -0300)]
Revert "Bug 19669: (QA follow-up) Remove itemstypes.plugin"

This reverts commit 7140a5e4ecc68759c1bee04571386f9cc9a16d92.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19705: Try to fix random failures from DecreaseLoanHighHolds.t
Jonathan Druart [Tue, 23 Jan 2018 20:00:16 +0000 (17:00 -0300)]
Bug 19705: Try to fix random failures from DecreaseLoanHighHolds.t

No idea if it will do the trick, wait and see...

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18964: Add --debugger option to koha-plack
Tomas Cohen Arazi [Fri, 21 Jul 2017 19:28:31 +0000 (16:28 -0300)]
Bug 18964: Add --debugger option to koha-plack

CAVEAT: This patch is only about allowing koha-plack to start a debugging
session on a remote target. Configuring all the needed pieces to make it
work is out of the scope of the bug. Testing should be focused (mainly) on
making sure this introduces NO REGRESSIONS on regular use (i.e. not debugging).

This patch adds the following option switches to koha-plack:

--debugger
----------
Toggle debugging

--debugger-key
--------------
Some IDEs require a key, this needs to match because they are picky about it

--debugger-location
-------------------
This option switch is used to specify the host:port your IDE is listening at.
Inside kohadevbox (using Vdebug with Vim) this would be localhost:9000. Outside
kohadevbox it would be 192.168.50.1:9000

--debugger-path
---------------
This is the path in which you installed the Komodo Remote Debugger library [1]. In kohadevbox
you could put the contents of the downloaded .tar.gz in /home/vagrant/dbgp/perllib. That
perllib seems to be required for things to work [2].

You can test with a simple CLI script things work:

PERL5LIB=/home/vagrant/dbgp/perllib:$PERL5LIB \
PERLDB="BEGIN { require q(/home/vagrant/dbgp/perllib/perl5db.pl) }" \
PERLDB_OPTS="RemotePort=192.168.50.1:9000" perl -d t/Prices.t

If you see action on your IDE, you are on the right track on the IDE side.

To test:
- Apply this patch
- Enable remote debugging on your IDE, on port 9000 (or adjust the command
  below to match your IDE's listening port).
- Download the Komodo Remote Debugger package, and place the package's contents
  in /home/vagrant/dbgp/perllib (you should see perl5db.pl in there).
- Run:
  $ sudo koha-plack --stop kohadev
  $ sudo kohaclone/debian/koha-plack --start \
                                     --debugger \
                                     --debugger-path /home/vagrant/dbgp/perllib \
                                     --debugger-location 192.168.50.1:9000 \
                                     kohadev
=> SUCCESS: You IDE/tool gets a connection from the Plack process.
- Sign off :-D

The explanation on how to use it assumes you are running kohadevbox.

WARNING: The main difficulty I found was setting the right dir/file mappings.

[1] http://code.activestate.com/komodo/remotedebugging/
[2] https://github.com/Komodo/KomodoEdit/issues/644#issuecomment-236268012

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19985: Make TestBuilder.t pass even if default_circ_rules is not empty
Jonathan Druart [Mon, 22 Jan 2018 20:18:59 +0000 (17:18 -0300)]
Bug 19985: Make TestBuilder.t pass even if default_circ_rules is not empty

This table cannot contain more than 1 row, so we need to remove its data
before trying to generate a new entry.

Test plan:
Set a default circ rule
 prove t/db_dependent/TestBuilder.t
should return green

Without this patch you get:
    #   Failed test 'TestBuilder should be able to create an object for every source'
    #   at t/db_dependent/TestBuilder.t line 78.
    #          got: '1'
    #     expected: '0'
    # The following sources have not been generated correctly: DefaultCircRule
    # Looks like you failed 1 test of 1.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18477: Populate article_requests table values for AR_PENDING notices
Kyle M Hall [Mon, 8 May 2017 16:47:06 +0000 (16:47 +0000)]
Bug 18477: Populate article_requests table values for AR_PENDING notices

The default AR_PENDING letter does not print populate <<article_requests.*>> fields.

Test Plan:
1) Enable article requests ( syspref: ArticleRequests => Enable, Circ and fine rules ALL/ALL (or a given category/itemtype): Article requests => Yes )
2) Search for a title, click in to catalog detail, click 'Request Article' button.
3) Select Patron
4) Fill out request information
5) Click 'Place request'
6) Go to notices in patron record, inspect 'Article Request Received' notice. You should see the request information from step 4, but it doesn't display.
7) Apply this patch
8) Repeat steps 2-6, not the fields now display!

Signed-off-by: Eric Phetteplace <phette23@gmail.com>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18477: Add tests
Jonathan Druart [Tue, 2 Jan 2018 17:36:43 +0000 (14:36 -0300)]
Bug 18477: Add tests

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20068: Check if user logged in before passing dashboard params to template
Aleisha Amohia [Mon, 22 Jan 2018 23:52:21 +0000 (23:52 +0000)]
Bug 20068: Check if user logged in before passing dashboard params to template

This prevents warns from dashboard variables when not logged in

To test:
1) Go to OPAC main homepage. Do not log in
2) Notice warn
3) Apply patch and refresh
4) Warn should be gone
5) Log in
6) Confirm dashboard shows as normal

Sponsored-by: Catalyst IT
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19831: Turn on EnhancedMessagingPreferences by default for new installations
Charlotte Cordwell [Tue, 16 Jan 2018 02:09:29 +0000 (02:09 +0000)]
Bug 19831: Turn on EnhancedMessagingPreferences by default for new installations

Test plan:
1) Create a new installation
2) On staff go adminisation --> and search EnchancedMessagingPreferences
3) Check that it is automaticaly on allow. If it is the it has worked.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20063: (bug 18811 follow-up) Allow hidden $9 subfields
Marcel de Rooy [Wed, 17 Jan 2018 13:26:38 +0000 (14:26 +0100)]
Bug 20063: (bug 18811 follow-up) Allow hidden $9 subfields

Although we could argue that the user should make all $9 subfields
visible, this might be a good compromise. It selectively reverts the
change from the first patch by accepting $9 subfields without checking
the hidden flag in the framework.

Test plan:
[1] Make a subfield $9 visible for some authority field.
[2] Put a value in it somewhere in authorities.pl
[3] Make subfield $9 invisible in the auth framework.
[4] Open and save the adjusted authority record.
[5] Check the marcxml of this record.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7143: Update about page for new dev - Zoe Bennett
Jonathan Druart [Fri, 19 Jan 2018 19:08:33 +0000 (16:08 -0300)]
Bug 7143: Update about page for new dev - Zoe Bennett

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7143: Update about page for new dev - Te Rauhina Jackson
Jonathan Druart [Fri, 19 Jan 2018 19:06:35 +0000 (16:06 -0300)]
Bug 7143: Update about page for new dev - Te Rauhina Jackson

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7143: Update about page for new dev - Charlotte Cordwell
Jonathan Druart [Fri, 19 Jan 2018 19:07:46 +0000 (16:07 -0300)]
Bug 7143: Update about page for new dev - Charlotte Cordwell

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7143: Update about page for new dev - Grace Smyth
Jonathan Druart [Fri, 19 Jan 2018 19:03:07 +0000 (16:03 -0300)]
Bug 7143: Update about page for new dev - Grace Smyth

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19988: Fixing the case where terminolgy referred to sex instead of gender.
Zoe Bennett [Wed, 17 Jan 2018 03:27:06 +0000 (03:27 +0000)]
Bug 19988: Fixing the case where terminolgy referred to sex instead of gender.

To test:
1) Change a users gender in the OPAC
2) View it in the patron request in the staff client
3) Check that under 'Field' it now says 'Gender' instead of 'Sex'

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18083: Simplify the condition - if there are more than 1 library
Jonathan Druart [Fri, 19 Jan 2018 18:42:54 +0000 (15:42 -0300)]
Bug 18083: Simplify the condition - if there are more than 1 library

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18083: Don't show 'library' selection on popular titles page for single-branch...
Te Rauhina Jackson [Tue, 16 Jan 2018 03:03:47 +0000 (03:03 +0000)]
Bug 18083: Don't show 'library' selection on popular titles page for single-branch libraries

This patch hides the search filter labelled "From" that offers you to
select a library branch which is located on the 'popular titles' page on the OPAC. It is hidden when the library only has one branchas it would be unneccessary to have an option for other branches when there is only one.

Test Plan:
1) Make sure you have a single-branch library
2) Make sure OPACTopIssue is allowed in the OPAC preferences
3) In the OPAC, got to 'Most Popular' page
4) Check that there is no "From" filter in the refine search
5) Create a new branch so that you have more than one branch
6) Check that there is a "From" filter in the refine search on the Most Popular page.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended white space on second change.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19585: Inventory: Allow additional separators in a barcode file
Marcel de Rooy [Thu, 2 Nov 2017 09:55:42 +0000 (10:55 +0100)]
Bug 19585: Inventory: Allow additional separators in a barcode file

This patch makes \n, \r, |, comma, semicolon and hyphen ('-') all valid
separators between barcodes passed to inventory.
An additional grep removes empty barcodes. (Note: The grep looks for at
least one non-whitespace character. We could be more specific, but this
allows for more flexibility like testing with alphanumeric barcodes etc.)

Test plan:
Upload a barcode file that contains various allowed separators.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jenny Way <jwayway@hotmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18878: Align labels in item form to the right
Grace Smyth [Tue, 16 Jan 2018 02:16:50 +0000 (02:16 +0000)]
Bug 18878: Align labels in item form to the right

Test Plan
[1.] Search for an item and click on it
[2.] Press the edit button to edit an item
[3.] Notice that the labels are aligned to the left and very far away
from the boxes
[4.] Load the patch and now notice that the labels are closer to the
boxes and are easier to read

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15770: Do not format numbers if too big
Jonathan Druart [Wed, 20 Dec 2017 23:29:29 +0000 (20:29 -0300)]
Bug 15770: Do not format numbers if too big

At several places we got the following error if we use numbers too big
for Number::Format
Template process failed: undef error - round() overflow. Try smaller
precision or use Math::BigFloat at /home/koha/src/Koha/Number/Price.pm line 44

It make the app explodes.
The goal here is to handle these errors gracefully and easily.

Test plan:
- Add a manual fine to a patron of 100000000000000
- Create a patron category with an enrolment fee of 123456789012345

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19971: Typo in the comments of parseQuery routine
Olivier Crouzet [Mon, 15 Jan 2018 16:22:22 +0000 (17:22 +0100)]
Bug 19971: Typo in the comments of parseQuery routine

TEST PLAN
---------
1) Run these commands:
    git checkout master
    git pull
    perldoc C4::Search
2) look for parseQuery
    -- NOTE: The sample code provided below this heading has
             the wrong function name!
3) Run these commands:
    git checkout -b bug_19971 origin/master
    perldoc C4::Search
4) look for parseQuery
    -- NOTE: The wrong function name is corrected.
5) Run koha qa test tools

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19221: Onboarding tool says user needs to be made superlibrarian
Te Rauhina Jackson [Tue, 16 Jan 2018 21:21:21 +0000 (21:21 +0000)]
Bug 19221: Onboarding tool says user needs to be made superlibrarian

I changed the "To give new patron superlibrarian permissions go to:"
message to "To edit patron permissions, go to:". Please clarify if this
is clearer or not.

Test plan:
1) Apply patch
2) Go through the web installer
3) At the create koha administrator patron step, notice that at the
   bottom, there is a message saying "To edit patron permissions, go
   to:"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19825: Make links to biblios on pending offline circulation page working again
Josef Moravec [Sun, 17 Dec 2017 08:45:41 +0000 (08:45 +0000)]
Bug 19825: Make links to biblios on pending offline circulation page working again

0) Do not apply the patch
1) Have pending offline circulation operations - you can use standalone
application, Firefox add-on or built-in offline circulatin client - it
does not matter in this case
2) Go to Circulation -> pending offline circulation actions
3) You see all barcode in red and without links - even if the item and
biblio existed
4) Apply the patch
5) Repeat 1-3, now you should see the links to biblio on existing items

Note: Don't add non-existent barcodes actions and payment actions unti
bug 19771 is not fixed

Signed-off-by: Charlotte Cordwell <charlotte.cordwell123@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19839: Removed Warning (invoice.pl - uncertainprices)
Grace Smyth [Tue, 16 Jan 2018 03:41:15 +0000 (03:41 +0000)]
Bug 19839: Removed Warning (invoice.pl - uncertainprices)

Test Plan
[1.] Check the patch to see that I have removed:
$template->param( uncertainprices => 1 ); from line 204 as Mr Druart has instructed to do
(to get to the patch see the comment above by Mr Druart)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 17682: DBRev 17.12.00.006
Jonathan Druart [Fri, 19 Jan 2018 18:49:28 +0000 (15:49 -0300)]
Bug 17682: DBRev 17.12.00.006

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 17682: Replace 2 occurrences in de-DE and nb-NO
Jonathan Druart [Fri, 19 Jan 2018 18:26:32 +0000 (15:26 -0300)]
Bug 17682: Replace 2 occurrences in de-DE and nb-NO

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 17682: (follow-up) Change URL for Google Scholar in OPACSearchForTitleIn
Charlotte Cordwell [Tue, 16 Jan 2018 20:14:20 +0000 (20:14 +0000)]
Bug 17682: (follow-up) Change URL for Google Scholar in OPACSearchForTitleIn

Amended the sql statement so it only affects the http://www.scholar.google.com url

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 17682: Change URL for Google Scholar in OPACSearchForTitleIn
Charlotte Cordwell [Tue, 16 Jan 2018 03:55:49 +0000 (03:55 +0000)]
Bug 17682: Change URL for Google Scholar in OPACSearchForTitleIn

1)apply patch
2) go into administration --> search for OPACSearchForTitleIn
3) *click to edit*
4) look at the link and read the google scholar one.
5) check that the start link is https://scholar.google.com.
6) http://www.scholar.google is incorrect

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 16603: (QA follow-up) Add a FIXME
Nick Clemens [Fri, 19 Jan 2018 14:11:51 +0000 (14:11 +0000)]
Bug 16603: (QA follow-up) Add a FIXME

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 16603: When processing uploaded offline circulation file, "apply directly" option...
Owen Leonard [Fri, 1 Dec 2017 18:23:01 +0000 (18:23 +0000)]
Bug 16603: When processing uploaded offline circulation file, "apply directly" option fails

This patch is a temporary mitigation of whatever the real problem is.
The patch hides the "Apply directly" button so that the option isn't
available.

To test, apply the patch and generate a .koc file with some
transactions. Upload the file via Circulation -> Offline
circulation file upload. After the file is uploaded, you should see only
a "Add to offline circulation queue" button, which should work
correctly.

Signed-off-by: Grace Smyth <gracesmythh@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19677: Properly escape enumchrom/serialseq data
Nick Clemens [Mon, 18 Dec 2017 14:42:25 +0000 (14:42 +0000)]
Bug 19677: Properly escape enumchrom/serialseq data

Some serial issues use angle brackets for denoting certain data.
Currently this is not displayed in Koha. This patch escapes the data so
that angle brackets will display.

To test:
1 - Add an enumchron field to an item containg angle brackets:
"This is a <test>"
2 - View the record in the staff and opac, not the field displays as:
"This is a"
3 - Apply patch
4 - Note full text now displays

Signed-off-by: Charlotte Cordwell <charlotte.cordwell123@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18696: Change debian/source/format to quilt
Mirko Tietgen [Fri, 19 Jan 2018 13:06:48 +0000 (14:06 +0100)]
Bug 18696: Change debian/source/format to quilt

debian/source/format uses 'native'. As Koha is not native Debian software,
and to allow Debian revision numbers like -2 in 16.05.13-2, it should be
changed to 'quilt'.

This is only relevant to packaging and does not affect Koha itself.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19783: Move check_kohastructure.t to db_dependent
Mirko Tietgen [Fri, 19 Jan 2018 12:55:30 +0000 (13:55 +0100)]
Bug 19783: Move check_kohastructure.t to db_dependent

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20042: 00-load.t fails when Elasticsearch is not installed
Mirko Tietgen [Fri, 19 Jan 2018 12:59:43 +0000 (13:59 +0100)]
Bug 20042: 00-load.t fails when Elasticsearch is not installed

00-load.t fails when Elasticsearch is not installed. Blocks packaging.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19987: If no z39.50/SRU servers the button should not show
Grace Smyth [Thu, 18 Jan 2018 20:30:00 +0000 (20:30 +0000)]
Bug 19987: If no z39.50/SRU servers the button should not show

Test plan:
[1.] Load the patch and make sure you have some Z39.50/SRU servers
     (Administration => Z39.50/SRU servers administration)
[2.] Then go to authorities and notice that the 'New from
     Z39.50/SRU' button is there
[3.] Next go to cataloging and notice that the 'New from Z39.50/SRU'
     button is there too
[4.] Now make sure you have no Z39.50/SRU servers (remove the
     servers)
     (Administration => Z39.50/SRU servers administration)
[5.] Go to authorities and notice that the 'New from Z39.50/SRU'
     button is not there
[6.] Lastly go to cataloging and notice that the 'New from Z39.50/SRU'
     button is not there too

:)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
I added a missing [% END %] during signoff. Hope no one minds!

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19977: Open only .pref files in Local Use tab (sysprefs)
Julian Maurice [Tue, 16 Jan 2018 09:20:21 +0000 (10:20 +0100)]
Bug 19977: Open only .pref files in Local Use tab (sysprefs)

Test plan:
1. Open .../prog/en/modules/admin/preferences/circulation.pref
with vim (check that it creates a .circulation.pref.swp in the same
directory)
2. Go to the "Local Use" tab in admin/systempreferences.pl
3. Confirm that the page works normally

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19771: Fix crashing in pending offline circulation actions list
Josef Moravec [Sun, 17 Dec 2017 08:53:18 +0000 (08:53 +0000)]
Bug 19771: Fix crashing in pending offline circulation actions list

When the barcode is empty or invalid, an "Internal Server Error"
is triggered on the kohadev box.

TEST PLAN
---------
0) back up your database if you care about it.
1) Run the following commands:
    git checkout master
    git pull
    git checkout -b bug_19771 origin/master
    git bz apply 19771
   -- This should be quite uneventful. Standard promptings.
2) Continue to run the following commands:
    git checkout master
    reset_all
    sudo koha-shell -c bash kohadev
    ./misc/cronjobs/create_te_koc_db.pl --sqlite3
   -- This will create a borrowers.db in your current directory.
3) On the host where you intend on running the koct install it.
   -- https://sourceforge.net/projects/koha-oc/files/
      download and install.
4) get the borrowers.db file to your host where you installed koct
5) point koct at the file you downloaded
   Database -> Select Borrowers DB File
6) Create a .koc file with the following transactions.
    check in, check out, check in (bad barcode),
    pay fines (any non-zero amount).
7) Run the following commands:
    restart_all
   -- we want to make sure caching for plack isn't in the way.
8) In the staff client: Home -> Circulation
    -> Upload offline circulation file (.koc)
9) Choose the file created and click 'Upload file'.
10) Add to offline circulation queue.
11) View pending offline circulation actions
    -- This should die. Reading /var/log/koha/kohadev/plack-error.log
       should be the same error as comment #0.
       However, this was only the bad biblio error.
12) Run the following commands:
    git checkout bug_19771
    restart_all
13) Refresh staff client page.
    -- it should all come up.
14) Select the bad biblio line, and delete it.
15) Run the following commands:
    git checkout master
    restart_all
16) Refresh the staff client page.
    -- it should die. Same error as comment #0.
       This confirms the fine payment issue.
17) Run the following commands
    git checkout bug_19771
    restart_all
18) Refresh the staff client page.
    -- it should all come up.
19) run the koha qa test tools
20) if you backed up your database, restore it. :)

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20001: Fix confusion between array and arrayref
Jonathan Druart [Thu, 18 Jan 2018 15:49:12 +0000 (12:49 -0300)]
Bug 20001: Fix confusion between array and arrayref

Illrequest->available_backends always returned only 1 element

TEST PLAN
---------
See bug 7317 comment #20 for configuring ILL
Make sure to restart_all
Strangely, ILLIBS didn't exist, but IL did in default install,
    so use that as the patron code in your koha-conf.xml
Make sure to turn on the ILL related system preference.

1) Configure ILL.
   -- this is the hard part. Hopefully the above will give you
      enough.
2) open OPAC and log in
3) Click the 'your interlibrary loan request' in the left pane
4) Click the 'Create a new request' button.
   -- when you hover your mouse over the links for the backends,
      they will have ARRAY(...) instead of a meaningful name.
      This is what triggers the error (see comment #7).
5) Run the following commands
    git checkout -b bug_20001 origin/master
    git bz apply 20001
    restart_all
6) Refresh the OPAC page, and repeat step 4.
    -- when hovering your mouse over the links for the backends,
       they will have meaningful values now.
7) run koha qa test tools.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 17467: Add missing --status switch handling
Tomas Cohen Arazi [Thu, 20 Oct 2016 13:00:19 +0000 (10:00 -0300)]
Bug 17467: Add missing --status switch handling

RM note: I forgot this patch (no idea what happened!)

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19968: Add missing use Date::Calc statement
Jonathan Druart [Mon, 15 Jan 2018 13:10:41 +0000 (10:10 -0300)]
Bug 19968: Add missing use Date::Calc statement

It has been reported than the missing use statement can cause a
compilation error:
Undefined subroutine &Date::Calc::Today called at
/usr/share/koha/intranet/cgi-bin/cataloguing/value_builder/unimarc_field_100.pl
line 75.

Test plan:
Use this UNIMARC plugin and make sure it fixes the error or at least
does not break it

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19973: Fix SQL syntax error in uk-UA/mandatory/sample_notices.sql
Jonathan Druart [Mon, 15 Jan 2018 16:46:06 +0000 (13:46 -0300)]
Bug 19973: Fix SQL syntax error in uk-UA/mandatory/sample_notices.sql

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18915: Add CHECKOUT_NOTE notice template for other languages
Jonathan Druart [Mon, 15 Jan 2018 16:41:41 +0000 (13:41 -0300)]
Bug 18915: Add CHECKOUT_NOTE notice template for other languages

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19937: Silence warnings t/db_dependent/www/batch.t
Mark Tompsett [Tue, 9 Jan 2018 14:37:08 +0000 (14:37 +0000)]
Bug 19937: Silence warnings t/db_dependent/www/batch.t

TEST PLAN
---------
1) Run the following on a kohadevbox:
    git checkout -b bug_19937 origin/master
    sudo koha-shell -c bash kohadev
    prove t/db_dependent/www/batch.t
    cat /var/log/koha/kohadev/plack-error.log

    The following errors are triggered at the end of the log file:
        Use of uninitialized value in array element at
        /home/vagrant/kohaclone/tools/batch_records_ajax.pl line 50.
        Use of uninitialized value $results_per_page in numeric eq (==) at
        /home/vagrant/kohaclone/tools/batch_records_ajax.pl line 53.
        Use of uninitialized value in uc at
        /home/vagrant/kohaclone/C4/ImportBatch.pm line 1120.

2) Run the following on a kohadevbox:
    exit
    git bz apply 19937
    restart_all
    sudo koha-shell -c bash kohadev
    prove t/db_dependent/www/batch.t
    cat /var/log/koha/kohadev/plack-error.log

    The log file will end with the restarting of plack, not the
    errors.

3) run koha qa test tools

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended handling of $results_per_page.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19483: Fix test plan in t/db_dependent/www/*
Olli-Antti Kivilahti [Wed, 18 Oct 2017 11:33:22 +0000 (14:33 +0300)]
Bug 19483: Fix test plan in t/db_dependent/www/*

t/db_dependent/www/* crashes test harness due to misconfigured test plan

prove t/db_dependent/www/

without defining KOHA_INTRANET_URL
bails out and marks the whole test suite as failed.
Test suite should not be failed if this optional WWW::Mechanize test
suite is not activated.

After this patch, the tests are properly skipped without failing the
whole tests.

This is important when running all tests under t, as this needlessly
fails the test suite.

Also handling of 'skip_all' is inconsistent in t/db_dependent/www
-tests, so this normalizes it to skip_all instead of bail_out

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18915: DBRev 17.12.00.005
Jonathan Druart [Mon, 15 Jan 2018 15:19:08 +0000 (12:19 -0300)]
Bug 18915: DBRev 17.12.00.005

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18915: (QA follow-up) Add note for installs after 17.05
Marcel de Rooy [Fri, 12 Jan 2018 10:31:42 +0000 (11:31 +0100)]
Bug 18915: (QA follow-up) Add note for installs after 17.05

Since the 17.05 upgrade adds the note and the sql file did not yet include
the note, we should add it when it is not there (for example new 17.11s).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested by running the dbrev while there is a letter and while not.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18915: Renaming svc/patron_notes to svc/checkout_notes
Aleisha Amohia [Sun, 17 Dec 2017 23:42:36 +0000 (23:42 +0000)]
Bug 18915: Renaming svc/patron_notes to svc/checkout_notes

For consistency.

Signed-off-by: Marjorie Barry-Vila <marjorie.barry-vila@collecto.ca>
https://bugs.koha-community.org/show_bug.cgi?id=19801

Signed-off-by: Marjorie Vila <marjorie.barry-vila@collecto.ca>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18915: Giving CHECKOUT_NOTE access to issues table
Aleisha Amohia [Sun, 17 Dec 2017 23:33:18 +0000 (23:33 +0000)]
Bug 18915: Giving CHECKOUT_NOTE access to issues table

This patch allows the notice to reference the issues table so that the
checkout note itself can be added to the note if wanted, such as in
Comment 9.

Sponsored-by: Catalyst IT
Signed-off-by: Marjorie Barry-Vila <marjorie.barry-vila@collecto.ca>
https://bugs.koha-community.org/show_bug.cgi?id=19801

Signed-off-by: Marjorie Vila <marjorie.barry-vila@collecto.ca>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18915: Fix checkout note email message
Aleisha Amohia [Sun, 27 Aug 2017 23:20:40 +0000 (23:20 +0000)]
Bug 18915: Fix checkout note email message

This patch replaces the <<biblio.item>> in the email with
<<biblio.title>> and uses CHECKOUT_NOTE instead of PATRON_NOTE.
This patch also adds the notice to
installer/data/mysql/en/mandatory/sample_notices.sql, and updates the
PATRON_NOTE entry in installer/data/mysql/updatedatabase.pl

To test:
1) Apply patch and update database
2) View the message_queue table in mysql
3) Check out an item if haven't already
4) Go to OPAC and set a checkout note for an item
5) View message_queue table and confirm it the title is included in the
email and all instances of 'patron note' have been replaced with
'checkout note'
6) Disable javascript in browser
7) repeat steps 4 and 5 and confirm all works as expected

Sponsored-by: Catalyst IT
Signed-off-by: Marjorie Vila <marjorie.barry-vila@collecto.ca>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19911: Escape password value during self-registration confirmation
Jonathan Druart [Wed, 3 Jan 2018 19:15:18 +0000 (16:15 -0300)]
Bug 19911: Escape password value during self-registration confirmation

The password must be correctly escape, it can contains html character
and break the display.

Test plan:
Apply first patch and confirm that the display is broken
Apply second patch (this one) and confirm that the display is fixed

Signed-off-by: Arturo <alongoria@sll.texas.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19911: Do not escape html characters when saving passwords
Jonathan Druart [Thu, 4 Jan 2018 14:00:35 +0000 (11:00 -0300)]
Bug 19911: Do not escape html characters when saving passwords

When the password is not generated automatically, we should not escape
the html characters. Otherwise it will be changed without any warnings.

Signed-off-by: Arturo <alongoria@sll.texas.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19921: Fix update child when only one adult patron category exist
Jonathan Druart [Fri, 5 Jan 2018 19:36:31 +0000 (16:36 -0300)]
Bug 19921: Fix update child when only one adult patron category exist

We are passing the Koha::Patron::Category object to the template instead
of the categorycode.

To reproduce this bug you must test in a system which has only one
patron category of the "adult" type. View the details of a patron with a
child-type patron category and choose More -> Update child to adult
patron.

This results in an error:

Can't call method "category_type" on an undefined value at
/home/vagrant/kohaclone/members/update-child.pl line 84.

The URL of the error page shows a problem with the parameters being
passed:

members/update-child.pl?op=update&borrowernumber=12345&catcode=Koha::Patron::Category=HASH(0xa168a18)&catcode_multi=

Test plan:
Make sure you have only 1 adult patron category
Update a child to adult
=> With this patch applied the error is gone and the patron has been
correctly updated

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19580: Exclude period as splitting character for autotrunction
Nick Clemens [Sat, 4 Nov 2017 01:01:42 +0000 (01:01 +0000)]
Bug 19580: Exclude period as splitting character for autotrunction

To test:
0 - Apply Unit test patch only
1 - prove t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t
2 - Should fail
3 - Apply this patch
4 - prove t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t
5 - should pass
6 - search for 'Local-number.raw:"4"' (or a vlid biblionumber)
7 - should get expected result

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19580: Unit tests
Nick Clemens [Sat, 4 Nov 2017 01:01:20 +0000 (01:01 +0000)]
Bug 19580: Unit tests

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18071: (QA follow-up) Rename commit to confirm parameter
Marcel de Rooy [Wed, 10 Jan 2018 12:31:49 +0000 (13:31 +0100)]
Bug 18071: (QA follow-up) Rename commit to confirm parameter

Trivial edit.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18071: Improve parameters handling
Jonathan Druart [Tue, 9 Jan 2018 19:56:38 +0000 (16:56 -0300)]
Bug 18071: Improve parameters handling

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18071: (QA Followup) - Add additional feedback and expand commit option
Nick Clemens [Fri, 5 Jan 2018 17:40:50 +0000 (17:40 +0000)]
Bug 18071: (QA Followup) - Add additional feedback and expand commit option

To test:
Test as before, verify commit option makes no changes and provides
additional feedback when verbose

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18071: (QA follow-up) Add commit parameter, add warning
Marcel de Rooy [Fri, 1 Dec 2017 11:29:48 +0000 (12:29 +0100)]
Bug 18071: (QA follow-up) Add commit parameter, add warning

Addressing points mentioned in comment12:
[1] Commit parameter.
[2] Warning if authid does not exist for -merge.

Test plan:
[1] Run update_authorities.pl -authid X -merge -ref Y -c
    where X does not exist in your db and Y does.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18071: Add authorities maintenance script
Marcel de Rooy [Tue, 7 Feb 2017 12:59:33 +0000 (13:59 +0100)]
Bug 18071: Add authorities maintenance script

With bug 9988 the manual merge option of merge_authorities was removed.
(Note that it did not work any more too.) This patch reintroduces this
functionality on the command line.

This maintenance script now allows you to force renumbering field 001 for
selected authid's, to delete authid's including the removal of references
in biblio records, as well as merging several authid's into one reference
record.

Test plan:
[1] Test the -renumber parameter. Field 001 and 005 should be updated.
[2] Test the -delete parameter. Check if a linked biblio does no longer
    contain a reference to the deleted authority.
[3] Test the -merge parameter.
    Create two PERSO_NAME records (say A,B) and attach biblios to them.
    Pick a CORPO_NAME record as reference record C.
    Now pass -merge -reference C -authid A,B
    Verify that A and B are gone, and the records link to C now.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19471: Show creation date in patron restrictions list
David Gustafsson [Mon, 16 Oct 2017 09:03:55 +0000 (11:03 +0200)]
Bug 19471: Show creation date in patron restrictions list

Test plan:
1. Go to the "Details" vertical tab of a patron.
2. Click the "Restriction" tab in the bottom and add a manual restriction.
3. Verify a creation date is visible.

4. Edit the same patron.
5. Under "Patron restrictions" verify the creation date of the listed
   restiction is visible.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 16782: Use uri filter instead of html
Jonathan Druart [Tue, 9 Jan 2018 20:20:42 +0000 (17:20 -0300)]
Bug 16782: Use uri filter instead of html

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 16782: (QA follow-up) Use Koha.Preference for staffClientBaseURL and provide...
Nick Clemens [Mon, 8 Jan 2018 15:37:45 +0000 (15:37 +0000)]
Bug 16782: (QA follow-up) Use Koha.Preference for staffClientBaseURL and provide classes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 16782: Disclose JSON URL for reports on the saved report page
Liz Rea [Thu, 19 Oct 2017 03:23:43 +0000 (16:23 +1300)]
Bug 16782: Disclose JSON URL for reports on the saved report page

It has always annoyed me that you had to look at the help to divine the url for a report.
This patch works it out and displays it for you in a new column on the saved reports table.

Requirements:
- OPACBaseURL and staffClientBaseURL preferences must be set for the urls to be complete. It's ok if they are not, but it's better if they are.
- You must have a saved report that is public to your OPAC, and one that is not public.

To test:
- create a public saved report and a private staff report. They can be anything.
- view the saved reports page, note that under a new heading of JSON URL the link to the json feed for that report shows.
- copying and pasting that link into the address bar, or clicking it, should take you to the results of the selected report.

sponsored-by: Catalyst IT

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Bug 16782 - missing </td>, fixed now

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 11046: Improve the readability of the regex using named capture
Jonathan Druart [Tue, 9 Jan 2018 20:13:41 +0000 (17:13 -0300)]
Bug 11046: Improve the readability of the regex using named capture

The tests tell me I am good

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 11046: Add the form YYY-? for uncertain years
Marcel de Rooy [Mon, 28 Aug 2017 11:14:08 +0000 (13:14 +0200)]
Bug 11046: Add the form YYY-? for uncertain years

This form occurred in Dutch ISBD rules.
The question mark should follow the hyphen(s).

Test plan:
Run t/db_dependent/Biblio/TransformMarcToKoha.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
TransformMarcToKoha tests passed. Also this patch passed QA test tool

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 11046: Better handling of uncertain years for publicationyear
Marcel de Rooy [Fri, 25 Aug 2017 05:39:16 +0000 (07:39 +0200)]
Bug 11046: Better handling of uncertain years for publicationyear

This patch makes it possible that uncertain year like 18.. or 197x are
converted to 1800 or 1970 in Koha field copyrightdate (MARC21) or
publicationyear (UNIMARC). (The corresponding MARC record will not be
changed obviously.)

This change will allow for better results when sorting search results or
list contents on copyrightdate. Currently, things like 18.. will sort
together with zero.

Note: The regex now allows four possible uncertain year markers: x or X,
question mark or dot.

Test plan:
[1] Run t/db_dependent/Biblio/TransformMarcToKoha.t
[2] Edit a biblio record. Save 18.. into 260c. Check biblio.copyrightdate.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Followed test plan, patch worked as described, it also passed QA test
tool

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18417: (follow-up) Document new shortcuts in dropdown
Nick Clemens [Tue, 24 Oct 2017 19:11:28 +0000 (19:11 +0000)]
Bug 18417: (follow-up) Document new shortcuts in dropdown

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18417: Advanced Editor (Rancor) add shortcuts for copyright symbols (C) (P)
Jesse Weaver [Tue, 10 Nov 2015 19:02:06 +0000 (12:02 -0700)]
Bug 18417: Advanced Editor (Rancor) add shortcuts for copyright symbols (C) (P)

To test:
1 - Apply patch
2 - Open advanced cataloging editor
3 - Try using Alt+P and Alt+C and note symbols are added
4 - Save record and ensure symbols are saved

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 13660: Exclude export phase and use existing exported MARCXML - rebuild_zebra_sli...
Olli-Antti Kivilahti [Tue, 3 Feb 2015 11:52:26 +0000 (13:52 +0200)]
Bug 13660: Exclude export phase and use existing exported MARCXML - rebuild_zebra_sliced.sh

When looking for a bad MARC Record using the rebuild_zebra_sliced.sh, it is
useful to skip the complete MARCXML exporting from Koha and reuse the exported
files for Zebra indexing.

This patch adds a new parameter:
    -x | --exclude-export Do not export Biblios from Koha, but use the existing
                          export-dir

Which depends on the:
     -d | --export-dir     Where rebuild_zebra.pl will export data
                           Default: $EXPORTDIR

 !---------!
! TEST PLAN !
 !---------!

1. Run
     "./rebuild_zebra_sliced.sh --length 1000"
   to export 1000 MARC Records
   and slice them to one big 1000-Record chunk.
2. Realize that you get an imaginary "stack smashing detected"-error crashing
   your indexing at some Record you dont know of and can't make out from the
   indexing logging.
3. Start looking for the bad Record by running:
     "./rebuild_zebra_sliced.sh --exlude-export --chunk-size 10"
   To skip Biblios export from Koha which takes ~2h and get straight into
   splitting your exported biblios to chunks of 10, and indexing them. You
   know which chunk fails so it is much easier to find the issue there.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 17833: Make sure this warning will not be ignored
Jonathan Druart [Fri, 5 Jan 2018 17:02:45 +0000 (14:02 -0300)]
Bug 17833: Make sure this warning will not be ignored

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 17833: Add a warning if memcached init failed
Olli-Antti Kivilahti [Mon, 2 Jan 2017 11:01:02 +0000 (13:01 +0200)]
Bug 17833: Add a warning if memcached init failed

If memcached or the connection to it is misconfigured, show simple warnings to help
identify the problem.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19280: refresh unblessed patron too
Jonathan Druart [Fri, 5 Jan 2018 14:00:07 +0000 (11:00 -0300)]
Bug 19280: refresh unblessed patron too

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19280: Pass a Koha::Patron to CanBookBeIssued
Jonathan Druart [Fri, 8 Sep 2017 15:51:28 +0000 (12:51 -0300)]
Bug 19280: Pass a Koha::Patron to CanBookBeIssued

We need to make subroutine from C4 use more Koha::Object objects
Seeing bug 19276, starting here is a good start.

Test plan:
The tests should still pass.

Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19568: Escape url params with url filter - opac-opensearch.tt
Jonathan Druart [Thu, 2 Nov 2017 19:13:32 +0000 (16:13 -0300)]
Bug 19568: Escape url params with url filter - opac-opensearch.tt

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19569: Set X-Frame-Options=SAMEORIGIN - opac-showmarc.ok
Jonathan Druart [Thu, 2 Nov 2017 19:14:12 +0000 (16:14 -0300)]
Bug 19569: Set X-Frame-Options=SAMEORIGIN - opac-showmarc.ok

Before and after:
wget 'http://catalogue.kohadev.org/cgi-bin/koha/opac-showmarc.pl?id=1&viewas=html'
must be the same

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19570: Add autocomplete=off to opac-main as well
Mark Tompsett [Mon, 6 Nov 2017 15:10:45 +0000 (15:10 +0000)]
Bug 19570: Add autocomplete=off to opac-main as well

To confirm all the files were modified for opac, typed
this:
$ git grep -i password | grep opac | grep -v "[.]po:" | grep
"opac[^/]*[.]tt:" | cut -f1 -d: | sort -u

The follow output was handled as follows:
    koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt
    koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt
    koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-passwd.tt
    koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-confirmation.tt
These were already done in the first patch.

    koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt
This already had the autocomplete modification.

    koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
This was a false-find. There was no modification necessary.

    koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt
This is the modal login in. This patch amends it.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19570: Add autocomplete='off' for login forms at the opac
Jonathan Druart [Thu, 2 Nov 2017 19:24:00 +0000 (16:24 -0300)]
Bug 19570: Add autocomplete='off' for login forms at the opac

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19319: Only fetch the record if it exists
Jonathan Druart [Fri, 8 Dec 2017 17:57:15 +0000 (14:57 -0300)]
Bug 19319: Only fetch the record if it exists

We already know if the bibliographic record exists (404 redirect),
we can avoid unecessary fetches

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19319: (QA follow-up) Biblionumber leftovers in opac-detail.tt
Marcel de Rooy [Fri, 8 Dec 2017 08:46:02 +0000 (09:46 +0100)]
Bug 19319: (QA follow-up) Biblionumber leftovers in opac-detail.tt

Correcting a few biblionumber template var leftovers in opac-detail
template. They were combined with url filter instead of html.

Test plan:
[1] Look for [^.;?]biblionumber in opac-detail.tt and verify that these
    occurrences are fine.

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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19319: Reflected XSS Vulnerability in opac-MARCdetail.pl
Kyle M Hall [Thu, 14 Sep 2017 15:52:08 +0000 (11:52 -0400)]
Bug 19319: Reflected XSS Vulnerability in opac-MARCdetail.pl

Try going to this URL on your site: /cgi-bin/koha/opac-MARCdetail.pl?biblionumber=2"><TEST>

Test Plan:
1) Go to /cgi-bin/koha/opac-MARCdetail.pl?biblionumber=2"><TEST>
2) Note <TEST> is embedded all over the html
3) Apply this patch
4) Refresh the page, note the injection is gone!
5) run koha qa test tools

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19611: Fix XSS Flaws in supplier.pl
Amit Gupta [Sun, 12 Nov 2017 15:44:41 +0000 (21:14 +0530)]
Bug 19611: Fix XSS Flaws in supplier.pl

Test
1. Hit the page /cgi-bin/koha/acqui/supplier.pl?op=enter
2. Add a text in the field Name that contains java script
3. Save the page.
4. Notice js is execute
5. Apply patch and reload the js is escaped

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19612: Fix XSS in members/memberentry.pl
Amit Gupta [Mon, 13 Nov 2017 03:35:14 +0000 (09:05 +0530)]
Bug 19612: Fix XSS in members/memberentry.pl

To Test
1. Hit the page /cgi-bin/koha/members/memberentry.pl
2. Add a text in the field address, address2, city, state, country,
   zipcode, B_streetnumber, B_city, B_country, B_zipcode that contains js
3. Save the page.
4. Notice js is execute
5. Apply patch and reload, the js is escaped

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19614: Fix XSS in members/pay.pl
Amit Gupta [Mon, 13 Nov 2017 03:57:44 +0000 (09:27 +0530)]
Bug 19614: Fix XSS in members/pay.pl

To Test
1. Hit the page /cgi-bin/koha/members/memberentry.pl
2. Add a text in the field firstname, surname that contains js
3. Save the page.
4. click on fine tab
5. Notice js is execute
6. Apply patch and reload, the js is escaped

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19913: Fix embedded HTML5 videos at the OPAC
Jonathan Druart [Wed, 3 Jan 2018 21:12:33 +0000 (18:12 -0300)]
Bug 19913: Fix embedded HTML5 videos at the OPAC

Caused by
commit 752aef4593f1aa2d64700bf9738e7e03907eb1cd
Bug 18754: Translatability: Get rid of exposed tt directives in opac-detail.tt

A space is missing between 'source' and 'src'

Test plan:
Set  HTML5MediaEnabled  to OPAC
Put a video link to 856$u
See the OPAC detail page, tab video, click the video
=> Should play with this patch applied

Note that this does not affect intranet

Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19914: Add an id to the Delete button on the library list view
Jonathan Druart [Thu, 4 Jan 2018 13:27:57 +0000 (10:27 -0300)]
Bug 19914: Add an id to the Delete button on the library list view

To ease selenium tests, see bug 19243.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19899: Restore Item floats feature - do not crash
Jonathan Druart [Fri, 5 Jan 2018 14:42:03 +0000 (11:42 -0300)]
Bug 19899: Restore Item floats feature - do not crash

Error is "The method noreturn is not covered by tests!"
caused by commit 6eade474ed3a84a5ba372a26ac27bf9fb4bd2299
Bug 18276: Remove GetBiblioFromItemNumber - Easy ones

When the "Return policy" (var returnbranch) is set to "Item floats" (value noreturn)
the library must be the current library (from userenv).
This behaviour is used in C4::Circulation::AddReturn

On bug 18276 I assumed that the value was either holdingbranch or
homebranch, and forgot it could be "noreturn"

Test plan:
Set Return policy to Item floats
Check an item in
=> without this patch it explodes
=> With this patch applied it will check the item in

Signed-off-by: Mohd Hafiz Yusoff <mhby87@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19918: Close span tag in opac-registration-confirmation.tt
Jonathan Druart [Fri, 5 Jan 2018 14:09:09 +0000 (11:09 -0300)]
Bug 19918: Close span tag in opac-registration-confirmation.tt

Introduced by:
commit 06f4950aa21ff889cff81f27b2f4e79788db193f
Bug 13599 - Add patron cardnumber to self registration confirmation

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>