koha.git
6 years agoBug 19760: Fix Config.t test
Jonathan Druart [Fri, 22 Dec 2017 17:04:52 +0000 (14:04 -0300)]
Bug 19760: Fix Config.t test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19760: Die if koha-conf is not accessible
Jonathan Druart [Wed, 6 Dec 2017 16:58:04 +0000 (13:58 -0300)]
Bug 19760: Die if koha-conf is not accessible

We got a lot of support questions because scripts are executed without
the correct environment/user.
We could die and provide more useful information

Tested on my kohadevbox VM by:

1) sudo chmod a-rx /etc/koha/sites/kohadev/koha-conf.xml
2) run help.pl from the command line to produce the desired die message
3) sudo chmod a+rx /etc/koha/sites/kohadev/koha-conf.xml
4) rerun help.pl successfully

Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 19760: Change wording

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: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19429: Rename .delete to .delete_invoice
Jonathan Druart [Thu, 21 Dec 2017 15:42:03 +0000 (12:42 -0300)]
Bug 19429: Rename .delete to .delete_invoice

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19867: Prevent HouseboundRoles.t to fail randomly
Jonathan Druart [Thu, 21 Dec 2017 17:45:51 +0000 (14:45 -0300)]
Bug 19867: Prevent HouseboundRoles.t to fail randomly

Here is just a guess but we need to tell TestBuilder the values of
housebound_deliverer and housebound_chooser to make sure it will not be
1

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
I manually tested setting to the opposite values in the tests, and
verified those values made the tests fail due to count problems.
The fix is valid.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19401: Add confirm message when deleting invoice
Aleisha Amohia [Tue, 3 Oct 2017 02:47:40 +0000 (02:47 +0000)]
Bug 19401: Add confirm message when deleting invoice

To test:
1) Go to Acquisitions
2) Go to Invoices (left nav menu)
3) Click Search (no need to filter results)
4) Click dropdown menu for an invoice, click Details
5) Click Delete
6) Notice invoice is deleted instantly
7) Apply patch and repeat steps 4 and 5
8) Confirm the confirm message shows and works as expected

Sponsored-by: Catalyst IT
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19429: Add confirm message when deleting invoice from invoice search page
Aleisha Amohia [Tue, 10 Oct 2017 02:17:36 +0000 (02:17 +0000)]
Bug 19429: Add confirm message when deleting invoice from invoice search page

To test:
To test:
1) Go to Acquisitions
2) Go to Invoices (left nav menu)
3) Click Search (no need to filter results)
4) Click dropdown menu for an invoice, click Delete
5) Notice invoice is deleted instantly
6) Apply patch and repeat steps 3 and 4
7) Confirm the confirm message shows and works as expected

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19756: Fix encoding issues during the update DB process
Jonathan Druart [Wed, 20 Dec 2017 21:59:39 +0000 (18:59 -0300)]
Bug 19756: Fix encoding issues during the update DB process

To display the output of the updatedatabase.pl under Plack, we redirect
the output to a temporary file, read it, then display it.
We need to open it specifying the correct encoding (utf-8).

Test plan:
1. MariaDB [koha_kohadev]> update systempreferences set value="17.1100000"
where variable="version";
2. restart plack
3. Login
4. Make the update from the interface
=> Without this patch you will see encoding issue:
Upgrade to 17.12.00.000 done (TÄ\93 tÅ\8dia, tÄ\93 haumatia)
=> With this patch applied you will see :
Upgrade to 17.12.00.000 done (Tē tōia, tē haumatia)

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19573: Link to make a new list in masthead in OPAC only appears / works if no...
Owen Leonard [Thu, 9 Nov 2017 15:54:12 +0000 (15:54 +0000)]
Bug 19573: Link to make a new list in masthead in OPAC only appears / works if no other list already exists

This patch corrects the OPAC masthead include file so that the "New
list" link will appear whether or not the logged-in user has existing
private lists.

To test, apply the patch and log into the OPAC as both a user with
private lists and a user without private lists. The header's "Lists"
dropdown menu should include a "New list" link in both cases.

Signed-off-by: Simon Pouchol <simon.pouchol@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 11976: Fix sorting issues
Jonathan Druart [Thu, 21 Dec 2017 15:57:11 +0000 (12:57 -0300)]
Bug 11976: Fix sorting issues

The last column must be sortable, and dates must use title-string
I removed the class on the th (did not seem useful as we have an id
already)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 11976: Add Publication date to subscription table (opac) + column settings
Mark Tompsett [Thu, 26 Oct 2017 15:41:34 +0000 (11:41 -0400)]
Bug 11976: Add Publication date to subscription table (opac) + column settings

This patch adds the column settings feature to the subscription list at
the OPAC.
It also adds a new column (Publication date) to this table

Using Home->Administration->Column Settings->OPAC->subscriptionst
the fields visibility can be toggled.

TEST PLAN
---------
1) Have a subscription where you have received at least once.
2) Look for it in OPAC and note the date is the received date, not the publication date
3) Apply patch
4) Log in to staff client
5) Home->Administration->Column Settings->OPAC->subscriptionst
6) Set visibility as desired.
7) Refresh OPAC page
   -- everything should be as expected.
8) run koha qa test tools.

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19725: OAI-PMH - Use biblio_metadata.timestamp
Julian Maurice [Fri, 1 Dec 2017 15:21:56 +0000 (15:21 +0000)]
Bug 19725: OAI-PMH - Use biblio_metadata.timestamp

Since bug 17196, biblioitems.timestamp is not always updated after a
change in the MARC record.
Filtering should be based on biblio_metadata.timestamp instead.

Test plan:
1. prove t/db_dependent/OAI/Server.t
2. Verify that it SUCCEEDS

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19725: Add failing test
Julian Maurice [Fri, 1 Dec 2017 15:18:04 +0000 (15:18 +0000)]
Bug 19725: Add failing test

Also fix tests for UNIMARC

