]> git.koha-community.org Git - koha.git/log
koha.git
7 years agoBug 9988: Few subtle changes for postponed merge
Marcel de Rooy [Thu, 23 Feb 2017 11:46:52 +0000 (12:46 +0100)]
Bug 9988: Few subtle changes for postponed merge

The fails in the previous test showed that we need the first three
changes here. Some final polishing in points 4 to 6.

[1] Sub merge: Refine the condition for initializing $tags_new.
    A postponed 'modify'-merge (A to B) makes that $authtypefrom is not
    defined when running merge later. When crossing the type boundary, we
    need a new field too.
[2] Sub merge: Add condition for an empty @record_to array.
    This indicates also that a field should be removed, since we should
    otherwise only add a $9 subfield.
[3] Sub merge: Adjust initializing @record_from.
    This change is tested by verifying a cleared subfield in the test.
[4] DelAuthority: Adding a skipmerge parameter to allow the call from
    authorities/merge.pl to skip an unneeded merge.
    This also prevents that the 'delete-merge' would precede the
    'modify-merge' under a hypothetical race condition.
[5] DelAuthority: There is actually no need to call GetAuthority.
    The subfields of the old record are not relevant in this case.
[6] Added a few POD lines to merge.
[7] Removed a trailing space in a comment line in merge.

Test plan:
[1] Run t/db_dependent/Authorities/Merge.t.
    The last subtest should no longer fail now.
[2] See test plan of next patch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 9988: Add a subtest for specific postponed merge issues
Marcel de Rooy [Thu, 23 Feb 2017 11:46:52 +0000 (12:46 +0100)]
Bug 9988: Add a subtest for specific postponed merge issues

This subtest shows that we need a few little tweaks to make merge
work in some specific postponed merge situations.

Test plan:
[1] Run t/db_dependent/Authorities/Merge.t.
    The last subtest should fail.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 9988: Remove further references to dontmerge
Marcel de Rooy [Wed, 22 Feb 2017 09:53:03 +0000 (10:53 +0100)]
Bug 9988: Remove further references to dontmerge

[1] The preference was sent to HEA. We can now send both AuthorityMergeMode
    as well as AuthorityMergeLimit.
[2] A comment in authorities/merge.pl is removed. Note that a subsequent
    patch will modify and test the cron job.
