]> git.koha-community.org Git - koha.git/log
koha.git
4 years agoBug 23411: Do not fall back to 'email' for SMS messages
Nick Clemens [Thu, 1 Aug 2019 14:57:29 +0000 (14:57 +0000)]
Bug 23411: Do not fall back to 'email' for SMS messages

To test:
 1 - Have a patron wiht an sms number, but no email
 2 - Enable sms by setting SMSDriver syspref to Email
 3 - Set Notice triggers to send an overdue via sms and email
 4 - Ensure the selected notice is defined only for 'email'
 5 - Checkout an overdue to the patron above
    You can set a specify a due date in the past
 6 - perl misc/cronjobs/overdue_notices.pl -t
 7 - Check the patron notices tab, they have a print notice and an SMS notice pending
 8 - The SMS notice used the 'email' template
 9 - Apply patch
10 - sudo koha-mysql kohadev
11 - DELETE * FROM message_queue WHERE borrowernumber={borrower as above};
12 - Run the cron again
13 - Patron should have a print notice queued, no sms
14 - Define an SMS notice
15 - delete the message queue
16 - Run again
17 - The patron should have a print and an SMS

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24250: Do not duplicate debarred comment in patron screen message AF field
Jonathan Druart [Tue, 17 Dec 2019 10:31:40 +0000 (11:31 +0100)]
Bug 24250: Do not duplicate debarred comment in patron screen message AF field

Caused by
  commit bddfed75913a2302c19c00b00a6fe86538af6f9f
  Bug 19933: Remove patronflags - tricky ones

Test plan:
1 - Setup SIP in your testing environment
    https://wiki.koha-community.org/wiki/Koha_SIP2_server_setup
2 - Set a patron to have a restriction
3 - Send a patron status request or patron information command via
    the SIP cli emulator (see link above)
4 - Note the comment on the restriction is sent only once

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 23900: Add tests
Jonathan Druart [Wed, 26 Feb 2020 11:51:06 +0000 (12:51 +0100)]
Bug 23900: Add tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 23900: Teach label maker to concat database fields
Jonathan Druart [Mon, 11 Nov 2019 16:54:56 +0000 (17:54 +0100)]
Bug 23900: Teach label maker to concat database fields

Test plan:
- define a label layout with this field list: "100a 245s","enumchron copynumber"
- find or create a record with values for all of those fields
- generate a label for that record
- the 100a and 245s successfully display on one line
- the enumchron and copynumber are displayed and separated by a space

Try other combinations

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24566: UpdateItemLocationOnCheckin triggers SIP2 alert flag, even with checked_in...
Kyle M Hall [Mon, 3 Feb 2020 12:56:37 +0000 (07:56 -0500)]
Bug 24566: UpdateItemLocationOnCheckin triggers SIP2 alert flag, even with checked_in_ok enabled

If UpdateItemLocationOnCheckin, it triggers an alert flag but cannot be acted on in the same way as LocalUse and thus should be removed in the same fashion.

Test Plan:
1) Enable UpdateItemLocationOnCheckin and set it up to trigger at
checkin for an item
2) Return that item via SIP2
3) Note the alert flag is set
4) Apply this patch
5) Repeat steps 1 and 2
6) The alert flag should not be set

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kevin Cook <ILS@cedarparktexas.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24901: Add tests for transferbook
Martin Renvoize [Thu, 19 Mar 2020 08:10:00 +0000 (08:10 +0000)]
Bug 24901: Add tests for transferbook

Test plan:
0/ Read the commit and confirm the new tests make sence
1/ Run the tests and verify they pass
2/ Signoff

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>
4 years agoBug 24901: Minor refactor of tests
Martin Renvoize [Wed, 18 Mar 2020 19:25:57 +0000 (19:25 +0000)]
Bug 24901: Minor refactor of tests