Test plan:
1. prove t/db_dependent/OAI/Server.t
2. Verify that it FAILS

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19599: Speed anonymise_issue_history up
Jonathan Druart [Thu, 9 Nov 2017 13:34:08 +0000 (10:34 -0300)]
Bug 19599: Speed anonymise_issue_history up

The query generated by anonymise_issue_history is unecessary complex and
can be very slow on large DB.
With this patch we will execute one query per patron instead.

See patch "Bug 19599: Simplify the query" on the bug report for an
alternative.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19830: Add the Koha::Patron->old_checkouts method
Jonathan Druart [Mon, 18 Dec 2017 17:27:52 +0000 (14:27 -0300)]
Bug 19830: Add the Koha::Patron->old_checkouts method

Test plan:
  prove t/db_dependent/Koha/Patrons.t
must return green

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19694: Force scalar context for output_pref called with billingdate
Jonathan Druart [Tue, 19 Dec 2017 18:04:13 +0000 (15:04 -0300)]
Bug 19694: Force scalar context for output_pref called with billingdate

If no string is passed to output_pref, it needs to be called in scalar
context (to avoid a shift in the hash elements).
Here we have billingdate that is not defined yet (NULL)

Test plan:
- Search for an existing invoice
- Show details
- Changing shipping cost
- Save
- Verify the new amount is shown

Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 18201: Unit tests
Nick Clemens [Wed, 4 Oct 2017 12:10:13 +0000 (12:10 +0000)]
Bug 18201: Unit tests

To test:
1. prove -v t/db_dependent/Exporter/Record.t
2. Tests should pass/be green/make the day a little brighter

Signed-off-by: Scott Kehoe <scott@masslibsystem.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 18201: Export data -Fix "Remove non-local items" option and add "Removes non...
Nick Clemens [Thu, 13 Apr 2017 14:21:50 +0000 (10:21 -0400)]
Bug 18201: Export data -Fix "Remove non-local items" option and add "Removes non-local records" option for existing functionality

It turns out the modules had the option expected  built in, we just didn't call
it. This patch set expands the options for passing to the export.

To test:
1 - Go to Tools->Export data
2 - Perform an export and check 'Remove non-local items'
3 - Note that file contains only 'local' records, but includes all items
on those records
4 - Apply patch
5 - Note Tools->Export data has a new option to remove records not owned
by logged in branch
6 - Export as before checking records option, file should be as before
7 - Now check 'Remove items not owned by logged in branch'
8 - File should now only have local items (may have empty records)
9 - Check both boxes and recieve only 'local' records and items

Signed-off-by: Scott Kehoe <scott@masslibsystem.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19510: Add description for edi_manage in acquistion permissions
Chris Weeks [Mon, 18 Dec 2017 22:10:05 +0000 (22:10 +0000)]
Bug 19510: Add description for edi_manage in acquistion permissions

Test Plan:
1/ Login
2/ Select patrons
3/ Search for a patron by name or card number that exists in the system
4/ Click More -> Set permissions
5/ Expand 'acquistions' and notice that 'edi_manage' has no description
6/ Apply patch
7/ Refresh the permissions page or repeat steps 2 to 5.
8/ Notice that 'edi_manage' now has a description of 'Manage EDIFACT transmissions'

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: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19444: (QA follow-up) Remove repeating condition
Julian Maurice [Fri, 15 Dec 2017 09:08:11 +0000 (10:08 +0100)]
Bug 19444: (QA follow-up) Remove repeating condition

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19444: (QA follow-up) Fix tests for UNIMARC
Julian Maurice [Fri, 15 Dec 2017 08:46:54 +0000 (09:46 +0100)]
Bug 19444: (QA follow-up) Fix tests for UNIMARC

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19444: Display error message for auto_account_expired
Jonathan Druart [Tue, 5 Dec 2017 13:23:09 +0000 (10:23 -0300)]
Bug 19444: Display error message for auto_account_expired

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19444: Do not auto renew if patron is expired and BlockExpiredPatronOpacActions...
Jonathan Druart [Wed, 25 Oct 2017 19:51:28 +0000 (16:51 -0300)]
Bug 19444: Do not auto renew if patron is expired and BlockExpiredPatronOpacActions is set

If the patron's account has expired and BlockExpiredPatronOpacActions is set,
we expect auto renewal to be rejected.

Test plan:
Use the automatic_renewals.pl cronjob script to auto renew a checkout

Before this patch, if the patron's account has expired the auto renew was done.
With this patch, it will only be auto renewed if BlockExpiredPatronOpacActions is not set.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Conflicts:
t/db_dependent/Circulation.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19514: Add client-side check
Jonathan Druart [Mon, 6 Nov 2017 15:22:59 +0000 (12:22 -0300)]
Bug 19514: Add client-side check

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19514: Implement password restrictions into onboarding tool
Alex Buckley [Sat, 21 Oct 2017 00:54:23 +0000 (00:54 +0000)]
Bug 19514: Implement password restrictions into onboarding tool

Test plan:
1. Drop and recreate your database
2. Restart memcached
3. Go through the web installer
4. In the onboarding tool create a patron with a password of only 2 characters in length
5. Notice the patron is successfully created and no warning message is
displayed
6. Repeat step 1,2,3 and create a patron with a password of 3 characters
none of which are a uppercase letter or number and notice the patron is
successfully created and no warning message is displayed
7. Apply patch
8. Repeat steps 1,2,3 and create a patron with a password consisting of
2 characters, notice that after submitting the form the same form is
loaded again and there is a warning message at the top of the page
informing you the patron wasn't created
9. Repeat steps 1,2,3 and create a patron with a password consisting of
3 characters (all lower case) and submit the form, notice the same form
is reloaded and a warning message at the top of the page informs you
that the patron wasn't created because the password was weak
10. Repeat steps 1,2,3 and create a patron with a password consisting of
3 characters (one lower case letter, one upper case letter and one
number) and submit the form and notice this time the next form in the onboarding is displayed with the message at the top of the screen informing you that the patron was successfully created

