]> git.koha-community.org Git - koha.git/log
koha.git
4 years agoBug 23081: set default to 0 for items.issues and deleteditems.issues
Andrew Fuerste-Henry [Sun, 26 Apr 2020 23:51:25 +0000 (23:51 +0000)]
Bug 23081: set default to 0 for items.issues and deleteditems.issues

To test:
- save and run this sql query in reports: select sum(if(issues is null,1,0)),sum(if(issues=0,1,0)) from items
- you should see a lot of nulls and no zeros
- apply patch
- updatedatabase
- re-run your query and see that your nulls have changed to zeros
- create a new item
- rerun your query and see your new item is counted in the zeros, not the nulls

Signed-off-by: Lucas Gass <lucas@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 02896efdf347adbfa0cb262c9b7d46e11dbe4866)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24750: Instructor Search Results
Joseph Sikowitz [Sat, 18 Apr 2020 20:06:05 +0000 (16:06 -0400)]
Bug 24750: Instructor Search Results

Adds regex to the split() of the passed parameters to improve searching.

Test plan
1. Go to Course Reserves module.
2. Press New course button.
3. Make active the instructor search box.
4. Start typing the last name of a patron that exists in your database.
5. At the end of the last name type ", " and try to add a first name.
6. The search should fail.
7. Apply the patch.
8. Follow steps 1-5 again.
9. You should now be able to search using the following methods
9a. surname, firstname
9b. firstname surname

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 85339f38a096c63a9794cab424b4b4d4ce94e291)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25233: Staff XSLT material type label "Book" should be "Text"
Lucas Gass [Tue, 21 Apr 2020 21:33:03 +0000 (21:33 +0000)]
Bug 25233: Staff XSLT material type label "Book" should be "Text"

This patch makes the staff client XSLT stylesheets consistent with the
ones for the OPAC, it also makes consitent the use of 'Text' when the leader6 = 't'

TO TEST:
1. Have a record with leader06 = 'a' and leader07 = 'c' 'd' or 'm'.
2. Check the staff client results and details page. See that the
   material type label says "Book"
3. Check the OPAC client results and details page. See that the
   materila type label says "Text"
4. Apply patch.
5. See that both staff client and OPAC results/details all now say
   "Text"
6. Set the leader6 = 't' and make sure that is says 'Text' on both the
   staff client and OPAC

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>
(cherry picked from commit 9018cefc25d330355778f56159459a9f4abcf30a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25211: Add missing share icon to OPAC lists page
Owen Leonard [Mon, 20 Apr 2020 11:38:41 +0000 (11:38 +0000)]
Bug 25211: Add missing share icon to OPAC lists page

This patch adds a Font Awesome icon to the "Share" links on the list of
lists in the OPAC.

To test, apply the patch and log in to the OPAC as a user who has one
or more private lists.

  - Go to Lists -> Your lists
  - In the table of your lists, each list should have a "Share" link
    with an icon.

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>
(cherry picked from commit 66c0ab283a364f34ca470938b847366d3117153a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24957: OpenLibrarySearch shouldnt display if nothing is returned
Lucas Gass [Tue, 21 Apr 2020 20:11:17 +0000 (20:11 +0000)]
Bug 24957: OpenLibrarySearch shouldnt display if nothing is returned

TO TEST:
1. Turn on OpenLibrarySearch
2. Do an OPAC search that returns results that have results with Open Library results and some that do not.
3. Notice results that return nothing simpliy say "Open Library:" with nothing afterwards.
4. Some results return a png from OpenLibrary or "Not found"
5. Apply patch and look at records again.
6. The results that return nothing for OpenLibrary API should now to hidden.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 21927: Acq - Add blank values in pull downs of mandatory item subfields
Katrin Fischer [Sun, 12 Apr 2020 03:19:03 +0000 (03:19 +0000)]
Bug 21927: Acq - Add blank values in pull downs of mandatory item subfields

This is the same fix as on bug 14662, which fixed the behaviour in
cataloguing, but for the item form in acquisitions.

The code assumes that if a subfield is marked as mandatory, there
should be no empty entry in the pull downs.

This assumption is not correct, as it leads to the first entry of the
pull down being preselected if there is no default set. As the field
can never be 'unset', there will never be a 'required' warning.
Furthermore, it might be counterproductive to use mandatory fields,
as it might be easily forgotten to change the preselected value and
those mistakes will be hard to find.

Correct behaviour would be to preselect the empty value when there is
no default. This means on saving the item an error message is triggered
and the cataloger is forced to set the value.

To test:
- This is best tested with an ACQ framework, but default can be used
  when no ACQ framework was created.
- In your MARC bibliographic framework:
  - In 952 make itemtype, classification source and some other pull downs
    like location or collection mandatory and set them to visibel if needed
- Create a new basket with 'items created while ordering'
- Add a new order, an existing record with 942$c set will work best
- Add items for your order line
  - Verify that the first value of each pull down is preselected,
    there is no way to trigger the 'required' error
- Apply patch
  - Add a new order line
    - Verify that classification source is preselected according to the
      DefaultClassificationSource system preference (try unsetting it later)
    - Verify all mandatory fields can be set to empty
    - Verify that you can't save before correctly setting them
  - Change your frameworks and set a default for itemtype (Ex: BK) and
    another mandatory and non-mandatory field of your choice
  - Add a new order line and item and verify the defaults are selected

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>
(cherry picked from commit 77a59b5b3ab8a8870ca9bf9842d1ad30104a05d3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25274: Don't initialize DataTable if table isn't present
Owen Leonard [Fri, 24 Apr 2020 11:49:21 +0000 (11:49 +0000)]
Bug 25274: Don't initialize DataTable if table isn't present

This patch modifies the OPAC basket JavaScript so that a check is added
for the existence of the "itemst" table. This avoids an error if the
"More details" view is selected and hte "itemst" table isn't present.

To reproduce the error, add some items to the OPAC cart and open the
cart window. Open the JavaScript console in your browser and click the
"More details" link. You'll see an error.

To test, apply the patch and perform the same test as above. The error
should not be present. Test that table sorting in the "brief" view words
correctly.

Signed-off-by: David Roberts <david@koha-ptfs.co.uk>
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 2c9e0ac020c99fbcecfe53e6f5588ce2ece4a1fa)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25224: Show large print format in search results XSLT
Andrew Fuerste-Henry [Tue, 21 Apr 2020 17:41:29 +0000 (17:41 +0000)]
Bug 25224: Show large print format in search results XSLT

To test:
1: find a bib with 008 type Book
(Leader position 6 = 'a' and leader position 7 = 'm' -- use bib number 1 in master data)
2: set 008 position 23 to 'd' for large print
3: check your book record in opac and intranet search results, note that your change is not reflected in the "format" note in line with material type
4: find a bib with 008 type Continuing Resource
(Leader position 6 = 'a' and leader position 7 = 's' -- use bib number 44 in master data)
5: set 008 position 23 to 'd' for large print
6: check your continuing resource record in opac and intranet search results, note that your change is not reflected in the "format" note in line with material type
7: apply patch, restart_all
8: reload search results from steps 3 and 6, confirm they now say "format: large print"

Signed-off-by: Lucas Gass <lucas@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 ab5c115d088665b41d3ae03b57fb801f1a63aca3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25186: Fix accordion sections height in columns configuration page
Jonathan Druart [Mon, 20 Apr 2020 09:13:40 +0000 (11:13 +0200)]
Bug 25186: Fix accordion sections height in columns configuration page

The height for each section was the height of the highest section.
Now the height is set to the length of the section.

Test plan:
Go to Administration > Column configuration
Open the sections and confirm that the height fits its content.

QA: note that I guess "autoHeight: false" was meant to achieve that,
but it does not exist in the API of the plugin.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 8641888fa3c2dd460a1cf62855dc65bc1448682c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 20501: Don't cut strings when unhighlighting in intranet search results
Phil Ringnalda [Sun, 19 Apr 2020 02:37:49 +0000 (02:37 +0000)]
Bug 20501: Don't cut strings when unhighlighting in intranet search results

When you click Unhighlight on the search results of a search in the staff client
when the search terms contain the same word twice, like "ma ma", the highlighted
words disappear, and don't reappear if you click Highlight.

This patch makes the same change to the intranet copy of jquery.highlight-3.js that
bug 5844 made to the OPAC copy.

Test plan:
1) Without this patch, search in the intranet for ma ma and verify you have at least
   two matching records.
2) Notice that the Ma in Material type: Book is highlighted.
3) Click Unhighlight, and notice that it has become terial type: Book
4) Apply this patch, repeat the search with a shift+reload to reload the .js
5) Click Unhighlight, and verify that Material type: Book remains Material

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 5810b72af96a032fcf3d41b39eb0ad582117d2c1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25223: Make join of aqbasket and aqorders explicit
Nick Clemens [Mon, 20 Apr 2020 18:41:37 +0000 (18:41 +0000)]
Bug 25223: Make join of aqbasket and aqorders explicit