[3] Script misc/batchRebuildItemsTables.pl temporarily enabled dontmerge.
    This is equivalent to setting the mergelimit to zero.
    The function defnonull is no longer needed. (If the pref was NULL,
    we restore that value. Sub merge won't mind.)

Test plan:
[1] Run t/db_dependent/UsageStats.t
[2] Run misc/batchRebuildItemsTables.pl -t
    This just ensures you it still compiles; the changes speak for itself.
[3] Now git grep on dontmerge.
    You should only find hits in atomicupdate and misc/translator/po.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 9988: Check the merge limit in sub merge
Marcel de Rooy [Tue, 21 Feb 2017 10:54:23 +0000 (11:54 +0100)]
Bug 9988: Check the merge limit in sub merge

At this point, we are replacing dontmerge functionality by the new
AuthorityMergeLimit logic. Instead of doing this check before calling
merge, we just call merge and check it there. In order to let the cron
job do the larger (postponed) merges, we add a parameter override_limit.

A subtest is added in Merge.t to test the 'postponed merge' feature. Since
merge now also calls get_usage_count, an additional mock is added. All
references to dontmerge are removed.

In merge two lines, initializing $dbh and $counteditbiblios, are moved.
The dontmerge test in DelAuthority and ModAuthority is removed. Since this
did not leave much in ModAuthority, I fixed the whitespace on the remaining
lines rightaway (yes, I know).
A minimal set of changes is applied to the cron script; it will get further
attention on a next patch.

Test plan:
[1] Run t/db_dependent/Authorities/Merge.t
[2] Set AuthorityMergeLimit to 2. Modify an authority with two linked
    biblios. Check that the merge was done immediately.
[3] Now modify an authority with more than 2 linked records.
    Verify that the merge was postponed; a record must be inserted in
    the need_merge_authorities table.
[4] Testing of the merge cron job is *postponed* to a next patch.
    Note: I tested a modification, but the script just needs more
    attention.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 9988: Remove the Zebra code from sub merge
Marcel de Rooy [Tue, 21 Feb 2017 08:22:59 +0000 (09:22 +0100)]
Bug 9988: Remove the Zebra code from sub merge

Since we can now call linked_biblionumbers, we can now remove all Zebra
related code from merge. We also add a parameter biblionumbers; we use it
in the test now, but it may be handy too later in the maintenance script
when we want to trigger a merge for specific biblionumber(s). See bug
report 18071.

All mocks for ZOOM, Context::Zconn, Search::new_record_for_zebra in the
merge test can now be replaced by one mock for linked_biblionumbers. Note
that we test the biblionumbers parameter in the last subtest without that
mock.

Remove unused vars $countunmodifiedbiblio, $counterrors from merge.
Renamed zebrarecords to linkedrecords in the Merge test.

Test plan:
[1] Run t/db_dependent/Authorities/Merge.t
[2] Modify an authority record. Check the linked biblio records.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 9988: Merge should have a parameter hash
Marcel de Rooy [Tue, 21 Feb 2017 07:39:24 +0000 (08:39 +0100)]
Bug 9988: Merge should have a parameter hash

We will need a few additional parameters for merge later on. This patch
puts the original parameters in a parameter hash.
For the same reason DelAuthority gets a parameter hash here.

Note: We remove the second parameter from the DelAuthority call in
authorities/authorities-home.pl here. It was not used and could have
presented problems in the future.

Test plan:
[1] Run t/db_dependent/AuthoritiesMarc.t.
[2] Run t/db_dependent/Authorities/Merge.t.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 9988: Add get_usage_count and linked_biblionumbers to Koha::Authority
Marcel de Rooy [Wed, 15 Feb 2017 14:48:17 +0000 (15:48 +0100)]
Bug 9988: Add get_usage_count and linked_biblionumbers to Koha::Authority

When replacing the Zebra code in sub merge, we actually need CountUsage
as well as the results it gets from SearchEngine.

In order to get count and/or results, we now create:

[1] instance methods get_usage_count and linked_biblionumbers in
    Koha::Authority,
[2] class methods of the same name in Koha::Authorities.

The instance method calls the class method. The class method can be used
for deleted authority records, and in 'legacy calls' before refactoring.

Note: On BZ 18149 we will replace all CountUsage calls.

Test plan:
Run t/db_dependent/Koha/Authorities.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 9988: Add extract_biblionumber to Koha/SearchEngine
Marcel de Rooy [Wed, 15 Feb 2017 14:48:17 +0000 (15:48 +0100)]
Bug 9988: Add extract_biblionumber to Koha/SearchEngine

When we will replace the Zebra code in sub merge, we will call SearchEngine
to pass records and we need a routine to extract a biblionumber from
a search result record. A record from Zebra still must be converted to
MARC::Record. This is no longer needed for a ElasticSearch record.

Test plan:
Run t/db_dependent/Koha/SearchEngine/Search.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 9988: Add Koha objects for table need_merge_authorities
Marcel de Rooy [Sun, 1 Jan 2017 10:50:44 +0000 (11:50 +0100)]
Bug 9988: Add Koha objects for table need_merge_authorities

This patch adds two Koha objects: MergeRequest(s).
MergeRequest has a new method and an oldmarc method.
A class method reporting_tag_xml is added to MergeRequests.pm.
All new routines are tested in Authorities.t.

Removes a few unneeded modules from Koha::Authority.

Test plan:
Run t/db_dependent/Koha/Authorities.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 9988: DBIx schema changes for need_merge_authorities
Marcel de Rooy [Tue, 14 Feb 2017 08:07:27 +0000 (09:07 +0100)]
Bug 9988: DBIx schema changes for need_merge_authorities

As generated by misc/devel/update_dbix_class_files.pl.
No test plan.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 9988: Table revision for need_merge_authorities
Marcel de Rooy [Tue, 14 Feb 2017 07:42:04 +0000 (08:42 +0100)]
Bug 9988: Table revision for need_merge_authorities

In order to let merge do exactly the same when called from the merge
cron job, we need three additional fields in the table. The use of these
fields will be explained in a follow-up.

Test plan:
Run the dbrev (updatestructure step in webinstaller).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Also tested running kohastructure.sql for this table.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 9988: Database revision for AuthorityMergeLimit
Marcel de Rooy [Tue, 10 Jan 2017 10:39:31 +0000 (11:39 +0100)]
Bug 9988: Database revision for AuthorityMergeLimit

Introduce the new preference and remove dontmerge.
If dontmerge was enabled, the new pref will be set to zero and we will
print a message about raising this value now.

Test plan:
Run the database revision or a new install.
In case of an upgrade, check the new pref value. Should be 0 when
dontmerge was enabled, otherwise 50.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Also tested sysprefs.sql on a new database.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18394: Add an option to item search to export a barcodes file
Julian Maurice [Wed, 5 Apr 2017 13:37:35 +0000 (15:37 +0200)]
Bug 18394: Add an option to item search to export a barcodes file

Test plan:
1. Go to item search (/cgi-bin/koha/catalogue/itemsearch.pl)
2. Fill the form with whatever you want
3. Leave the 'Output' option to 'Screen' and click 'Search'
4. Verify that the search still works
5. Click on 'Edit search' and set 'Output' to 'Barcodes file', click 'Search'
6. You should be able to download a 'barcodes.txt' file, open it and compare it
   to the previous search results
7. Now click on the 'Export results to barcodes file' button above the results,
   you should have the same result as in step 5
8. Verify that the CSV export still works

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18394: Remove useless code from item search
Julian Maurice [Thu, 6 Apr 2017 12:26:08 +0000 (14:26 +0200)]
Bug 18394: Remove useless code from item search

The item search was originally designed to work even with JS disabled.
Since bug 15111, the staff interface does not work at all without JS, so some
parts of this code are useless and should be removed

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18375: Better readability of patron category table for zero ages and fees
Marc Véron [Tue, 4 Apr 2017 11:03:04 +0000 (13:03 +0200)]
Bug 18375: Better readability of patron category table for zero ages and fees

In patron category table, this patch displays zero / empty values for ages and
fees with '-' for better readability

To test:
- Go to Home > Administration > Patron categories
- Verify that you have 0 years and/or only years in Age required and Uper age limit colums
- Verify that you have Enrollment and Hold fees of 0.00
- Apply patch
- Verify that such values are replaced by - to enhance table readability

Signed-off-by: Luke Honiss <luke.honiss@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18274: C4::Items - Remove GetItemStatus
Jonathan Druart [Wed, 15 Mar 2017 16:10:16 +0000 (13:10 -0300)]
Bug 18274: C4::Items - Remove GetItemStatus

This subroutine is no longer in used.
It was previously call from serials/serials-recieve.pl, which was not used and has been removed by
    commit 65b7ad030cd5cd0e3148fbbd1496d31b5cf149f7
    Bug 13423: Remove unused serials-recieve

Test plan:
  git grep GetItemStatus
should not return any used calls (only 1 occurrence in release notes)

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18208: [QA Follow-up] Get count from Koha::Items
Marcel de Rooy [Fri, 7 Apr 2017 09:56:52 +0000 (11:56 +0200)]
Bug 18208: [QA Follow-up] Get count from Koha::Items

Removes the loop by moving the onloan test to the query.

Test plan:
Run the test again.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18208: Add RecordProcessor filter to inject not onloan count to MARC records
Tomas Cohen Arazi [Fri, 3 Mar 2017 18:30:22 +0000 (15:30 -0300)]
Bug 18208: Add RecordProcessor filter to inject not onloan count to MARC records

This patch adds a new filter for MARC records to be used with
Koha::RecordProcessor. It's purpose is to inject the information about
items not-onloan in a fixed subfield, 999$x.

To test:
- Apply the patch
- Run:
  $ prove t/db_dependent/Koha/Filter/EmbedItemsAvailability.t
=> SUCCESS: Tests pass!
- Sign off :-D

Sponsored-by: ByWater Solutions
Followed test plan, test passes OK
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17737: [QA Follow-up] Remove unused reservedfor variable
Marcel de Rooy [Fri, 3 Feb 2017 10:49:30 +0000 (11:49 +0100)]
Bug 17737: [QA Follow-up] Remove unused reservedfor variable

The changes in this patch set obsolete this variable.
Remove confusing comment about reserve via host record.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17737: Rename holds_placed_before_today with current_holds
Jonathan Druart [Mon, 9 Jan 2017 08:13:11 +0000 (09:13 +0100)]
Bug 17737: Rename holds_placed_before_today with current_holds

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17737: Remove C4::Reserves::GetReservesFromItemnumber
Jonathan Druart [Wed, 7 Dec 2016 13:04:17 +0000 (14:04 +0100)]
Bug 17737: Remove C4::Reserves::GetReservesFromItemnumber

At this point, there should not be any occurrences of
GetReservesFromItemnumber anymore.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17737: Replace GetReservesFromItemnumber with Koha::Item->get_holds_placed_before...
Jonathan Druart [Wed, 7 Dec 2016 12:50:46 +0000 (13:50 +0100)]
Bug 17737: Replace GetReservesFromItemnumber with Koha::Item->get_holds_placed_before_today

On the same way of Koha::Biblio->get_holds,
Koha::Biblio->get_holds_placed_before_today and Koha::Patron->get_holds,
this new subroutin will permit to retrieve the holds placed on a
specific item.
Note that at the moment we do not need a Koha::Item->get_holds method:
we do not want to display future holds placed in the future.

Test plan:
I would suggest to test this patch with patches from bug 17736 and bug 17738,
to place different kind of holds (biblio and item level, future and
past).
Then do a whole workflow to detect bug, view a record, delete record,
order, place a hold on an item which has been ordered, etc.
The hold's informations should always be the same without or without
these patches.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18388 - Standardize serials volume information displaying
Alex Arnaud [Wed, 5 Apr 2017 15:01:53 +0000 (15:01 +0000)]
Bug 18388 - Standardize serials volume information displaying

OPAC: Home > Details for (serial)
Compared information in tab 'Holdings' col 'Vol info' with
same information in staff client. With patch it's the same.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17872: Fix small error in GetBudgetHierarchy and one of its calls
Marcel de Rooy [Tue, 10 Jan 2017 09:03:36 +0000 (10:03 +0100)]
Bug 17872: Fix small error in GetBudgetHierarchy and one of its calls

In aqbudgetperiods.pl a commented line is removed that contains a
wrong userenv hash key. Should be branch instead of branchcode.

In aqbudgets GetBudgetHierarchy is called with the same wrong userenv
hash key. Should be userenv->{branch}.
This made another bug visible: if you call GetBudgetHierarchy with a
branch and without owner, the where clause should take into account
that the branchcode can be empty (not null).

Test plan:
[1] Run Budgets.t
[2] Run aqbudgets.pl from Administration
[3] Add the show_mine=1 parameter in the URL
[4] Change owner of one of the funds and repeat step 2 and 3.

t/Budgets.t returns green. Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14932: Do not call can_edit_subscription with an empty value
Jonathan Druart [Tue, 11 Apr 2017 13:31:49 +0000 (10:31 -0300)]
Bug 14932: Do not call can_edit_subscription with an empty value

ref($sub) eq 'ARRAY' should always be true, what we want is to call
can_edit_subscription if there is at least 1 serial for this
subscription.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14932 - serials/serials-collection.pl-page is very slow. GetFullSubscription...
Olli-Antti Kivilahti [Thu, 1 Oct 2015 12:23:23 +0000 (15:23 +0300)]
Bug 14932 - serials/serials-collection.pl-page is very slow. GetFullSubscription* checks permission for each serial!

Currently we have subscriptions with 300+ serials received.
It takes a lot of time to show serials-collection.pl (~20s).
This is especially troublesome when receiving serials, since after receival we get redirected to that page.

We no longer can receive daily serials in the allotted timeframe.

This quick and dirty fix prevents checking the subscription editing for each serial, but instead checks it for the first serial only.

This reduced page load time by ~18s

TEST PLAN:
1. Receive ~300 serials (or just a bunch :)  )
2. Observe the gradual slowing of the receival action.

