koha.git
4 years agoBug 24200: (follow-up) Try to fix random failures from Borrower_PrevCheckout.t
Jonathan Druart [Wed, 18 Mar 2020 12:43:52 +0000 (13:43 +0100)]
Bug 24200: (follow-up) Try to fix random failures from Borrower_PrevCheckout.t

2 other occurrences where missing.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit d4db0b96e8753b1b213b6a2efeea7a61baf0ac7e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24200: Try to fix random failures from Borrower_PrevCheckout.t
Jonathan Druart [Fri, 10 Jan 2020 10:48:09 +0000 (11:48 +0100)]
Bug 24200: Try to fix random failures from Borrower_PrevCheckout.t

It failed inconsistently, let's try to use build_sample_item and see if
it fixes the random failures.

Test plan:
 % prove t/db_dependent/Patron/Borrower_PrevCheckout.t
must return green

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit d5e9dc31ca66cff586125d1bbcff8de8bc089387)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24456: change default sort orders/make wording clearer
Lucas Gass [Fri, 17 Jan 2020 22:12:11 +0000 (22:12 +0000)]
Bug 24456: change default sort orders/make wording clearer

TEST PLAN:
1. Apply patch
2. Have some checkout from today and some from multiple previous days.
3. Set todaysIssuesDefaultSortOrder & previousIssuesDefaultSortOrder to 'earliest to latest' and confirm it sorts correctly.
4. Reverse the 2 system preferences and see that it is now sorting the opposite way.
5. Also look at the wording of each system prefence and make sure it makes sense

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit ba69672acec227e4d13d61d7a24fa41533cf6385)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23236: Remove 'its items may still be processed' in action if no match is found
Caroline Cyr La Rose [Wed, 12 Feb 2020 19:32:01 +0000 (14:32 -0500)]
Bug 23236: Remove 'its items may still be processed' in action if no match is found

When importing records and looking for duplicate records using record matching rules,
there is an option if NO match is found to "ignore incoming record (its items may
still be processed)". This doesn't make any sense. Where would the items go if there
is no match?

To test:
1) Go to Tools > Stage MARC for import
2) Browse and choose a file with at least one record that is not already in your
catalog and click on Upload file
3) Fill out the first section with the appropriate information
4) In the Look for existing records in catalog? section, choose a record matching
rule
5) In the Action if no match is found drop-down menu, choose Ignore incoming record
(its items may still be processed)
6) Click on Stage for import
7) Click on Manage staged records
8) Click Import this batch in the catalog
9) In the table, the record status should say Ignore
10) Apply patch
11) Redo steps 1-9, notice the option Ignore incoming records does not mention items
12) Make sure the tool still works and still ignores the record

Signed-off-by: Devinim <kohadevinim@devinim.com.tr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 29941cd761cae087d0ac44b66e247635816a5352)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24851: Translate the .txt in French
Jonathan Druart [Mon, 16 Mar 2020 11:39:39 +0000 (12:39 +0100)]
Bug 24851: Translate the .txt in French

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 2244ed80725a91d101d1796ab118d4fccc5ff61e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24851: Insert libraries sample data for "UNIMARC"
Jonathan Druart [Wed, 4 Mar 2020 18:06:03 +0000 (19:06 +0100)]
Bug 24851: Insert libraries sample data for "UNIMARC"

I am trying to make koha-testing-docker UNIMARC compabible.
In order to have koha-misc4dev insert all the data correctly (users, etc.) we need at least 1 library.
I am suggesting to reuse the usual library list for UNIMARC.

misc4dev will use fr-FR sample data for "UNIMARC"
This is related to https://gitlab.com/koha-community/koha-misc4dev/issues/29

Test plan:
outside your box, in koha-testing-docker (up-to-date), edit .env and set
 KOHA_MARC_FLAVOUR=unimarc
 DEBUG_GIT_REPO_MISC4DEV_URL=https://gitlab.com/joubu/koha-misc4dev.git
 DEBUG_GIT_REPO_MISC4DEV_BRANCH=unimarc

Then start the koha container
When the misc4dev will start its job, the scripts will have the expected
data to continue.

Without this patch you will get
koha_1       | Not enough data in the database, library and/or patron category does not exist at /kohadevbox/misc4dev/create_superlibrarian.pl line 31.

And plenty of errors will follow.

Also, the sample data used in misc4dev will use CPL
(/kohadevbox/misc4dev/data/sql/unimarc/1812/after_22155/items.sql)

Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit e513e32d0e3c004236048b6673f55eb45bbd82ae)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24789: [follow-up] Fix saving of macros
Nick Clemens [Mon, 16 Mar 2020 14:55:31 +0000 (14:55 +0000)]
Bug 24789: [follow-up] Fix saving of macros

Saving was accidentally commented out in patches, this restores that

To test:
1 - Create a new macro
2 - Add some content
3 - Reload the macro, no content
4 - Apply patch
5 - Repeat
6 - Macro saves/loads correctly

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 66742f6e705d5841c6559f346883bdc2f6ee1053)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24789: Remove ITS macro format
Nick Clemens [Tue, 3 Mar 2020 13:26:02 +0000 (13:26 +0000)]
Bug 24789: Remove ITS macro format

To test:
1 - Apply patches
2 - Confirm you can save, load, and run macros
3 - Confirm you have no choice of format

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit b58bb48b0b7401d010bb89bdaf7edbee1c6163ce)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 22943: Remove unused line from Auth.t
Katrin Fischer [Fri, 13 Mar 2020 08:47:53 +0000 (08:47 +0000)]
Bug 22943: Remove unused line from Auth.t

Removes an unnecessary variable declaration from Auth.t

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 04359d9bbb2dabe8eefac60cd5ed68c81d91379c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 22943: (QA follow-up) Add new cases
Martin Renvoize [Mon, 9 Mar 2020 09:17:50 +0000 (09:17 +0000)]
Bug 22943: (QA follow-up) Add new cases

A few additional cases were introduced since the original bug was
authored. This patch simply catches those cases and makes the same
change.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 59955a13836fba246746ca8aaa2384c800425665)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 22943: Renames the in_ipset function to in_iprange in C4::Auth
Hayley Mapley [Mon, 27 May 2019 01:57:05 +0000 (13:57 +1200)]
Bug 22943: Renames the in_ipset function to in_iprange in C4::Auth

Bug 14407 introduced a new system preference to allow limiting the
online self checkout system to an IP or IP Range. The function that
handles this is called in_ipset, which is the name of a linux tool. To
stop confusion, this patch renames the function to 'in_iprange', and the
variable 'ipset' within it to 'iprange'.

To test, follow the test plans outlined in Bug 14407 and confirm that
everything works as expected.

Sponsored-by: Catalyst IT
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 46b219864e3ea001d05dc69e960fd77c00c5eed6)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24858: Correct labels on wording in ExcludeHolidaysFromMaxPickUpDelay
Lucas Gass [Thu, 12 Mar 2020 22:38:47 +0000 (22:38 +0000)]
Bug 24858: Correct labels on wording in ExcludeHolidaysFromMaxPickUpDelay

TO TEST:
- Apply patch
- mark your library closed today and tomorrow
- set ReservesMaxPickUpDelay to 1 day
- set ExcludeHolidaysFromMaxPickUpDelay to "Ignore the calendar"
- place hold, capture hold
- hold expiration date is set to tomorrow (doesn't skip closed days)

- Set ExcludeHolidaysFromMaxPickUpDelay to "Use the calendar"
- Place hold, capture hold
- hold expiration date is set to the day after tomorrow (skips closed days)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 81f32a92ac7e883a98b40511c1d4e3d44b68b480)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 5103: Refactor the code to avoid repetition
Jonathan Druart [Thu, 12 Mar 2020 14:09:02 +0000 (15:09 +0100)]
Bug 5103: Refactor the code to avoid repetition

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 572c3afef1a3b6dfe3ee4d841737170ee92b7e1f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 5103: (follow-up) Using mapped item fields instead of hardcoding subfields
Aleisha Amohia [Wed, 11 Mar 2020 03:08:12 +0000 (03:08 +0000)]
Bug 5103: (follow-up) Using mapped item fields instead of hardcoding subfields

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 37de3685a4d527663f98ca11d09b4d911e00a770)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 5103: Format dates in MARC detail using dateformat syspref
Aleisha Amohia [Wed, 26 Feb 2020 02:52:24 +0000 (02:52 +0000)]
Bug 5103: Format dates in MARC detail using dateformat syspref