This is simply a SQL change that makes things a bit easier to read
and also prevents too much data being returned in a large system

To test:
1 - Have some orders in your system in the ordered status
2 - Click the 'Ordered' amount for your budget from Acquisitions home
3 - Note the view of orders, possibly screen shot
4 - Apply patch
5 - Restart all the things
6 - Reload the ordered page
7 - Confirm nothing has changed

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 7d69c0f10c7cb6c8b11baf55f05256684cdb0966)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 13557: Add hint for on-site checkouts to list of current checkouts in OPAC
Katrin Fischer [Mon, 13 Apr 2020 21:45:22 +0000 (21:45 +0000)]
Bug 13557: Add hint for on-site checkouts to list of current checkouts in OPAC

In the list of checkouts it's currently not possible for the
patront or tell the difference between normal checkouts (item
is at home with them) and on-site checouts (items remained at
the library). This patch adds a hint to the list of checkouts to
allow differentiating these kinds of checkouts.

To test:
- In your patron account, have multiple checkouts, some on-site,
  some others, overdue items, etc.
- Go to: OPAC > your summary > Checked out
- Verify that there is no hint for the on-site checkouts
- Apply patch
- Check again, there should now be a note

The note also has a class, so would be easy to be hidden
or formatted differently: class="onsite_checkout".

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 09b527d717be485b1e4de39a0877ac6d0050a40a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 21211: Add patron toolbar to suggestions, discharges and ill requests tabs
Katrin Fischer [Tue, 14 Apr 2020 13:14:37 +0000 (13:14 +0000)]
Bug 21211: Add patron toolbar to suggestions, discharges and ill requests tabs

When paging through the patron account in staff, using the tabs on
the right, you notice that some pages are missing the patron toolbar
on top and that the headings, where they exist, vary in size.

This patch adds the patron toolbar to 3 more tabs and changes headings
to h1 to be consistent with older tabs. It has also been suggested on
another tab that this is preferrable for screen readers.

Note: Modification log was left out for now, as this is also used in tools.

To test:
- Activate ILL (ILLModule pref)
- Activate discharges (UseDischarge pref)
- Go to any patron account, tab through the tabs...
- Verify that discharge, purchase suggestions and ill requests are
  missing the toolbar
- Apply patch
- Verify that the toolbar now appears on these pages and works
  correctly
- Also veriy that the headings are now consistently h1 on all pages

Signed-off-by: David Roberts <david@koha-ptfs.co.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 1b9fd03f17cc1d99ea0960173be87ae33d76df40)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 18680: Add an empty entry by default to sort1/sort2 values in patron account
Katrin Fischer [Tue, 14 Apr 2020 16:57:38 +0000 (16:57 +0000)]
Bug 18680: Add an empty entry by default to sort1/sort2 values in patron account

When using sort1/sort2 with authorised values to create a pull down
list, there will be no empty entry unless one is manually added to
the authorised values list.

This is not a good default behaviour, as it can easily
cause errors on patron creation. Without the empty entry, the first
alphabetic value is pre-selected and will be saved if not explicitly
changed. It also doesn't allow to mark sort1/sort2 as mandatory,
as the value is always 'set', the required message won't be triggered.

This adds an empty parameter to av-build-dropbox.inc to allow selectively
adding this empty entry without causing side-effects in other places
this include is used.

To test:
- Create authorised values for either Bsort1 or Bsort2 authorised
  value category
- Create a new patron:
  - you should see a pull down list on one and an input field for the other
  - for the pull down list, there will be no empty entry and the first
    alphabetic value will be preselected
- Make your sort1 and sort2 mandatory using BorrowerMandatoryField
- Verify there is still on empty entry
- Apply patch
- Repeat tests and verify that the behaviour is as expected
  - There should now be an empty entry
  - When the field is marked mandatory and empty is left, the required
    warning will be shown.

Signed-off-by: David Roberts <david@koha-ptfs.co.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 a934499b8cc192781f263b0ba2b3edd5374e64cf)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 10561: Rephrase DisplayOPACiconsXSLT and DisplayIconsXSLT slightly
Katrin Fischer [Mon, 13 Apr 2020 01:46:25 +0000 (03:46 +0200)]
Bug 10561: Rephrase DisplayOPACiconsXSLT and DisplayIconsXSLT slightly

As the pref removes the whole 'line' of information, this tries to makes
the behaviour a little clearer by adding a 'and descriptions' to the pref
text. It now reads:

[Show|Don't show]  the format, audience, and material type icons and
descriptions in XSLT MARC21 results and detail pages in ...

To test:
- Check both preference descriptions in the staff client
- Verify the text reads correctly and this helps things

Signed-off-by: David Roberts <david@koha-ptfs.co.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 6d02cbad0b8f64293ceae4a3cc2640a149a2756a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25069: Fix AddressFormat="fr" behavior
Jonathan Druart [Mon, 6 Apr 2020 10:44:13 +0000 (12:44 +0200)]
Bug 25069: Fix AddressFormat="fr" behavior

Something went wrong during a rebase of bug 13618
  commit dcd1f5d48c758aee17b6c6f069c6146b42efe117
  Bug 13618: Add html filters to all the variables

Several changes related to AddressFormat are wrong:

-    [% IF Koha.Preference( 'AddressFormat' ) %]
-        [% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
-    [% ELSE %]
-        [% INCLUDE 'member-main-address-style-us.inc' %]
-    [% END %]
+    [% SWITCH Koha.Preference( 'AddressFormat' ) %]
+        [% CASE 'de' %]
+            [% INCLUDE 'member-main-address-style-de.inc' %]
+        [% CASE # us %]
+            [% INCLUDE 'member-main-address-style-us.inc' %]
+     [% END %]

Test plan:
Create a patron with all the address fields filled
Play with the 3 option values of AddressFormat, and confirm that the address is displayed correctly
on the patron's view, and in the patron module (top left)

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit b7e9de9a436d59c811f459758094b9bb1ab86a59)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 20101: Cronjob automatic_item_modification_by_age.pl does not log run in action...
Kyle M Hall [Tue, 30 Jan 2018 16:10:07 +0000 (11:10 -0500)]
Bug 20101: Cronjob automatic_item_modification_by_age.pl does not log run in action logs

C4::Log::cronlogaction() was never implemented in automatic_item_modification_by_age.pl.

Test Plan:
1) Apply this patch
2) Enable CronjobLog
3) Run automatic_item_modification_by_age.pl succesfully
4) Note the run is noted in the action logs

Signed-off-by: Mark Tompsett <mtompset@hotmail.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 8ed0d57c95f36cfb960a998dc5b2fda6cfa44ef4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25007: (follow-up) Fix the way image check alters layout
Owen Leonard [Sat, 28 Mar 2020 17:42:50 +0000 (17:42 +0000)]
Bug 25007: (follow-up) Fix the way image check alters layout

A question in the bug report asks: Why is is necessary to change the
Bootstrap class to col-xs-12? The JavaScript which checks for the
existence of an Amazon cover image is designed to remove the Amazon
cover's container if there is none. Changing the class of
cover image column is gone.

However, the check is incorrect because it doesn't account for Local
Covers. There might be both a 1 x 1 pixel Amazon image and a local cover
image, so the layout shouldn't be changed unless there are no images
present.

To test, apply the patch and view the bibliographic details page of
various titles including:
- Amazon cover present, no local cover
- No Amazon cover, local cover image present
- Both Amazon and local cover image

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 05c4248721cfcbb9967b42e2bacf1a82eb845f1a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25007: Check for normaalized ISBN when building Amazon link
Lucas Gass [Fri, 27 Mar 2020 20:40:30 +0000 (20:40 +0000)]
Bug 25007: Check for normaalized ISBN when building Amazon link

TO RECREATE:
-Have Amazon images turned on and local images too.
-Have a record with a local cover image
-Make sure the record has no ISBN in 020 field.
-Load detail page of that record and see that the local cover images is
 not on the right hand side like it should be but forced underneath
 'catalogue_detail_biblio' in an odd spot.