AFTER THIS PATCH:
1. Receive ~300 serials more (or just a bunch)
2. Observe a significant performance improvement.

Signed-off-by: Paul POULAIN <paul.poulain@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18395: (bug 14610 followup) Remove article requests methods from Koha::Patrons
Jonathan Druart [Wed, 5 Apr 2017 01:30:19 +0000 (22:30 -0300)]
Bug 18395: (bug 14610 followup) Remove article requests methods from Koha::Patrons

There is something very wrong with the new subroutines, they have been added to both Koha::Patron and Koha::Patrons:

% git grep 'sub article_request' Koha/Patron*.pm
Koha/Patron.pm:sub article_requests {
Koha/Patron.pm:sub article_requests_current {
Koha/Patron.pm:sub article_requests_finished {
Koha/Patrons.pm:sub article_requests {
Koha/Patrons.pm:sub article_requests_current {
Koha/Patrons.pm:sub article_requests_finished {

The ones in Koha::Patrons are wrong

Test plan:
  prove t/db_dependent/ArticleRequests.t
should still return green

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18121: Replace opac_news.new with opac_news.content in notices templates
Jonathan Druart [Wed, 15 Feb 2017 08:39:23 +0000 (08:39 +0000)]
Bug 18121: Replace opac_news.new with opac_news.content in notices templates

Bug 17960 replaces opac_news.new with opac_news.content, we can replace
the content of the notices' templates automatically.

Test plan:
Checkout a commit prior to bug 17960. Install a new DB with sample data.
You should have notices with <<opac_news.new>>

Switch to a branch with this patch, on top of master

Execute the updatedatabase.pl sript
=> The notices with opac_news.new should have been replaced with
opac_news.content

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18349: [QA Follow-up] Add four missing error messages
Marcel de Rooy [Fri, 7 Apr 2017 08:13:00 +0000 (10:13 +0200)]
Bug 18349: [QA Follow-up] Add four missing error messages

The error codes come from CanBookBeIssued.
The warnings speak for themselves. Note that the GNA message is similar
to the one used in opac-user.tt (gonenoaddress is translated to the patron
as contact information not up-to-date).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18349: Remove useless info in alert message
Jonathan Druart [Fri, 31 Mar 2017 16:25:13 +0000 (13:25 -0300)]
Bug 18349: Remove useless info in alert message

Empty tags should be removed, and message id
Note that not all error codes are covered here.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18349: If a confirmation is required, consider as blocker
Jonathan Druart [Fri, 31 Mar 2017 16:22:05 +0000 (13:22 -0300)]
Bug 18349: If a confirmation is required, consider as blocker

Only RENEW_ISSUE should not be considered as blocker, others should.
Note that this code is not robust and the whole script as well as the
return of CanBookBeIssued should be rewrittent completely.
We need a small patch to easy backport to stable releases

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18349: $borrower is a hashref
Jonathan Druart [Fri, 31 Mar 2017 00:51:28 +0000 (21:51 -0300)]
Bug 18349: $borrower is a hashref

I guess this code was never called before...

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18349: SCO - Do not trust the confirmed flag
Jonathan Druart [Wed, 29 Mar 2017 21:25:40 +0000 (18:25 -0300)]
Bug 18349: SCO - Do not trust the confirmed flag

The "confirmed" flag is used to know if that user confirmed a situation
that needs a confirmation.
But if the issue/renew is impossible the CanBookBeIssued and the
'impossible flags' should be checked.

Otherwise a patron can checkout and renew bypassing the circulation
rules (Understand 'no limit' here...)

Test plan:
Want to renew?
Checkin $barcode, then
/cgi-bin/koha/sco/sco-main.pl?patronid=$cardnumber&barcode=$barcode&confirmed=1&op=checkout

Want to bypass the checkin?
Same url...

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18413: Fix Letters.t (following bug 17866)
Marcel de Rooy [Tue, 11 Apr 2017 12:15:54 +0000 (14:15 +0200)]
Bug 18413: Fix Letters.t (following bug 17866)

SendAlert now needs a userenv to find branch email and the fallback
of KohaAdminEmailAddress if the branch mail is not filled.

Test plan:
Run t/db_dependent/Letters.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17309 - Renewing and HomeOrHoldingBranch syspref
David Kuhn [Thu, 15 Dec 2016 00:02:26 +0000 (16:02 -0800)]
Bug 17309 - Renewing and HomeOrHoldingBranch syspref

The AddRenewal subroutine currently uses the circulation rules for the branch
stored in the Issues table (which is the holding branch) when calculating the new due date.

This patch replaces using the branch from the Issues table with the branch
specified by the HomeOrHoldingBranch syspref.

To test:
1. Set up 2 branches, Branch1 and Branch2
2. Set up a loan rule in Branch1 for DVDs with a 21 day loan period and a
   21 day renewal period.
3. Set up a loan rule in Branch2 for DVDs with a 14 day loan period and a
   14 day renewal period.
4. Checkout a DVD belonging to Branch1 while logged into Branch2. It will
   receive the correct 21 day loan period.
5. Renewing the same DVD while logged into either Branch1 or Branch2
   will give a 14 day due date, rather than 21 days.
6. Checkout a DVD belonging to Branch2 while logged into Branch1. It will
   receive the correct 14 day loan period.
7. Renewing the same DVD while logged into either Branch1 or Branch2
   will give a 21 day due date, rather than 14 days.
8. Apply the patch and repeat steps 4-7. The correct due date should be given
   when the item is renewed, regardless of where it is checked out or renewed.

This update removes reassignment of $branch variable.

Signed-off-by: Cédric Vita <cedric.vita@dracenie.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18093: Koha::Objects->get_column should not return a DBIC object
Jonathan Druart [Wed, 15 Mar 2017 21:58:55 +0000 (18:58 -0300)]
Bug 18093: Koha::Objects->get_column should not return a DBIC object

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18093: Add Koha::Objects->get_column
Jonathan Druart [Fri, 10 Feb 2017 08:45:26 +0000 (09:45 +0100)]
Bug 18093: Add Koha::Objects->get_column

Test plan:
  prove t/db_dependent/Koha/Objects.t
Should return green

Followed test plan, result as expected
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17866: [QA Follow-up] Change wording of db revision
Marcel de Rooy [Mon, 3 Apr 2017 07:21:37 +0000 (09:21 +0200)]
Bug 17866: [QA Follow-up] Change wording of db revision

As Katrin noted on the report, we should not limit the db rev message to
the serial claims only. Applies to acquisision claims too.
Note: Strictly speaking, we could also mention the new ACQORDER notice,
but this will not yet be widely used.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18368 - DBversion 16.12.00.022 not set by updatedatabase.pl
Marc Véron [Sun, 2 Apr 2017 16:59:52 +0000 (18:59 +0200)]
Bug 18368 - DBversion 16.12.00.022 not set by updatedatabase.pl

Updating to 16.12.00.22 puts the upgrade process in an endless loop because DBversione is not set by updatedatabase.pl
Missing line:  SetVersion( $DBversion )

This patch inserts the line as appropriate.

To test:
- Apply patch
- Verify code change makes sense
- Verify that upgrade smoothly runs through

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoFix number of tests in Circulation.t
Jonathan Druart [Fri, 31 Mar 2017 19:12:48 +0000 (16:12 -0300)]
Fix number of tests in Circulation.t

7 years agoBug 17825: (followup) Remove unused function AttributeTypeExists
Tomas Cohen Arazi [Thu, 29 Dec 2016 14:40:57 +0000 (11:40 -0300)]
Bug 17825: (followup) Remove unused function AttributeTypeExists

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17825: Remove the use of AttributeTypeExists from opac-user.pl
Tomas Cohen Arazi [Thu, 29 Dec 2016 14:32:27 +0000 (11:32 -0300)]
Bug 17825: Remove the use of AttributeTypeExists from opac-user.pl

With the introducion of Koha::Object-based
Koha::Patron::Attribute::Type(s) there's no need for using this
function.

This patch replaces it with a regular ->search + ->count call.

To test:
- Have a user with checkouts logged into the OPAC on the opac-user.pl
page
- Set the SHOW_BCODE attribute to 'no' on the staff interface for the
user.
- Reload opac-user.pl
=> SUCCESS: The barcode is not shown for checked out items.
- Set the SHOW_BCODE atttribute to 'yes' on the staff interface for the
user.
- Reload opac-user.pl
=> SUCCESS: The barcode is shown for checked out items.
- Delete the Patron attribute type SHOW_BCODE
- Reload opac-user.pl
=> SUCCESS: No barcode is shown for checked out items
- Sign off :-D

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17828: return $self to be consistent
Jonathan Druart [Wed, 29 Mar 2017 19:39:36 +0000 (16:39 -0300)]
Bug 17828: return $self to be consistent

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17828: Use Koha::Patron::Attributes instead of _resultset
Jonathan Druart [Tue, 28 Mar 2017 14:39:09 +0000 (11:39 -0300)]
Bug 17828: Use Koha::Patron::Attributes instead of _resultset

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17828: (QA followup) Add ->type and reuse it
Tomas Cohen Arazi [Mon, 27 Mar 2017 15:47:14 +0000 (12:47 -0300)]
Bug 17828: (QA followup) Add ->type and reuse it

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17828: (followup) Add Test::Exception as dependency
Tomas Cohen Arazi [Thu, 23 Mar 2017 15:07:49 +0000 (12:07 -0300)]
Bug 17828: (followup) Add Test::Exception as dependency

Test::Exception is available on Jessie and already installed when
koha-common gets installed

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17828: Overload Koha::Patron::Attribute->store to check for unique_id and repeatable
Tomas Cohen Arazi [Fri, 30 Dec 2016 14:12:32 +0000 (11:12 -0300)]
Bug 17828: Overload Koha::Patron::Attribute->store to check for unique_id and repeatable

This patch introduces a Koha::Patron::Attribute->store method that does
the required check for the corresponding Koha::Patron::Attribute::Type
and raises an exception if trying to store more than one unique
attribute code/value combination, and another exception for
non-repeatable attribute types being stored while already existing on
the DB.

This patch introduces exception definitions for that purpose.

To test:
- Apply the unit tests patches
- Run:
  $ prove t/db_dependent/Koha/Patron/Attributes.t
=> FAIL: Tests fail
- Apply this patch
- Run:
  $ prove t/db_dependent/Koha/Patron/Attributes.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17828: Unit tests for Koha::Patron::Attribute->store
Tomas Cohen Arazi [Fri, 30 Dec 2016 14:10:33 +0000 (11:10 -0300)]
Bug 17828: Unit tests for Koha::Patron::Attribute->store

Unit tests for an overloaded Koha::Patron::Attribute->store that
checks attribute type's uniqueness property and raises an exception
conveniently.

It also tests for repeatable attribute type's property.

Test plan on the implementing patch.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17014: Simplify some code
Jonathan Druart [Tue, 21 Mar 2017 19:55:37 +0000 (16:55 -0300)]
Bug 17014: Simplify some code

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17014 - Remove more event attributes from patron templates
Owen Leonard [Mon, 1 Aug 2016 16:33:24 +0000 (12:33 -0400)]
Bug 17014 - Remove more event attributes from patron templates

There are many patron-related templates which still use event attributes
to define events. This patch updates these templates so that events are
defined in JavaScript.

To test apply the patch and check out to a patron.

- From the Print menu in the toolbar, choose "Print summary." The patron
  summary page should open and the print dialog should be automatically
  triggered.

- From the Print menu in the toolbar, choose "Print slip." The patron
  slip page should open and the print dialog should be automatically
  triggered.

- From the Print menu in the toolbar, choose "Print quick slip." The
  patron quick slip page should open and the print dialog should be
  automatically triggered.

- Click the patron's "Fines" tab in the left-hand sidebar and then
  choose the "Account" tab.
  -- Click the "Print" button for an account payment (the link should
     point to printfeercpt.pl). A print receipt page should open and
     the print dialog should be automatically triggered.
  -- Follow the same procedure for a transaction which is not an account
     payment (the link should point to printinvoice.pl).

- Click the "Create manual invoice" tab.
  -- Select one of the "type" choices. Doing so should automatically
     populate the "Description" field with the corresponding code.
  -- If necessary, define one or more values for the MANUAL_INV
     authorized value and confirm that those invoice types work as well.

- From the patron's "Pay fines" tab, click the "Pay amount" button. In
  the "collect from patron" field, enter any combination of letters,
  numbers, and symbols. When you tab away from that field your text
  should be reformatted to currency format.

- From the patrons home page, change the filter in the left-hand sidebar
  and submit it. The correct results should be returned.

Signed-off-by: EricGosselin <eric.gosselin.5@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18189 - Elasticsearch sorting broken
Nick Clemens [Wed, 1 Mar 2017 14:30:11 +0000 (14:30 +0000)]
Bug 18189 - Elasticsearch sorting broken

To test:
1 - Have ES enabled and biblios and authorities indexed
2 - Perform a catalog search
3 - Try to sort results by author, it will fail
4 - Perform an authority search with sorting enabled, it will fail
5 - Apply patch
6 - Reindex, deleting current indexes
    perl /home/vagrant/kohaclone/misc/search_tools/rebuild_elastic_search.pl
    -d -v
7 - Repeat 3&4, they should succeed

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 12026: [QA Follow-up] Add Tests for autocreate
Martin Renvoize [Thu, 23 Mar 2017 14:54:38 +0000 (14:54 +0000)]
Bug 12026: [QA Follow-up] Add Tests for autocreate

https://bugs.koha-community.org/show_bug.cgi?id=12026
Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 12026: [QA Follow-up] Fix a POD line
Marcel de Rooy [Thu, 23 Mar 2017 10:56:50 +0000 (11:56 +0100)]
Bug 12026: [QA Follow-up] Fix a POD line

Still refers to a removed parameter of _autocreate.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 12026: [Rebase Follow-up] - Fix Test
Martin Renvoize [Wed, 22 Mar 2017 13:54:46 +0000 (13:54 +0000)]
Bug 12026: [Rebase Follow-up] - Fix Test

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 12026: [QA Follow-up] POD typo and tiny change in AddMember_Opac
Marcel de Rooy [Tue, 21 Mar 2017 09:27:03 +0000 (10:27 +0100)]
Bug 12026: [QA Follow-up] POD typo and tiny change in AddMember_Opac

[1] Correct xml error in POD
Copy-pasting this example from Auth_with_shibboleth.pm into koha-conf.xml
did not work. We need a closing tag ;)
[2] If AddMember_Opac calls AddMember_Auto, there is no need to call
fixup_cardnumber. Adding trivial test for AddMember_Auto in Members.t.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 12026: Fix small errors
Mirko Tietgen [Tue, 15 Nov 2016 10:36:33 +0000 (11:36 +0100)]
Bug 12026: Fix small errors

When running tests I got two errors. Do these changes make sense?

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 12026: [Followup] Rebasing
Martin Renvoize [Wed, 12 Oct 2016 10:08:31 +0000 (10:08 +0000)]
Bug 12026: [Followup] Rebasing

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 12026: [Follow up] Added Documentation
Martin Renvoize [Wed, 30 Jul 2014 14:53:27 +0000 (14:53 +0000)]
Bug 12026: [Follow up] Added Documentation

Updated to work with match point selection

- The base bug that this patch enhances has added the ability to choose
  your match point in the configuration file. This patch adds code to
  take that change into account.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 12026: Adds auto-provisioning to shibboleth
Jesse Weaver [Wed, 2 Apr 2014 15:53:03 +0000 (15:53 +0000)]
Bug 12026: Adds auto-provisioning to shibboleth

- Adds the option to map shibboleth attributes to koha user columns
  and allows mapping to auto create non-existant users

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18304: [QA Follow-up] Add id to paragraph tag
Marcel de Rooy [Mon, 20 Mar 2017 20:58:49 +0000 (21:58 +0100)]
Bug 18304: [QA Follow-up] Add id to paragraph tag

See Bugzilla, comment 4.

Note: the id is unique in the Koha codebase (git grepped).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18304: Do not mail cart or list contents to the library
Marcel de Rooy [Mon, 20 Mar 2017 11:58:42 +0000 (12:58 +0100)]
Bug 18304: Do not mail cart or list contents to the library

Sometimes we receive mails from patrons, sent from opac-sendbasket or
opac-sendshelf. Instead of placing a hold on books they send the contents
of the cart (or even a list).

This patch simply puts a note on both forms saying that they should not
use the mail to request or renew books. If both options are disabled on
the OPAC, the message is not shown.

Test plan:
[1] Enable RequestOnOPAC.
[2] Put a book in the cart.
[3] Open the cart, click on Send. Verify presence of the message.
[4] Open a list.
[5] Click on Send list. Verify presence of the message.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 18302: Release team 17.05
Marcel de Rooy [Mon, 20 Mar 2017 09:32:14 +0000 (10:32 +0100)]
Bug 18302: Release team 17.05

Changes to about.tt in sections release team and development team.

Notes:
[1] We do not have a QA manager in 17.05 any more.
[2] Martin Renvoize has been added to the QA team of 16.11 after the
election; this was not adjusted in about, but has been added in the
Development team section now.

Test plan:
Compare about:Koha team with roles for 17.05 page on the wiki.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18200: Fix a potential issue with preceding space in GetMarcUrls
Marcel de Rooy [Thu, 2 Mar 2017 13:24:17 +0000 (14:24 +0100)]
Bug 18200: Fix a potential issue with preceding space in GetMarcUrls

Trims the URL in order prevent prefixing a space with http://
Normally you won't have a preceding space here, but I saw it happening
one day and it does not cost much to resolve it.

Bonus: Adding few simple tests in t/db_dependent/Biblio.t.

Test plan:
[1] Run t/db_dependent/Biblio.t
[2] Add a 856$u with preceding space (MARC21)
[3] Check opac-detail, Online access with OPACXSLTDetailsDisplay empty.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Followed test plan, works as expected
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18174: Add update to Koha::Object
Marcel de Rooy [Mon, 27 Feb 2017 09:57:18 +0000 (10:57 +0100)]
Bug 18174: Add update to Koha::Object

Since Koha::Objects has a update method, we should allow it too in
Koha::Object. Note that it is just redirecting to DBIx immediately.

Changed the exception when the method generates an error. The previous
code suggested that the method was not found, but this is not the case.

Test plan:
Run t/db_dependent/Koha/Object.t

Followed test plan, tests passes OK.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18283: 'sql' should be 'SQL'
Jonathan Druart [Tue, 21 Mar 2017 10:30:26 +0000 (07:30 -0300)]
Bug 18283: 'sql' should be 'SQL'

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18283 - Display improvements on report results - hide code and change wording
Nick Clemens [Thu, 16 Mar 2017 15:28:29 +0000 (11:28 -0400)]
Bug 18283 - Display improvements on report results - hide code and change wording

This patch makes small display improvements to the report results page.

-Add toggle link for SQL code
-Change results count wording
-Add 'Notes:' label report notes

To test:
1 - Apply patch
2 - Run some reports
3 - Check that results page makes sense
4 - Hide and display code and ensure toggle works

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17945 - Breadcrumbs broken on opac-serial-issues.pl
Luke Honiss [Thu, 19 Jan 2017 22:52:49 +0000 (22:52 +0000)]
Bug 17945 - Breadcrumbs broken on opac-serial-issues.pl

==TEST PLAN==
1) Make a subscription with a record
2) Search and view the record in OPAC
3) Click on the subscription tab and click more details
4) The breadcrumb will say 'Detals for' without the record name
5) Apply patch
6) Refresh the page
7) The breadcrumb will display the name of the record