Test plan:
0/ Read the change and verify it makes sense

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>
4 years agoBug 24856: Remove itemtypes.imageurl in fr-FR sample data
Jonathan Druart [Thu, 12 Mar 2020 09:01:10 +0000 (10:01 +0100)]
Bug 24856: Remove itemtypes.imageurl in fr-FR sample data

in installer/data/mysql/fr-FR/3-LecturePub/sample_itemtypes.sql and installer/data/mysql/fr-FR/4-Conservation/sample_itemtypes.sql the values of imageurl point to non-existent images.

Test plan:
Insert the 2 sql file and confirm that imageurl is not empty

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>
4 years agoBug 24870: Translate installer data label
Bernardo Gonzalez Kriegel [Sun, 15 Mar 2020 00:00:24 +0000 (21:00 -0300)]
Bug 24870: Translate installer data label

This patch enable the translation of the
labels 'Mandatory' or 'Optional' present at install time
for groups of installer files.

To test:
1) Try install using de-DE language,
   at step3 verify 'Mandatory' and 'Optional'
   labels for marc21 or other data checklist
   Do not close this window!
2) Apply this patch
3) Update de-DE translation files, reinstall lang files
   cd misc/translator
   ./translate update de-DE
   ./translate install de-DE
4) Reload page at step3, now 'Mandatory' label
is translated to 'Pflichtfeld'
5) Verify strings in translation file
Search for
^msgid \"Mandatory\"
^msgid \"Optional\"
in po/de-DE-staff-prog.po.

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>
4 years agoBug 24510: Add missing filter
Jonathan Druart [Mon, 16 Mar 2020 11:16:27 +0000 (12:16 +0100)]
Bug 24510: Add missing filter

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>
4 years agoBug 24510: Code cleaning
Jonathan Druart [Wed, 26 Feb 2020 16:38:53 +0000 (17:38 +0100)]
Bug 24510: Code cleaning

Additional test plan:
Create 3 clubs: abc adf axy
place a hold for on of those club, search for a club 'a'
you will get the focus on the "Clubs" tab

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.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>
4 years agoBug 24510: When Placing a Hold, cursor doesn't focus on Patron Name
Owen Leonard [Wed, 26 Feb 2020 15:53:48 +0000 (15:53 +0000)]
Bug 24510: When Placing a Hold, cursor doesn't focus on Patron Name

This alternate patch tries to implement a fix in a more "correct" way by
tying the cursor focus to the initialization of the jQueryUI tabs. By
configuring both the "create" and "activate" events we can make sure the
correct input field is focused.

I think the only advantage of this patch over the other one is that
tying the focus to the tabs activation makes it a little more obvious
where in the DOM loading sequence the focus is being set.

To test, follow the original patch's test plan:

TEST PLAN:
1. Go to Biblio Record
2. Place Hold (request.pl) - either the Hold above the Bib or the Hold
   on the left, it does the same thing.
3. Note that the cursor does not go to Patron Name (for whom to place
   the hold for), it goes to the Top Search bar under Checkout.
4. Apply patch and reload the page.
5. The focus should now be correctly set.
6. Toggle between 'Patrons' and 'Club' tabs.
7. Focus should stay set.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.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>
4 years agoBug 24510: Add focus to Patron/club input
Lucas Gass [Fri, 24 Jan 2020 15:34:07 +0000 (15:34 +0000)]
Bug 24510: Add focus to Patron/club input

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.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>
4 years agoBug 15775: Change wording slightly
Katrin Fischer [Sat, 29 Feb 2020 22:36:46 +0000 (23:36 +0100)]
Bug 15775: Change wording slightly

maxoutstanding only blocks holds, for checkouts we got
noissuechage.

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>
4 years agoBug 15775: Show message on OPAC summary if holds are blocked due to fines
Aleisha Amohia [Thu, 6 Feb 2020 22:25:06 +0000 (22:25 +0000)]
Bug 15775: Show message on OPAC summary if holds are blocked due to fines