This patch fixes the formatting of dates on the following pages:
- catalogue/MARCdetail.pl (staff)
- cataloguing/additem.pl (staff)
- opac-MARCdetail.pl (opac)

To test:
1) Ensure that the following fields are visible in the opac, intranet
and editor. You may need to edit the subfields in your default
bibliographic framework
952$d date accessioned
952$q date due/on loan
952$r date last seen
952$s date last borrowed
952$w replacement price date

Also ensure you have dateformat system preference set

2) Go to cataloguing/additem.pl for a biblio. Fill in the fields above
if required. Save
3) Remain on cataloguing/additem.pl. Notice the items table at the top
of the page, the dates are in the generic yyyy-mm-dd format
4) Go to catalogue/MARCdetail.pl for that biblio. Notice dates in wrong
format
5) View this biblio in the opac opac-MARCdetail.pl. Scroll to bottom to
items table. Notice dates in wrong format.
6) Apply patch, restart memcached and plack and refresh pages
7) Dates should now be formatted according to dateformat preference
8) Confirm that changing the preference changes the format of the dates

Sponsored-by: Catalyst IT
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 16d756791ece7325f4541b7f2b7caaee7c9c12c5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 19288: Don't show patron info for item level holds on details.pl unless hold...
Nick Clemens [Mon, 9 Mar 2020 09:41:26 +0000 (09:41 +0000)]
Bug 19288: Don't show patron info for item level holds on details.pl unless hold is waiting

This persists after bug 20948 - we can still display patron information even if this patron is not the one
who will receive the item upon checkin. The holds tab can give an overview of holds and information - I think
on the details page the only info we need is whether there might be a item level hold, not who it is for

To test:
1 - Place an item level hold for delivery at a branch not matching home branch of item
2 - Place a record level hold for delivery at homebranch of item placed on hold above
3 - Enable LocalHoldsPriority with 'pickup library' matches the item's 'home library'
4 - View the details for the page, it says the item has a hold for the patron with an item level hold
5 - Check in the item, the hold triggered is for the next available patron, ignore the hold
6 - Apply patch
7 - Check details page, 'There is an item-level hold (priority=1)' with no patron info
8 - Check in, next available hold is still the one triggered

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 2c2e229709e723c7604fecf0a5607486ed1e6d14)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23383: fix IdRef syspref test in XSLT
Fridolin Somers [Fri, 26 Jul 2019 13:43:02 +0000 (15:43 +0200)]
Bug 23383: fix IdRef syspref test in XSLT

IdRef link is displayed via XSLT.
There is a test of syspref with just if value is defined.
But in installer/data/mysql/sysprefs.sql you see this pref will be 0 by default, which is true in XPATH.
We should test that pref is 1.

Test plan :
1) Create a fresh UNIMARC database
2) You have pref IdRef disabled
3) Simulate a SUDOC record:
  Fill a 7..$3 field with a ppn (032581270 for example).
  Fill the 009 field with an integer
4) Go to the opac detail page of the record => You don't see IdRef link
5) Enable IdRef syspref
6) Go to the opac detail page of the record => You see IdRef link
7) Disable IdRef syspref
8) Go to the opac detail page of the record => You don't see IdRef link

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit df4811ae1f2ff5a21ea5a3a7db97b19ecfdc4f6d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24838: Fix help link for patron categories
Andrew Fuerste-Henry [Wed, 11 Mar 2020 00:54:03 +0000 (00:54 +0000)]
Bug 24838: Fix help link for patron categories

To test:
- go to admin/categories.pl
- click Help, confirm it takes you to manual main page
- apply patch
- restart all
- click Help, confirm it takes you to patron categories in manual

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 5fbde57bbcb5c4035c6e7a5a7416ebbc407719e2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24565: Add patron profile to ILL list pages
Andrew Isherwood [Mon, 3 Feb 2020 11:14:50 +0000 (11:14 +0000)]
Bug 24565: Add patron profile to ILL list pages

We need the API call to get ILL requests on the patron profile page,
this commit allows this.

Test plan:
- Do not apply the patch.
- Go to the "Ill requests history" page for a patron who has made ILL
  requests
- TEST: Observe that no requests are displayed
- Apply the patch
- Refresh the page
- TEST: Observe that requests are displayed
- Go to the main "ILL requests" page
- TEST: Observe that requests are displayed

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit b32023b10109e9e487f5aa59d194fa5599231743)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 19008: Replace issues with checkouts in print statement
Jonathan Druart [Tue, 4 Feb 2020 11:09:00 +0000 (12:09 +0100)]
Bug 19008: Replace issues with checkouts in print statement

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit d6a0b07984ed63e91723fa484890f111077dbd10)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 19008: More database cleanups - QA followup
Magnus Enger [Fri, 2 Aug 2019 11:57:13 +0000 (13:57 +0200)]
Bug 19008: More database cleanups - QA followup

This patch tries to change the POD as suggested in the QA process.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit a5e723b887fe085ba36527bbf14e4c1d9d30556d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 19008: More database cleanups - item transfers
Fridolin Somers [Fri, 28 Jul 2017 14:09:14 +0000 (16:09 +0200)]
Bug 19008: More database cleanups - item transfers

misc/cronjobs/cleanup_database.pl provides some database cleanup.
Yet some tables that could need cleanup are not in this script.

This patch adds cleanup for branchtransfers table.

Test plan :
- Count : select count(*),datearrived from branchtransfers group by datearrived;
- Run cleanup : misc/cronjobs/cleanup_database.pl -v --transfers 30
- Recount

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit dd8df39986ebc7c055894fea0148f900ba4a3a45)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 19008: More database cleanups - old reserves
Fridolin Somers [Fri, 28 Jul 2017 14:01:51 +0000 (16:01 +0200)]
Bug 19008: More database cleanups - old reserves

misc/cronjobs/cleanup_database.pl provides some database cleanup.
Yet some tables that could need cleanup are not in this script.

This patch adds cleanup for old_reserves table.

Test plan :
- Count : select count(*),date(timestamp) from old_reserves group by date(timestamp);
- Run cleanup : misc/cronjobs/cleanup_database.pl -v --old-reserves 30
- Recount

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 9ce0f3a73e4de58fb04f4e7977a6299e4b480b5b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 19008: More database cleanups - old issues
Fridolin Somers [Fri, 28 Jul 2017 12:57:33 +0000 (14:57 +0200)]
Bug 19008: More database cleanups - old issues

misc/cronjobs/cleanup_database.pl provides some database cleanup.
Yet some tables that could need cleanup are not in this script.

This patch adds cleanup for old_issues table.

Test plan :
- Count : select count(*),date(timestamp) from old_issues group by date(timestamp);
- Run cleanup : misc/cronjobs/cleanup_database.pl -v --old-issues 30
- Recount

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit ce96ed4336f99d97c31bc87cfea3369ddfaf0a02)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 19008: More database cleanups - deleted patrons
Fridolin Somers [Fri, 28 Jul 2017 12:43:45 +0000 (14:43 +0200)]
Bug 19008: More database cleanups - deleted patrons

misc/cronjobs/cleanup_database.pl provides some database cleanup.
Yet some tables that could need cleanup are not in this script.

This patch adds cleanup for deletedborrowers table.

Test plan :
- Count : select count(*),date(updated_on) from deletedborrowers group by date(updated_on);
- Run cleanup : misc/cronjobs/cleanup_database.pl -v --deleted-patrons 30
- Recount

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit f2aeaede38b05cb93146d9fbe86bcd4a2a76b8d5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 19008: More database cleanups - deleted catalog
Fridolin Somers [Fri, 28 Jul 2017 12:05:03 +0000 (14:05 +0200)]
Bug 19008: More database cleanups - deleted catalog

misc/cronjobs/cleanup_database.pl provides some database cleanup.
Yet some tables that could need cleanup are not in this script.

This patch adds cleanup for deleted catalog tables.
Note that deletedbiblio_metadata is managed by foreign key on biblionumber.

Test plan :
- Count :
select count(*),year(timestamp) from deleteditems group by year(timestamp);
select count(*),year(timestamp) from deletedbiblio group by year(timestamp);
select count(*),year(timestamp) from deletedbiblioitems group by year(timestamp);
- Run cleanup : misc/cronjobs/cleanup_database.pl -v --deleted-catalog 30
- Recount

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit a0a579d773c95ec87a647497cc755b0a4cc7f55f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 19008: More database cleanups - statistics
Fridolin Somers [Fri, 28 Jul 2017 12:12:22 +0000 (14:12 +0200)]
Bug 19008: More database cleanups - statistics