(fixed small error)

Signed-off-by: Sonia BOUIS <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16757 - Add support for Fee Paid to SIP cli emulator for testing
Kyle M Hall [Thu, 16 Jun 2016 15:41:43 +0000 (15:41 +0000)]
Bug 16757 - Add support for Fee Paid to SIP cli emulator for testing

Signed-off-by: Rhonda Kuiper <kuiper@roundrocktexas.gov>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16757 - Add ability to pay fee by id for SIP2
Kyle M Hall [Thu, 16 Jun 2016 14:50:44 +0000 (14:50 +0000)]
Bug 16757 - Add ability to pay fee by id for SIP2

The SIP protocol allows for a Fee Paid message to specify a fee
identifier in the CG field. While this field is read and passed to
C4::SIP::ILS::pay_fee, it is not passed along to
C4::SIP::ILS::Transaction::FeePayment::pay and is thus not used. We
should enable this functionality in Koha now that accountlines each have
a unique identifier that can be passed along to the payment requestor
via the AV field line items added by bug 14512.

Test Plan:
1) Create a fee in Koha
2) Ensure your SIP2 server is running and configured correctly
3) Send a 37 Fee Paid message to Koha's SIP server with the
   accountlines_id for that fee in the CG fee identifier field,
   along with the other required fields.