Sponsored-By: Catalyst IT
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 11210: Writeoff partial amounts
David Bourgault [Mon, 25 Sep 2017 17:05:01 +0000 (13:05 -0400)]
Bug 11210: Writeoff partial amounts

Minor changes to pay.pl and paycollect.tt to allow writing off a partial amount of a fine.

Test plan:
0) Go to the Fines tab of a test patron's profile
1) Create a fine if there are none (under the Manual invoice tab)
2) Go to the "Pay fines" tab
3) Press the write off button on the corresponding account line

Without patch, you'll be asked to confirm, but will not be able to edit the amount
With patch, you'll be able to edit the amount.

Followed test plan, patch worked as described. Also ran QA test tool and
modified files passed

Signed-off-by: Simon Pouchol <simon.pouchol@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19450: Fixed WebService::ILS bug upstream (0.17)
Srdjan [Thu, 12 Oct 2017 00:45:43 +0000 (13:45 +1300)]
Bug 19450: Fixed WebService::ILS bug upstream (0.17)

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17770: Perltidy
Mark Tompsett [Tue, 7 Nov 2017 03:25:52 +0000 (03:25 +0000)]
Bug 17770: Perltidy

Signed-off-by: Your Full Name <your_email>
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17770: Improve perlcritic level
Mark Tompsett [Tue, 7 Nov 2017 03:21:36 +0000 (03:21 +0000)]
Bug 17770: Improve perlcritic level

before patch: perlcritic -4 noisy
after patch: perlcritic -4 ok

Signed-off-by: Your Full Name <your_email>
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17770: Fix Sitemapper.t if date changes during test run
Mark Tompsett [Mon, 6 Nov 2017 19:49:27 +0000 (19:49 +0000)]
Bug 17770: Fix Sitemapper.t if date changes during test run

To compensate, DateTime->now is mocked to the current date.

Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19845: Do not generate a password if one is filled on selfreg
Jonathan Druart [Wed, 20 Dec 2017 15:32:34 +0000 (12:32 -0300)]
Bug 19845: Do not generate a password if one is filled on selfreg

Bug 15343 allows patrons to choose their own passwords during self-registration.
But this does not work if the PatronSelfRegistrationVerifyByEmail preference is
set to "Require." If e-mail verification is required, whatever password the patron
supplied in the form is ignored, and they are given a randomly generated password
once they click on the verification link.

Test plan:
1. Make sure there is a valid e-mail stored in the KohaAdminEmailAddress preference.
2. Set PatronSelfRegistration to Allow.
3. Set PatronSelfRegistrationVerifyByEmail to Require.
3. Be sure "password" is listed in PatronSelfRegistrationBorrowerMandatoryField and
NOT listed in PatronSelfRegistrationBorrowerUnwantedField.
4. Be sure there is a valid patron category in PatronSelfRegistrationDefaultCategory.
5. Set PatronSelfRegistrationPrefillForm to "Display and prefill" so that you can see
the generated password.

Then fill out the self-registration form, include a valid e-mail address, and select
a password. Wait for the verification e-mail. Click on the link and you'll see that
the password you entered in the form is used.

Signed-off-by: Arturo <alongoria@sll.texas.gov>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19669: (QA follow-up) Remove itemstypes.plugin
Kyle M Hall [Thu, 21 Dec 2017 14:17:01 +0000 (09:17 -0500)]
Bug 19669: (QA follow-up) Remove itemstypes.plugin

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19669: Remove deprecated checkouts by patron category report
Owen Leonard [Tue, 21 Nov 2017 13:56:31 +0000 (13:56 +0000)]
Bug 19669: Remove deprecated checkouts by patron category report

Patch applies. Reports and general OPAC and staff client functionality is intact.
Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoMerge branch '17.11.x' of git.koha-community.org:koha into 1711_rel
Nick Clemens [Thu, 4 Jan 2018 16:11:45 +0000 (11:11 -0500)]
Merge branch '17.11.x' of git.koha-community.org:koha into 1711_rel

6 years agoMerge branch 'new/sec-release-17.11.01' of git.koha-community.org:security into 1711_rel
Nick Clemens [Fri, 22 Dec 2017 11:44:58 +0000 (06:44 -0500)]
Merge branch 'new/sec-release-17.11.01' of git.koha-community.org:security into 1711_rel

6 years agoUpdate release notes for the 17.11.01 release v17.11.01
Nick Clemens [Fri, 22 Dec 2017 11:33:36 +0000 (11:33 +0000)]
Update release notes for the 17.11.01 release

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoIncrement version for 17.11.01 release
Nick Clemens [Fri, 22 Dec 2017 11:11:23 +0000 (11:11 +0000)]
Increment version for 17.11.01 release

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoTranslation updates for Koha 17.11.01
root [Fri, 22 Dec 2017 10:55:58 +0000 (07:55 -0300)]
Translation updates for Koha 17.11.01

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19843: (bug 15839 follow-up) Set reviews.datereviewed when the review is made
Jonathan Druart [Tue, 19 Dec 2017 19:52:03 +0000 (16:52 -0300)]
Bug 19843: (bug 15839 follow-up) Set reviews.datereviewed when the review is made

Caused by
  commit 092ae340cef375cc66c8511fd34c1a4eec9c7ba6
    Bug 15839: Koha::Reviews - Remove savereview

the datereviewed=now() part of the query has not been translated.

Test plan:
Add a review from the OPAC
Confirm that the reviews.datereviewd has been correctly set. Without
this patch it is set to NULL.

I have no idea how we could update existing data :-/

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19843: (bug 15839 follow-up) Set reviews.datereviewed when the review is made
Jonathan Druart [Tue, 19 Dec 2017 19:52:03 +0000 (16:52 -0300)]
Bug 19843: (bug 15839 follow-up) Set reviews.datereviewed when the review is made