misc/cronjobs/cleanup_database.pl provides some database cleanup.
Yet some tables that could need cleanup are not in this script.

This patch adds cleanup for statistics table.

Test plan :
- Count statistics : select count(*),date(datetime) from statistics group by date(datetime);
- Run cleanup : misc/cronjobs/cleanup_database.pl -v --statistics 30
- Recount statistics

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 20118bb795ce046c2b00152aeccb94ae998375e6)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23384: Fix use statement order for ArticleRequest::Status
Jonathan Druart [Tue, 18 Feb 2020 15:13:11 +0000 (16:13 +0100)]
Bug 23384: Fix use statement order for ArticleRequest::Status

Koha::ArticleRequest is used by Koha::ArticleRequests so
Koha::ArticleRequest::Status should not be needed in
Koha::ArticleRequest.
Also Koha::ArticleRequest::Status must be loaded before
Koha::ArticleRequest

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 00379c189976ac9e7e2429f5261a0b562206fc5d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24760: (follow-up) Add a neighboring test messsage
Marcel de Rooy [Fri, 6 Mar 2020 11:13:15 +0000 (11:13 +0000)]
Bug 24760: (follow-up) Add a neighboring test messsage

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 390f838d27984ea47572b729145b1268e9866f29)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24760: Use C4::BackgroundJob->fetch in tests
Julian Maurice [Fri, 28 Feb 2020 13:22:34 +0000 (14:22 +0100)]
Bug 24760: Use C4::BackgroundJob->fetch in tests

Starting with YAML 1.30 and YAML::Syck 1.32, these modules don't bless
loaded objects by default. This is not a problem as
C4::BackgroundJob->fetch bless them anyway.

So, instead of testing what's in the session, test the result of
C4::BackgroundJob->fetch, which is what's used everywhere else

Test plan:
1. Install latest version of YAML::Syck (or YAML if YAML::Syck is not
installed)
2. prove t/db_dependent/BackgroundJob.t => should FAIL
3. Apply patch
4. prove t/db_dependent/BackgroundJob.t => should PASS
5. Verify that background jobs are still working (for instance,
tools/batchMod.pl)

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit c1c3cfed5ca2709b99587e8907b68d158ce013f9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24788: Remove autoloaded column accessors in Koha::Object->store
David Gustafsson [Tue, 3 Mar 2020 13:32:31 +0000 (14:32 +0100)]
Bug 24788: Remove autoloaded column accessors in Koha::Object->store

Columns are accessed as methods, relying on AUTOLOAD, in
Koha::Object->store. This could be a source of strange bugs
if a column name clashes with an existing method name.

To test:

1) Apply patches for Bug 14957
2) Follow the testing instructions, when saving a new marc rule and
error is thrown.
3) Apply patch
4) Try saving a new rule once again, this should now work

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 508a6ad027b34c2279fbb1ff994152144b38ceb8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24813: Prevent api/v1/holds.t to fail randomly
Jonathan Druart [Thu, 5 Mar 2020 15:27:15 +0000 (16:27 +0100)]
Bug 24813: Prevent api/v1/holds.t to fail randomly

Hold cannot be suspended if found=W:
Koha::Hold->suspend_hold
 90     if ( $self->is_found ) {    # We can't suspend found holds

So when TestBuilder generate a hold with found=W the test fail.

A question however:
Why did not we have the correct exception displayed somewhere? That
would be much more helpful to find the problem!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit c405b03dd367adb7c1c274477865a7444f59c9e9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 22969: fix biblionumber on 001 in UNIMARC XSLT
Fridolin Somers [Thu, 23 May 2019 05:55:15 +0000 (07:55 +0200)]
Bug 22969: fix biblionumber on 001 in UNIMARC XSLT

In UNIMARC default configuration the 001 is linked to biblio.biblionumber.
In some XSLT files, 090$a is used.
This is by default biblioitems.biblionumber so it usually works but it may not be the same and var biblionumber is used to create hyperlinks to record detail page.

Test plan :
1) Use UNIMARC database
2) Set default in all XSLT system preferences
3) At OPAC, perform a search and click on a result
4) Check displayed page shows the correct biblio record
5) Same at intranet

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested on clean UNIMARC install.
Before insert new records: "alter table biblioitems AUTO_INCREMENT = 5"
Added two records, with result:
+--------------+------------------+
| biblionumber | biblioitemnumber |
+--------------+------------------+
|            1 |                5 |
|            2 |                6 |
+--------------+------------------+
Without patch, OPAC results shows for first record
  http://opac/cgi-bin/koha/opac-detail.pl?biblionumber=5, Wrong!
with patch result is correct

Works, no errors

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 5bf9a83495971a196224f9342394a5b2d065d3e1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24798: smart-rules.tt has erroneous comments
Owen Leonard [Wed, 4 Mar 2020 18:29:24 +0000 (18:29 +0000)]
Bug 24798: smart-rules.tt has erroneous comments

This patch corrects a couple of invalid Template Toolkit comments in the
Circulation and Fines rules template.

To test, apply the patch and log into the staff client as an
administrator.

On the Circulation and Fines Rules page "View source" and look for
instances of the text "[#% Default branch %#]" There should be none.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] There is a theoretical difference between [% # and [%#. The latter
marks the whole directive as a comment and not just until EOL.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 1fbd4468642aa09b999b3baf014b6f3a0afd6df8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoRevert "Bug 24719: Remove use of CGI object in C4::Context::set_remote_address()"
Lucas Gass [Thu, 9 Apr 2020 19:49:11 +0000 (19:49 +0000)]
Revert "Bug 24719: Remove use of CGI object in C4::Context::set_remote_address()"

This reverts commit d8cb07d6658850a84f125956d6f058a1fa72de74.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24719: Remove use of CGI object in C4::Context::set_remote_address()
David Cook [Thu, 27 Feb 2020 00:28:48 +0000 (00:28 +0000)]
Bug 24719: Remove use of CGI object in C4::Context::set_remote_address()

This patch replaces the CGI "http" object method with its equivalent
class method, which doesn't require object instantiation and thus skips
global initialization and premature handling of the incoming HTTP request.

Test plan:
0. Disable Plack if it is enabled
1. Set koha_trusted_proxies in koha-conf.xml to 1.1.1.1
2. Clear Memcached
3. Try to upload MARCXML file to /cgi-bin/koha/tools/stage-marc-import.pl
4. Note that form below "Upload progress" never appears and errors show
in browser console
5. Apply the patch
6. Try to upload MARCXML file to /cgi-bin/koha/tools/stage-marc-import.pl
7. Note that form appears below "Upload progress"

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 74e3ef126c5992ac049a35c75a7d3879669d7a49)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24552: Be compatible with Search::Elasticsearch 6.00
Julian Maurice [Fri, 31 Jan 2020 10:13:47 +0000 (11:13 +0100)]
Bug 24552: Be compatible with Search::Elasticsearch 6.00

There is no need to specify the `client` param here because
'5_0::Direct' is the default value for Search::Elasticsearch 5.x and it
breaks when Search::Elasticsearch 6.x is installed

Test plan:
1. Apply the patch
2. Make sure you have Search::Elasticsearch 5.x
3. Reload starman
4. Verify that search works
5. Install Search::Elasticsearch 6.x
6. Reload starman
7. Verify that search works

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit a3143506b2edf7ffca185e650c18b89dc249423f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 17532: Make koha-shell propagate the error code
Jonathan Druart [Thu, 13 Feb 2020 11:03:36 +0000 (12:03 +0100)]
Bug 17532: Make koha-shell propagate the error code

Context: I am trying to make koha-misc4dev stop when something wrong happens.
Basically we do not want the process to continue of the DB has not been populated correctly.
It will make the errors easier to catch.

The issue: Say a script that will return an error (die in perl for an easy example),
koha-shell will not return the 255 error code, but 0 instead.
The caller cannot know something wrong happened

The solution is to propagate the error and make koha-shell return the same error code
as the command it executed

An example:
=== t.pl ===
die('something wrong');

% perl t.pl;echo $?
something wrong at t.pl line 1.
255