-Apply patch and reload page
-The image should be back in its normal spot

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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 8c09c5ee80d59aae134454375f260c47a6af2f16)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 22468: Standardize on labelling ccode table columns as Collections
Katrin Fischer [Mon, 13 Apr 2020 02:32:56 +0000 (04:32 +0200)]
Bug 22468: Standardize on labelling ccode table columns as Collections

We now display the descriptions everywhere, so we should drop the
'code' from labels.

This changes text in a lot of playes in Koha, including:

- The relatives checkouts table when displayed for the guarantor
- The new order and order receive forms in acquisitoins (item creation)
- The description of CCODE in the authorised values table
- The column description on results in item search
- The branch tranfers page
- Course reserves: add reserve items (one and in batch)
- Patron account > statistics tab

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 58990eda36c29d09903c2135e76529c6a3accfcc)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 21865: allow test arg alone
Fridolin Somers [Wed, 11 Mar 2020 14:39:18 +0000 (17:39 +0300)]
Bug 21865: allow test arg alone

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 8523817dcc4d2219138b1c8600f289cbe9a009ee)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 21865: add confirm to remove_unused_authorities.pl script
Fridolin Somers [Mon, 19 Nov 2018 14:45:49 +0000 (15:45 +0100)]
Bug 21865: add confirm to remove_unused_authorities.pl script

Like in most scripts in misc, add confirm argument
to ensure script is not run without knowing what it does.

Test plan:
1) Run misc/migration_tools/remove_unused_authorities.pl -h
2) You see help line for confirm
3) Run misc/migration_tools/remove_unused_authorities.pl
4) You see help and script does nothing
5) Run misc/migration_tools/remove_unused_authorities.pl -c
6) Script runs like wanted

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 ace1f665dfdcb7dd2fe1e864191556432e9c5ef6)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 21865: ES compatiblity of remove_unused_authorities.pl
Fridolin Somers [Mon, 19 Nov 2018 14:19:46 +0000 (15:19 +0100)]
Bug 21865: ES compatiblity of remove_unused_authorities.pl

The script misc/migration_tools/remove_unused_authorities.pl directly checks if Zebra search is OK.

This patch changes so that this test is only if Zebra is the search engine.
It also adds a test on the search off any authority number indexed (index 'an').
With Zebra its : an,alwaysmatches=''
With ES its : an:*
This test ensure that biblios records are indexed and that not all autorities will be deleted.

Test plan:
1) On a catalog create a new authority
2) Use Zebra in systempreference SearchEngine
3) Stop Zebra server
4) Run misc/migration_tools/remove_unused_authorities.pl -c
5) The script does nothing and says :
   Zebra server seems not to be available. This script needs Zebra runs.
6) Restart Zebra server
7) Delete biblio index base
8) Run misc/migration_tools/remove_unused_authorities.pl -c
9) The script does nothing and says :
   Searching authority number in biblio records seems not to be available : an,alwaysmatches=''
10) Use ElasticSearch in systempreference SearchEngine
11) Delete biblio index base
12) Run misc/migration_tools/remove_unused_authorities.pl -c
13) The script does nothing and says :
    Searching authority number in biblio records seems not to be available : an:*

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 ee25606e8a85fb8a95284b6ad678dd18e97dfd02)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 21865: improve remove_unused_authorities.pl script
Fridolin Somers [Mon, 19 Nov 2018 13:46:05 +0000 (14:46 +0100)]
Bug 21865: improve remove_unused_authorities.pl script

remove_unused_authorities.pl script can be improved.

This patch changes changes verbosity so than test mode can be used
to know the autorities that are used and those that can be deleted.
It also writes a line in output if limited authority type(s).

This patch also removes the unused vars $thresholdmin and $thresholdmax.

It also changes the query to use SQL with parameters for authority types.

Test plan :
1) On a catalog create a new authority
2) Be sure catalog is well indexed
3) Run misc/migration_tools/remove_unused_authorities.pl -t
4) You will see the line :
   *** Testing only, authorities will not be deleted. ***
5) You will see lines of :
   authid=x type=y : used X time(s)
6) You will see the line for the authority created in 1) :
   authid=x type=y : can be deleted
7) You will see at the end :
   x authorities parsed
   y can be deleted because unused
   z unchanged because used
8) Run misc/migration_tools/remove_unused_authorities.pl
9) You don't see the line :
   *** Testing only, authorities will not be deleted. ***
10) You will see lines of :
   authid=x type=y : used X time(s)
11) You will see the line for the authority created in 1) :
   authid=x type=y : deleted
12) You will see at the end :
   x authorities parsed
   y deleted because unused
   z unchanged because used
13) Run misc/migration_tools/remove_unused_authorities.pl --auth NP --auth CO
14) You see the line :
    Restricted to authority type(s) : NP,CO.

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 36a84f4264e5c03b900eb850c93cc4eb0befd9e7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 20882: (Rmaint follow-up) fix shebang typo
Lucas Gass [Thu, 14 May 2020 14:37:05 +0000 (14:37 +0000)]
Bug 20882: (Rmaint follow-up) fix shebang typo

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25053: Clarify the description of syspref PatronSelfRegistrationExpireTemporaryAc...
David Roberts [Sat, 4 Apr 2020 23:13:00 +0000 (23:13 +0000)]
Bug 25053: Clarify the description of syspref PatronSelfRegistrationExpireTemporaryAccountsDelay

This patch changes the wording of this system preference.

To test:

1) Check the current wording of this system preference.
2) Install the patch.
3) Check that the wording of this system preference has changed to "Delete patrons still in the category indicated by PatronSelfRegistrationDefaultCategory X days after account creation."

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 2b8f6f62af9c262bec4a4ce88ddae3d706727fb1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24547: Add more action logs for holds
Kyle M Hall [Thu, 30 Jan 2020 15:29:05 +0000 (10:29 -0500)]
Bug 24547: Add more action logs for holds

It seems like ModReserveFill and ModReserveAffect should both produce action logs for holds.

Test Plan:
1) Apply this patch
2) Place a hold
3) Check in the item to trap the hold
4) Check out the item to fill the hold
5) Check the action logs for that reserve id
6) Note the new logs!

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 d3e3a3757dc3e9d97e3204767409e1d39d637255)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25027: Use localStorage instead of sessionStorage for results browser
Jonathan Druart [Tue, 31 Mar 2020 14:39:12 +0000 (16:39 +0200)]
Bug 25027: Use localStorage instead of sessionStorage for results browser

Staff side, when a search a done and a result clicked, a browser appears
on the left, to navigate between the different results.

We use sessionStorage to know the list of biblionumber from the result.

As sessionStorage is only for the current tab, we do some ugly things,
to catch the click events, then open the new tab, attach it to the
current window, and put the focus back on the result list.

We really should not do that, and let the user decide what they want to
do with their clicks!

To do so, let use the correct storage, localStorage, and have the
results shared between the windows.

We may need to clear that at some point, isn't it?

Test plan:
Launch a search, click result (left or middle), confirm you see the
browser and that the window/tab opened like any other websites
(depending on your web browser settings).

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 20370: Misleading comment for bcrypt - #encrypt it; Instead it should be #hash it
David Roberts [Mon, 13 Apr 2020 01:22:07 +0000 (01:22 +0000)]
Bug 20370: Misleading comment for bcrypt - #encrypt it; Instead it should be #hash it

This patch changes the wording of the comment

To test:

1) Check the wording of Line 67 of Koha/AuthUtils.pm
2) Apply the patch
3) Check that the wording has changed from "Encrypt it" to "Hash it"

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 5576bf647dda24a4f7da56bf86656fe58f05b80d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24993: fix increment
Liz Rea [Thu, 9 Apr 2020 15:50:04 +0000 (15:50 +0000)]
Bug 24993: fix increment

Aparently ((i++)) isn't portable, changed for an admittedly uglier
but functional increment.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Liz Rea <wizzyrea@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 cfd8e38fd8c01d0ab1dfd9e1b828b283b1dac64d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24993: Make sure we are not going to loop indefinitely
Jonathan Druart [Wed, 8 Apr 2020 09:57:06 +0000 (11:57 +0200)]
Bug 24993: Make sure we are not going to loop indefinitely

Signed-off-by: Liz Rea <wizzyrea@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 121ea7e96cdaf0e620858ec04ab80213a09a3d44)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24993: Make sure SIP server is stopped before restarting it
Jonathan Druart [Thu, 2 Apr 2020 10:36:16 +0000 (12:36 +0200)]
Bug 24993: Make sure SIP server is stopped before restarting it