Caused by
  commit 092ae340cef375cc66c8511fd34c1a4eec9c7ba6
    Bug 15839: Koha::Reviews - Remove savereview

the datereviewed=now() part of the query has not been translated.

Test plan:
Add a review from the OPAC
Confirm that the reviews.datereviewd has been correctly set. Without
this patch it is set to NULL.

I have no idea how we could update existing data :-/

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19808: Handle deleted reviewers gracefully - reviews/reviewswaiting.pl
Jonathan Druart [Mon, 18 Dec 2017 16:32:19 +0000 (13:32 -0300)]
Bug 19808: Handle deleted reviewers gracefully - reviews/reviewswaiting.pl

Test plan:
- Create reviews
- Delete some reviewers
- Go to Home › Tools › Comments › Comments awaiting moderation

Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19808: Handle deleted reviewers gracefully - opac-showreview
Jonathan Druart [Mon, 18 Dec 2017 16:32:14 +0000 (13:32 -0300)]
Bug 19808: Handle deleted reviewers gracefully - opac-showreview

Test plan:
- Create reviews
- Delete some reviewers
- Enable OpacShowRecentComments
- Go to opac/opac-showreviews.pl
- Go to opac-showreviews.pl?format=rss

Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19808: (follow-up) Handle deleted reviewers gracefully - opac-detail
Jonathan Druart [Mon, 18 Dec 2017 16:32:02 +0000 (13:32 -0300)]
Bug 19808: (follow-up) Handle deleted reviewers gracefully - opac-detail

Make the tests easier to read

Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19808: Handle deleted reviewers gracefully - opac-detail
Victor Grousset [Fri, 15 Dec 2017 14:22:24 +0000 (15:22 +0100)]
Bug 19808: Handle deleted reviewers gracefully - opac-detail

And other display issues when the patron was NULL.
Which allows to keep the review even if it has no patron.
Because it might be useful.

For example when disconnected, the borrowernumber is null. So the
comments from deleted patrons were displayed as if the disconnected
user wrote them. So it had the edit button...

And fix borrowernumber not being passed to the template when
OpacStarRatings was false.

Test plan
1. Log in as a patron
2. Leave a comment/review on a record
3. Librarian: approve this comment
4. Delete the borrower
5. See the record (opac:/cgi-bin/koha/opac-detail.pl?biblionumber=RELEVANT_BIB_NUMBER)
6. Then you should see an error
7. Apply this patch
8. Refresh the page
9. Then you should see the record page with the comment

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19315: Prevent crash if no items and not library set for the subscription
Jonathan Druart [Thu, 21 Dec 2017 13:49:41 +0000 (10:49 -0300)]
Bug 19315: Prevent crash if no items and not library set for the subscription

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
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: Nick Clemens <nick@bywatersolutions.com>
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: Nick Clemens <nick@bywatersolutions.com>
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: Nick Clemens <nick@bywatersolutions.com>
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: Nick Clemens <nick@bywatersolutions.com>
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: Nick Clemens <nick@bywatersolutions.com>
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: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19570: Add autocomplete to opac-main as well
Mark Tompsett [Mon, 6 Nov 2017 15:10:45 +0000 (15:10 +0000)]
Bug 19570: Add autocomplete 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: Nick Clemens <nick@bywatersolutions.com>
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: Nick Clemens <nick@bywatersolutions.com>
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: Nick Clemens <nick@bywatersolutions.com>
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: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19806: Add classes to itemnotes in issues table
Nick Clemens [Thu, 14 Dec 2017 12:54:14 +0000 (12:54 +0000)]
Bug 19806: Add classes to itemnotes in issues table

To test:
1 - Checkout an item with both public and non-public notes
2 - Note the notes display and both have circ-hlt class
3 - Apply patch
4 - Ensure display has not changed
5 - Note notes now have classes 'item-note-public' and
'item-note-nonpublic'
6 - Sign off

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 19806: Add classes to itemnotes in issues table
Nick Clemens [Thu, 14 Dec 2017 12:54:14 +0000 (12:54 +0000)]
Bug 19806: Add classes to itemnotes in issues table

To test:
1 - Checkout an item with both public and non-public notes
2 - Note the notes display and both have circ-hlt class
3 - Apply patch
4 - Ensure display has not changed
5 - Note notes now have classes 'item-note-public' and
'item-note-nonpublic'
6 - Sign off

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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19759: Fix failing test in Chargelostitem.t
Jonathan Druart [Mon, 18 Dec 2017 17:47:37 +0000 (14:47 -0300)]
Bug 19759: Fix failing test in Chargelostitem.t

 t/db_dependent/Circulation/Chargelostitem.t .. 1/6
 #   Failed test 'The accountline amount should be precessfee value '
 #   at t/db_dependent/Circulation/Chargelostitem.t line 71.
 #          got: '4.5968041848873e+20'
 #     expected: '459680418488730451968.00'

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19759: Fix failing test in Chargelostitem.t
Jonathan Druart [Mon, 18 Dec 2017 17:47:37 +0000 (14:47 -0300)]
Bug 19759: Fix failing test in Chargelostitem.t

 t/db_dependent/Circulation/Chargelostitem.t .. 1/6
 #   Failed test 'The accountline amount should be precessfee value '
 #   at t/db_dependent/Circulation/Chargelostitem.t line 71.
 #          got: '4.5968041848873e+20'
 #     expected: '459680418488730451968.00'

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19759: Make TestBuilder generates only 2 decimals for float
Jonathan Druart [Wed, 6 Dec 2017 16:03:15 +0000 (13:03 -0300)]
Bug 19759: Make TestBuilder generates only 2 decimals for float

For instance items.replacementprice is decimal(8,2) but more than 2 decimals are generated.

It leads to issues when we compare expected objects:

    #          got: '135623.866142537'
    #     expected: '135623.87'