% sudo koha-shell kohadev -p -c 'perl xxx.pl' ; echo $?
something wrong at xxx.pl line 1.
0

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Tested it with
  $ sudo debian/scripts/koha-shell kohadev -c 'exit 8'
  $ echo $?
  8
The unpatched version returns 0 (forgets about the error code).

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 5d22e0b3a331e35b8f1e494bc366c1624c982cf8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 17464: Order deny,allow / Deny from all was deprecated in Apache 2.4 and is now...
David Cook [Mon, 13 Jan 2020 06:05:17 +0000 (17:05 +1100)]
Bug 17464: Order deny,allow / Deny from all was deprecated in Apache 2.4 and is now a hard error

Patch change Apache access control from 2.2 to 2.4 directives.

Test plan:
0. Apply patch
1. Build Koha from source
2. Copy or symlink koha-dev/etc/koha-httpd.conf into your relevant
Apache directory.
3. Reload Apache
4. Note a lack of syntax errors regarding the "Order" directive

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit c0422998f89daf82eb898ddb951d46df97a6f1e4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23488: Line wrapping doesn't always respect word order in Patron card creator
Maryse Simard [Wed, 21 Aug 2019 21:20:16 +0000 (17:20 -0400)]
Bug 23488: Line wrapping doesn't always respect word order in Patron card creator

When wrapping long lines of text, the line is divided by removing each
word from the end of the line and putting it in a new one until the line
is the right width. When the word to be removed appears multiple time
in the line, it is not the last occurrence that is removed.

This patch changes the regular expression used to remove the part of
the text that is wrapped to a new line, making sure it removes it at
the end of the text.

Test plan:

1. Go to Tools > Patron card creator

2. Have a card template and a card batch
    -> If needs be, you can create them by using
       New > Card template or New > Card batch

3. Create a layout and use one text field containing a long text with
    at least one word which is repeated a minimum of 2 times
    (preferably towrdds the end of the text, since it has to be picked
    as one of the words to appear in the new line). You can use this:

        one two three one two three one two three one two three
        one two three one two three one two three one two three ...

4. Go to Manage > Card batches and export a batch

5. Choose the layout set up in 3.

6. Click the Export button and open the resulting pdf file

7. Notice all the repeated word have been grouped
    -> For this example : all of the ones appear first, followed by
       all the twos and only then the threes.

8. Apply patch

9. Repeat step 4 through 7
    => this time the order of the words has not changed!

Signed-off-by: Gabriel DeCarufel <gabriel@inlibro.com>
Signed-off-by: William Frazilien <william.frazilien@inlibro.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 5811331a5a07b84c39de7485fd2d21df7d45be34)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23753: Add missing humanMsg library to pages using background job JavaScript
Owen Leonard [Fri, 28 Feb 2020 16:48:37 +0000 (16:48 +0000)]
Bug 23753: Add missing humanMsg library to pages using background job JavaScript

The JavaScript used to process background uploads calls the humanMsg
library under some circumstances. There are several templates which use
background-job-progressbar.js which don't include the humanMsg assets.
This patch corrects those templates.

Note: upload-images.tt has been modified to remove the inclusion of
background-job-progressbar.js because it was unused.

To test, apply the patch and test the following processes which include
background job processing:

 - Batch item modification -- the background job is triggered when you
   submit your changes
 - Batch record modification -- the background job is triggered when you
   submit your changes
 - Stage MARC for import -- the background job is triggered when you
   click the "Sage for import" button after uploading a file
 - Staged MARC management -- the background job is triggered when you
   click "Import this batch into the catalog"

In each case the process should complete correctly. If you would like to
test the error message handling provided by the humanMsg library you can
deliberately introduce an error into the JavaScript. After applying the
patch you can modify js/background-job-progressbar.js to alter line 63
from:

   url: f.action,

...to:

   url: f.action + "foo",

Perform the same tests and confirm that you see an error message. Don't
forget to undo your changes to background-job-progressbar.js before
signing off.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 4516a3ead6577131cc8087527a6d0c42158597f8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24747: Corrects on-screen instructions in branch transfer limits
Andrew Fuerste-Henry [Thu, 27 Feb 2020 20:09:02 +0000 (14:09 -0600)]
Bug 24747: Corrects on-screen instructions in branch transfer limits

To test:
1- go to cgi-bin/koha/admin/branch_transfer_limits.pl
2- see wording "Check the boxes for the libraries you accept to checkin items from"
3- apply patch
4- see wording "Check the boxes for the libraries you allow your items to be transferred to"

To verify new wording accuractely describes behavior:
1- Set UseBranchTransferLimits set to Enforce using itemtype
2- Confirm circ rules allow holds
3- Confirm hold policy by item type allows holds
4- Confirm all branches are valid pickup locations in branch setup
5- In Branch Transfer Limits, set dropdown to Branch A, select itemtype Book, disable all transfers so Branch A does not accept books from any other branch
6- Find a patron from Branch A
7- Find a book from Branch B
8- On the intranet, successfully place hold on item for patron for pickup at branch A
9- Cancel hold
10- Log into opac as patron
11- Successfully place hold on item for pickup at Branch A
12- Cancel hold
13- In Branch Transfer Limits, set dropdown to Branch A, select itemtype Book, ENABLE all transfers so Branch A DOES accept books from any other branch
14- In Branch Transfer Limits, set dropdown to Branch B, select itemtype Book, disable all transfers so Branch B does not accept books from any other branch
15- On the intranet, try to place a hold on item for patron, confirm Branch B is your only pickup option
16- On the OPAC, log in as patron, try to place a hold on item, confirm Branch B is your only pickup option

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 84026f258909e1203f34793a1089388cd933d1c9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24733: created_by param should be an arrayref
Nick Clemens [Wed, 26 Feb 2020 03:16:26 +0000 (03:16 +0000)]
Bug 24733: created_by param should be an arrayref

We allow for the user to add multiple users to this field, and the
search function expects and array. We have been treating it as a scalar

TO test:
1 - Have an open basket in acquisitions
2 - Add to basket - from an existing order (copy)
3 - Enter a name in the 'Basket created by' field and select a user
4 - Hit search
5 - ISE (Can't use string ("1") as an ARRAY ref while "strict refs" in use at /usr/share/koha/lib/C4/Acquisition.pm line 2482.)
6 - Apply patch
7 - Repeat 1-4
8 - Success!
9 - Test with mutiple 'created by' entries as well

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 789866e585be0a5c439559383325cbe4db525412)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 21879: Code cleaning in printinvoice.pl
Nazlı Çetin [Fri, 21 Feb 2020 14:33:42 +0000 (14:33 +0000)]
Bug 21879: Code cleaning in printinvoice.pl

Coming from
  commit 51aa6db46c604aa202a3d8f8e5028557480efbd5
  Bug 12001: Move GetMemberAccountRecords to the Koha namespace

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f9f7b5cc80eb84309dd1ff667e3166e0e8634ef4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24732: Set DumpTemplateVars Dumper options for Indent and Sort
Nick Clemens [Tue, 25 Feb 2020 18:51:41 +0000 (18:51 +0000)]
Bug 24732: Set DumpTemplateVars Dumper options for Indent and Sort

To test:
1 - Enable sysprefs
    DumpTemplateVarsOpac
    DumpTemplateVarsIntranet
2 - View some pages on staff client and opac
3 - View the page source
4 - See a large mass of comments including the page vars at the top of the source
5 - Refresh page and note order of vars changes
6 - Apply patch
7 - View page source on some pages and note things are much easier to read
8 - Refresh page and note variable order does not change

Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit a0808619e86f9902546bc9d221db4c33567f2fac)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24294: (QA follow-up) Add rollback and 008 default test
Marcel de Rooy [Tue, 25 Feb 2020 13:40:52 +0000 (13:40 +0000)]
Bug 24294: (QA follow-up) Add rollback and 008 default test

Default for 008 was not tested yet.
Only wondering if we should insert default values only when we meet an
undefined value. Or should we also add if we meet an empty string? Is the
latter not more realistic in MARC?

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 9056d53e32667ae997516a00586c02f567cb948a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24294: Add default value support for control fields in ACQ framework
Jonathan Druart [Thu, 2 Jan 2020 11:09:27 +0000 (12:09 +0100)]
Bug 24294: Add default value support for control fields in ACQ framework

When trying to add an order using the ACQ framework with a 008@ tag,
Koha explodes:

Control fields (generally, just tags below 010) do not have subfields,
use data() at /home/vagrant/kohaclone/C4/Acquisition.pm line 3272.

Test plan:
Set a default value for a control field in the ACQ framework
Turn on UseACQFrameworkForBiblioRecords
Create a new order from a new record
The default value should be displayed
Save
=> No crash

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit dec127df2ab986ed555f7a2cadc94491abecfbfe)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24605: (QA follow-up) Fix unencoded series link in staff interface
Katrin Fischer [Sun, 23 Feb 2020 21:25:00 +0000 (21:25 +0000)]
Bug 24605: (QA follow-up) Fix unencoded series link in staff interface

Same change as the first patch, but for the staff detail page.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 6298eafa642529283ed82f72638bb434762a2c15)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24605: Fix unencoded series link
Nick Clemens [Thu, 6 Feb 2020 17:45:07 +0000 (17:45 +0000)]
Bug 24605: Fix unencoded series link

To test:
1 - Add an 830 to a record with a volume subfield separated by a semicolon
    830$aThe series ;$vvol 8.
2 - View the record in the opac
3 - Click the series link, no results
4 - View the link url - the semicolon is not encoded
5 - Apply patch
6 - link works
7 - URL is corrrectly encoded

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit e3cffae41f82fb22100bcf269696107cb102660e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24809: (QA follow-up) Add prefix to prevent disambiguity
Marcel de Rooy [Fri, 20 Mar 2020 10:12:24 +0000 (10:12 +0000)]
Bug 24809: (QA follow-up) Add prefix to prevent disambiguity

This seems not to be needed. Just at the safe side.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 96e6362ab721621dd7e24d6f8a56d168e2a9b497)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24809: Get only timestamp of deleted items attached to existing bibs when check...
Nick Clemens [Thu, 5 Mar 2020 10:59:22 +0000 (10:59 +0000)]
Bug 24809: Get only timestamp of deleted items attached to existing bibs when check if bib deleted

To test:
 1 - Edit/create a file in the koha home dir '/var/lib/koha/{instance}/OAI.yaml' with content like below:
format:
  marcxml:
    metadataPrefix: marcxml
    metadataNamespace: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim
    schema: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd
    include_items: 1
 2 - Set the systempreferences below to indicated values:
  OAI-PMH => Enable
  OAI-PMH:ConfFile => /var/lib/koha/{instace}/OAI.yaml
 3 - View a record with items and confirm the items show:
  http://localhost:8080/cgi-bin/koha/oai.pl?verb=GetRecord&metadataPrefix=marcxml&identifier=KOHA-OAI-TEST:4
 4 - Delete the items, then delete the record
 5 - Reload the URL from step 3
 6 - Internal Server Error:
  Empty String at /kohadevbox/koha/Koha/OAI/Server/Record.pm line 58.
    at /usr/share/perl/5.24/Carp.pm line 167
 7 - Apply patch
 8 - restart_all
 9 - Repeat
10 - Reload URL from step 3
11 - Success

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 68488f40558d66b7e4e444c1ed57a260b33ee034)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24114: (QA follow-up) Fix counts for lock, anonymize and delete
Marcel de Rooy [Fri, 29 Nov 2019 09:45:48 +0000 (09:45 +0000)]
Bug 24114: (QA follow-up) Fix counts for lock, anonymize and delete

Since these operations impact on the resultset, the counts should be
saved before.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 9b0ba1c096ed72bd867792a11de59a825355e6dc)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24114: (follow-up) Resolve warning on non-numeric subtraction
Marcel de Rooy [Fri, 29 Nov 2019 09:17:19 +0000 (09:17 +0000)]
Bug 24114: (follow-up) Resolve warning on non-numeric subtraction

Argument "" isn't numeric in subtraction (-) at /usr/share/koha/Koha/Patrons.pm line 290.

Coming from an empty or undefined FailedLoginAttempts.

Test plan:
Verify that Koha/Patrons.t still passes.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit c242f8667794cc4217155c783dfe8065d77ac788)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24114: Remove warn statements from Koha::Patrons
Jonathan Druart [Tue, 26 Nov 2019 10:11:35 +0000 (11:11 +0100)]
Bug 24114: Remove warn statements from Koha::Patrons

The warn must be done in the cronjob.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Followed this test plan (with two follow-ups applied):
[1] Prefs: UnsubscribeReflectionDelay=1, PatronAnonymizeDelay=2, PatronRemovalDelay=3, FailedLoginAttempts was undef
[2] Pick borrower and set expiry to NOW-2, and lock him (login_attempts=-1) Could be achieved too by settings FailedLoginAttempts and trying wrong passwords. Run cleanup job:
    Locked 0 patrons
    Anonymized 1 patrons
    Deleted 0 patrons
[3] Pick borrower, set expiry to NOW-3. Run cleanup job:
    Locked 0 patrons
    Anonymized 0 patrons
    Deleted 1 patrons

Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit d7f922eb63c420375f42ab419d9db154650fbd4d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24682: Make UsageStatsGeolocation readonly (and redirect to the config page)
Jonathan Druart [Fri, 21 Feb 2020 09:31:54 +0000 (10:31 +0100)]
Bug 24682: Make UsageStatsGeolocation readonly (and redirect to the config page)

To prevent invalid values in this pref (and so on the server), we should
make this input readonly on the syspref page.
The sysprefs related to Hea should be edited from the dedicated page, so
also adding a note about that.

Test plan:
Search syspref with "UsageStats"
Notice the note about the admin page
Notice the UsageStatsGeolocation input is now readonly (and resized, to
display the whole value when filled)

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 60a0c1c51cc4667eefa62232d7a45a823168a378)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24527: misc/cronjobs/update_totalissues.pl problem with multiple items
Fridolin Somers [Tue, 28 Jan 2020 15:09:20 +0000 (16:09 +0100)]
Bug 24527: misc/cronjobs/update_totalissues.pl problem with multiple items

misc/cronjobs/update_totalissues.pl when issuing statistics table, no-incremental,  has a problem for biblio with multiple items.
The first SQL query gets the biblios linked to items with issues in statistics :

SELECT
  biblio.biblionumber, COUNT(statistics.itemnumber)
FROM
  biblio
LEFT JOIN
  items
ON
  (biblio.biblionumber=items.biblionumber)
LEFT JOIN
  statistics
ON
  (items.itemnumber=statistics.itemnumber)
WHERE
  statistics.type = 'issue'
$limit
GROUP BY
  biblio.biblionumber

The second SQL query is :
SELECT
  biblio.biblionumber, 0
FROM
  biblio
LEFT JOIN
  items
ON
  (biblio.biblionumber=items.biblionumber)
LEFT JOIN
  statistics
ON
  (items.itemnumber=statistics.itemnumber)
WHERE
  statistics.itemnumber IS NULL
GROUP BY
  biblio.biblionumber

The problem is that this second query will set to 0 where ANY item has no entry in statistics table.
So when running it sets 0 to the biblio that had a value from first
query.

I think the best fix is to use "WHERE statistics.type = 'issue'" inside que JOIN :
LEFT JOIN statistics ON (items.itemnumber=statistics.itemnumber AND statistics.type = 'issue')

Test plan :
1) Begin with an empty database
2) Create a biblio 1 with no items
3) Create a biblio 2 with 3 items
4) Create a biblio 3 with 2 items
5) Checkout and checkin all items of biblio 2
6) Checkout and checkin the firt item of biblio 3
7) run misc/cronjobs/update_totalissues.pl --use-stats -v
8) Check biblio 1 has biblioitems.totalissues = 0
9) Check biblio 2 has biblioitems.totalissues = 3
10) Without patch the biblio 3 has biblioitems.totalissues = 0
11) With patch the biblio 3 has biblioitems.totalissues = 1
12) Check misc/cronjobs/update_totalissues.pl --incremental is OK

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 91da9841d78d26db205c6493c27c174c20e7b7c2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24711: Don't add logout input to login form
Nick Clemens [Fri, 21 Feb 2020 21:11:37 +0000 (21:11 +0000)]
Bug 24711: Don't add logout input to login form