4) Note that specific fee was paid in Koha

Signed-off-by: Rhonda Kuiper <kuiper@roundrocktexas.gov>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14365 - Change 'Last modified' to 'Last edit' for terseness
Kyle M Hall [Wed, 1 Mar 2017 11:24:54 +0000 (11:24 +0000)]
Bug 14365 - Change 'Last modified' to 'Last edit' for terseness

Signed-off-by: Cab Vinton <director@plaistowlibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14365 - SQL Reports Last Edit Date column - Show in interface
Kyle M Hall [Tue, 7 Feb 2017 15:55:30 +0000 (15:55 +0000)]
Bug 14365 - SQL Reports Last Edit Date column - Show in interface

Test Plan:
1) Apply these patches
2) Modify a saved sql report
3) Note the "Last modified" column is updated
4) Run the report
5) Note the "Last run" column is updated

Signed-off-by: Cab Vinton <director@plaistowlibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14365 - Populate never used saved_sql column last_run when execute_query is called
Kyle M Hall [Tue, 7 Feb 2017 16:01:12 +0000 (16:01 +0000)]
Bug 14365 - Populate never used saved_sql column last_run when execute_query is called

Signed-off-by: Cab Vinton <director@plaistowlibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 15541 - Prevent normalization during matching/import process
David Cook [Tue, 19 Jan 2016 05:37:09 +0000 (16:37 +1100)]
Bug 15541 - Prevent normalization during matching/import process