Sometimes doing koha-sip --restart instance happens too fast and
the SIP server is not started.

To test:
- have SIP enabled and running for your instance
- issue a restart, make sure it restarts
  sudo koha-sip --restart inst

Signed-off-by: Liz Rea <wizzyrea@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 317d2c1de7c7ef234517b99e65df3cab361fc1bb)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25008: Overload Koha::RecordProcessor->options to update filters
Tomas Cohen Arazi [Mon, 30 Mar 2020 13:06:43 +0000 (10:06 -0300)]
Bug 25008: Overload Koha::RecordProcessor->options to update filters

This patch overloads the 'options' accessor generated by Class:Accessor.
It does so the passed options are used to refresh the loaded filters.

Tests are added for this overloaded method as well.

To test:
1. Apply this patches
2. Run:
   $ kshell
  k$ prove t/RecordProcessor.t
=> SUCCESS: Tests pass!
3. Sign off :-D

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>
(cherry picked from commit b4f47c9a06af45a1524c210f073c07523ff94ce9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25008: Tests for ->options
Tomas Cohen Arazi [Mon, 30 Mar 2020 13:20:11 +0000 (10:20 -0300)]
Bug 25008: Tests for ->options

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>
(cherry picked from commit b2b36b6f447890ec2972cd2b397a23c53fd183f3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25008: Regression tests
Tomas Cohen Arazi [Fri, 27 Mar 2020 20:53:32 +0000 (17:53 -0300)]
Bug 25008: Regression tests

This patch highlights a behaviour of Koha::RecordProcessor that is
unexpected: if you change the original options using ->options, the
loaded filters don't pick the change. That's because the filter objects
are loaded on ->new, and they are never updated.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/RecordProcessor.t
=> FAIL: Test prove ->options doesn't update the filters!

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>
(cherry picked from commit 008b09ce057e117766a95c03f551cab82e90c424)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24764: TinyMCE shouldnt do automatic code cleanup when editing HTML in News Feature
Lucas Gass [Thu, 26 Mar 2020 22:46:26 +0000 (22:46 +0000)]
Bug 24764: TinyMCE shouldnt do automatic code cleanup when editing HTML in News Feature

TEST PLAN:
1. Make a new news item and use the TinyMCE editor, click on the <> icon to go to the Source code editor
2. Add some HTML like <i class="fa fa-facebook-official" aria-hidden="true">TEST</i> and save it.
3. Go back in and notice that TinyMCE has changed it to: <p><em class="fa fa-facebook-official">TEST</em></p>
4. It should not auto clean up and also it should not autowrap with <p> tag.
5. Apply patch patch, and repeat step 2. Save again.
6. It should not have automatiicly changed any HTML or added any <p> wrapper.

Signed-off-by: David Cook <dcook@prosentient.com.au>
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 0b7d3b4331c69238ae04fdb895baeae9ce0742cf)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24903: Add tests for _handle_seqno
Marcel de Rooy [Thu, 19 Mar 2020 13:39:14 +0000 (14:39 +0100)]
Bug 24903: Add tests for _handle_seqno

Trivial tests.

Test plan:
Run t/Serials/ModSerialStatus.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Laurence Rault <laurence.rault@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 71eb787fbd34294ff6df995fa74d930dec4f4057)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24903: Special characters like parentheses in numbering pattern cause duplication...
Marcel de Rooy [Thu, 19 Mar 2020 13:20:38 +0000 (14:20 +0100)]
Bug 24903: Special characters like parentheses in numbering pattern cause duplication in recievedlist

Test plan:
Use serial with a numbering pattern with parentheses like "2018 (No. 1)".
Mark serial issue as arrived, check receivedlist on summary.
Edit issue again, check if not duplicated on receivedlist.
Mark issue as missing or not available, check missinglist.
Mark missing issue as not missing, check list again.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Laurence Rault <laurence.rault@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 82bee9fe6a28e70393d382b03db884d1eb142ddf)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24966: Add unit tests
Kyle M Hall [Fri, 10 Apr 2020 10:43:51 +0000 (06:43 -0400)]
Bug 24966: Add unit 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>
(cherry picked from commit 93d95ac1b3feaf5482b6a1a25c9d4198837e675c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24966: (QA follow-up) Fix return value of hold_patron_bcode
Marcel de Rooy [Fri, 10 Apr 2020 09:50:13 +0000 (09:50 +0000)]
Bug 24966: (QA follow-up) Fix return value of hold_patron_bcode

It is used in list context, but we need a scalar value.
Can be fixed by adding scalar's, or returning empty string as here.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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>
(cherry picked from commit 48d42a68794c3bf85c087adf2185d979929a13bc)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24266: (alternate patch) Only use defined borrowernumbers in reconcile_balances...
Aleisha Amohia [Mon, 16 Mar 2020 22:09:51 +0000 (22:09 +0000)]
Bug 24266: (alternate patch) Only use defined borrowernumbers in reconcile_balances.pl cron

I believe the error is triggered when borrowernumbers are left empty in
the accountlines table. Not sure why this would happen, but it appears
to be what causes the problem.

Do not apply the first patch if testing this patch.

To test:
1) sudo koha-mysql INSTANCENAME
2) Create a test borrower, add any payment etc to create an accountline,
    then delete this borrower
3) ensure the AccountAutoReconcile syspref is disabled
4) Go to another borrower's accounting tab
5) Create a manual credit or debit. Confirm this shows in the 'Make a
payment' tab as an amount that COULD be applied, but isn't automatically
applied
6) in your terminal, run the reconcile_balances.pl script
7) Confirm the error does not show in the logs and the balance for
the borrower is correctly reconciled.

Sponsored-by: Horowhenua District Council
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>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit c6c6c57400a9941a027ce8f919c652567ed37710)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25095: Remove warn left in FeePayment.pm
Kyle M Hall [Thu, 9 Apr 2020 12:24:44 +0000 (08:24 -0400)]
Bug 25095: Remove warn left in FeePayment.pm

It appears that a debugging statement was accidentally left in FeePayment.pm by bug 5605.

Signed-off-by: Devinim <kohadevinim@devinim.com.tr>
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 de56296d36ef8102f1d90e90e1617bd87c9879d8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 22778: Add unit test
Kyle M Hall [Wed, 8 Apr 2020 14:52:23 +0000 (10:52 -0400)]
Bug 22778: Add unit test

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 0c64138dd1787dd35c06cad1512dd1a2de470bfb)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 22778: Suggestions with no "suggester" can cause errors
Kyle M Hall [Thu, 25 Apr 2019 19:50:35 +0000 (15:50 -0400)]
Bug 22778: Suggestions with no "suggester" can cause errors

If one tries to modify a suggestion that has no suggester you will get the following error:

Can't call method "lang" on an undefined value at /usr/share/koha/lib/C4/Suggestions.pm line 506

Koha assumes that every suggestion has a borrowernumber in suggestedby

Test Plan:
1) Create a suggestion with an unpopulated suggestedby
2) Attempt to modify that suggestion
3) Note the error
4) Apply this patch
5) Restart all teh things
6) Attempt to modify that suggestion
7) No error!

Signed-off-by: David Roberts <david@koha-ptfs.co.uk>
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 cac73b47ef221b32a6254fd25f22c86bcdd20c20)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23514: Split Call Numbers for all layout types
Theodoros Theodoropoulos [Wed, 8 Apr 2020 07:21:12 +0000 (08:21 +0100)]
Bug 23514: Split Call Numbers for all layout types

This patch ensures call numbers are properly split for layout types
other than 'BAR'.

Test plan:

1. Go to Label Creator and choose/create a Label Layout with "Choose
layout type: Biblio"
2. make sure you have at least "itemcallnumber" in Bibliographic data to
print/Data fields
3. check "Split call numbers" box and save the layout (ie testlayout)
4. create a label batch, using items that have a call number (ie
DC611.B848 H84 1997). LCC is used here, but you may try with Dewey as
well.
5. export selected batch using any template and the layout you created
in previous step to a PDF
6. Call numbers are splitted (as expected) in the resulting PDF file
7. edit the layout you created in the previous step (ie testlayout) and
change the  "Choose layout type:" to either Biblio/Barcode (BIBBAR) or
Barcode/Biblio (BARBIB)
8. export the same batch using the same template and layout as before
9. Call numbers are NOT splitted at all