To test:
1) Set maxoutstanding syspref to 5
2) Create a manual invoice for a borrower for $6
3) Log in to the OPAC as this borrower
4) Go to opac-user.pl, your summary page
5) Confirm there is a warning box explaining that the borrower is
blocked from holds due to fines
6) Back on the staff side, pay some or all of the borrower's fines so
they are no longer over the max outstanding amount
7) Refresh the summary page in the OPAC and confirm the warning is gone

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>
4 years agoBug 24844: Focus syspref searchbar
Aleisha Amohia [Wed, 11 Mar 2020 03:38:44 +0000 (03:38 +0000)]
Bug 24844: Focus syspref searchbar

To test:
1) Go to Administration
2) Notice neither of the syspref search bars are focussed so you have to
click inside one to begin searching
3) Apply patch and refresh page
4) Notice the header syspref search bar is now focussed so you can begin
typing straight away

Sponsored-by: Catalyst IT
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.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>
4 years agoBug 24847: Select AND by default in items search
Fridolin Somers [Wed, 11 Mar 2020 11:00:21 +0000 (14:00 +0300)]
Bug 24847: Select AND by default in items search

In items search form, when clicking on "New field" a new conjunction and search field are added.
It would save time to select AND conjunction by default, like it is in advanced search.

Test plan:
1) Go to items search
2) Click on  "New field"
3) Check that AND is selected

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.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>
4 years agoBug 24518: Fix IE11 partner filtering
Andrew Isherwood [Mon, 27 Jan 2020 12:00:47 +0000 (12:00 +0000)]
Bug 24518: Fix IE11 partner filtering

This patch adopts the approach detailed in comment #1.

It also fixes a couple of additional minor bugs relating to the ILL
partner list:
- Exclude partners with no email address, we cannot use them
- Quote the "value" attribute to avoid warnings displayed by IE, they
should be quoted anyway!

Test plan: USE IE11
- Apply the patch
- Define 3 ILL partner patrons (patrons in the category that has a code
that matches the <partner_code> value in the ILL config). One patron
should have no email address, the other two should have an email address
- Navigate to "Place request with partners" for an ILL request
- TEST: Observe that the patron with no email address is not displayed
- Try filtering the list
- TEST: Observe that the list filters correctly

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>
4 years agoBug 19279: performance of linked items in search
Fridolin Somers [Fri, 8 Sep 2017 15:20:38 +0000 (17:20 +0200)]
Bug 19279: performance of linked items in search

When catalog has fields 773 (461 in UNIMARC), those linked items are fetched for display in search results.
Looks like the code could be more performant by replacing item search by $9 with direct call with GetMarcItem().

Test plan :
1) Enable system preference EasyAnalyticalRecords
2) Get a record A with a lot of items, it will be the 'Host record'
3) Click on 'Analytics' on this record
4) On one of its items (say item A1) click on 'Create analytics' to
create record B
5) Enter the same title as record A and all mandatory fields
6) Edit field 773 (461 in UNIMARC)
6) Check that $0 contains the biblionumber of record A
7) Check that $9 contains the itemnumber of item A1
8) Perform a search on record A title, be sure you see record B with
other results
=> Compare execution times with and without patch

Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
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>
4 years agoBug 24756: [19.11.X] Catch two failed to load-variations in Security.t
Marcel de Rooy [Mon, 2 Mar 2020 11:08:18 +0000 (11:08 +0000)]
Bug 24756: [19.11.X] Catch two failed to load-variations in Security.t

Test 7 in Security.t failed when 'failed to load HTTP resource' was
returned by libxml2 instead of 'failed to load external entity'.

We now remove the debugging with Dumper again and adjust the regex to
include both variations.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 7882: (follow-up) Only show sortable icon for sortable tags
Owen Leonard [Tue, 17 Dec 2019 15:19:56 +0000 (15:19 +0000)]
Bug 7882: (follow-up) Only show sortable icon for sortable tags

Only tags which can be repeated can be sorted, so the "bars" icon should
not display by these tags.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.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>
4 years agoBug 7882: (follow-up) Update sorting interaction
Owen Leonard [Mon, 16 Dec 2019 19:06:57 +0000 (19:06 +0000)]
Bug 7882: (follow-up) Update sorting interaction