Test plan:
  prove t/db_dependent/TestBuilder.t
must return green

Signed-off-by: Dominic Pichette <dominic@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Somehow I have the feeling that we should allow more decimals sometimes
and perhaps have a number of decimals parameter or so. Think of fields
like currency or discount.
But the current issues justify this change.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19759: Make TestBuilder generates only 2 decimals for float
Jonathan Druart [Wed, 6 Dec 2017 16:03:15 +0000 (13:03 -0300)]
Bug 19759: Make TestBuilder generates only 2 decimals for float

For instance items.replacementprice is decimal(8,2) but more than 2 decimals are generated.

It leads to issues when we compare expected objects:

    #          got: '135623.866142537'
    #     expected: '135623.87'

Test plan:
  prove t/db_dependent/TestBuilder.t
must return green

Signed-off-by: Dominic Pichette <dominic@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Somehow I have the feeling that we should allow more decimals sometimes
and perhaps have a number of decimals parameter or so. Think of fields
like currency or discount.
But the current issues justify this change.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19706: (QA follow-up) Hide the collection code selector if no value is defined...
Josef Moravec [Sun, 17 Dec 2017 07:24:53 +0000 (07:24 +0000)]
Bug 19706: (QA follow-up) Hide the collection code selector if no value is defined (for consistency)

Test plan:
0) Go to item search
1) Do have some authorized values in CCODE category -> selector of
collection is visible
2) Don't have any authorized value in CCODE category -> selector of
collection is not visible

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19706: (QA follow-up) Hide the collection code selector if no value is defined...
Josef Moravec [Sun, 17 Dec 2017 07:24:53 +0000 (07:24 +0000)]
Bug 19706: (QA follow-up) Hide the collection code selector if no value is defined (for consistency)

Test plan:
0) Go to item search
1) Do have some authorized values in CCODE category -> selector of
collection is visible
2) Don't have any authorized value in CCODE category -> selector of
collection is not visible

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19706: Fix bad json formed when there are no CCODE values
Nick Clemens [Tue, 12 Dec 2017 11:15:34 +0000 (11:15 +0000)]
Bug 19706: Fix bad json formed when there are no CCODE values

To test:
1 - Delete all ccode values in your system
2 - Load the item search page
3 - View the console and note a js error
4 - Try to perform an item search to screen
5 - Internal server error ("unsupported format 'html'" in logs)
6 - Apply patch
7 - Reload page
8 - Note js error is gone
9 - Perform search to screen, success!

To test there is no regression:
1 - Have some values in CCODE authorised values
2 - Ensure collection drop down on item search displays correctly
3 - Ensure item search returns results ot screen with no js errors

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

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19706: Fix bad json formed when there are no CCODE values
Nick Clemens [Tue, 12 Dec 2017 11:15:34 +0000 (11:15 +0000)]
Bug 19706: Fix bad json formed when there are no CCODE values

To test:
1 - Delete all ccode values in your system
2 - Load the item search page
3 - View the console and note a js error
4 - Try to perform an item search to screen
5 - Internal server error ("unsupported format 'html'" in logs)
6 - Apply patch
7 - Reload page
8 - Note js error is gone
9 - Perform search to screen, success!

To test there is no regression:
1 - Have some values in CCODE authorised values
2 - Ensure collection drop down on item search displays correctly
3 - Ensure item search returns results ot screen with no js errors

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

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19767: Remove unused serial-issues.pl script
Owen Leonard [Mon, 11 Dec 2017 16:47:00 +0000 (16:47 +0000)]
Bug 19767: Remove unused serial-issues.pl script

This patch removes three unused files:

serials/serial-issues.pl

...and its associated templates:

koha-tmpl/intranet-tmpl/prog/en/modules/serials/serial-issues-full.tt
koha-tmpl/intranet-tmpl/prog/en/modules/serials/serial-issues.tt

To test, apply the patch and search the Koha codebase for references to
any of those files. None should exist.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19767: Remove unused serial-issues.pl script
Owen Leonard [Mon, 11 Dec 2017 16:47:00 +0000 (16:47 +0000)]
Bug 19767: Remove unused serial-issues.pl script

This patch removes three unused files:

serials/serial-issues.pl

...and its associated templates:

koha-tmpl/intranet-tmpl/prog/en/modules/serials/serial-issues-full.tt
koha-tmpl/intranet-tmpl/prog/en/modules/serials/serial-issues.tt

To test, apply the patch and search the Koha codebase for references to
any of those files. None should exist.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19560: Correctly escape branchcode in admin/branches.pl
Jonathan Druart [Wed, 29 Nov 2017 18:24:40 +0000 (15:24 -0300)]
Bug 19560: Correctly escape branchcode in admin/branches.pl

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19560: Correctly escape branchcode in admin/branches.pl
Jonathan Druart [Wed, 29 Nov 2017 18:24:40 +0000 (15:24 -0300)]
Bug 19560: Correctly escape branchcode in admin/branches.pl

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17182: (QA follow-up) Fix call to GetMarcBiblio
Julian Maurice [Fri, 8 Dec 2017 14:31:49 +0000 (15:31 +0100)]
Bug 17182: (QA follow-up) Fix call to GetMarcBiblio

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 17182: (QA follow-up) Fix call to GetMarcBiblio
Julian Maurice [Fri, 8 Dec 2017 14:31:49 +0000 (15:31 +0100)]
Bug 17182: (QA follow-up) Fix call to GetMarcBiblio

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17182: Allow Keyword to MARC mapping for acquisitions searches
Nick Clemens [Wed, 19 Jul 2017 14:10:05 +0000 (14:10 +0000)]
Bug 17182: Allow Keyword to MARC mapping for acquisitions searches

This patchset adds the 'subtitle' field to the results display on
acquistions search for adding an order form an existing item.

Any field mapped to 'subtitle' in 'Keyword to MARC mapping' will be
fetched and displayed in the results