This patch allows you to use the "qualifier,qualifier" syntax
in the Record Matching Rules "Search Index" when using the QueryParser.
While QueryParser doesn't support this syntax, it will now fallback
correctly to non-QueryParser functionality. Without the patch, your search
will just fail silently.

This patch also adds a "skip_normalize" option to C4::Search::SimpleSearch(),
and uses the option during C4::Matcher::get_matches. This prevents
the s/:/=/g and s/=/:/g normalization. This normalization is heavy-handed,
and while it is necessary sometimes to generate a valid CCL query or
QueryParser query, C4::Matcher::get_matches() already produces a valid
CCL query, so we don't need to do this normalization.

Additionally, this normalization causes problems when you use a
Zebra register which isn't normalized: namely the "u" register.
Strings are stored "as is", so http://localhost/koha/resource/1 is
stored as is during indexing. When you search, you need to pass
the exact same thing through the query to get a match. Using
http=//localhost/koha/resource/1 in your query will yield zero results.

_TEST PLAN_

0) Apply patch

1) Create a Record Matching Rule in Koha with the following details:
    Matching rule code: TEST
    Description: Test
    Match threshold: 100
    Record type: Bibliographic
    Match point 1:
        Search index: id-other,st-urx
        Score: 100
        Tag: 024
        Subfields: a
        Normalization rule: None
2) Create a record in Koha with an indexable URI
    2a) Default framework
    2b) 024 $a http://koha-community.org/test $2 uri
    2c) 040 $c test
    2d) 245 $a This is a test record
    2e) 942 $c Books
    2f) Save (save again if cautioned about missing fields as these should autofill)