This follow-up modifies the CSS for the sortable fields so that a
different icon is used. Elsewhere in Koha (stock rotation stage sorting)
we use the "bars" icon to indicate a sortable element. I think it would
be good to continue to use this. The cursor is now styled as a "Move"
cursor.

The configuration of the sortable function in the script has been
updated in two ways: 1. The movement of the element is constrained along
the y-axis, and 2. The movement of the element is contstrained to the
container within which it can be moved (for the tag, the tab, and for
the subfield, the tag).

To test, apply the patch and edit a MARC record in the basic cataloging
editor.

Confirm that the new icon is used, and that the "Move" cursor shows when
you hover over the icon.

Confirm that a tag can be dragged up and down within the constraints of
the visible section. A subfield should be only movable within its parent
tag.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.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>
4 years agoBug 7882: Add ability to move and reorder fields in MARC editor
Maryse Simard [Wed, 23 Oct 2019 19:34:39 +0000 (15:34 -0400)]
Bug 7882: Add ability to move and reorder fields in MARC editor

Use jQueryUI sortable to make fields and subfields moveable in the
MARC editor for both records and authorities.

This patch convert items from div's to ul's and consequently alter css
and js to match. It also replace the up arrow with a more adapted icon
(from font awesome).

Primary authorship by Elliott Davis.

To Test:

1. Add or edit a record in cataloguing module.
2. You should be able to move the fields and subfields around.
    - You can click on any part of the element to drag it, the move
    icon to the left of the item is a good place to do it.
    => You can only change the order of fields of the same tag.
3. Make sure all of the javascript driven fonctionnality still work :
    - Duplicate fields/subfields
    - Remove fields/subfields
    - Using the tag editor for control fields or to link authorities
    - etc
4. Reorder some fields/subfields and save the record.
5. Edit the record again.
6. The order in the editor should match the changes which were saved.
    - Empty subfields should appear after the ones with content.
7. Repeat steps 1-6 with the authority editor.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
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>
4 years agoBug 25020: Preserve time part when batch extending due dates
Jonathan Druart [Mon, 30 Mar 2020 14:11:51 +0000 (16:11 +0200)]
Bug 25020: Preserve time part when batch extending due dates

When selecting a new hard due date, we should keep the time part of the
original checkouts.

Test plan:
1 - Checkout an item specifying a date due
2 - Checkout an item without specifying a date due
3 - Use Tools->Batch extend due date
4 - Select a hard due date
5 - On the confirmation screen you should see that the time part has
been kept
6 - Confirm
7 - Make sure the correct values hava been inserted in DB
8 - Try now using the other option, give a number of days
9 - Repeat 4-7

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
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>
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>
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>
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>
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>
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>
4 years agoBug 24827: Add a test
Jonathan Druart [Mon, 16 Mar 2020 12:01:04 +0000 (13:01 +0100)]
Bug 24827: Add a test

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>
4 years agoBug 24827: Specify UTF-8 as encoding in new_from_xml()
Andreas Roussos [Sun, 15 Mar 2020 07:43:25 +0000 (08:43 +0100)]
Bug 24827: Specify UTF-8 as encoding in new_from_xml()

The MARC preview of staged records fails when a staged record contains
items with UTF-8 characters (see attached screenshots). That's because
in EmbedItemsInImportBiblio() the call to MARC::Record->new_from_xml()
does not explicitly specify 'UTF-8' as the optional encoding to use.

This patch fixes that.

Test plan (in a MARC21 instance):
0) Stage for import the test record attached to this bug report (make
   sure that 'Check for embedded item record data?' is set to 'Yes'),
   then go to Home > Tools > Manage staged MARC records and click on
   the filename you've just staged.
1) In the 'Citation' column, click on the hyperlink to launch the MARC
   preview -- notice how it fails to produce any output apart from the
   modal heading.