To test:
1 - Perform an acquisitions search for existing record
2 - Note record subtitles are not displayed
3 - Map 245$b and 245$n to 'subtitle' in 'Keyword to MARC mapping'
4 - Note they are still not displayed ion acq results
5 - Apply patch
6 - subtitle fields should now display

Sponsored by: Round Rock Public Library
<https://www.roundrocktexas.gov/departments/library/>

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 17182: Allow Keyword to MARC mapping for acquisitions searches
Nick Clemens [Wed, 19 Jul 2017 14:10:05 +0000 (14:10 +0000)]
Bug 17182: Allow Keyword to MARC mapping for acquisitions searches

This patchset adds the 'subtitle' field to the results display on
acquistions search for adding an order form an existing item.

Any field mapped to 'subtitle' in 'Keyword to MARC mapping' will be
fetched and displayed in the results

To test:
1 - Perform an acquisitions search for existing record
2 - Note record subtitles are not displayed
3 - Map 245$b and 245$n to 'subtitle' in 'Keyword to MARC mapping'
4 - Note they are still not displayed ion acq results
5 - Apply patch
6 - subtitle fields should now display

Sponsored by: Round Rock Public Library
<https://www.roundrocktexas.gov/departments/library/>

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoUpdate version after bug 19724
Nick Clemens [Wed, 20 Dec 2017 11:30:14 +0000 (11:30 +0000)]
Update version after bug 19724

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19769: 'Pickup library is different' message does not display library branch...
Claire Gravely [Thu, 7 Dec 2017 07:35:37 +0000 (07:35 +0000)]
Bug 19769: 'Pickup library is different' message does not display library branch name when placing hold

When placing a hold for a patron whose pickup library and home library
are different, the message displayed only shows the branch code and not
the branch name.

This patch displays the branch name as well as the branch code.

To test:
1. Search for an item
2. Click 'place hold'
3. Enter patron name/card number for a patron whose home library is
   different to the item's
4. Note the message displayed only shows the branch code but not the
   name
5. Apply Patch
6. Repeat 1-3
7. Message should now also display the branch name

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

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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19746: Remove debug statements in returns.pl
Jonathan Druart [Mon, 4 Dec 2017 19:07:52 +0000 (16:07 -0300)]
Bug 19746: Remove debug statements in returns.pl

From bug commit bb6277ffcc593685554112d770ac273c9efeda33
Bug 14464: Add ability to cancel waiting holds from checkin screen

+use Carp 'verbose';
+$SIG{ __DIE__ } = sub { Carp::confess( @_ ) };

See also
http://lists.koha-community.org/pipermail/koha-devel/2017-November/044168.html

Test plan:
Read the changes and make sure they make sense

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 3841: Add the ACQ framework for new installations
Jonathan Druart [Thu, 26 Oct 2017 18:41:47 +0000 (15:41 -0300)]
Bug 3841: Add the ACQ framework for new installations

This patch adds the acquisition frameworks (frameworkcode=ACQ) for new
installations.
It copies the 952 (MARC21) or 995 (UNIMARC) fields from the default
framework (frameworkcode='')

Test plan:
Create a new installation and make sure the ACQ framework exists.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19563: (follow-up) Restore checking sort variable
Nick Clemens [Fri, 17 Nov 2017 12:13:55 +0000 (12:13 +0000)]
Bug 19563: (follow-up) Restore checking sort variable

This code seems a bit odd, $self->sort_fields()->{$name} is checking if
there is any mapping in ES for a field, so if one marc field in an index
is marked as sortable this will exists. We need to check the individual
marc field to see if it should be added to the sort index here.

If you apply the first patch, reindex, and view a record in es:
curl -XGET 'localhost:9200/koha_kohadev_biblios/data/19/?pretty' | grep
-A 10 author__sort

You will see that 245$c is included in the record without that
additional check

Apply this, reindex again, and that field should not be included

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19563: Unit tests
Nick Clemens [Fri, 17 Nov 2017 12:12:32 +0000 (12:12 +0000)]
Bug 19563: Unit tests

To test:
1 - Apply first patch and this patch
2 - prove -v t/db_dependent/Koha_Elasticsearch.t
3 - New tests will fail
4 - Apply followup patch
5 - Tests shuld pass

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19563: Generation of sort_fields uses incorrect condition
David Gustafsson [Thu, 2 Nov 2017 12:44:13 +0000 (13:44 +0100)]
Bug 19563: Generation of sort_fields uses incorrect condition

Fix incorrect condition for if clause for generating <field>__sort mappings
for Elasticsearch. Also remove redundant check for same condition when
generating fixer rules.

Test plan:
1. Inspect current mappings for example by viewing: http://<elasticsearch_host>:9200/koha_<koha_instance_name>_biblios/_mapping.
2. If using the default configuraion only "author" has a sort field (author__sort).
4. Appy patch.
5. Reindex using rebuild_elastic_search.pl.
6. All fields except those with sort sort set to "0" should now have sort fields, which in the default configuration is all but "author".

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19439: (follow-up) Remove four spaces from lines 133-149
Marcel de Rooy [Tue, 10 Oct 2017 13:50:24 +0000 (15:50 +0200)]
Bug 19439: (follow-up) Remove four spaces from lines 133-149

Speaks for itself. No test plan.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19439: Remove eval with exit statements from opac/unapi
Marcel de Rooy [Mon, 9 Oct 2017 13:12:05 +0000 (15:12 +0200)]
Bug 19439: Remove eval with exit statements from opac/unapi

The script contains some error responses that get lost when using them
in an eval statement. (Since exit should not be used within an eval
construction.) The eval is removed now.

Test plan:
[1] Before applying this patch, you could look at the current responses
    from unapi for the calls in the next steps. Apply the patch now.
[2] Call http(s)://[your-server]/cgi-bin/koha/unapi with only a format
    parameter.
    Check if you have a 400 status response. (In Firefox, look at Network
    tab of Developer Tools.)
    Note: Have to admit (reluctantly) that MS Edge shows the status code in
    the browser rightaway in contrast with Firefox.