3) Do a full re-index of Zebra
4) Download your record from Koha as a .mrc file (ie isomarc, binary marc, etc)
5) Go to "Stage MARC records for import"
    5a) Upload your .marc file.
    5b) Change your "Record matching rule" to "Test"
    5c) Click Stage for import
9) It should say "1 records with at least one match in catalog per matching rule "Test".

NOTE: For completeness, you can go through this process on a clean master branch,
and note that it will say '0 records with at least one match in catalog per matching rule "TEST"'

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 4969: Do not display the new link if we are seeing all baskets of a given vendor
Jonathan Druart [Tue, 7 Mar 2017 18:52:03 +0000 (15:52 -0300)]
Bug 4969: Do not display the new link if we are seeing all baskets of a given vendor

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 4969: Do not jump to the top on click
Jonathan Druart [Tue, 7 Mar 2017 18:45:57 +0000 (15:45 -0300)]
Bug 4969: Do not jump to the top on click

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 4969: Cursor should be pointer for links
Jonathan Druart [Tue, 7 Mar 2017 18:44:57 +0000 (15:44 -0300)]
Bug 4969: Cursor should be pointer for links

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 4969: Toggle showing of all/active vendors
Aleisha Amohia [Fri, 3 Mar 2017 01:32:54 +0000 (01:32 +0000)]
Bug 4969: Toggle showing of all/active vendors

This patch provides the functionality to hide inactive vendors from the
vendor search.

To test:
1) Make sure at least one vendor is inactive
2) Do a vendor search
3) Confirm the link to show only active vendors works, and is replaced
with a link to show all vendors when clicked
4) Confirm the link to show all vendors works, and is replaced with a
link to show only active vendors when clicked

Sponsored-by: Catalyst IT
Followed test plan, works as expected
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18181: Can't tell which subscriptions already have a routing list if seeing all...
Aleisha Amohia [Tue, 28 Feb 2017 02:20:01 +0000 (02:20 +0000)]
Bug 18181: Can't tell which subscriptions already have a routing list if seeing all subs attached to a biblio

To test:
1) Go to Serials -> search for a subscription
2) Add a new routing list for a subscription
3) After saving, you should be redirected to the subscription detail
page
4) Click Serial collection on the left sidebar menu
5) Notice there is a button that says 'Edit routing list' next to this
subscription in the first table
6) Click 'See any subscription attached to this biblio' link
7) Notice it no longer says edit next to this subscription, it says
'Create routing list'
8) Apply patch and refresh page
9) Should now show 'Edit' button like expected

Sponsored-by: Catalyst IT
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18134: Updating Preview MARC button in Batch Authority Record Mod
Aleisha Amohia [Thu, 16 Feb 2017 22:10:34 +0000 (22:10 +0000)]
Bug 18134: Updating Preview MARC button in Batch Authority Record Mod

This patch ensures the Preview MARC button when batch modifying
authority records looks like the Preview MARC button when batch
modifying biblio records.

To test:
1) Go to Tools -> Batch record modification
2) Leave record type as Biblio, Put in a biblionumber, select a template
and click Continue
3) Notice the 'Show MARC' button
4) Click Cancel and change record type to Authority. Put in auth id,
select template, click Continue
5) Notice ugly 'Preview MARC' link
6) Apply patch and refresh page
7) There should now be a nice 'Show MARC' button like there is for
biblio mod. Confirm it still works as expected.

Sponsored-by: Catalyst IT
Signed-off-by: JMBroust <jean-manuel.broust@univ-lyon2.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17946: Show number of subscriptions on tab in OPAC record details
Aleisha Amohia [Thu, 19 Jan 2017 21:54:12 +0000 (21:54 +0000)]
Bug 17946: Show number of subscriptions on tab in OPAC record details

This patch removes some duplicate code.

To test:
1) Edit at least one subscription (or add a new one) to have a record
2) Find that record on the OPAC
3) Confirm that the Subscriptions tab reads the correct number of
subscriptions attached to the record

Sponsored-by: Catalyst IT
Signed-off-by: JMBroust <jean-manuel.broust@univ-lyon2.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17233 - Add 008 value builder plugin for MARC21 classifications
Jacek Ablewicz [Thu, 1 Sep 2016 19:10:57 +0000 (21:10 +0200)]
Bug 17233 - Add 008 value builder plugin for MARC21 classifications

This patch adds 008 cataloguing value builder for MARC21 classifications
records (LCC, DDC/Dewey, UDC and so on).

For most practical purposes, MARC21 classification records
(<https://www.loc.gov/marc/classification/>) are quite similar to regular
MARC21 authority records, so handling them in Koha is (almost) achievable
by means of the built-in 'regular' MARC21 authority records related
functionalities, but there are some notable differences - in particular,
008 field length and format is not the same.

To test:

1) apply patch
2) link the new plugin (marc21_field_008_classifications.pl) to the 008
field in the existing (or cloned, ..) authority framework of your choice
3) try to add, edit, re-edit 008 field using this "authority" framework,
ensure that the new plugin behaves as it should according to the
Library of Congress specifications for MARC21 classification records
008 field format (<https://www.loc.gov/marc/classification/cd008.html>).

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18263: Make use of syspref 'CurrencyFormat' for Account and Pay fines tables
Marc Véron [Tue, 14 Mar 2017 13:29:08 +0000 (14:29 +0100)]
Bug 18263: Make use of syspref 'CurrencyFormat' for Account and Pay fines tables

On Home > Patrons > Accounts for... and Home > Patrons > Pay fines for...,
make the amounts display as defined in syspref 'CurrencyFormat'

To test:
- Apply patch
- Give a patron a high fine or credit (e.g. 12345.67)
- Got to pages Home > Patrons > Accounts for... and
  Home > Patrons > Pay fines
- Verify that amounts display following syspref 'CurrencyFormat'
  (e.g. 12'345.67 for syspref set to 360'000.00 (CH)

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17290 - Standardize on "Patron Categories"
Grace McKenzie [Tue, 17 Jan 2017 22:45:28 +0000 (22:45 +0000)]
Bug 17290 - Standardize on "Patron Categories"

We need to standardize on terminology, this changes all instances of
patron types to be patron categories.  To text, just view the patch

Signed-off-by: Cédric Vita <cedric.vita@dracenie.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 7143: Add Patricio Marrone to history.txt
Tomas Cohen Arazi [Tue, 14 Mar 2017 14:25:24 +0000 (11:25 -0300)]
Bug 7143: Add Patricio Marrone to history.txt

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18307 - Branchname is no longer displayed in subscription tab view
Marc Véron [Tue, 21 Mar 2017 13:52:51 +0000 (14:52 +0100)]
Bug 18307 - Branchname is no longer displayed in subscription tab view

This patch restores the branchname in OPAC subscription detail view.
Additionally, it adds the subscriptons count to the tab title to make
it consistent with the other tab titles.

To test:
- Search a subscription in OPAC catalog
- Go to Subscriptions tab (see screenshot in initial comment)
- Verify that library name does not display
- Apply patch
- Verify that library name displays properly in Subscriptons tab
- Verify that the tab title displays the subscriptions count
  e.g.: Subscriptions (2)

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18209: Add default, 'Actions' and fix case
Jonathan Druart [Thu, 9 Mar 2017 14:25:28 +0000 (11:25 -0300)]
Bug 18209: Add default, 'Actions' and fix case

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18209 - Patron's card manage.pl page is not fully translatable
Blou [Fri, 3 Mar 2017 21:13:40 +0000 (16:13 -0500)]
Bug 18209 - Patron's card manage.pl page is not fully translatable

The headers of the tables displayed in patroncards/manage.tt are hardcoded in the .pl and thus cannot be translated.

This simple fix reuse the translate_card_element tool already in the code to make the strings translatable.

Applied patch and verified that table headers on manage.pl display the same as before.
Signed-off-by: Marc Véron <veron@veron.ch>
Re-tested, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18219: Remove extra whitespace from returns.tt
Christopher Brannon [Tue, 7 Mar 2017 22:18:49 +0000 (22:18 +0000)]
Bug 18219: Remove extra whitespace from returns.tt

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18219: Remove duplicated code in returns.tt
Christopher Brannon [Tue, 7 Mar 2017 20:01:05 +0000 (20:01 +0000)]
Bug 18219: Remove duplicated code in returns.tt

Removed lines of code that were duplicated in bug 16530.
Fixes alignment of a few lines of code surrounding duplication.

Modifies returns.tt

To test:
1) Check in items that are not checked out.
2) Note duplicated problem message (i.e. "Not checked out.")
3) Apply patch.
4) Repeat step 1.
5) Note the problem message is no longer duplicated.

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17346: Make checkin column hidable
Christopher Brannon [Fri, 10 Mar 2017 19:54:05 +0000 (19:54 +0000)]
Bug 17346: Make checkin column hidable