2) Apply the patch, and restart Plack if necessary.
3) Re-launch the MARC preview: this time the output should include the
   whole record, including the embedded item data in field 952.
4) Run the unit tests to ensure nothing was broken inadvertently:
   $ prove t
   $ prove xt

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>
4 years agoBug 24827: Standardise on 'UTF-8' as the encoding name
Andreas Roussos [Sun, 15 Mar 2020 07:34:52 +0000 (08:34 +0100)]
Bug 24827: Standardise on 'UTF-8' as the encoding name

This patch standardises the encoding name used in direct calls
to new_from_xml() to 'UTF-8' instead of 'utf8' or 'utf-8'.

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>
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>
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>
4 years agoBug 24402: About template corrections
Martin Renvoize [Sun, 8 Mar 2020 08:39:40 +0000 (08:39 +0000)]
Bug 24402: About template corrections

With the 20.05 team we introduced and expanded some roles.  This patch
adds support for:

* removal of the release maintainer for development releases
* a list of documentation managers
* a list of packaging manager

Signed-off-by: Michal Denar <black23@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>
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>
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>
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>
4 years agoBug 24627: Correct style of clubs search results during hold process
Owen Leonard [Tue, 11 Feb 2020 15:10:48 +0000 (15:10 +0000)]
Bug 24627: Correct style of clubs search results during hold process

This patch updates some markup and CSS so that the process of selecting
a club from search results during the hold process looks the same as
when selecting a patron: Club names should be links (like patron
names are) and the table row should have a hover color to help indicate
that it is clickable.

This patch also changes the markup of the Patrons/Clubs tabs a little
bit to make the information clearer: Superfluous Bootstrap-related tab
markup has been removed, and the patron and club search results have
been moved into their respective tab containers. This means that if you
search for a patron but then switch to the clubs tab the patron list
doesn't still display.

To test, apply the patch and rebuild the staff client CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client)

 - You should have more than one patron club defined.
 - Begin the process of placing a hold on a title.
 - Test the process of searching for both patrons and clubs.
   - In each case the name (patron or club) should be an active link.
   - Hovering your mouse over the table rows should change the row
     background to yellow.
   - Clicking the other tab at this stage should hide the search results
     from your last search.
   - Whether you click the linked name or elsewhere in the table row
     you should be correctly redirected to the next step in the holds
     process.

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>
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>
4 years agoBug 24767: Hide the "Claim returned" tab if the feature is turned off
Kyle M Hall [Thu, 12 Mar 2020 11:07:48 +0000 (07:07 -0400)]
Bug 24767: Hide the "Claim returned" tab if the feature is turned off

The ability to claim an item "claim returned" is not there if the syspref is empty, however, the Claim Returned tab is stil present on the patrons detail page.

Test Plan:
1) Ensure ClaimReturnedLostValue is not set
2) Note the claims tabs on the circulation and patron details pages
3) Apply this patch
4) Refresh those pages
5) The claims tabs should be gone!

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>
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>
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>
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>
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>
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>
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>
4 years agoBug 23521: (follow-up) Add quotes
Nick Clemens [Fri, 25 Oct 2019 13:49:05 +0000 (13:49 +0000)]
Bug 23521: (follow-up) Add quotes

Not only should terms from facets/limits be grouped, but order should probably matter
We build a different facet for "Dillinger Girl" or "Girl Dillinger"

The parens are possibly overkill now, but I think it makes it very clear and does not hurt

To test:
1 - Follow original plan
2 - Create a new record with 'Girl Dillinger' as author
3 - Search for 'Dill*'
4 - You get all three records (and maybe others that match)
5 - Limit by 'Girl Dillinger' - you get two records
6 - Same for 'Dillinger Girl'
7 - Apply patch
8 - Limits/facets for 'Dillinger Girl' and 'Girl Dillinger' now match a isngle record

Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 23521: Put parentheses arround limit terms
Alex Arnaud [Thu, 29 Aug 2019 15:06:14 +0000 (15:06 +0000)]
Bug 23521: Put parentheses arround limit terms