After patch is applied, call numbers splitting functions are applied
even in Biblio/Barcode (BIBBAR) or Barcode/Biblio (BARBIB) layout types.

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>
(cherry picked from commit ef9f3adbddbffdf0f734e68e11a0c0424d6ec975)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 22937: Add hint to groups editor
Kyle M Hall [Fri, 27 Mar 2020 16:01:05 +0000 (12:01 -0400)]
Bug 22937: Add hint to groups editor

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
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 56c629d969b0de56f1202799d7ab11705fc39d90)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25046: Add test
Jonathan Druart [Wed, 8 Apr 2020 09:28:31 +0000 (11:28 +0200)]
Bug 25046: Add 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>
(cherry picked from commit e370007f0e04945a82a1fa1af42bfc84ab8855b4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25046: Include borrowers.othernames in SELECT statement
Andreas Roussos [Thu, 2 Apr 2020 17:14:57 +0000 (19:14 +0200)]
Bug 25046: Include borrowers.othernames in SELECT statement

In C4/Utils/DataTables/Members.pm, the SELECT statement that fetches
patron data from the database does not include borrowers.othernames
in the field list. As a consequence, when the output is in the form
of a DataTable, the Template Toolkit files that refer to .othernames
(such as the patron-title.inc include) won't display the information
from the 'Other name' input field if that field has been filled in.

This patch fixes that.

Test plan:
0) Have a few patrons with some data in the 'Other name' field.
1) Perform a generic search in Home > Patrons to ensure you will get
   a DataTable with results.
2) Observe that the 'Name' column does not include 'Other name' info.
3) Apply the patch, and restart Plack if necessary.
4) Repeat your search: this time you should see the information from
   the 'Other name' field, it will be next to the patron's First name
   and within parentheses.

Sponsored-by: Eugenides Foundation Library
Signed-off-by: Devinim <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>
(cherry picked from commit 5b10df8bf77c8e7148caf042221d2ecd946742fa)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24826: Remove warnings from Sendmail
Jonathan Druart [Wed, 11 Mar 2020 15:21:06 +0000 (16:21 +0100)]
Bug 24826: Remove warnings from Sendmail

Use of uninitialized value $mail{"Cc"} in substitution (s///) at /usr/share/perl5/Mail/Sendmail.pm

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24940: Serials statistics wizard: order vendor list alphabetically
David Roberts [Fri, 3 Apr 2020 15:23:01 +0000 (15:23 +0000)]
Bug 24940: Serials statistics wizard: order vendor list alphabetically

This patch changes the dropdown from being sorted by aqbookseller.id to
aqbookseller.name

To test:
1) Add at least 2 vendors:
 - First: ZZZZ
 - Second: AAAA
2) Add subscriptions for each of the vendors
3) Check the pull down in the serials statistics wizard and verify it
lists them as ZZZZ, AAAA
4) Apply the patch
5) Re-check the pull down in the wizard and check that the vendors are
now listed AAAA,ZZZZ

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 ef8f3870b41032e1ae388baaeb8f13565a08dfaf)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25019: Make the ViewPolicy filter initialization standard
Tomas Cohen Arazi [Mon, 30 Mar 2020 12:39:13 +0000 (09:39 -0300)]
Bug 25019: Make the ViewPolicy filter initialization standard

This patch makes the ViewPolicy filter use the 'params' accessor instead
of relying of ->{options} which has no accessor. This will allow
interacting with the filter object be similar through all the filters in
the chain.

To test, we just need to verify no behaviour change takes place:
1. Run:
   $ kshell
  k$ prove t/db_dependent/Filter_MARC_ViewPolicy.t
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests still pass!
4. Sign off :-D

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 e6c829d887b8b6aeda98a7ba57dc9ac04b79a7a3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 20754: DBRev 19.05.11.001
Lucas Gass [Mon, 11 May 2020 21:27:29 +0000 (21:27 +0000)]
Bug 20754: DBRev 19.05.11.001

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 20754: DB revision to remove double accepted shares
Marcel de Rooy [Fri, 4 May 2018 08:42:38 +0000 (10:42 +0200)]
Bug 20754: DB revision to remove double accepted shares

[Originally submitted for bug 11943, parked at 20754.]
[Attempt to revive it now.]

Although it is no problem to have them, we could do a cleanup.
This patch just removes duplicate rows from the table.

Note: I considered adding a unique index like:
    ALTER TABLE virtualshelfshares ADD UNIQUE INDEX (shelfnumber, borrowernumber, invitekey);
But the possible NULL values in borrowernumber and/or invitekey require
additional code changes. So I left it alone.

Test plan:
[1] Create two records with same borrowernumber and shelfnumber in the shares
    table, if not present already.
[2] Run updatedatabase.pl

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@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>
(cherry picked from commit ba3bed7afe84b9e5278bed0aa12d71bfc82b4c9d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24604: Add 'Pay' button under Transactions tab in patron accounting
Julian Maurice [Thu, 6 Feb 2020 15:15:43 +0000 (16:15 +0100)]
Bug 24604: Add 'Pay' button under Transactions tab in patron accounting

It does the same thing as the 'Pay' button under 'Make a payment' tab.
It is nothing more than a shortcut.

Signed-off-by: David Nind <david@davidnind.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>
(cherry picked from commit 4ed413a76a32c52db71aae5efc2d3edf1949cc2c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25024: Do not escape $
Jonathan Druart [Wed, 1 Apr 2020 08:58:28 +0000 (10:58 +0200)]
Bug 25024: Do not escape $

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 a51e18d746526897abcc6e7b9e16b0937d332ad6)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25024: Make grep match full string
Nick Clemens [Tue, 31 Mar 2020 13:55:21 +0000 (13:55 +0000)]
Bug 25024: Make grep match full string

To test:
1 - Create or have a branch with code CPL
2 - Create two new branches 'ACPL' and 'CPLA'
3 - In branch transfer limits disallow some itype or collection from another branch (FPL) to ACPL and CPLA
4 - Set UseBranchTransferLimits to 'Enforce'
5 - Find a biblio with one item belonging to FPL
6 - On opac, attempt to place a hold
7 - Note that ACPL and CPLA don't show in dropdown, OK
8 - Note that CPL is disabled, NOT OK
9 - Apply patch
10 - Place hold
11 - CPL is now enabled

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Joel Sasse <jsasse@plumcreeklibrary.net>
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 155b47d2fee0440cc743a09d5c6a2152abb97d16)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23601: Prevent default for auxclick
Nick Clemens [Mon, 30 Mar 2020 15:16:36 +0000 (15:16 +0000)]
Bug 23601: Prevent default for auxclick

The issue appears to be that the default action is not prevented for middle click because it registers
an 'auxclick' event as opposed to a 'click' event

To test:
1 - Perform a search in staff client
2 - Shift-click and hold on a result
3 - Note a new tab opens
4 - Release the click, no change
5 - Middle click and hold on a result
6 - New tab opens
7 - Release, a second new tab opens
8 - Apply patch
9 - Reload page
10 - Middle click and hold
11 - New tab opens
12 - Release
13 - No new tab

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 9f89eabcd5befe34d4b3ad75fb8b128f4de131f3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24964: [19.11.x] Do not fetch all patrons for owner/users of funds
Jonathan Druart [Mon, 6 Apr 2020 09:44:18 +0000 (11:44 +0200)]
Bug 24964: [19.11.x] Do not fetch all patrons for owner/users of funds

admin/add_user_search.pl sets 'patrons_with_acq_perm_only', to only
retrieve patrons with acq (order_manage) permissions.

The original bug was hidden in the existing code, but the behavior was
terrible.
To prevent patrons matching the permissions contrainst to be hidden, we
fetched ALL the patrons from the DB, then filtered them depending on
their permissions. This might have awful performance on DB with lot of
patrons.

So basically with this patch we are adding the pagination back to the
"owner/users for funds" feature, as the permission filtering is now done
at DB level.

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 300dbea81219245614d95599c7cd98c51a005242)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24964: [19.11.x] Fix perl critic warning
Kyle M Hall [Thu, 26 Mar 2020 12:53:59 +0000 (08:53 -0400)]
Bug 24964: [19.11.x] Fix perl critic warning

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 96956fee2440f20a112bc1413253d6043ada704f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24964: [19.11.x] Prevent random failures sorting by borrowernumber
Jonathan Druart [Wed, 25 Mar 2020 12:50:45 +0000 (13:50 +0100)]
Bug 24964: [19.11.x] Prevent random failures sorting by borrowernumber

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 6c962a7d5af5117fc7f858b2a78ddb818b679397)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24964: [19.11.x] Do not filter patrons after they have been fetched
Jonathan Druart [Wed, 25 Mar 2020 10:21:15 +0000 (11:21 +0100)]
Bug 24964: [19.11.x] Do not filter patrons after they have been fetched