To test:
1 - Set OpacPublic syspref to 'Disable'
2 - Log in to OPAC
3 - Log out
4 - Try to log in again
5 - No error, but you get the login form again
6 - Apply patch
7 - Repeat
8 - This time you can log in again

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit a137b170c0f4bac8fdd69dd4e9fe6e46c60edd59)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23968: Add div this id around OPACMySummaryNote content
Fridolin Somers [Tue, 5 Nov 2019 08:55:25 +0000 (09:55 +0100)]
Bug 23968: Add div this id around OPACMySummaryNote content

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cffa7623e13d8a21e66f5c9dc8caaa5668738411)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23968: fix OPACMySummaryNote feature
Fridolin Somers [Tue, 5 Nov 2019 08:52:59 +0000 (09:52 +0100)]
Bug 23968: fix OPACMySummaryNote feature

The system preference OPACMySummaryNote is used to display on the logged-in patron summary page at OPAC.
It does not display anymore.

Looks like it comes from code :
[% IF OPACMySummaryNote %][% Koha.Preference('OPACMySummaryNote') | $raw %][% END %]
OPACMySummaryNote used to be a provided variable.

Test plan:
1) Enable system preference OPACMySummaryNote
2) Enter some HTML into it
3) Go to OPAC and loggin
4) Check you see the HTML in opac-user.pl
5) Disable the preference
6) Check you dont see the HTML anymore

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d5c501bf63f9d42bc9d872eef391c0864753c8ba)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoUpdate release notes for 19.05.09 release v19.05.09
Lucas Gass [Wed, 25 Mar 2020 16:06:49 +0000 (16:06 +0000)]
Update release notes for 19.05.09 release

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoIncrement version for 19.05.09 release
Lucas Gass [Wed, 25 Mar 2020 16:00:18 +0000 (16:00 +0000)]
Increment version for 19.05.09 release

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoTranslation updates for Koha 19.05.09
Koha translators [Wed, 25 Mar 2020 15:22:26 +0000 (12:22 -0300)]
Translation updates for Koha 19.05.09

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24673: Add CSRF token support to opac-messaging.pl
David Cook [Mon, 17 Feb 2020 06:50:49 +0000 (06:50 +0000)]
Bug 24673: Add CSRF token support to opac-messaging.pl

This patch adds CSRF token support to opac-messaging.pl,
which allows users to manually update their messaging preferences,
but prevents bad actors from tricking people into updating their
preferences from cross-site requests.

Test plan:
0. Set SMSSendDriver global system preference to "Test" if unset
1. Log into the OPAC
2. Navigate to a URL in your browser like the following:
http://localhost:8080/cgi-bin/koha/opac-messaging.pl?modify=yes
&1=email&digest=1&2-DAYS=5&2=email&digest=2&4=email&SMSnumber=0444444444
3. Observe that the preference and SMS number update

4. Apply the patch

5. Navigate to a URL in your browser like the following:
http://localhost:8080/cgi-bin/koha/opac-messaging.pl?modify=yes
&1=email&digest=1&2-DAYS=5&2=email&digest=2&4=email&SMSnumber=0444444444
6. Observe that you get an error message of "Wrong CSRF token" instead
of the previous behaviour
7. Navigate to a URL in your browser like the following:
http://localhost:8080/cgi-bin/koha/opac-messaging.pl
8. Update "Advance notice" to 3 and update "SMS number" to 61111111111
9. Observe that the "Advance notice" and "SMS number" fields update
correctly

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 35cdeadbdfbf75731688f71778756aab73ffb824)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24878: Add auth check for copy-holidays
Jonathan Druart [Tue, 17 Mar 2020 10:37:12 +0000 (11:37 +0100)]
Bug 24878: Add auth check for copy-holidays

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 6ef4c45b845b67326e1b115f3c13986135c96222)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24878: Add authentication checks to the calendar tool
Jonathan Druart [Mon, 16 Mar 2020 15:26:48 +0000 (16:26 +0100)]
Bug 24878: Add authentication checks to the calendar tool

There is a security hole in 2 scripts that are used by the UI to edit
holidays.

To test:
1) Go to Tools -> Calendar, for Centerville
   Check no holiday for 30/4/2020
2) To add a new holiday without login execute
   a curl command with necessary parameters
3) Reload page from 1), verify the new holiday
   edit and delete the holiday
4) Apply the patch
5) Do 2) again, this time you get a lengthy output,
   with the magic words:

   <title>Koha &rsaquo;
       Log in to Koha
   </title>

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Only tested newHoliday but the fix is the same.
No errors

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 656e7814b34d07534fa3a044f9cc7a8f4f4feea6)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24846: DBRev 19.05.08.004
Lucas Gass [Tue, 24 Mar 2020 15:38:34 +0000 (15:38 +0000)]
Bug 24846: DBRev 19.05.08.004

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24846: Update items.onloan with the new due date
Jonathan Druart [Tue, 17 Mar 2020 15:59:44 +0000 (16:59 +0100)]
Bug 24846: Update items.onloan with the new due date

Signed-off-by: Donna Bachowski <donna@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit b56562f2d0fe466dee2bc5c22f3753b140477a13)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24846: Add new tool to batch extend due dates
Jonathan Druart [Mon, 16 Mar 2020 10:45:44 +0000 (11:45 +0100)]
Bug 24846: Add new tool to batch extend due dates

With events sometimes leading to unforeseen branch closures (think Coronavirus as
an example), it would be helpful to have a tool that would allow librarians to
update due dates in bulk based on branch and current due date of the material.

It allows to select checkouts given the following parameters:
 * libraries
 * patron's categories
 * range of the due date

You can set a hard due date, or define a number of days to extend the
due date.

Test plan:
Check some items out
Use the new tool to extend the due dates
Test the different filters to make sure they all work

Note: What about holidays?

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 0ff5dc25ffac4c13c68b8a2db9046e844f23d028)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24846: Link to the new tool
Jonathan Druart [Mon, 16 Mar 2020 10:51:10 +0000 (11:51 +0100)]
Bug 24846: Link to the new tool

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 32e5ec841a748249462189846c267a5078febe81)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24846: Add new permission batch_extend_due_dates
Jonathan Druart [Mon, 16 Mar 2020 10:45:15 +0000 (11:45 +0100)]
Bug 24846: Add new permission batch_extend_due_dates

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24676: Remove <p/> typo in opac-auth.tt
David Cook [Tue, 18 Feb 2020 00:59:05 +0000 (00:59 +0000)]
Bug 24676: Remove <p/> typo in opac-auth.tt

This patch removes some trivial invalid HTML from opac-auth.tt

Test plan:
1. Apply patch
2. As an unauthenticated user, try to place a hold on a search result
e.g. http://localhost:8080/cgi-bin/koha/opac-reserve.pl?biblionumber=29
3. View source or use an inspector to see there is no <p></p> block
between <input type="submit" value="Log in" class="btn"> and
<div id="nologininstructions">

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 9ce7bc002599fcd27208029fbeef75933ff28dfe)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 21663: DBRev 19.05.003
Lucas Gass [Wed, 18 Mar 2020 22:03:37 +0000 (22:03 +0000)]
Bug 21663: DBRev 19.05.003

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 21633: (follow-up) Cleanup other values for finesMode
Nick Clemens [Thu, 23 Jan 2020 12:06:21 +0000 (12:06 +0000)]
Bug 21633: (follow-up) Cleanup other values for finesMode

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 916dd8d7234f4613a06627cd43fe189e285624c2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 21633: Remove finesMode 'test'
Nick Clemens [Fri, 3 Jan 2020 14:56:53 +0000 (14:56 +0000)]
Bug 21633: Remove finesMode 'test'

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit aab0258799f372731ec991dacb60a9f4d161126b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24094: Unit tests
Nick Clemens [Fri, 31 Jan 2020 14:18:14 +0000 (14:18 +0000)]
Bug 24094: Unit tests

Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 8288f02c3722093d6d8dd6f00953efe3c542f360)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24094: Strip trailing spaces and punctuation from authority headings
Nick Clemens [Fri, 31 Jan 2020 14:18:24 +0000 (14:18 +0000)]
Bug 24094: Strip trailing spaces and punctuation from authority headings

Both when searching for and creating new authorities we need to remove
punctuation that exists in the bibliographic record but does not belong in
the authority record.

For example, a series with a volume contains a semicolon in the bib record,
however, this should not be passed to the authority as the volume is not
included in the authority record.