Test plan:
  - Use Elasticsearch 6 (you'll need Bug 18969),
  - create a biblio (#1) with "Dillinger Girl" in author and what you
    want in title,
  - create another biblio (#2) with the word "girl" in the title and
    "Dillinger Escaplan" as author
  - reindex
  - search * and refine on "Dillinger Girl"
  - Ko => Biblio #1 and #2 appear
  - Apply this patch,
  - search * and refine on "Dillinger Girl"
  - Ok => anly biblio #1 appears
  - use Elasticsearch 5 again
  - check for no search regression

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@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>
4 years agoBug 24839: (QA follow-up) Remove unused variables
Martin Renvoize [Wed, 11 Mar 2020 11:27:38 +0000 (11:27 +0000)]
Bug 24839: (QA follow-up) Remove unused variables

Whilst QAing I spotted a couple of unused variables in the test.. no
harm in removing them ;)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24839: Return hold info to transfer script and set borrowernumber
Nick Clemens [Tue, 10 Mar 2020 13:37:56 +0000 (09:37 -0400)]
Bug 24839: Return hold info to transfer script and set borrowernumber

To test:
1 - Place a hold on an item
2 - Go to Circulation->Transfers
3 - Attempt to transfer item to a branch it is not expected at
4 - No warning
5 - Apply patches
6 - Repeate
7 - You get a notice that there is a hold and must deal with the hold (or ignore)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24839: Unit tests
Nick Clemens [Tue, 10 Mar 2020 13:59:16 +0000 (09:59 -0400)]
Bug 24839: Unit tests

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24777: Use patron.is_debarred instead of patron.debarred in return.tt
Fridolin Somers [Mon, 2 Mar 2020 15:03:54 +0000 (18:03 +0300)]
Bug 24777: Use patron.is_debarred instead of patron.debarred in return.tt

In return page return.tt, when there is an hold message, patron is said as restricted even if restriction end date is in the past.

Test plan :
1) For a patron Jon Doe create a manual restriction with end date in the past
2) Create an hold for this patron on an item
3) Check in this item => You don't see message "Patron is RESTRICTED"
4) For a patron Kevin Doe create a manual restriction with end date in the future
5) Create an hold for this patron on an item
6) Check in this item => You see message "Patron is RESTRICTED"
7) Repeate 1-6 with system preference HoldsAutoFill enabled
8) Repeate 1-6 with a waiting hold

Signed-off-by: Nazlı Çetin <nazli@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>
4 years agoBug 23268: Make "Suspend all holds" calendar select a date from tomorrow
Emmi [Fri, 5 Jul 2019 08:46:15 +0000 (11:46 +0300)]
Bug 23268: Make "Suspend all holds" calendar select a date from tomorrow

This patch removes "circulation" and moremember" templates functions
for Datepicker plugin. They now use options common for all inputs with
"datepicker" class and get "minDate" option from class "futuredate" assigned
function in "calender.inc".

To test:
- Apply patch
- Add holds for patron
- Use "Suspend all holds" calendar
=>Calendar greys out dates past from today

Signed-off-by: David Roberts <david.roberts@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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
4 years agoDBRev: followup
Joy Nelson [Thu, 2 Apr 2020 14:35:51 +0000 (14:35 +0000)]
DBRev: followup

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24802: Updating holds can cause suspensions to apply to wrong hold
Kyle M Hall [Wed, 4 Mar 2020 17:08:29 +0000 (12:08 -0500)]
Bug 24802: Updating holds can cause suspensions to apply to wrong hold

On request.pl, the table of holds shows a suspend_until date picker for each hold, *unless* that hold is waiting or in transit. The script reserve/modrequest.pl assumes that there will be a suspend_until input for each hold, but that is incorrect. Assume there are 20 holds on a record, and 10 of them are waiting or in transit. If you were to then set the suspend until date on the 10 open holds, and use the "Update hold(s)" button, those 10 suspensions would apply to the 10 found holds and not the holds they should apply to!