The svc/members/search script is called in different places.
In some places (Set owner for a fund, add users to a fund, or set a
manager to a suggestion), we need patrons to be filtered depending on
the permissions they have.
For instance you can only set a fund's owner with a patron that has
acquisition.order_manage.

Currently we have fetching X (default 20) patrons, then filter them
depending on their permission.
Says you have 3 patrons that have the correct permissions but are not in
the 20 first patrons, if you do not define a search term, the search
result will be empty.

This is not ideal and we should filter when requesting the DB.

Test plan:
- Have more than 20 patrons, remove them their permissions
- Create 3 more:
1 superlibrarian
1 with the full acq permission
1 with acquisition.order_manage
- Create a fund and set a owner
- Search for patrons, without specifying a search term (to get them all)
=> Without this patch the new patrons you created are not displayed
=> With this patch they are!

Same test plan apply to set a manager to a suggestion (freshly pushed,
see bug 23590), with suggestions and suggestions.suggestions_manage

Note: The code has been written that way to rely on
C4::Auth::haspermission, but the SQL query is quite trivial and the gain
is important.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 62b6e283a2c72d5e8c7f7f9a048df44fba2de8c3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24964: [19.11.x] Add tests
Jonathan Druart [Wed, 25 Mar 2020 10:20:20 +0000 (11:20 +0100)]
Bug 24964: [19.11.x] Add tests

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit b3d97ce0294bebd89c65830b1851cea5d936f0c4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25022: Display problem in authority editor with repeatable field
Owen Leonard [Tue, 31 Mar 2020 14:20:23 +0000 (14:20 +0000)]
Bug 25022: Display problem in authority editor with repeatable field

This patch corrects an error in the structure of the authority editor
template so that repeating subfields do not generate invalid markup. The
correction was found by comparing with addbiblio.tt.

If you are viewing the diff, please note that some minor whitespace
changes have been made.

To reproduce, clone and and populate any repeatable subfield, save, and
open the authority for editing again. The clones subfield will be
formatting incorrectly, showing bullet points on each line.

To test, apply the patch and reload the authority editor showing the
record with the cloned subfield. It should display correctly.

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 276e271ef4ec7c6d5196a3214663996b4cd289db)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 17938: Fix display of label for repeated MARC 583 - Action note fields
Katrin Fischer [Thu, 26 Mar 2020 22:30:52 +0000 (22:30 +0000)]
Bug 17938: Fix display of label for repeated MARC 583 - Action note fields

When there are mulitple 583 on a record, the label "Action note" will be
repeated for each. This fixes it, so that the label only appears once and
multiple fields are separated by | following the existing pattern.

Also makes sure there is a space between $z and other subfields.

Note:
Ind. 1 = private - These won't display in the OPAC
Ind. 1 = 0 or empty - These will display in the OPAC
Staff will display all 583 independent from indicator.

To test:
- Add one or more records with none, one and muliple 583, at least one including $z
  For examples see:
  http://www.loc.gov/marc/bibliographic/bd583.html
- Verify display problems
- Apply patch
- Verify display is improved - one label and $z is followed by a space

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 d35bcd9bb8890b8ad2121e21e5e4f44adf571b3e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25012: Fix class on OPAC view link in staff detail page
Katrin Fischer [Fri, 27 Mar 2020 23:46:55 +0000 (00:46 +0100)]
Bug 25012: Fix class on OPAC view link in staff detail page

Probably a copy & paste error: the OPAC view link on the staff
detail page currently has the class succeeding_entry_note.

This patch changes it to opac_view to allow for independent
styling of the link.

Note: The link will only be visible when OPACBaseURL is set.

To test:
- Use the element inspector or check the source code for
  the class used on the OPAC view link on the staff detail page
- Apply patch
- Repeat and verify that the class has changed to opac_view

Signed-off-by: David Roberts <david@koha-ptfs.co.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 f11299f9c04e6223507f0b4914b3191b60d5845e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25013: Fix capitalization: Edit Items on batch item edit
Katrin Fischer [Fri, 27 Mar 2020 23:54:21 +0000 (00:54 +0100)]
Bug 25013: Fix capitalization: Edit Items on batch item edit

Fixes a tiny string issue: Edit Items --> Edit items

To test:
- Go to tools / batch item edit
- Enter a barcode
- Check the heading above the edit item form
- Apply patch
- Verify the heading is now properly capitalized

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 b3ecfd686d5190c937415558497024819992e8d5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25014: Fix capitalization for "Call Number" in staff and OPAC sort options
Katrin Fischer [Sat, 28 Mar 2020 00:05:14 +0000 (01:05 +0100)]
Bug 25014: Fix capitalization for "Call Number" in staff and OPAC sort options

There are some ocurrences of "Call Number" in the sort option lists in
staff and OPAC. The patch changes them to "Call number".

To test:
- Check the sort option list in staff and OPAC for the typo
- Apply patch
- Verify it's now all corrected

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 b85e53dccb76e2a462255b01c6e37f2f040b7ff2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 9422: (RM follow-up) Rebase Correction
Martin Renvoize [Fri, 3 Apr 2020 13:10:07 +0000 (14:10 +0100)]
Bug 9422: (RM follow-up) Rebase Correction

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 9422: Don't allow access to 'Upload patron images' when patronimages syspref...
Katrin Fischer [Sun, 10 Feb 2019 11:09:08 +0000 (12:09 +0100)]
Bug 9422: Don't allow access to 'Upload patron images' when patronimages syspref is off

In addition to checking the patron image upload permission, this
adds a check for the patronimages system preference to the tools
home page and sidebar.

To test:
- Check that the patron image upload tool only displays when
  - system preference patronimages is set to 'Allow'
    and user is either
  - superlibrarian or
  - has bath_upload_patron_images permission
- Save URL of patron image uploader page
- Turn off patronimages
- Verify you get redirected to the home page of Koha when trying
  to access the page

Note: this redirect is already used by the stock rotation feature.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 4ed4b51e4bbbcc0e968c1685a6f4eaeefc6d7e37)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25262: [19.05.x] Do not truncate MANUAL_INV in dropdown
Nick Clemens [Thu, 23 Apr 2020 10:36:20 +0000 (10:36 +0000)]
Bug 25262: [19.05.x] Do not truncate MANUAL_INV in dropdown

There is an issue in that historic values will still be truncated, but recent values are not.
I feel the cash register report should reflect recent transactions over historic, and the historic are a data cleanup issue

To test:
1 - Add a MANUAL_INV value with more than 5 characters 'INCREDIBLE_HULK'
2 - Add a manual invoice to a patron's acccount using this value
3 - Note the full code displays in patrons account
4 - Browse to Reports->Cash register
5 - Search for today's date, the value you createed, and all libraries
6 - No results returned
7 - Apply patch
8 - Repeat 5
9 - The transaction shows

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24013: Fix transferbook if item is checked out
Jonathan Druart [Wed, 20 Nov 2019 10:52:04 +0000 (11:52 +0100)]
Bug 24013: Fix transferbook if item is checked out

Wrong conflict resolution, the following
  commit 6eade474ed3a84a5ba372a26ac27bf9fb4bd2299
  Bug 18276: Remove GetBiblioFromItemNumber - Easy ones
restored a previous change from
  commit 546379cc92b733cb29a0b70247a72c770afdad26
  Bug 17680: C4::Circulation - Remove GetItemIssue, simple calls

Not that "easy" or "simple"...

Test plan:
Run the test before and after this patch.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24013: Add tests
Jonathan Druart [Wed, 20 Nov 2019 10:55:55 +0000 (11:55 +0100)]
Bug 24013: Add tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoUpdate release notes for 19.05.10 release v19.05.10
Lucas Gass [Wed, 22 Apr 2020 21:41:30 +0000 (21:41 +0000)]
Update release notes for 19.05.10 release

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoIncrement version for 19.05.10 release
Lucas Gass [Wed, 22 Apr 2020 21:36:31 +0000 (21:36 +0000)]
Increment version for 19.05.10 release

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoTranslation updates for Koha 19.05.10
Koha translators [Wed, 22 Apr 2020 21:29:52 +0000 (18:29 -0300)]
Translation updates for Koha 19.05.10

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25009: Avoid leakages in opac-showmarc.pl
Tomas Cohen Arazi [Fri, 27 Mar 2020 21:16:58 +0000 (18:16 -0300)]
Bug 25009: Avoid leakages in opac-showmarc.pl