[3] Call unapi with a format=marcxml&id=999
    The wrong id parameter should trigger a 404 response.
[4] Call unapi with format=marcxml&id=koha:biblionumber:[notexist]
    where notexist is a biblionumber that not exists.
    This should trigger again a 404 response.
[5] Call unapi with format=marcxmlx&id=koha:biblionumber:[exist]
    where exist should be a good biblionumber.
    The wrong format should trigger a 406 response.
[6] Bonus: The 500 response can be tested by manipulating a XSLT file.
    Create invalid xml in the file for marcxml (identity.xsl in intranet
    xslt folder).
    Call unapi with format=marcxml&id=koha:biblionumber:[exist].
    You should get a 500 response and have warnings in your logfile.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19292: Add MARC code column on libraries list
Josef Moravec [Fri, 6 Oct 2017 07:26:31 +0000 (07:26 +0000)]
Bug 19292: Add MARC code column on libraries list

Test plan:
0) Apply the patch
1) Go to admin/branches.pl
2) In the list of libraries, you should see new column "MARC Organization Code"
3) Insert some codes to some libraries
4) Confirm they are shown in new column

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Fixed capitalization.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19751: Holds awaiting pickup report should not be fixed-width
Owen Leonard [Tue, 5 Dec 2017 15:26:58 +0000 (15:26 +0000)]
Bug 19751: Holds awaiting pickup report should not be fixed-width

This patch changes the grid used for the holds awaiting pickup report so
that the results are full page and fluid instead of fixed-width.

To test, apply this patch and the patch for Bug 19700 if necessary.

View the holds awaiting pickup report. The report should fluidly fill
the page width.

Test with the CircSidebar system preference enabled and disabled.

Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: BWS Sandboxes <ByWaterSandboxes@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19775: Try & prevent Search/History.t to fail randomly
Jonathan Druart [Thu, 7 Dec 2017 16:41:06 +0000 (13:41 -0300)]
Bug 19775: Try & prevent Search/History.t to fail randomly

 #   Failed test 'There are still 8 searches after calling delete with an interval = 6 days'
 #   at t/db_dependent/Search/History.t line 185.
 #          got: '6'
 #     expected: '8'

 #   Failed test 'There are still 2 searches after calling delete with an interval = 2 days'
 #   at t/db_dependent/Search/History.t line 191.
 #          got: '0'
 #     expected: '2'
 # Looks like you failed 2 tests of 27.
[15:04:12] t/db_dependent/Search/History.t

It looks like it does not longer fail with this change (date comparaison wrongly rounded to second in mysql?)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 7143: Update about page for new dev - Victor Grousset
Jonathan Druart [Thu, 7 Dec 2017 14:28:54 +0000 (11:28 -0300)]
Bug 7143: Update about page for new dev - Victor Grousset

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19496: ReplytoDefault is a pref, not a C4::Context method
Jonathan Druart [Thu, 7 Dec 2017 13:52:28 +0000 (10:52 -0300)]
Bug 19496: ReplytoDefault is a pref, not a C4::Context method

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19496: Fixing to_address for patron notes
Aleisha Amohia [Mon, 27 Nov 2017 21:33:58 +0000 (21:33 +0000)]
Bug 19496: Fixing to_address for patron notes

This patch ensures the patron note to_address is the branch email or the
Koha Admin email, and the from_address is the patron's email.

To test:
1) Ensure syspref 'allowcheckoutnotes' is turned on
2) Go to OPAC, leave a note on a checkout
3) Confirm that the note is received (in mysql message_queue) but the
to_address is the patron's email - this is wrong
4) Apply patch and refresh OPAC
5) Leave a note on a checkout
6) Confirm that the note is received in message queue
7) Confirm that the to_address is one of:
- branch email
- branch reply to
- syspref ReplytoDefault
- syspref KohaAdminEmailAddress
8) Confirm that the from_address is one of:
- patron email
- patron emailpro
- patron B_email

Sponsored-by: Catalyst IT
Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19724: DBIC Schema changes
Jonathan Druart [Thu, 7 Dec 2017 13:26:32 +0000 (10:26 -0300)]
Bug 19724: DBIC Schema changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18907: Build has deprecating message
Mark Tompsett [Thu, 6 Jul 2017 15:42:43 +0000 (15:42 +0000)]
Bug 18907: Build has deprecating message

Following the instructions at:
https://wiki.koha-community.org/wiki/Building_Debian_Packages_-_The_Easy_Way
Receiving the following message in the build:
dpkg-source: warning: relation < is deprecated: use << or <=

This patch tweaks the list-deps.
git diff origin/master -- debian/list-deps shows just the one line
changed from < to << as per the messages suggestion and eythian's
suggestion on IRC:
http://irc.koha-community.org/koha/2017-07-06#i_1950698

The control file can be regenerated from the command-line:
./debian/update-control
However, it will be attached separately.

Signed-off-by: Josef Moravec <josef.moravec@gmail.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: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 12497: Fix OPAC search history reachable by URL even when disabled
Victor Grousset [Fri, 24 Nov 2017 11:02:47 +0000 (12:02 +0100)]
Bug 12497: Fix OPAC search history reachable by URL even when disabled

Test plan:
1. Set EnableOpacSearchHistory syspref to "Keep"
2. Make a search in the OPAC
3. Go to /cgi-bin/koha/opac-search-history.pl
4. Set the EnableOpacSearchHistory syspref to "Don't keep"
5. Refresh the OPAC page to show that history is still accessible
6. Apply the patch
7. Refresh the OPAC page, you should end on the 404 page
8. Set EnableOpacSearchHistory syspref to "Keep"
9. Go to /cgi-bin/koha/opac-search-history.pl which should be reachable

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Charles Farmer <charles.farmer@inLibro.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: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 12497: Fix search history non-accessible when OPAC was private
Victor Grousset [Thu, 23 Nov 2017 15:03:14 +0000 (16:03 +0100)]
Bug 12497: Fix search history non-accessible when OPAC was private