Test Plan:
1) Place two holds on a record
2) Check in an item and trap it for the first hold
3) Now that one hold is waiting and the other is not, attempt to set
   a suspension date using the "Update hold(s)" button
4) Note your hold does not get suspended!
5) Apply this patch
6) Restart all the things!
7) Repeat steps 1-3
8) Your hold should now be suspended!

Signed-off-by: Andrew Fuerste-Henry <andrew@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>
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>
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>
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>
4 years agoBug 24803: Remove JS error when clicking "Log in to your account"
Owen Leonard [Wed, 4 Mar 2020 19:47:26 +0000 (19:47 +0000)]
Bug 24803: Remove JS error when clicking "Log in to your account"

This patch removes the "data-toggle" attribute from the login link in
order to avoid a JavaScript error. Since we have a custom click handler
to trigger the modal we don't need Bootstrap's "automatic" modal
handling.

Test plan:
1. Apply patch
2. Open F12 dev tools
3. Click "Log in to your account" on OPAC
4. Observe no Javascript errors in console

Signed-off-by: David Cook <dcook@prosentient.com.au>
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: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@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>
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>
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>
4 years agoBug 22273: DBRev 19.11.04.002
Joy Nelson [Wed, 1 Apr 2020 20:52:41 +0000 (20:52 +0000)]
Bug 22273: DBRev 19.11.04.002

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 22273: DBRev 19.11.04.002
Joy Nelson [Wed, 1 Apr 2020 20:50:17 +0000 (20:50 +0000)]
Bug 22273: DBRev 19.11.04.002

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 22273: Modify Koha::ArticleRequest->store to fill created_on
Marcel de Rooy [Wed, 18 Dec 2019 13:49:59 +0000 (13:49 +0000)]
Bug 22273: Modify Koha::ArticleRequest->store to fill created_on

For a new record, store should fill created_on.
The database will always update the timestamp updated_on.
Since open also calls SUPER::store, we do not need to call it twice.

Test plan:
[1] Run t/db_dependent/ArticleRequests.t
[2] In the interface, add two article requests. Change the status of one
    to PROCESSING. Check created_on and updated_on in the article_requests
    table. The changed request should have updated_on > created_on.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
[1] Tests pass
ok 12 - New article request has created_on date set
ok 13 - New article request has updated_on date set

[2] Work as described.
No errors

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>
4 years agoBug 22273: Database revision for table article_requests
Marcel de Rooy [Wed, 18 Dec 2019 14:35:50 +0000 (14:35 +0000)]
Bug 22273: Database revision for table article_requests

Column created_on should not be updated. It is filled once by the
store method of Koha::ArticleRequest.
Column updated_on should be a timestamp, updated by the database.

Note: Although higher versions of MySQL and MariaDB support two timestamps
(NOT NULL) in one table, I kept on the safe side by allowing NULL on the
created_on column.

@RM: Don't forget to run DBIx update.

Test plan:
Run new install or upgrade.

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>
4 years agoBug 22273: Replace typo opan by opac in POD
Marcel de Rooy [Wed, 18 Dec 2019 13:39:57 +0000 (13:39 +0000)]
Bug 22273: Replace typo opan by opac in POD

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>
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>
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>
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>
4 years agoBug 24736: (QA follow-up) Change tooltip wording
Katrin Fischer [Sat, 29 Feb 2020 09:49:46 +0000 (10:49 +0100)]
Bug 24736: (QA follow-up) Change tooltip wording

Suggesting a change of the tooltip wording to read:

There are no enrollments for this club yet

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24736: Disable "Enrollments" link if nobody enrolled to the club yet
Jonathan Druart [Wed, 26 Feb 2020 16:46:49 +0000 (17:46 +0100)]
Bug 24736: Disable "Enrollments" link if nobody enrolled to the club yet

The link is disabled but it's possible to click and access the page
anyway.