This patch cleans opac-showmarc.pl so it doesn't allow retrieving
records from import batches without requiring any permissions in the
OPAC.

it does so by just removing the code portion that does that.

It also cleans the record fetch operation and how the record processor
is initialized to it actually works :-D

To test:
1. Perform a successful Z39.50 search in cataloguing (this fetches 20
   records usually)
2. Query your DB for a valid import_record_id:
  $ koha-mysql kohadev
  > SELECT * FROM import_records LIMIT 1;
3. Notice some of the MARCXML details (title, author, etc), and the
   import_record_id
4. Point your browser to the opac-showmarc.pl URL like this:
   http://kohadev.mydnsname.org:8080/cgi-bin/koha/opac-showmarc.pl?importid=20
=> FAIL: You get the record! (Bonus: no field/subfield takes place)
5. Hide some obvious subfield on the framework for a known (to you)
   biblionumber
6. Point your browser to:
   http://kohadev.mydnsname.org:8080/cgi-bin/koha/opac-showmarc.pl?id=<biblionumber_here>
=> FAIL: No filtering takes place
7. Apply this patch
8. Repeat 4
=> SUCCESS: You get an error because you did a bad request (no id param)
9. Repeat 6
=> SUCCESS: Subfield filtering actually works!
10. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit d3ba9dc0fe423347f0e0e90b66be3ebeb7a6dec1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 16922: Add RewriteRule to apache-shared-intranet for dev package installs
Marcel de Rooy [Thu, 14 Jul 2016 11:51:21 +0000 (13:51 +0200)]
Bug 16922: Add RewriteRule to apache-shared-intranet for dev package installs

As a simple alternative to the solution in bug 9949 or just as an
additional measure, this patch adds a rewrite rule for intranet
in order to intercept potential misuse of perl scripts that could be
reached on a dev package install via the cgi-bin/koha scriptalias.

It simply rewrites them to the nonexistent "notfound", resulting in a
regular 404 error.

The rewrite rule does not harm regular installs and is just a little extra
step in securing a dev install. You should have more security measures in
place to secure your staff client.

QA Note: Although a rewrite rule may not be our first choice, this one
rule is more elegant and easier to maintain than e.g. a whole bunch of
aliases.

Note: This patch should have a regular and a dev install signoff.

Test plan:
[1] Make sure that this rewrite rule is inserted in your actual apache
    config via /etc/koha/apache-shared-intranet.conf. Restart Apache.
[2] For regular package installs:
    Try one of the URLs in step 3.
    Verify that your staff client still operates as usual. Test a few
    URLs inside some modules.
[3] For dev installs:
    Try some URLs like below.
    Expect 404 errors only, not 500s. If you do not see a 404, go back!
    /misc/stage_file.pl
    /t/db_dependent/default_search_class.pl
    /installer/data/mysql/updatedatabase.pl
    /Makefile.PL
[4] Do you see an additional directory to add to the regex? Please report.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 3401e94d942a8d8a4e216ea44bd295f96b8f3e24)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25142: Fix wrong grep logical test
Jonathan Druart [Tue, 14 Apr 2020 11:22:44 +0000 (13:22 +0200)]
Bug 25142: Fix wrong grep logical test

To test and understand what's going on, you can try that bit of code:
my @a = qw( a b c a);
my @b = qw( b c d );
my @c;
@c = grep { 'a' eq $_ } @a ? 'ok' : ();
say @c;
@c = ( grep { 'a' eq $_ } @a ) ? 'ok' : ();
say @c;
@c = grep { 'a' eq $_ } @a ? ('ok') : (undef);
say @c;

The problem here:
Have patrons in 3 branches CPL, MPL, SPL
Have a non superlibrarian with edit_borrowers permission but
without view_borrower_infos_from_any_libraries, from CPL
Create a library group with CPL, MPL
Use that non superlibrarian to search for patrons
You can search for patrons fro CPL and MPL
BUT, edit the value for CPL, use SPL (edit the DOM)
Search and... oops

Apply this patch, try again

Also use a superlibrarian patron (and/or with view_borrower_infos_from_any_libraries)
and confirm that they can see all patrons

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested with edit_borrowers permission but NOT view_borrower_infos_from_any_libraries
Editing the DOM I can search (not edit) from any branch
With patch no entries found :)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Amended test plan slightly (+ without)

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit c33f598c5cdea829390660419498e15f968f9abe)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25144: [19.05.x only] Remove subtitle from query
Nick Clemens [Wed, 15 Apr 2020 17:53:49 +0000 (17:53 +0000)]
Bug 25144: [19.05.x only] Remove subtitle from query

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoRevert "Bug 24858: Correct labels on wording in ExcludeHolidaysFromMaxPickUpDelay"
Lucas Gass [Wed, 15 Apr 2020 22:57:10 +0000 (22:57 +0000)]
Revert "Bug 24858: Correct labels on wording in ExcludeHolidaysFromMaxPickUpDelay"

This reverts commit 1f80f34cee73197c13ffedb408fbe3c6c54d3758.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25000: SQL report not updated
Nazlı Çetin [Fri, 27 Mar 2020 12:25:46 +0000 (12:25 +0000)]
Bug 25000: SQL report not updated

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24386: Prevent double form submission on adding orders to basket from a file
Nick Clemens [Thu, 9 Jan 2020 15:53:45 +0000 (15:53 +0000)]
Bug 24386: Prevent double form submission on adding orders to basket from a file

To test:
 1 - Have a marc record file
 2 - Go to Acquisitions, find a vendor, then an open basket
 3 - Add to basket from a new file (if you already have one staged you can choose that instead)
 4 - Import the file, then add to basket
 5 - On the page where you select the records and set info select a record, set matching to 'Do not check' fill in the fund for the order
 6 - When ready, click save as many times as you can
 7 - When you go to the basket there are many copies of the order added
 8 - Don't despair, apply the patch
 9 - Repeat above
10 - When ready to add orders, click furiously
11 - The order is only added once!
12 - Success!

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 bf8ed831f83987eadd7de4455673da28877499f4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24614: Fix Reports/Guided.t
Jonathan Druart [Fri, 27 Mar 2020 16:09:27 +0000 (17:09 +0100)]
Bug 24614: Fix Reports/Guided.t