(when the user didn't have the "borrowers" permission)

Test plan:
1. Set syspref "OpacPublic" to false (Disable)
2. Log in as a user without any permission
3. Try to access the search history. The link is next to "Log out"
4. Then you should see "Access denied"
5. Apply this patch
6. Refresh the page
7. Then you should see the search history

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Charles Farmer <charles.farmer@inLibro.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: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19674: Broken indicators of changed fields in manage staged MARC records template
Owen Leonard [Tue, 21 Nov 2017 16:17:32 +0000 (16:17 +0000)]
Bug 19674: Broken indicators of changed fields in manage staged MARC records template

This patch returns some CSS to the manage staged MARC records template
which was incorrectly removed by Gug 16538.

To test, apply the patch and go to Tools -> Staged MARC management.
Choose a staged MARC file.

Changing any of the <select> fields in the first section should cause a
label to appear showing that the selection has changed, along with a
link to reset the option to its original state. Clicking 'Reset' should
make the label and the link disappear.

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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19602: Add usage statistics link to administration sidebar menu
Owen Leonard [Thu, 9 Nov 2017 16:47:42 +0000 (16:47 +0000)]
Bug 19602: Add usage statistics link to administration sidebar menu

This patch adds a link to the new usage statistics page in the
administration sidebar menu.

To test, apply the patch and view an administration page which includes
the admin sidebar. Confirm that the link to usage statistics is there.

Visit the usage statistics page and confirm that the usage statistics
link in the sidebar is display in bold.

Signed-off-by: Simon Pouchol <simon.pouchol@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19595: Clicking plugin link does not fill item's date acquired field
Owen Leonard [Fri, 10 Nov 2017 12:59:58 +0000 (12:59 +0000)]
Bug 19595: Clicking plugin link does not fill item's date acquired field

This patch updates the dateaccessioned plugin for the item edit form to
return functionality which was removed in a previous patch.

To test, apply the patch and open an item for editing. Clicking the
"..." link next to the "Date acquired" field should insert the current
date, overwriting the existing date.

Open a blank item add form. Putting the cursor in the "Date acquired"
field should automatically insert the current date.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Added a comment line in set_to_today.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19551: Fix wrong order of operations in cash register report
Nick Clemens [Tue, 31 Oct 2017 13:17:26 +0000 (13:17 +0000)]
Bug 19551: Fix wrong order of operations in cash register report

To test:
1 - Find or create a fine for a patron
2 - Write it off
3 - Home -> Reports -> Cash register
4 - Fill in current date and transaction type 'Write off'
5 - Click Submit
-- see your write off
6 - Fill in previous dates and transaction type 'Write off'
7 - Click Submit
-- see your write off (bad)
8 - Apply patch
9 - Rerun steps 3-7
-- write only visible for current date.

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: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19724: DBRev 17.11.00.001
Nick Clemens [Thu, 14 Dec 2017 12:03:10 +0000 (12:03 +0000)]
Bug 19724: DBRev 17.11.00.001

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19724: Add timestamp to biblio_metadata and deletedbiblio_metadata
Nick Clemens [Thu, 14 Dec 2017 12:01:38 +0000 (12:01 +0000)]
Bug 19724: Add timestamp to biblio_metadata and deletedbiblio_metadata

Since bug 17196, biblioitems.timestamp is not always updated after a
change in the MARC record.
We need to know the last modification time of the MARC record for some
features (like OAI-PMH parameters 'from' and 'until' for instance)

This patch only adds the missing column in biblio_metadata and
deletedbiblio_metadata

Test plan:
1. Run updatedatabase.pl
2. Verify that both tables have the new column, its value should be the
   greatest timestamp value from the corresponding biblio and
   biblioitems table entries
   You can verify with the following SQL query:
     SELECT b.biblionumber, b.timestamp as biblio_ts,
     bi.timestamp as biblioitems_ts, m.timestamp as biblio_metadata_ts
     FROM biblio_metadata m
     LEFT JOIN biblioitems bi ON (bi.biblionumber = m.biblionumber)
     LEFT JOIN biblio b ON (b.biblionumber = m.biblionumber);

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druat <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19638: Remove false positive obsolete reports (auth_header.marcxml)
Jonathan Druart [Mon, 4 Dec 2017 18:39:48 +0000 (15:39 -0300)]
Bug 19638: Remove false positive obsolete reports (auth_header.marcxml)

Bug 17898 tries to help users identify reports affected by the move of marcxml to the biblio_metadata table, however, the auth_header table still uses the column name 'marcxml' and so reports as needing updated though it doesn't.

C4::Reports::Guided::convert_sql only converts if the sql query contain biblioitems and marcxml.
We should use the same regexp in the controler script.

Test plan:
Use a sql report that use auth_header.marcxml (see https://wiki.koha-community.org/wiki/SQL_Reports_Library)
After the this the report should not be longer marked as obsolete on the report list view

Replicated bug with the following SQL:
select marcxml from auth_header;

Patch applied correctly and functioned as expected.

Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 7143: Update about page for new dev - Simon Pouchol
Jonathan Druart [Thu, 7 Dec 2017 12:47:28 +0000 (09:47 -0300)]
Bug 7143: Update about page for new dev - Simon Pouchol

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 10222: Correct and expand to other languages
Mark Tompsett [Mon, 23 Oct 2017 14:00:53 +0000 (14:00 +0000)]
Bug 10222: Correct and expand to other languages

This added column names, and reformated to be a bit more readable.
This also adds this change to de-DE, es-ES, fr-CA, and nb-NO.
While there was printer_profiles for it-IT, the Italian file seems
to not use the same numbers, and does not visibly look like it needs
these changes.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>