Test plan:
- Create a new club template
- Create a new club
- Click the Actions > Enrollments link
=> Without this patch you can access the page
=> With this patch applied you cannot, and a tooltip explains why (feel
free to suggest another wording)
- Add a new patron to this club (from /cgi-bin/koha/opac-user.pl#opac-user-clubs)
- Notice that the action link is not enabled and click takes you to the
list of enrollments

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>
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>
4 years agoBug 24739: Perform IPv6 tests only if Net::Netmask is correct version
David Cook [Fri, 28 Feb 2020 00:17:58 +0000 (00:17 +0000)]
Bug 24739: Perform IPv6 tests only if Net::Netmask is correct version

Test plan:
0. Apply patch
1. Set up Koha on stretch (e.g. koha/koha-testing:master)
2. perl t/Koha/Middlware/RealIP.t
3. Observe the following:
Subtest: IPv6 support
    ok 1 - Warn on IPv6 koha_trusted_proxies
    ok 2 - Unable to parse IPv6 address for trusted proxy, so ignore the X-Forwarded-For header
    1..2
ok 13 - IPv6 support

4. Set up Koha on buster (e.g. koha/koha-testing:master-buster)
5. perl t/Koha/Middlware/RealIP.t
6. Observe the following:
Subtest: IPv6 support
    ok 1 - Trust proxy (2001:db8:1234:5678:abcd:1234:abcd:1234) using IPv6 CIDR notation, so use the X-Forwarded-For header for the remote address
    1..1
ok 13 - IPv6 support

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24739: Skip tests when IPv6 support is found
Martin Renvoize [Thu, 27 Feb 2020 09:16:12 +0000 (09:16 +0000)]
Bug 24739: Skip tests when IPv6 support is found

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24753: Change Koha/Middlware to Koha/Middleware in test name
David Cook [Fri, 28 Feb 2020 00:28:02 +0000 (00:28 +0000)]
Bug 24753: Change Koha/Middlware to Koha/Middleware in test name

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
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>
4 years agoBug 24705: Holds placed via SIP will be given first priority
Kyle M Hall [Fri, 21 Feb 2020 14:41:27 +0000 (09:41 -0500)]
Bug 24705: Holds placed via SIP will be given first priority

The SIP server does not calculate and pass a priority to AddReserve, which causes the hold to be given priority 1.

Test Plan:
1) Place a hold via SIP for a record with existing holds
2) Note the new hold is top priority
3) Apply this patch
4) Restart SIP
5) Repeat step 1
6) New hold should be last priority

Signed-off-by: Christofer Zorn <Christofer.Zorn@ajaxlibrary.ca>
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>
4 years agoBug 24705: Add tests
Jonathan Druart [Mon, 24 Feb 2020 09:40:54 +0000 (10:40 +0100)]
Bug 24705: Add tests

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>
4 years agoBug 24103: DBRev 19.11.04.001
Joy Nelson [Wed, 1 Apr 2020 15:35:46 +0000 (15:35 +0000)]
Bug 24103: DBRev 19.11.04.001

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24103: (follow-up) Dump query on opac authorities search
Nick Clemens [Fri, 14 Feb 2020 11:34:46 +0000 (11:34 +0000)]
Bug 24103: (follow-up) Dump query on opac authorities search

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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>
4 years agoBug 24103: Add option to dump search query to templates
Nick Clemens [Mon, 25 Nov 2019 14:58:00 +0000 (14:58 +0000)]
Bug 24103: Add option to dump search query to templates

To test:
1 - Apply patch, update database
2 - Note new syspref 'DumpSearchQueryTemplate'
3 - Leave it off
4 - Enable DumpTemplateVariablesOpac and Staff
5 - Search on staff and opac
6 - View the source
7 - Search for 'search_query' - you shouldn't find it
8 - Enable the new pref
9 - Repeat, but you should find the query
10 - Test staff/opac search and advanced search, cataloguing search, authority search, authfinder search, adding to a basket form a new biblio
11 - All should work and show the query
12 - This will work under both ES and Zebra

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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>
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>
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>