To test:
1) Go to columns_settings.pl --> Circulation --> issues-table and note that you cannot change the settings for checkin.
2) Go to columns_settings.pl --> Patrons --> issues-table and note that you cannot change the settings for checkin.
3) Apply the patch.
4) Go to both tables again and note that you can now change the settings.

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17866 - DBRev 16.12.00.022
Kyle M Hall [Fri, 31 Mar 2017 13:22:37 +0000 (13:22 +0000)]
Bug 17866 - DBRev 16.12.00.022

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17866: [QA Follow-up] Reword message for missing email address
Marcel de Rooy [Thu, 23 Mar 2017 09:01:53 +0000 (10:01 +0100)]
Bug 17866: [QA Follow-up] Reword message for missing email address

See BZ, comment 14 from Jonathan.

In the exceptional case that branch email address and fallback, i.e.
preference KohaAdminEmailAddress, are both empty or not valid, the error
message should reflect that (of course :)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Removed branch email and KohaAdminEmailAddress.
Followed the test plan of the first patch and saw the alert.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17866: [QA Follow-up] Add notification for changed sender address
Marcel de Rooy [Wed, 22 Mar 2017 15:50:33 +0000 (16:50 +0100)]
Bug 17866: [QA Follow-up] Add notification for changed sender address

See BZ, comment 6, requested by QA.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17866: Change sender for serial claim notifications
Marcel de Rooy [Mon, 9 Jan 2017 14:10:56 +0000 (15:10 +0100)]
Bug 17866: Change sender for serial claim notifications

Currently, the From field uses the emailaddress of the staff client member
from the user context. This is exceptional in Koha. And might very well be,
as in our case, the cause of fraud detection warnings.
We should use branch email address or fallback to KohaAdminEmailAddress,
as we do (almost) everywhere else.

Test plan:
Go to subscription detail in Koha.
Go to Claims.
Select a missing issue and click Send notification.
Verify the sender address in the generated notification. (Make sure that
you receive this mail.)

Signed-off-by: Grace McKenzie <grace.mcky@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18019: [QA Follow-up] Also catch the delete from authorities detail
Marcel de Rooy [Thu, 30 Mar 2017 08:20:30 +0000 (10:20 +0200)]
Bug 18019: [QA Follow-up] Also catch the delete from authorities detail

Good catch from Jonathan. See comment11.
Authorities detail should pass a CSRF token to authorities-home when
deleting a record without linked biblios.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Passing the token with GET is not a good way to do, but nothing quick to
replace that.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18019: Add CSRF protection to authorities-home.pl (op==delete)
Marcel de Rooy [Tue, 7 Feb 2017 08:09:33 +0000 (09:09 +0100)]
Bug 18019: Add CSRF protection to authorities-home.pl (op==delete)

Without this patch, it is possible to delete authority records with URL
manipulation.
Like: /cgi-bin/koha/authorities/authorities-home.pl?op=delete&authid=[XXX]

Test plan:
[1] Go to Authorities. Search for some authorities (without links).
[2] Delete an authority. Should work.
[3] Apply patch.
[4] Construct an URL like above to delete another authority. Should fail.
    Under Plack this results in an internal server error, the log tells
    you: Wrong CSRF token.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Amended the test plan.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 12972 - Transfer slip and transfer message (blue box) can conflict
Nick Clemens [Fri, 3 Mar 2017 14:56:31 +0000 (14:56 +0000)]
Bug 12972 - Transfer slip and transfer message (blue box) can conflict

Instead of passing the homebranch to the slip, let's pass
TransferWaitingAt (the value we display)

To test:
1 - Check in an item that will initiate a transfer (hold or automatic
        item return)
2 - Note the transfer message and receipt match
3 - Remove the reason for transfer (bot don't cancel transfer)
    i.e. cancel hold or change homebranch of item to current library
4 - Check the item in again
5 - Note the message displays the transfer destination and the slip
shows the homebranch
6 - Apply patch
7 - Repeat 5 but note slip and message match
8 - Test any edge cases for correctness
9 - sign off

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 7728: [QA Follow-up] Fix POD whitespace
Marcel de Rooy [Fri, 17 Mar 2017 12:24:41 +0000 (13:24 +0100)]
Bug 7728: [QA Follow-up] Fix POD whitespace

Resolves complaints from qa tools.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 7728: QA fixes
Julian Maurice [Wed, 11 Jan 2017 13:51:43 +0000 (14:51 +0100)]
Bug 7728: QA fixes

- Remove useless comments
- Use Koha::Objects::find instead of Koha::Objects::search

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 7728: Adding unit test ReNewSubscription.t
Paul Poulain [Tue, 26 Jan 2016 14:03:21 +0000 (14:03 +0000)]
Bug 7728: Adding unit test ReNewSubscription.t

Test plan:
 * run without the patch, the test will fail
 * run with the patch, the test will pass

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>