DBD::mysql::st execute failed: Column 'public' cannot be null [for Statement "UPDATE `saved_sql` SET `last_modified` = ?, `notes` = ?, `public` = ?, `report_group` = ?, `report_name` = ?, `report_subgroup` = ?,
`savedsql` = ? WHERE ( `id` = ? )" with ParamValues: 0='2020-03-27T16:03:04', 1=undef, 2=undef, 3=undef, 4='Just another report', 5=undef, 6=undef, 7=25] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1836.
    # Looks like you planned 17 tests but ran 6.

update_sql expect all the paramters to be set, otherwise it will be
nulled.

The best way to fix it is at test level. There is only 1 occurrence in
controller/module, and it sends all the parameters. That is the correct
way to do and will make things easier when we will removed them to use
Koha::Reports directly

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24614: Use Koha::Reports from save_report and update_sql
Jonathan Druart [Tue, 11 Feb 2020 16:21:38 +0000 (17:21 +0100)]
Bug 24614: Use Koha::Reports from save_report and update_sql

In order to get the default value defined at DBMS level, we use
Koha::Reports (to inherit from Koha::Object->store) from the 2 add/edit
methods of C4::Reports::Guided.
A second step would be to remove completely those CRUD subroutines and
use directly Koha::Reports instead.

Test plan:
1. Add and edit some reports
2. Disable memcached, create a report, edit it
=> Should not crash
3. Make sure the tests make sense and that they pass after the second
patch.

The error was:
DBD::mysql::db do failed: Column 'cache_expiry' cannot be null [for
Statement "UPDATE saved_sql SET savedsql = ?, last_modified = now(),
report_name = ?, report_group = ?, report_subgroup = ?, notes = ?,
cache_expiry = ?, public = ? WHERE id = ? "] at
/kohadevbox/koha/C4/Reports/Guided.pm line 633.

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>
(cherry picked from commit 0a6c345703d46f4da4714dd5fa9ae673fab94ec6)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24614: Add tests
Jonathan Druart [Tue, 11 Feb 2020 16:21:15 +0000 (17:21 +0100)]
Bug 24614: Add tests

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>
(cherry picked from commit d3d27f48d8672a5d5f679647a7265ba1fd9bb11e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24875: Remove extra punctuation from tools start page
Katrin Fischer [Fri, 13 Mar 2020 20:30:06 +0000 (20:30 +0000)]
Bug 24875: Remove extra punctuation from tools start page

The patron clubs note was ending with .., but patch also removed
some single . to be consistent with the majority of entries on the
tools page.

To test:
- Check the tools start page for ending . in the notes
- Apply patch
- Verify the punctuation is now consistent

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 88590cb6784d0b774f48aac9db491d0d32cf6d8a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24872: Set languages prefererences after install
Bernardo Gonzalez Kriegel [Sun, 15 Mar 2020 14:39:42 +0000 (11:39 -0300)]
Bug 24872: Set languages prefererences after install

This patch set 'languages' and 'opaclanguages' system
preferences with the language used during install.

To test:
1. Apply the patch
2. Do a clean install in a language other than english
3. Verify that 'languages' and 'opaclanguages' system
preferences show the language code used during install,
besides english.

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 6705ca9d4ee0d32c7808ee7aba30ffa744625ef1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24874: Compile CSS
Lucas Gass [Mon, 13 Apr 2020 20:24:02 +0000 (20:24 +0000)]
Bug 24874: Compile CSS

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24874: Printing is broken on opac-results.pl page (19.11.x)
Mason James [Thu, 19 Mar 2020 07:41:00 +0000 (20:41 +1300)]
Bug 24874: Printing is broken on opac-results.pl page (19.11.x)

to test in 19.11.x...

- search for something in opac
- print page using file -> print
- observe printing is broken (pic1)

- apply patch

- search for something in opac
- print page using file -> print
- observe printing is fixed (pic2)

it seems this issue was introduced by bug 5287

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 86799ff8ce364d4c8642b08ce447f05d2b8bb940)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 21708: Sort MARC fields in TransformHtmlToMarc
Marcel de Rooy [Tue, 10 Mar 2020 15:11:07 +0000 (15:11 +0000)]
Bug 21708: Sort MARC fields in TransformHtmlToMarc

Instead of pushing 999 in the front :)

Test plan:
Do not yet apply this patch.
Edit a record. Save. And open MARC view/view plain on opac-detail.
Verify that the biblionumber field (MARC21 999) follows leader.
Apply this patch. Restart Plack.
Edit a record. Save. And open MARC view/view plain on opac-detail.
Verify that the biblionumber field is in right position.
Run t/db_dependent/Biblio/TransformHtmlToMarc.t. Should pass now.

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 6cb9b3634dcc06bdd69b82960a257f38fd75e0d0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 21708: Add a few tests in TransformHtmlToMarc.t
Marcel de Rooy [Wed, 11 Mar 2020 13:22:31 +0000 (13:22 +0000)]
Bug 21708: Add a few tests in TransformHtmlToMarc.t

Test plan:
Run t/db_dependent/Biblio/TransformHtmlToMarc.t without the module change
patch. Verify that the test fails on the order of fields.
Go to test plan of the second patch.

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 ca2ebddb1386665a3332ac67f7b5ce971a828c90)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24324: Resolve error with delete_records_via_leader.pl
Liz Rea [Fri, 3 Jan 2020 21:18:27 +0000 (21:18 +0000)]
Bug 24324: Resolve error with delete_records_via_leader.pl

To test:

Have a record with the 000 position 5 set to "deleted" (record status)
Use koha-shell to run the job with the -i flag: perl misc/cronjobs/delete_records_via_leader.pl -c -i -v
* items and the record should be deleted
Mark another record with the 000 position 5 set to deleted (record status)
Use koha-shell to run the job without the -i flag: perl misc/cronjobs/delete_records_via_leader.pl -c -v
* if the record had items, it will not be deleted
* if the record did not have items, it will be deleted.

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 b713241845e8f730b46c756fa65c4ddd17ed746b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24688: Check the priority of the fulfilled hold when fixing priorities
Aleisha Amohia [Thu, 20 Feb 2020 01:36:32 +0000 (01:36 +0000)]
Bug 24688: Check the priority of the fulfilled hold when fixing priorities

Currently when fixing priorities of existing holds, priorities aren't
fixed when checking out a middle priority hold because the hold has been
fulfilled and deleted. This patch adds a check for, if the hold can't be
found, an old hold with the required reserve_id.

To test:
1. Place at least four holds on a biblio for different borrowers
2. Check out an item to the 3rd priority borrower
3. Check the existing holds table for the biblio. The priorities might be
out of order, or try clicking the dropdowns and there might be an empty
dropdown option, or open the browser developer tools and notice the option
values in the select are missing value=3.
4. Apply patch and restart memcached
5. Check out an item to the 2nd priority borrower
6. Check the existing holds table for the biblio. Confirm the priorities
have been fixed and are now consecutive with no gaps.

Sponsored-by: Chartered Accountants Australia and New Zealand
Signed-off-by: Emmi Takkinen <emmi.takkinen@outlook.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>
(cherry picked from commit b17c16f9106eb159a1690da80a2a46b1f3a165ab)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24892: Resolve uninitialized warns from opac-memberentry
Marcel de Rooy [Wed, 18 Mar 2020 13:54:52 +0000 (13:54 +0000)]
Bug 24892: Resolve uninitialized warns from opac-memberentry

Especially line 500 (current master).

Use of uninitialized value $new_data{"sort2"} in string eq at /usr/share/koha/opac/opac-memberentry.pl line 500.
Use of uninitialized value in string eq at /usr/share/koha/opac/opac-memberentry.pl line 500.

Simple fix, not completely trivial due to adding xor ;)

Test plan:
Do not apply, update from opac memberentry. Check warns in log.
Apply patch, update again. Less warns?

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.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>
(cherry picked from commit 44d91396128a38a29b21f643f2e6439383a03e5c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24848: Improve manual links for the label creator
Katrin Fischer [Fri, 13 Mar 2020 17:40:38 +0000 (17:40 +0000)]
Bug 24848: Improve manual links for the label creator

Some of the manual links in the label creator tool were
not working correctly or pointing to the wrong pages.

A problem is the label-manage.pl file. This can show
different data depending on an added parameter. Example:
/cgi-bin/koha/labels/label-manage.pl?label_element=template

But it appears that parameters will be ignored when creating
links to the manual. So this patch links to the beginning
of the label creator section in the manual for now.

To test:
- Go to the lable creator
- Try the various pages of the tool
  - Note: All 'New ...' links should point to the
    correct section in the manual (batches, templates, ...)
    Except: Barcode range. This feature is new and not
    yet documented in the manual. Link goes to label creator section.
  - Note: All 'Manage ...' links should point to the
    beginning of the 'label creator' section in the manual

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>
(cherry picked from commit cda91af335a163b9e1d12c2aac57ec46b24ddea4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 8595: (follow-up) Changing other occurrences of 'host item' to 'host record'
Aleisha Amohia [Tue, 25 Feb 2020 02:02:22 +0000 (02:02 +0000)]
Bug 8595: (follow-up) Changing other occurrences of 'host item' to 'host record'

Signed-off-by: Michal Denar <black23@gmail.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>
(cherry picked from commit 59953212052ad480cb76de8946175b3602f7942f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 8595: Rename 'host item' to 'host record'
Aleisha Amohia [Thu, 13 Feb 2020 21:23:58 +0000 (21:23 +0000)]
Bug 8595: Rename 'host item' to 'host record'

To test:

1) Enable the syspref EasyAnalyticalRecords
2) Find a biblio record, go to the detail page
3) Click the Edit dropdown and notice the option "Link to host item"
4) Apply patch and refresh page
5) Click the Edit dropdown and confirm the renamed "Link to host record"
button

Sponsored-by: Catalyst IT
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.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>
(cherry picked from commit 2cff3403604f2a01d32032fbc386f2ebbf5c8b87)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
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>
(cherry picked from commit 64d8beafa8b5745c5ca2e63fddaf2177246ce937)

Signed-off-by: Lucas Gass <lucas@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>
(cherry picked from commit 268a62a6d2f8c6b3fe1a07033b533b31fc88db33)

Signed-off-by: Lucas Gass <lucas@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>
(cherry picked from commit ca4f14180b90bab2e8185e919a87657c6fba0e2f)

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