To test:
 1 - Set AutoCreateAuthorities to 'generate'
 2 - Set BiblioAddsAuthorities to 'true'
 3 - Set CatalogModuleRelink to 'Do'
 4 - Find or create a record with:
    a 100 field with a subfield e preceded by a comma: 100 $aBoring, M. Eugene M ,$e author
    an 830 field with a volume preceded by a semicolon: 650$aLord of the rings ;$v 3.
 5 - Save the records and check the links
 6 - Note punctuation is passed through
 7 - Save again, auth records are created again
 8 - Apply patch
 9 - Save again, new auth records are created again
10 - Check the records, punctuation has been removed
11 - Save again, no more records created.

Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 4dd2445fd667294b9cf430f7a6986ea3ceb1cc05)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24494: Make the regex more exact
Jonathan Druart [Thu, 13 Feb 2020 16:01:06 +0000 (17:01 +0100)]
Bug 24494: Make the regex more exact

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 3c45a6ac63b93fcaa67b2c2d529cbc95bd2a44da)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24494: tests: 00-valid-xml.t shouldn't check node_modules
Victor Grousset/tuxayo [Thu, 23 Jan 2020 14:55:18 +0000 (15:55 +0100)]
Bug 24494: tests: 00-valid-xml.t shouldn't check node_modules

== Test plan ==
- work with SCSS (just recompile it if you never did)
  - https://wiki.koha-community.org/wiki/Working_with_staff_client_SCSS
- now you have a node_modules directory
- prove -r t/00-valid-xml.t
- it should fail on files in node_modules
- apply this patch
- prove -r t/00-valid-xml.t
- it should work
- sabotage a legitimate XML file, like etc/SIPconfig.xml
- prove -r t/00-valid-xml.t
- it should fail, good the test is still useful
- undo the sabotage

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 088a610682f1a1be3fd05b64c5080faa0ff7cfd7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 19791: Keep user in circ when viewing patron's logs
Jonathan Druart [Fri, 14 Feb 2020 10:44:44 +0000 (11:44 +0100)]
Bug 19791: Keep user in circ when viewing patron's logs

When a librarian is viewing the log for a given patron (tab "modification log"
from the circulation module), the "object" and "modules" parameter can
be modified. It does not make sense, we should stay in the circulation
module and avoid those fields to be modified.

Test plan:
- Modify several patrons (in order to have several modification logs)
- Go to the modification log tab of one of them
- Notice that the "Object" input is not a "Borrowernumber" labelled
input and that you cannot modify it.
Also notice that the "modules" is hidden.
- Go to the log viewer tool and notice that the view is still the same
as before this patch.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit d78feb1d2fed87f2f38b4d4b57a3c0e5cff63b9d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24051: Remove "search( %condition ) is deprecated" warning from batchMod.pl
Jonathan Druart [Mon, 18 Nov 2019 10:29:46 +0000 (11:29 +0100)]
Bug 24051: Remove "search( %condition ) is deprecated" warning from batchMod.pl

Test plan:
Go to Home › Tools › Batch item modification
Insert barcodes and continue
=> Without this patch you will get warning in the log
=> With this patch applied you warning does no longer appear
Confirm that the number of holds is correct

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit d833b9f957b5b537dd831ad4d9296b6163db2ba9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 22245: Allow copy/move from and to control fields
Jonathan Druart [Sat, 16 Feb 2019 14:46:08 +0000 (11:46 -0300)]
Bug 22245: Allow copy/move from and to control fields

The JS conditions were wrong, we want to allow copy and move between
control fields.

Test plan:
Create a new MARC modification template action using control fields.
Confirm that you are allowed to copy/move a control field to another one

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 72cbcf7c4b2d921721b520fd8e67d0c7d8c7f8e0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 17221: (follow-up) Orphan comma in shelf browser
Katrin Fischer [Sun, 12 Jan 2020 03:55:41 +0000 (03:55 +0000)]
Bug 17221: (follow-up) Orphan comma in shelf browser

This further improves the display if no location or no
collection has been set. Example output:

Browsing Centerville shelves, Collection: Non-fiction

Also changes 'Collection code' to 'collection' and takes
care of additional spaces before the comma.

To test:
- Make sure your OpacShelfBrowser pref is set to "Show"
- Search for a record with items and callnumbers in your OPAC
- "Browse shelf"
- Navigate back and forth, verify the information showing on
  top of the list is correctly formatted
- Try different combinations for the following prefs:
  - ShelfBrowserUsesCcode
  - ShelfBrowserUsesHomeBranch
  - ShelfBrowserUsesLocation
- Verify the display is always nicely formatted

Note: fixing capitalization here is tricky, as it also
depends on what was displayed before. If you have no
homebranch, you would want "Shelving...", if you have one
we'd like "shelving...". Left as I found it for now.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit d54a0d81c51396d9a0f94a264fb33688894caebe)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 17221: Remove orphan commas in shelf browser
phette23 [Sun, 12 Jan 2020 10:32:53 +0000 (11:32 +0100)]
Bug 17221: Remove orphan commas in shelf browser

This patch adds more conditions to the shelf browser template
such that the displayed text reads as a proper list no matter
what combination of system preferences are utilized

Sponsored-by: California College of the Arts
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 091133983b116e2b5a330223404187482e5d5e79)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24110: Do not html filter TT vars when dumped
Jonathan Druart [Tue, 26 Nov 2019 08:27:21 +0000 (09:27 +0100)]
Bug 24110: Do not html filter TT vars when dumped

DumpTemplateVarsIntranet and DumpTemplateVarsOpac are devs tools to
display the variables sent to the template. They should not be filtered
otherwise it's getting complicate to read.

For instance: $VAR1 = { var =&gt; val }

Test plan:
Turn DumpTemplateVarsIntranet on
Go to the main page
Show the source of the page
Confirm that the variable are displayed as it and not filtered

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 710a37220017025c039d64a06a307130bfdcae67)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24514: Add option to exclude title from patron-title.inc
Nick Clemens [Fri, 24 Jan 2020 17:33:48 +0000 (17:33 +0000)]
Bug 24514: Add option to exclude title from patron-title.inc

Without this patch sorting by patron name on the 'holds awaiting
pickup' report sorted by title, surname, firstname. With this
patch the list will sort by surname, firstname, ignoring the title.

To test:
- generate and capture a hold for a patron named "Mr. A A"
- generate and capture a hold for a patron named "A A"
- generste and capture a hold for patron named "Mr. B B"
- generste and capture a hold for patron named "B B"
- go to holds awaiting pickup
- sort by patron name ascending
- holds sort Mr. A, Mr. B, A, B
- sort by patron name descending
- holds sort B, A, Mr. B, Mr. A
- APPLY PATCH
- Reload holds awaiting pickup
- Confirm holds sort on Surname

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit fe86bf2b6c7a0afb8be0a0030f8013dd9f5d7f85)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 18933: Allow OPAC messaging SMS number to be set to empty
Aleisha Amohia [Sun, 9 Feb 2020 21:55:01 +0000 (21:55 +0000)]
Bug 18933: Allow OPAC messaging SMS number to be set to empty

To test:
1) Ensure EnhancedMessagingPreferences is enabled and
EnhancedMessagingPreferencesOPAC is set to Show. Set SMSSendDriver to
Email
2) Log in to OPAC, go to your messaging tab
3) Set an SMS number if you havent already
4) Try to remove it (set to empty)
5) Notice that it says the number has been updated, but it has not
been set to empty
6) Apply patch and refresh page
7) Attempt to set the number to empty
8) Confirm this is successful

Sponsored-by: Catalyst IT
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 7535b5072329cc38ef7f0cef2616d51b289efb0b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24388: Remove uneeded test in lateorders.tt
Jonathan Druart [Mon, 16 Dec 2019 17:50:16 +0000 (18:50 +0100)]
Bug 24388: Remove uneeded test in lateorders.tt

The budget_lock is never set (and has never been).

Test plan:
For QAer only, make sure this never worked

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit aa8cdebe0c6b9b0dfb0819648e217553e675d2f5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24664: Add missing *-messages-js.po
Bernardo Gonzalez Kriegel [Fri, 14 Feb 2020 14:33:44 +0000 (11:33 -0300)]
Bug 24664: Add missing *-messages-js.po

If you try to update some language translation files
translate script will complain of missing *-messajes-js.po
file.

This patch adds those missing files

To test:
1) Go to misc translation
2) Update some language, eg- fr-FR
Check error
/usr/bin/msgmerge: error while opening "/.../misc/translator/po/es-ES-messages-js.po" for reading: No such file or directory
3) Apply this patch
4) Repeat 2), no error message

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 2d60c61cf778940597eea24e330f6ddbdaa9fddf)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24881: [19.05.x] Try to fix random failure from Circulation.t
Jonathan Druart [Mon, 16 Mar 2020 16:19:22 +0000 (17:19 +0100)]
Bug 24881: [19.05.x] Try to fix random failure from Circulation.t

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23527: BakerTaylorBookstoreURL is converted to escaped characters by template...
David Kuhn [Sat, 31 Aug 2019 23:23:16 +0000 (16:23 -0700)]
Bug 23527: BakerTaylorBookstoreURL is converted to escaped characters by template, rendering it invalid

Changing the template toolkit filter for rendering the value of
BakerTaylorBookstoreURL in opac-detail.tt and opac-results.tt from uri
to url fixes the problem.

To test (requires a Baker & Taylor username and password):

1. Enter the B&T url into BakerTaylorBookstoreURL.
2. Set BakerTaylorEnabled to "add" and enter your username and password.
3. Look up a title in the OPAC.
4. Locate a title with a cover image.
5. Click on the cover image. You are not redirected to the url stored
   in BakerTaylorBookstoreURL.
6. Display the full record for the title
7. Click on the cover image. You are not redirected to the url stored
   in BakerTaylorBookstoreURL.
8. Apply the patch.
9. Refresh the OPAC display.
10. Click on the cover image. You are now redirected to the specified url.
11. Return to the results list.
12. Click on a cover image. You are now redirected to the specified url.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Although I don't have valid Baker & Taylor credentials I was able to use
dummy data to verify that the links in the template are correctly
encoded with this patch.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 07af2a5645303ad35b45fabc3ed966f2ab55899e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24260: DBRev 19.05.08.002
Lucas Gass [Tue, 10 Mar 2020 22:40:07 +0000 (22:40 +0000)]
Bug 24260: DBRev 19.05.08.002

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24640: Allow quotes.timestamp to be NULL
Jonathan Druart [Wed, 12 Feb 2020 11:26:25 +0000 (12:26 +0100)]
Bug 24640: Allow quotes.timestamp to be NULL

It is broken with strict mode enable, timestamp is created without
default value.

Note that the .sql installer file init the value with NOW(), which is
wrong.

DBD::mysql::st execute failed: Field 'timestamp' doesn't have a default
value [for Statement "INSERT INTO quotes (source, text) VALUES (?, ?);"
with ParamValues: 0="poeut", 1="pouet"] at
/kohadevbox/koha/tools/quotes/quotes_ajax.pl line 49.

Test plan:
Create a new quote of the day
=> Without this patch you will get an error

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 9bf4f492d82196f10bb017dd761ff6fa022a9bb9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24654: Remove trailing quote in rda264 XSLT
Nick Clemens [Thu, 13 Feb 2020 15:43:30 +0000 (15:43 +0000)]
Bug 24654: Remove trailing quote in rda264 XSLT

To test:
1 - Find or add a recod with a 264 field
2 - Make sure there is a subfield b
3 - View the record in opac
4 - Right click on publisher link and copy and paste into a text editor
5 - Note the trailing " in the search
6 - Apply patch
7 - Refresh
8 - Link is correctly formed now

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 91c16e9e7a8e9eccf37024b0efde14819b7093b9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24621: Phase out jquery.cookie.js: Basic MARC editor
Owen Leonard [Mon, 10 Feb 2020 19:04:57 +0000 (19:04 +0000)]
Bug 24621: Phase out jquery.cookie.js: Basic MARC editor

This patch removes the use of the jquery.cookie plugin by the basic MARC
editor for setting two interface preferences: Showing MARC tag numbers
and showing MARC documentation links.

To test, apply the patch and open the basic MARC editor.

 - From the "Settings" menu, select the "Show MARC tag documentation
   links" link. This should toggle the display of the "?" link next to
   MARC tag descriptions.
 - Reload the page to confirm that your selection has been saved.
 - Perform the same test with the "Show tags" menu item.

You can also follow the changes to the cookie using the browser's
developer console. Look for cookies named 'marcdocs_***' and
'marctags_***' (where *** is the borrowernumber of the logged-in
user) and confirm that the value of each flips from "show" to "hide" and
back.

https://developer.mozilla.org/en-US/docs/Tools/Storage_Inspector
https://developers.google.com/web/tools/chrome-devtools/storage/cookies

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit a2fe9fa991bc074c4703729b0f459a40a2cc0eb4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24619: Phase out jquery.cookie.js: MARC Frameworks
Owen Leonard [Mon, 10 Feb 2020 17:58:04 +0000 (17:58 +0000)]
Bug 24619: Phase out jquery.cookie.js: MARC Frameworks

This patch removes the use of the jquery.cookie plugin on the MARC
Frameworks page and replaces it with a call to the new js-cookie
library.

To test, apply the patch and go to Administration -> MARC
bibliographic frameworks.

 - Choose the 'MARC structure' menu item for one of the frameworks
   listed.
 - On the page which lists the tags in the framework, check the box
   labeled "Display only used tags/subfields." The page should reload.
 - The checkbox should remain checked and the list of tags should now
   show only used tags.
 - Uncheck the checkbox and the page should reload again.

You can also follow the changes to the cookie using the browser's
developer console. Look for a cookie named
'marctagstructure_selectdisplay' and confirm that the value flips from 0
to 1 and back.

https://developer.mozilla.org/en-US/docs/Tools/Storage_Inspector
https://developers.google.com/web/tools/chrome-devtools/storage/cookies

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit fb45f5bb98c07ac544184b8ffa029f1f5702e993)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24389: Better error handle when claiming late orders
Jonathan Druart [Mon, 16 Dec 2019 16:15:19 +0000 (17:15 +0100)]
Bug 24389: Better error handle when claiming late orders

A successful message says that the email has been sent and the order has
been claimed, but nothing happened.

Test plan:
0. Do not apply this patch
1. Create a new vendor, does not create a contact
2. Create some orders, close the basket
3. Go to the late orders page and claims some orders
=> You get a successful message, but the claim has not been done!
4. Apply this patch
5. Claim the orders
=> You get an error
6. Set a contact for the vendor
7. Claim the orders
=> Success

In the docker container, you may need to:
% apt install postfix
% postfix start
Edit /etc/hosts
127.0.0.1       localhost localhost.localdomain

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit c2c7c6e754c0cf44ce0f99798f5115731a61868e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 18499: (QA follow-up) Add missing colon after label description
Katrin Fischer [Sat, 15 Feb 2020 01:15:35 +0000 (01:15 +0000)]
Bug 18499: (QA follow-up) Add missing colon after label description

To match the line above, a colon (:) was added after the description:

Callnumber classification scheme: [pull down]

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 329796c7a95ed30a4e0ff4963518bf6f88a0f679)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 18499: (follow-up) Add missing filters
Nick Clemens [Fri, 14 Feb 2020 17:59:38 +0000 (17:59 +0000)]
Bug 18499: (follow-up) Add missing filters

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit c64ac9504fc72ee8e6b95ac26b679dc1701ca2bf)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 18499: Use items cn_source in cn_browser.pl
Nick Clemens [Thu, 6 Feb 2020 13:14:30 +0000 (13:14 +0000)]
Bug 18499: Use items cn_source in cn_browser.pl

This does a few things:
 * We fetch the cn_sort from the DB and use this rather than calculating based on DefaultClassificationSource
   We were already pulling based on the items source, so this should not change things
 * Rather than using JS to submit the form, it submits via html
 * Fix subtitle display and add barcode (it was retrieved in one query but not used)
 * Add option to apply different classification scheme to the search

To test:
 1 - Add cn_browser.pl to the 'plugin' field in a framework for 952$o
 2 - Edit an item on a record in that framework
 3 - Enter an itemcallnumber
 4 - Click the two dots to launch the callnumber browser
 5 - Note the results
 6 - Apply patch
 7 - Repeat
 8 - Note subtitles and barcodes are displayed in results
 9 - Note callnumbers are appropriate
10 - Try changing the class source used
11 - Try this with differing dewey,lcc, and other callnumbers
12 - Ensure results are as expected

Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 0f7d7a8c2faf5777655a9b67c8cea8ffade56071)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 20882: DBRev 19.05.08.001
Lucas Gass [Mon, 9 Mar 2020 21:04:00 +0000 (21:04 +0000)]
Bug 20882: DBRev 19.05.08.001

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>