]> git.koha-community.org Git - koha.git/log
koha.git
3 years agoBug 27738: Set fallback for unset DefaultCountryField008 to |||, "no attempt to code"
Phil Ringnalda [Sun, 21 Feb 2021 18:41:04 +0000 (10:41 -0800)]
Bug 27738: Set fallback for unset DefaultCountryField008 to |||, "no attempt to code"

Current code intended to set a fallback of xxu, an unknown state in the US,
but because the preference is always defined, just sometimes unset, it
actually falls back to three spaces, an invalid value. This patch instead
uses the fallback value ||| which means no attempt to code.

Test plan:
1. Without the patch, verify that the value of the system preference
DefaultCountryField008 is empty.
2. Cataloging - New record - Default framework (if you have the Advanced
editor enabled, Settings - Switch to basic editor, this only applies to the
basic editor)
3. On tab 0, click in the text input for field 008 which fills in default
values, then click the Tag editor button at the end of the field
4. In the popup window, verify that the value for 15-17 is shown as ###
indicating three spaces
5. Apply patch, repeat the steps above, verify that the value is now |||

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27889: (follow-up) Adjust width of OpacAddMastheadLibraryPulldown
Owen Leonard [Tue, 16 Mar 2021 17:46:33 +0000 (17:46 +0000)]
Bug 27889: (follow-up) Adjust width of OpacAddMastheadLibraryPulldown

This patch adds some responsive classes to the
OpacAddMastheadLibraryPulldown container so that it will adjust better
at various browser widths.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27889: Adjust responsive width of OPAC advanced search form
Owen Leonard [Tue, 16 Mar 2021 16:00:57 +0000 (16:00 +0000)]
Bug 27889: Adjust responsive width of OPAC advanced search form

This patch tweaks the CSS for the advanced search form in the OPAC so
that it adjusts well at various browser widths, including preventing the
form from taking up the whole width of the page at higher browser
widths.

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

- In the OPAC, go to the advanced search page.
- Test the appearance of the fields in the first "Search for" section,
  confirming that everything adjusts well at all widths large and small.
- Click the "More options" button and test that configuration as well.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27926: (QA follow-up) Switch to using data-order
Martin Renvoize [Fri, 12 Mar 2021 08:48:59 +0000 (08:48 +0000)]
Bug 27926: (QA follow-up) Switch to using data-order

This patch switches away from using the title attribute for ordering and
instead uses data-order which is supported in modern DataTables.  This
has the effect of allowing our ordering to continue to work but without
adding the unwanted tooltip on hover.

Test plan
1/ Ensure sorting is still working as expected
2/ Hover over any of the date of birth fields and note that you are not
longer faced with a tooltip.
3/ Signoff

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27926: Add 'title-string' for dates on circ-patron-results
Martin Renvoize [Thu, 11 Mar 2021 12:15:25 +0000 (12:15 +0000)]
Bug 27926: Add 'title-string' for dates on circ-patron-results

This patch adds the title string sorting for the data of birth field in
the circulation patron results table.  This has the side effect of
adding a tooltip that displays the date of birth in ISO format, so I'm
not entirely sure it's the right approach.

Test plan
1/ Set your date format preferences to British English (dd-mm-yyyy)
2/ Do a search that will yield multiple patrons via "Check out"
3/ Try sorting on date of birth and not the order is incorrect.
4/ Apply the patch
5/ Refresh the page and try sorting on date again
6/ The order should now be correct
7/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28074: Make current_search.offset an integer instead of string
Lucas Gass [Thu, 1 Apr 2021 22:51:07 +0000 (22:51 +0000)]
Bug 28074: Make current_search.offset an integer instead of string

To test:
1. Do a search with 3-4 results, go to the record and use the browse
   controls, when you get to the last record if you attempt to go to the
   'next' you'll end up on a page which says 'record not found.'
2. Do a search with exactly 10 results. Click on the first record, the
   'next' arrow is not a link, you cannot move to the next result.
3. Apply patch
4. Repeat steps 1-2 and the problems should be gone.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27900: (QA follow-up) Rephrase link text
Katrin Fischer [Mon, 29 Mar 2021 18:17:37 +0000 (18:17 +0000)]
Bug 27900: (QA follow-up) Rephrase link text

See discussion on IRC from today :)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27900: (QA follow-up) Add missing filter
Katrin Fischer [Mon, 29 Mar 2021 17:53:53 +0000 (17:53 +0000)]
Bug 27900: (QA follow-up) Add missing filter

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27900: Add a link back to the basket view if no result
Jonathan Druart [Thu, 11 Mar 2021 14:03:07 +0000 (15:03 +0100)]
Bug 27900: Add a link back to the basket view if no result

Since bug 24347 the neworderbiblio view has been removed and we now
display the usual search result.
When adding a new order from a search, if there is no result we should
let the user get back to the basket view.

Test plan:
Add to basket from an existing record
Do a search with no results and confirm that there is a new "Go to the
basket view" link

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 21958: Allow 'e' subfield for authorities
Nick Clemens [Tue, 6 Apr 2021 12:56:50 +0000 (12:56 +0000)]
Bug 21958: Allow 'e' subfield for authorities

This bug specifically changed the code to allow for e in authority record

This is a tricky issue, see link for discussion:
https://www.loc.gov/marc/marbi/2008/2008-dp05-1.html

It seems to be allowed, but possibly not useful?

In either case I think for now we can allow in the test to fix this error
and possibly open a new bug for further discussion

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28017: (follow-up) Fix Letters.t
Tomas Cohen Arazi [Tue, 6 Apr 2021 11:16:37 +0000 (08:16 -0300)]
Bug 28017: (follow-up) Fix Letters.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27610: (follow-up) Hide <h1> on opac-main.tt
Wainui Witika-Park [Thu, 11 Mar 2021 01:06:35 +0000 (01:06 +0000)]
Bug 27610: (follow-up) Hide <h1> on opac-main.tt

This patch visually hides the <h1> on opac-main.tt so that libraries' customisations of their home pages are not disturbed by the introduction of a descriptive <h1>, but the heading is still available to be read out by screenreaders in the summary of headings on the page.

Test plan:

1) Apply dependencies and all patches on this bug report
3) Ensure the <h1> "Koha home" heading on the OPAC main/home page is hidden visually, but in the source code you can see it

Sponsored-by: Catalyst IT
Signed-off-by: Henry Bolshaw <bolshawh@parliament.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27610: Changed pages of OPAC to have a <h1>
Wainui Witika-Park [Tue, 16 Feb 2021 09:11:08 +0000 (09:11 +0000)]
Bug 27610: Changed pages of OPAC to have a <h1>

Changed each of the pages in the OPAC to have one <h1> tag showing that describes the page, rather than the <h1> describing the logo.

The hierarchy of heading tags may be broken in many pages, but this will be dealt with in a follow up patch or bug.

To test:
1) Go to the OPAC
2) Apply patch
3) Go to each of the pages and check that they have an obvious and
descriptive heading
4) Ensure that the heading in the page is <h1>

Sponsored by: Catalyst IT
Signed-off-by: Hayley Pelham <hayleypelham@catalyst.net.nz>
Signed-off-by: Henry Bolshaw <bolshawh@parliament.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27610: Changed <h1> around logo to <div>
Wainui Witika-Park [Wed, 3 Feb 2021 22:37:47 +0000 (22:37 +0000)]
Bug 27610: Changed <h1> around logo to <div>

To test:
1) Look at OPAC and the logo
2) Apply patch
3) Check Koha logo looks the same as before applying the patch
4) Ensure page source shows logo inside <div> and not <h1>

Sponsored-by: Catalyst IT
Signed-off-by: Hayley Pelham <hayleypelham@catalyst.net.nz>
Signed-off-by: Henry Bolshaw <bolshawh@parliament.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27742: (follow-up) Add title for record blocked page
Owen Leonard [Tue, 23 Feb 2021 11:41:19 +0000 (11:41 +0000)]
Bug 27742: (follow-up) Add title for record blocked page

This modifies the title for the template used when a bibliographic
record is blocked.

Signed-off-by: Hayley Pelham <hayleypelham@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27742: Page titles have unique info first
Wainui Witika-Park [Mon, 22 Feb 2021 07:19:05 +0000 (07:19 +0000)]
Bug 27742: Page titles have unique info first

Changed the titles of each page on the OPAC to display the unique
information first, and the name of the website (e.g. Koha library
        catalog). This is fot accessibility reasons, such as when a
screen reader user is going through tabs, they do not have to waste time
listening to the website name, they can just find the unique page title
first.

To test:
1) Go to the OPAC
2) Apply patch
3) Go to each of the pages and check that the page title has the unique
information about the page first, and the name of the website is at the
end

Sponsored by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27846: Compiled CSS
Jonathan Druart [Thu, 1 Apr 2021 16:50:12 +0000 (18:50 +0200)]
Bug 27846: Compiled CSS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27846: (follow-up) Use background SVG for breadcrumb dividers
Owen Leonard [Wed, 24 Mar 2021 17:41:45 +0000 (17:41 +0000)]
Bug 27846: (follow-up) Use background SVG for breadcrumb dividers

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27846: (QA follow-up) Apply changes to transfers_to_send
Martin Renvoize [Wed, 24 Mar 2021 13:32:18 +0000 (13:32 +0000)]
Bug 27846: (QA follow-up) Apply changes to transfers_to_send

It looks like the transfers to send page was added after these changes
were coded up.. This patch just impliments them for this page too.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27846: (follow-up) Add id back to breadcrumbs container
Owen Leonard [Wed, 24 Mar 2021 10:43:45 +0000 (10:43 +0000)]
Bug 27846: (follow-up) Add id back to breadcrumbs container

I think the "breadcrumbs" ID is worth saving for past and future CSS
customization reasons.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27846: (follow-up) Indentation corrections
Owen Leonard [Tue, 23 Mar 2021 12:01:06 +0000 (12:01 +0000)]
Bug 27846: (follow-up) Indentation corrections

This patch makes some indentation changes to make things (in my opinion)
more consistent. Diffing while ignoring whitespace should show no
changes except to acqui/basket.tt where some lines were broken up.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27846: (follow-up) Use SCSS-style nesting for style additions
Owen Leonard [Tue, 23 Mar 2021 12:16:43 +0000 (12:16 +0000)]
Bug 27846: (follow-up) Use SCSS-style nesting for style additions

This patch takes the changes introduced to the SCSS file in the previous
patches and converts it to use SCSS-style nesting to generate the
same output.

There should be no visible changes as a result.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27846: (follow-up) Markup corrections
Owen Leonard [Tue, 23 Mar 2021 18:33:17 +0000 (18:33 +0000)]
Bug 27846: (follow-up) Markup corrections

This patch makes minor markup corrections which were introduced by the
previous patches or discovered during testing.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27846: tools and virtualshelves folders
Wainui Witika-Park [Wed, 10 Mar 2021 02:38:52 +0000 (02:38 +0000)]
Bug 27846: tools and virtualshelves folders

Modified breadcrumbs to be accessible, in particular for a
screen-reader.

Made the block of breadcrumbs be a <nav aria label="Breadcrumb"
class="breadcrumb"> with an ordered list inside. The last breadcrumbs
also has aria-current="page" to specify that it is the current page.

To test:
1) Apply patch
2) Build scss file
3) Ensure each of the files in the tools and virtualshelves folders have
   breadcrumbs that are in a <nav aria label="Breadcrumb"
   class="breadcrumb"> block
4) Ensure that there is an ordered list in the block of breadcrumbs
5) Ensure that the last breadcrumb has aria-current="page"
6) Ensure that the breadcrumbs on each page of the staff client
   belonging to these files look the same as before, but the '>' symbol
   is replaced with '/' and the last breadcrumb has bold text
7) Ensure that when the last breadcrumb is clicked it takes you to the
   page you are currently on

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27846: rotating_collections, serials, suggestion and tags folders
Wainui Witika-Park [Tue, 9 Mar 2021 23:51:42 +0000 (23:51 +0000)]
Bug 27846: rotating_collections, serials, suggestion and tags folders

Modified breadcrumbs to be accessible, in particular for a
screen-reader.

Made the block of breadcrumbs be a <nav aria label="Breadcrumb"
class="breadcrumb"> with an ordered list inside. The last breadcrumbs
also has aria-current="page" to specify that it is the current page.

To test:
1) Apply patch
2) Build scss file
3) Ensure each of the files in the rotating_collections, serials,
   suggestion and tags folders have breadcrumbs that are in a <nav aria
   label="Breadcrumb" class="breadcrumb"> block
4) Ensure that there is an ordered list in the block of breadcrumbs
5) Ensure that the last breadcrumb has aria-current="page"
6) Ensure that the breadcrumbs on each page of the staff client
   belonging to these files look the same as before, but the '>' symbol
   is replaced with '/' and the last breadcrumb has bold text
7) Ensure that when the last breadcrumb is clicked it takes you to the
   page you are currently on

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27846: reports, reserve and reviews folders
Wainui Witika-Park [Tue, 9 Mar 2021 22:52:31 +0000 (22:52 +0000)]
Bug 27846: reports, reserve and reviews folders

Modified breadcrumbs to be accessible, in particular for a
screen-reader.

Made the block of breadcrumbs be a <nav aria label="Breadcrumb"
class="breadcrumb"> with an ordered list inside. The last breadcrumbs
also has aria-current="page" to specify that it is the current page.

To test:
1) Apply patch
2) Build scss file
3) Ensure each of the files in the reports, reserve and reviews folders
   have breadcrumbs that are in a <nav aria label="Breadcrumb"
   class="breadcrumb"> block
4) Ensure that there is an ordered list in the block of breadcrumbs
5) Ensure that the last breadcrumb has aria-current="page"
6) Ensure that the breadcrumbs on each page of the staff client
   belonging to these files look the same as before, but the '>' symbol
   is replaced with '/' and the last breadcrumb has bold text
7) Ensure that when the last breadcrumb is clicked it takes you to the
   page you are currently on

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27846: offline_circ, patroncards, patron_lists, plugins and pos
Wainui Witika-Park [Tue, 9 Mar 2021 04:54:45 +0000 (04:54 +0000)]
Bug 27846: offline_circ, patroncards, patron_lists, plugins and pos

Modified breadcrumbs to be accessible, in particular for a
screen-reader.

Made the block of breadcrumbs be a <nav aria label="Breadcrumb"
class="breadcrumb"> with an ordered list inside. The last breadcrumbs
also has aria-current="page" to specify that it is the current page.

To test:
1) Apply patch
2) Build scss file
3) Ensure each of the files in the offline_circ, patroncards,
   patron_lists, plugins and pos folders have breadcrumbs that are in a
   <nav aria label="Breadcrumb" class="breadcrumb"> block
4) Ensure that there is an ordered list in the block of breadcrumbs
5) Ensure that the last breadcrumb has aria-current="page"
6) Ensure that the breadcrumbs on each page of the staff client
   belonging to these files look the same as before, but the '>' symbol
   is replaced with '/' and the last breadcrumb has bold text
7) Ensure that when the last breadcrumb is clicked it takes you to
   the page you are currently on

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27846: members folder
Wainui Witika-Park [Tue, 9 Mar 2021 03:32:52 +0000 (03:32 +0000)]
Bug 27846: members folder

Modified breadcrumbs to be accessible, in particular for a
screen-reader.

Made the block of breadcrumbs be a <nav aria label="Breadcrumb"
class="breadcrumb"> with an ordered list inside. The last breadcrumbs
also has aria-current="page" to specify that it is the current page.

To test:
1) Apply patch
2) Build scss file
3) Ensure each of the files in the members folder have breadcrumbs that
are in a <nav aria label="Breadcrumb" class="breadcrumb"> block
4) Ensure that there is an ordered list in the block of breadcrumbs
5) Ensure that the last breadcrumb has aria-current="page"
6) Ensure that the breadcrumbs on each page of the staff client
belonging to these files look the same as before, but the '>' symbol is
replaced with '/' and the last breadcrumb has bold text
7) Ensure that when the last breadcrumb is clicked it takes you to the
page you are currently on

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27846: labels folder
Wainui Witika-Park [Tue, 9 Mar 2021 02:03:34 +0000 (02:03 +0000)]
Bug 27846: labels folder

Modified breadcrumbs to be accessible, in particular for a
screen-reader.

Made the block of breadcrumbs be a <nav aria label="Breadcrumb"
class="breadcrumb"> with an ordered list inside. The last breadcrumbs
also has aria-current="page" to specify that it is the current page.

To test:
1) Apply patch
2) Build scss file
3) Ensure each of the files in the labels folder have breadcrumbs that
   are in a <nav aria label="Breadcrumb" class="breadcrumb"> block
4) Ensure that there is an ordered list in the block of breadcrumbs
5) Ensure that the last breadcrumb has aria-current="page"
6) Ensure that the breadcrumbs on each page of the staff client
   belonging to these files look the same as before, but the '>' symbol
   is replaced with '/' and the last breadcrumb has bold text
7) Ensure that when the last breadcrumb is clicked it takes you to the
   page you are currently on

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27846: clubs, course_reserves, errors and ill folders
Wainui Witika-Park [Mon, 8 Mar 2021 23:39:38 +0000 (23:39 +0000)]
Bug 27846: clubs, course_reserves, errors and ill folders

Modified breadcrumbs to be accessible, in particular for a
screen-reader.

Made the block of breadcrumbs be a <nav aria label="Breadcrumb"
class="breadcrumb"> with an ordered list inside. The last breadcrumbs
also has aria-current="page" to specify that it is the current page.

To test:
1) Apply patch
2) Build scss file
3) Ensure each of the files in the clubs, course_reserves, errors and
   ill folders has breadcrumbs that are in a <nav aria
   label="Breadcrumb" class="breadcrumb"> block
4) Ensure that there is an ordered list in the block of breadcrumbs
5) Ensure that the last breadcrumb has aria-current="page"
6) Ensure that the breadcrumbs on each page of the staff client
   belonging to these files look the same as before, but the '>' symbol
   is replaced with '/' and the last breadcrumb has bold text
7) Ensure that when the last breadcrumb is clicked it takes you to the
   page you are currently on

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27846: circ folder
Wainui Witika-Park [Sat, 13 Mar 2021 09:32:18 +0000 (09:32 +0000)]
Bug 27846: circ folder

Modified breadcrumbs to be accessible, in particular for a
screen-reader.

Made the block of breadcrumbs be a <nav aria label="Breadcrumb"
class="breadcrumb"> with an ordered list inside. The last breadcrumbs
also has aria-current="page" to specify that it is the current page.

To test:
1) Apply patch
2) Build scss file
3) Ensure each of the files in the circ folder have breadcrumbs that are
   in a <nav aria label="Breadcrumb" class="breadcrumb"> block
4) Ensure that there is an ordered list in the block of breadcrumbs
5) Ensure that the last breadcrumb has aria-current="page"
6) Ensure that the breadcrumbs on each page of the staff client
   belonging to these files look the same as before, but the '>' symbol
   is replaced with '/' and the last breadcrumb has bold text
7) Ensure that when the last breadcrumb is clicked it takes you to the
   page you are currently on

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27846: authorities, catalogue and cataloguing folders
Wainui Witika-Park [Sat, 13 Mar 2021 09:29:07 +0000 (09:29 +0000)]
Bug 27846: authorities, catalogue and cataloguing folders

Modified breadcrumbs to be accessible, in particular for a
screen-reader.

Made the block of breadcrumbs be a <nav aria label="Breadcrumb"
class="breadcrumb"> with an ordered list inside. The last breadcrumbs
also has aria-current="page" to specify that it is the current page.

To test:
1) Apply patch
2) Build scss file
3) Ensure each of the files in the authorities, catalogue and
   cataloguing folders have breadcrumbs that are in a <nav aria
   label="Breadcrumb" class="breadcrumb"> block
4) Ensure that there is an ordered list in the block of breadcrumbs
5) Ensure that the last breadcrumb has aria-current="page"
6) Ensure that the breadcrumbs on each page of the staff client
   belonging to these files look the same as before, but the '>' symbol
   is replaced with '/' and the last breadcrumb has bold text
7) Ensure that when the last breadcrumb is clicked it takes you to the
   page you are currently on

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27846: admin folder
Wainui Witika-Park [Thu, 11 Mar 2021 04:14:02 +0000 (04:14 +0000)]
Bug 27846: admin folder

Modified breadcrumbs to be accessible, in particular for a
screen-reader.

Made the block of breadcrumbs be a <nav aria label="Breadcrumb"
class="breadcrumb"> with an ordered list inside. The last breadcrumbs
also has aria-current="page" to specify that it is the current page.

To test:
1) Apply patch
2) Build scss file
3) Ensure each of the files in the admin folder has breadcrumbs that are
   in a <nav aria label="Breadcrumb" class="breadcrumb"> block
4) Ensure that there is an ordered list in the block of breadcrumbs
5) Ensure that the last breadcrumb has aria-current="page"
6) Ensure that the breadcrumbs on each page of the staff client
   belonging to these files look the same as before, but the '>' symbol
   is replaced with '/' and the last breadcrumb has bold text
7) Ensure that when the last breadcrumb is clicked it takes you to the
   page you are currently on

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27846: modules and modules/acqui folders
Wainui Witika-Park [Thu, 11 Mar 2021 02:40:25 +0000 (02:40 +0000)]
Bug 27846: modules and modules/acqui folders

Modified breadcrumbs to be accessible, in particular for a
screen-reader.

Made the block of breadcrumbs be a <nav aria label="Breadcrumb"
class="breadcrumb"> with an ordered list inside. The last breadcrumbs
also has aria-current="page" to specify that it is the current page.

To test:
1) Apply patch
2) Build scss file
3) Ensure each of the files in the modules folder and the modules/acqui
   folder has breadcrumbs that are in a <nav aria label="Breadcrumb"
   class="breadcrumb"> block
4) Ensure that there is an ordered list in the block of breadcrumbs
5) Ensure that the last breadcrumb has aria-current="page"
6) Ensure that the breadcrumbs on each page of the staff client
   belonging to these files look the same as before, but the '>' symbol
   is replaced with '/' and the last breadcrumb has bold text
7) Ensure that when the last breadcrumb is clicked it takes you to the
   page you are currently on

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27846: changed scss for breadcrumbs
Wainui Witika-Park [Tue, 2 Mar 2021 10:13:06 +0000 (10:13 +0000)]
Bug 27846: changed scss for breadcrumbs

Changed styling for breadcrumbs to be accessible

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28004: Fix breadcrumbs on authorised_values.tt
Lucas Gass [Tue, 23 Mar 2021 23:08:51 +0000 (23:08 +0000)]
Bug 28004: Fix breadcrumbs on authorised_values.tt

To Test:
  - go to a category with at least one value, see the complete breadcrumb "Home › Administration › Authorized values › Authorized values for category" with link on the 3 first menus
  - create a new category / go to an empty category ; see the incomplete breadcrumb "Home › Administration › Authorized values" with link only on the 2 first menus
  - Apply patch
  - go to category with at least one value, breadcrumbs should look like Home › Administration › Authorized values › Authorized values for category CATEGORY
  - got to category with no values, breadcrumbs should look the same as category with values

Signed-off-by: Amit Gupta <amitddng135@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27936: Clarify AllowItemsOnHoldCheckoutSIP syspref help text
Joonas Kylmälä [Wed, 17 Mar 2021 11:27:27 +0000 (13:27 +0200)]
Bug 27936: Clarify AllowItemsOnHoldCheckoutSIP syspref help text

The waiting reserves have always been impossible to checkout via
SIP2. There was some confusion whether this is actually true but if
you check the commit "Bug 25690: Remove duplicated logic in SIP2
checkouts" (338ba1d769) and the removed code around line

  $self->screen_msg("Item is on hold for another patron.");

you will be sure that it has been impossible to checkout waiting holds.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28052: Do not check SYSENV values only keys in loop
Colin Campbell [Tue, 30 Mar 2021 11:13:27 +0000 (12:13 +0100)]
Bug 28052: Do not check SYSENV values only keys in loop

Loop is only interested in key values, because 'keys' is omitted
it is checking values as well. This can lead to misleading errors
being logged (e.g. key is undefined)
Extract keys only to loop array as in the other loops below this

Testing:
1 - tail /var/lib/koha/kohadev/sip-output.log
2 - in another tab use the sip cli tester:
   perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -m checkin --item CHESS1
3 - Note errors:
Use of uninitialized value $key in index at /kohadevbox/koha/C4/SIP/Sip/MsgType.pm line 337, <STDIN> line 1.
Use of uninitialized value $key in index at /kohadevbox/koha/C4/SIP/Sip/MsgType.pm line 337, <STDIN> line 2.
4 - Apply patch and restart all the things
5 - Repeat 2
6 - Errors mentioned are gone

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27397: The description input field when defining numbering patterns is too short
Catherine Ma [Tue, 19 Jan 2021 02:26:54 +0000 (02:26 +0000)]
Bug 27397: The description input field when defining numbering patterns is too short

Test Plan:
1. go to the serials module
2. click on manage numbering patterns in the left hand navigation
3. add or edit a pattern
4. check the description field is as short as the name field, but can
take much more text
5. add patch
6. repeat steps 1-3
7. check the description field is larger than the name field (it should)

Sponsored by Catalyst IT

Works OK!

Signed-off-by: Amit Gupta <amitddng135@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28042: Button corrections in OAI set mappings template
Owen Leonard [Fri, 26 Mar 2021 12:05:44 +0000 (12:05 +0000)]
Bug 28042: Button corrections in OAI set mappings template

This patch makes minor markup changes in the OAI set mappings template
so that the "Add" button looks consistent with other buttons in the
table.

Also changed: Removed unnecessary inline style attributes.

To test, apply the patch and go to Administration -> OAI sets
configuration

- If necessary, create an OAI set.
- Click the "Actions" button and choose "Define mappings."
- In the table of form fields, confirm that the "Add" button is styled
  similarly to the "Delete" button.
- Confirm that the "Add" button works as expected.

Signed-off-by: Amit Gupta <amitddng135@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28032: Button corrections in point of sale pages
Owen Leonard [Thu, 25 Mar 2021 15:08:03 +0000 (15:08 +0000)]
Bug 28032: Button corrections in point of sale pages

This patch corrects some markup inconsistencies in some templates
related to point of sale:

- Point of sale -> Library details. The "btn-xs" class has been added to
  "Record cashup" and "Cashup all" buttons.
- Administration -> Debit types and Administration -> Credit types:
  - Font Awesome icons are removed from the "save" and "cancel" controls
    in order to keep them consistent with other templates.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27881: Markup error in masthead-langmenu.inc
Owen Leonard [Fri, 5 Mar 2021 15:33:02 +0000 (15:33 +0000)]
Bug 27881: Markup error in masthead-langmenu.inc

Some markup errors were introduced into the masthead-langmenu include
file by Bug 20168, presumably during the update to the dropdown menu
markup:

'<a class="dropdown-item" <a href="'

...resulting in validation errors like "Attribute <a not allowed on
element a at this point." This patch correct the errors.

To test you should have at least two languages enabled in the
OPACLanguages system preference, opaclanguagesdisplay set to "allow,"
and OpacLangSelectorMode set to "top" or "both top and footer."

- Apply the patch and view the OPAC.
- The "Languages" menu at the top of the page should look correct and
  work correctly.
- Validating the source of the page should return no errors related to
  the language menu's markup.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28053: Squash warning in C4::Members
Martin Renvoize [Tue, 30 Mar 2021 11:15:22 +0000 (12:15 +0100)]
Bug 28053: Squash warning in C4::Members

This patch sets guarantess_non_issues_charges to '0' upon creation of
the variable and thus prevents 'Use of uninitialized value
$guarantees_non_issues_charges in numeric gt (>) at
/home/martin/kohaclone/C4/Members.pm line 183.' being thrown when the
patron has guaruntees without any charges.

Test plan
1. Run t/db_dependant/SIP/SIPServer.t and note the warning above is
   thrown at least once.
2. Apply the patch
3. Run the test again and note the warning has gone.

Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27940: Fix missing email in OpacMaintenance page
Magnus Enger [Fri, 12 Mar 2021 10:28:02 +0000 (11:28 +0100)]
Bug 27940: Fix missing email in OpacMaintenance page

To reproduce:

KohaAdminEmailAddress = Some valid email address
OpacMaintenance = Show

OPAC/cgi-bin/koha/maintenance.pl shows this text:

"Koha online catalog is offline for system maintenance. We'll be back
soon! If you have any questions, please contact the site administrator."

"site administrator" is a link, but it only links to "mailto:", the
actual email address from KohaAdminEmailAddress is missing.

To test:
- Apply the patch
- Reload the maintenance page
- Click on the "site administrator" link and verify it contains the
  address from KohaAdminEmailAddress

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28054: Reinstate the shebang in SIPServer.pm
Colin Campbell [Tue, 30 Mar 2021 11:49:00 +0000 (12:49 +0100)]
Bug 28054: Reinstate the shebang in SIPServer.pm

Bug 26673 renoved the shebang from SIPServer.pm. This was an error
SIPServer.pm is a program not a perl module, and needs the shebang
for the OS to assign an interpreter unless the command line
calls it as an argument to perl. Restore the shebang

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27869: let user know something went wrong with csv upload
Lucas Gass [Thu, 4 Mar 2021 19:37:10 +0000 (19:37 +0000)]
Bug 27869: let user know something went wrong with csv upload

To test:
-attempt to upload a malformed CSV file
-nothing happens, check the console and see the error: Uncaught TypeError: arrData[(arrData.length - 1)] is undefined
-apply patch
-try again
-now you should at least see a warning that something went wrong
-attempt to upload a good CSV file, it should work

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27921: Log correct timestamp for HOLD MODIFY when set waiting
Jonathan Druart [Thu, 11 Mar 2021 15:11:15 +0000 (16:11 +0100)]
Bug 27921: Log correct timestamp for HOLD MODIFY when set waiting

The HOLD MODIFY log at the end of ModReserveAffect is not using an
up-to-date $hold object.

$hold is modified at
1201         $hold->set_waiting($desk_id);
But not refreshed before logged (and so the timestamp is not logged
correctly).

Test plan:
Turn on HoldsLog
Place an item on hold
Check it in to mark it waiting

Confirm that the timestamp logged is the one from the check in, not when
you created the hold

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28017: Test IPs are supported
Tomas Cohen Arazi [Tue, 23 Mar 2021 15:19:48 +0000 (12:19 -0300)]
Bug 28017: Test IPs are supported

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28017: Allow non-FQDN (@localhost) addresses
Tomas Cohen Arazi [Mon, 22 Mar 2021 17:47:33 +0000 (14:47 -0300)]
Bug 28017: Allow non-FQDN (@localhost) addresses

This patch makes Koha::Email support using @localhost addresses.

To test:
1. Apply the regression tests
2. Run:
   $ kshell
  k$ prove t/Koha/Email.t
=> FAIL: Koha::Email doesn't support non-fqdn addresses
3. Apply this patch
4. Repeat 2
=> SUCCESS: All tests pass!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28017: Regression tests
Tomas Cohen Arazi [Mon, 22 Mar 2021 17:47:11 +0000 (14:47 -0300)]
Bug 28017: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 26999: (follow-up) Simplify code
Tomas Cohen Arazi [Mon, 15 Mar 2021 11:33:49 +0000 (08:33 -0300)]
Bug 26999: (follow-up) Simplify code

Doing
$ git grep pickup_locations_code

shows there's some calculated data that is not actually used anywhere.
We can get rid of it.

This patch also reuses $item_object (which is in the same loop scope) to
avoid an extra DB call.

To test:
1. Run:
   $ git grep pickup_locations_code
=> FAIL: It is only used/set as a comma separated string, inside
request.pl
2. Apply this patch
3. Repeat 1
=> SUCCESS: The unused stuff is not there anymore
4. Open the page for placing some holds
=> SUCCESS: It doesn't explode
5. Sign off :-D

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 26999: Make 'Any library' translatable when placing a hold
Tomas Cohen Arazi [Mon, 15 Mar 2021 11:05:02 +0000 (08:05 -0300)]
Bug 26999: Make 'Any library' translatable when placing a hold

This patch makes the 'Any library' string translatable, by converting it
into a flag and using it accordingly on the request.tt template.

To test:
1. Have the 'Hold pickup library match' set to 'any library' on the
   circultation rules.
2. Open the page to place a hold on a biblio with some items
=> SUCCESS: The item says 'Any library' on the 'Allowed pickup
locations' column.
3. Apply this patch
4. Repeat 2
=> SUCCESS: No behavior change
=> SUCCESS: The string is on the template
5. Sign off :-D

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28043: Some patron clubs operations don't work from later pages of results
Owen Leonard [Fri, 26 Mar 2021 18:36:19 +0000 (18:36 +0000)]
Bug 28043: Some patron clubs operations don't work from later pages of results

This page changes the way event handlers are defined for some operations
on the patron clubs page. These changes make it possible for the
controls to work on multi-page tables of clubs.

To test, apply the patch and got to Tools -> Patron clubs.

- If necessary, add enough patron club templates and patron clubs that
  there are more than 10 of each.
- Click to the second page of club templates and try to delete a
  template. It should work correctly.
- Click to the second page of clubs and try to delete a club. It should
  work correctly.
- Add one or more patrons to a club (from the checkout or patron details
  page).
- Click to the second page of clubs and try the "Search to hold" menu
  item. It should redirect you to the search page.
- After entering a search, the results page should include "Place hold
  for <club>" links with each result.

Signed-off-by: Amit Gupta <amitddng135@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27999: Display the description of authorized values category
Owen Leonard [Fri, 19 Mar 2021 13:00:32 +0000 (13:00 +0000)]
Bug 27999: Display the description of authorized values category

This patch corrects a parameter in the authorized values template so
that the right value is passed for displaying the description of an
authorized value category.

To test, apply the patch and go to Administration -> Authorized values.

- In the table of authorized values, click on one which has a
  description in the "Description" column.
- On the page titled "Authorized values for category XXX," you should
  see that description under the heading.
- Use the "Show category" dropdown to try some other categories.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27566: Compiled CSS
Jonathan Druart [Thu, 1 Apr 2021 15:24:34 +0000 (17:24 +0200)]
Bug 27566: Compiled CSS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27566: Add generic font family to prevent unstyled select tags
Owen Leonard [Thu, 28 Jan 2021 16:37:13 +0000 (16:37 +0000)]
Bug 27566: Add generic font family to prevent unstyled select tags

This patch adds a default font family "sans-serif" to the OPAC CSS as a
workaround for this Firefox bug:

font-family isn't honored in `<option>` element within `<select>`
dropdown
https://bugzilla.mozilla.org/show_bug.cgi?id=1536148

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

 - Open the OPAC main page in Firefox.
 - Click the search type dropdown. The options should be styled using
   your system's default sans-serif font rather than a serif font.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Henry Bolshaw <bolshawh@parliament.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28003: Invoice adjustments using inactive budgets do not indicate that status
Nick Clemens [Fri, 19 Mar 2021 15:02:12 +0000 (15:02 +0000)]
Bug 28003: Invoice adjustments using inactive budgets do not indicate that status

This patch affects the display of existing invoice adjustments to indicate when using an inactive budget

To recreate
1 - In acquisitions go to a vendor
2 - Click 'Receive'
3 - Create an invoice
4 - Finish receiving
5 - Go to Admin->budgets
6 - Duplicate your current budget
7 - Mark the original budget inactive
8 - View the invoice you created
9 - No indication the budget is inactive
10 - Apply patch
11 - Reload the page
12 - The fund shows '(inactive)'
13 - The dropdown to edit the funds also indicates which funds are inactive

Note that adding new adjustments does show only the active budget unless you request to see inactive.

Signed-off-by: Amit Gupta <amitddng135@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27937: Set datepicker when date is valid
Nick Clemens [Tue, 16 Mar 2021 13:13:57 +0000 (13:13 +0000)]
Bug 27937: Set datepicker when date is valid

When validating dates in JavaScript it is acceptable to have single digit days or months e.g,:
2011-6-16

When parsing in Koha::DateUtils->dt_from_string we die on these

This patch uses JS to set the datepicker which normalizes the date as Koha expects

To test:
 1 - Add new patron
 2 - Enter birthdate as 2/11/1986
 3 - Complete required fields
 4 - Save
 5 - Get ISE
     The given date (2/11/1986) does not match the date format (us) at /kohadevbox/koha/Koha/DateUtils.pm line 175
 6 - Apply patch
 7 - Repeat 1-2
 8 - Note that when you change focus (click on another field) the date is formatted as '02/11/1986'
 9 - Save patron, success!
10 - Edit patron, try setting DOB to 2/1/1986
11 - Change focus and note date is formatted as '02/01/1986', save
12 - Repeat with other settings of system preference 'dateformat'

Signed-off-by: Donna <donna@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Bug 27937: (QA follow-up) Fix indentation

Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27928: FindDuplicate should use simple_search_compat
Nick Clemens [Thu, 11 Mar 2021 13:33:43 +0000 (13:33 +0000)]
Bug 27928: FindDuplicate should use simple_search_compat

This patch switches from calling SimpleSearch directly to using the compat
method so that Elastic is used when it is the chosen search engine

To test:
 1 - Set SearchEngine syspref to 'Zebra'
 2 - Add a suggestion with an existing title, e.g.:
   'E street shuffle'
 3 - Confirm you get a duplication warning
 4 - Change SearchEngine to ES
 5 - Repeat get same warning
 6 - sudo koha-zebra --stop
    'ps aux | grep zebra'  to confirm they are stoped
    'sudo pkill -9 zebra' if they arent;
 7 - Repeat suggestion - no duplication warning (because zebra returns nothing)
 8 - Delete the suggestion
 9 - Apply patches
10 - Restart all the things, stop zebra
11 - Repeat suggestion
12 - Successful warning from ES
13 - prove -v t/db_dependent/Search.t

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27993: Add handling for datecancelled in in_transit
Martin Renvoize [Fri, 19 Mar 2021 13:31:49 +0000 (13:31 +0000)]
Bug 27993: Add handling for datecancelled in in_transit

This patch adds handling for the datecancelled field in the in_transit
method.

Test plan
1/ Run the new unit test in t/db_dependent/Koha/Item/Transfer.t

Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27993: Add unit tests
Martin Renvoize [Fri, 19 Mar 2021 13:31:10 +0000 (13:31 +0000)]
Bug 27993: Add unit tests

This patch adds a unit test to check that 'in_transit' takes
datecancelled into account.

Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27807: (QA follow-up) Unique values only
Martin Renvoize [Tue, 2 Mar 2021 11:19:42 +0000 (11:19 +0000)]
Bug 27807: (QA follow-up) Unique values only

This patch filters the final _order_by clause such that we only have
unique data fields present and we take the first occurence of a field.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27807: Add multi-column ordering support to datatables wrapper
Martin Renvoize [Tue, 2 Mar 2021 10:36:06 +0000 (10:36 +0000)]
Bug 27807: Add multi-column ordering support to datatables wrapper

This patch add mutli-column ordering support to the datatables api
wrapper.

Test plan
1/ Add a series of cities to the system with various combinations of
city and state such that you can distinguish sorting on city + state in
city ascending + state ascending, city ascending + state descending etc.
2/ Attempt to sort on the two fields in the table (Click the 'City'
heading to sort on city name, then Shift Click on 'State' to add 'state'
ordering on top.. Shift click again on state to reverse the 'state'
ordering but maintain the 'City' ordering.
3/ Confirm the various ordering comes out correctly.
4/ Signoff

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 21260: (follow-up) Fix typo in holdingbranch segment
Marcel de Rooy [Wed, 26 Aug 2020 13:59:58 +0000 (13:59 +0000)]
Bug 21260: (follow-up) Fix typo in holdingbranch segment

Copy-and-paste error. We need holdingbranch here.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: ava li <rubyli208@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 21260: Move the count before the callnumbers
Marcel de Rooy [Tue, 25 Aug 2020 14:44:38 +0000 (14:44 +0000)]
Bug 21260: Move the count before the callnumbers

The current display is a bit confusing [Call number: A](2) seems
to indicate that we have two call numbers A. But what it means here,
is: we have two items and we list only one, being A.

So, we'd better do something like:
    Items available for loan: Centerville (2) [Call number: A, ..]
Which says we have two items at Centerville, listing only one (A),
but indicating with the two dots that there are more.

Test plan:
Pick a biblio with multiple available items at a branch.
Include it in a search and check results display.
Test the same but with only one branch in Koha.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: ava li <rubyli208@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 21260: Introduce local pref to affect status grouping
Marcel de Rooy [Wed, 19 Aug 2020 14:52:13 +0000 (16:52 +0200)]
Bug 21260: Introduce local pref to affect status grouping

Introducing a local preference Available_NFL to control which not for
loan statuses are considered to be 'available for reference'.
Standard value is '1|2' which comes down to the former >0 when using
the initial Koha defaults.

Test plan:
[1] Pick a biblio with an available item A, an item B with notforloan 1,
    an item C with notforloan 2 and two damaged items. (Former patch.)
    Include it in a OPAC search. You should see:
        Available: A. Reference: B, C. Not-available: Damaged(2).
[2] Add local pref Available_NFL with value '1'. Repeat the search.
    You should see now:
        Available: A. Reference: B. Not-available: S.C.(1), Damaged(2).
    [where S.C. stands for Staff Collection]
[3] Run test t/db_dependent/XSLT.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: ava li <rubyli208@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 21260: Remove item details from reallynotforloan block
Marcel de Rooy [Mon, 24 Aug 2020 13:05:23 +0000 (15:05 +0200)]
Bug 21260: Remove item details from reallynotforloan block

No need to display itemcallnumbers and branch info for items that
are ('really') not available.
We only show a status and a count for the reallynotforloan ('ordered')
categories (not per branch). This simplifies the code too.
We use the preceding-sibling axis to loop over the unique substatuses.

Test plan:
[1] Pick a biblio with an available item A, an item B with notforloan 1,
    an item C with notforloan 2 and two damaged items.
    Include it in a OPAC search. You should see:
        Available: A. Reference: B, C. Not-available: Damaged(2).
[2] Edit item C (notforloan 2). Change to notforloan -1.
    Search again. You should see:
        Available: A. Reference: B. Not-available: On order(1), Damaged(2).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: ava li <rubyli208@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 21260: Create three main XSLT Availability segments
Marcel de Rooy [Wed, 19 Aug 2020 14:52:13 +0000 (16:52 +0200)]
Bug 21260: Create three main XSLT Availability segments

XSLT changes:
[1] Add an item count at the start. Also add variables for counting
    status available and reference. Use these vars in the corresponding
    'blocks'.
[2] Refine the No items-test with the new itemcount.
[3] Combine the reallynotforloan block with the other statuses by
    refining (extending) its initial test. All if's are moved up into
    the former block but are unchanged.

Result of these changes makes that the Availability line consists of three
segments: 1 Available items, 2 Reference items, 3 Other statuses.

Test plan:
[1] Check a biblio without any items in the OAPC results. You should
    see the No items only here.
[2] Check a biblio with one item checked out. You should see only the
    'third' segment with Checked out(1).
[3] Check a biblio with one available and a notforloan==1. You should
    see segment 1 and 2. Both listing item call numbers.
[4] Check a biblio with one available and a notforloan==-1. You should
    see segment 1 and 3. Both listing item call numbers. (See also the
    following patch.)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: ava li <rubyli208@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 21260: Simple adjustments in Availability blocks
Marcel de Rooy [Wed, 19 Aug 2020 14:20:27 +0000 (16:20 +0200)]
Bug 21260: Simple adjustments in Availability blocks

[1] Add reallynotforloan=0 test to 'Block 1'. Add a period after No items available.
[2] Remove the if with colon block. Remove the <br> and add a span for reallynotforloan (items on order).
[3] Add a 'Not available' label for the reallynotforloan block.
[4] Remove the On order status, since it is not used anymore since 7611.

Test plan:
See subsequent patches.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: ava li <rubyli208@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 21260: Indentation at higher levels for Availability/Location
Marcel de Rooy [Wed, 19 Aug 2020 12:35:22 +0000 (14:35 +0200)]
Bug 21260: Indentation at higher levels for Availability/Location

Only whitespace changes and few comments.

Test plan:
Nothing to test. Count the spaces ;)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: ava li <rubyli208@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 26942: Allow style and link tags in NewsEditor TinyMCE
Lucas Gass [Fri, 22 Jan 2021 22:50:51 +0000 (22:50 +0000)]
Bug 26942: Allow style and link tags in NewsEditor TinyMCE

To Test:
-Make sure the sys pref 'NewsToolEditor' is set to TinyMCE
-Go to any news item and add this line:  <link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
-Save the news item
-Re-open the same news item again in TinyMCE.
-The editor has removed that line. Annoying!
-Apply patch
-Try again, the <link> should stay now

Signed-off-by: Amit Gupta <amitddng135@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27963: (bug 23463 follow-up) Fix touch_all_items.pl
Jonathan Druart [Tue, 16 Mar 2021 10:36:17 +0000 (11:36 +0100)]
Bug 27963: (bug 23463 follow-up) Fix touch_all_items.pl

This script is used to fix inconsistencies in the items table. Prior to
bug 23463, ModItem dealt with that.

We need to make some attributes as dirty to make sure the
Koha::Item->store method will fix them.

Test plan:
Be familiar with how touch_all_items is supposed to work and confirm
that the different inconsistencies are fixed.

Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 21958: (QA follow-up) Correct indirect object notation
Martin Renvoize [Thu, 25 Mar 2021 13:32:39 +0000 (13:32 +0000)]
Bug 21958: (QA follow-up) Correct indirect object notation

Our coding guidelines now forbit indirect object notation calling.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 21958: Fix bibliographic record field comparison with authority
Ere Maijala [Tue, 22 Jan 2019 12:38:32 +0000 (14:38 +0200)]
Bug 21958: Fix bibliographic record field comparison with authority

This makes the comparison between bibliographic field and authority field more robust and per subfield. This makes the comparison not consider the same e.g. the following fields:

$a Test User
$a Test $b User

The actual issue cannot be as easily reproduced with the patches for bug 21826 applied, but here's a test plan anyway:

1. Make sure tests pass (especially t/db_dependent/AuthoritiesMarc*)
2. Make sure authority linking still works properly
3. Make sure authority and biblio frameworks allow subfield i
4. Make sure that even if you add subfield i to 700 in biblio, authority link is kept the same
5. Make sure that even if you add subfield i to the authority record, the authority link is kept the same

Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28023: Fix Reply-To typo
Tomas Cohen Arazi [Tue, 23 Mar 2021 14:14:43 +0000 (11:14 -0300)]
Bug 28023: Fix Reply-To typo

This patch fixes a typo making the header useless.

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/Koha/Email.t
=> FAIL: The Reply-To header is not being set!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass! the header is set!
5. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28023: Regression tests
Tomas Cohen Arazi [Tue, 23 Mar 2021 14:14:37 +0000 (11:14 -0300)]
Bug 28023: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 26705: (QA follow-up) Do not rely on latest Email::MIME
Tomas Cohen Arazi [Tue, 23 Mar 2021 19:58:04 +0000 (16:58 -0300)]
Bug 26705: (QA follow-up) Do not rely on latest Email::MIME

This patch makes the implementation use lower-level methods to deal with
headers. So the Email::MIME library in Debian 9 works.

Params are sorted for testing purposes.

To test:
1. Apply this patch
2. Run the tests
=> SUCCESS: Things pass in D9+
3. Sign off :-D

Thanks Kyle!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 26705: (QA follow-up) Clarify test result
Martin Renvoize [Tue, 23 Mar 2021 14:26:02 +0000 (14:26 +0000)]
Bug 26705: (QA follow-up) Clarify test result

Simple output string improvement to fix the copy/paste of the previous
tests comment string.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 26705: Make Koha::Email->send_or_die handle Bcc
Tomas Cohen Arazi [Tue, 23 Mar 2021 13:57:13 +0000 (10:57 -0300)]
Bug 26705: Make Koha::Email->send_or_die handle Bcc

Koha used to rely on Mail::Sendmail for sending emails. As an SMTP
client, the library took the job of extracting Bcc headers (and removing
them) to pass them along with the recipients listed on To: and Cc: to
the SMTP protocol in the form of RCPT TO: lines. [1]

This was overlooked when we moved to Email::Stuffer/Email::Simple and
there's a different behavior, that is a design decision [2].

This patchset re-introduces the behavior from Mail::Sendmail by
overriding the send_or_die method locally (in Koha::Email) and doing the
right thing.

Unless an explicit {to} parameter is passed, it extracts the recipients
from the headers, as Mail::Sendmail does, and calls
$self->SUPER::send_or_die with the right parameters.

To test:
1. Apply the regression tests
2. Run:
   $ kshell
  k$ prove t/Koha/Email.t
=> FAIL: Bcc is not handled correctly!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass! The recipients list is correct! No Bcc header
sent!
5. Sign off :-D

[1] https://metacpan.org/release/Mail-Sendmail/source/lib/Mail/Sendmail.pm#L331
[2] https://metacpan.org/pod/Email::Sender::Manual::QuickStart#Hey,-where's-my-Bcc-support

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 26705: Regression tests
Tomas Cohen Arazi [Tue, 23 Mar 2021 13:56:59 +0000 (10:56 -0300)]
Bug 26705: Regression tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25946: (QA follow-up) Add Unit tests
Martin Renvoize [Tue, 30 Mar 2021 14:47:12 +0000 (15:47 +0100)]
Bug 25946: (QA follow-up) Add Unit tests

Add a unit test for the empty relationship availability.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25946: borrowerRelationship can be empty
Petro Vashchuk [Tue, 30 Mar 2021 11:42:11 +0000 (14:42 +0300)]
Bug 25946: borrowerRelationship can be empty

Do not show the empty dropdown with no options if borrowerRelationship
is disabled (empty) in the syspref.

To reproduce:
    1) Go to system preferences and disable borrowerRelationship.
    2) Create a new patron or modify the existing one.
    3) Under "Guarantor Information" click on "Search to add" button.
    After performing the search, select different patron to act as
    guarantor.
    4) Observe that there's empty dropdown for the relation type.
    5) Apply the patch.
    6) Repeat steps above.
    7) Observe that dropdown is no longer there.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25946: borrowerRelationship can be empty
Petro Vashchuk [Mon, 29 Mar 2021 13:59:32 +0000 (16:59 +0300)]
Bug 25946: borrowerRelationship can be empty

When borrowerRelationship is empty in system preferences, Relationship
dropdown is not required and we accept empty value.

Also fixes bug that didn't let you to pick empty value even when you
specified that it should be possible in system preferences but in the
end of the string (i.e. "|father|mother" worked,
but "father|mother|" don't).

To reproduce (borrowerRelationship can be empty):
    1) Go to system preferences and make borrowerRelationship empty.
    2) Create a new patron who is assumed to have a guarantor or modify
    the existing one.
    3) Under "Guarantor Information" click on "Search to add" button.
    After performing the search, select a user to act as guarantor. Try to save your changes.
    4) Observe that relationship field is required in order to save but
    you can't actually choose anything as it doesn't contain anything.
    5) Apply the patch.
    6) Repeat steps above.
    7) Observe that it allows you to save the form now.

To reproduce (can't choose empty value bug):
    1) Go to system preferences and set borrowerRelationship exactly
    to "father|mother|".
    2) Create a new patron who is assumed to have a guarantor or modify
    the existing one.
    3) Under "Guarantor Information" click on "Search to add" button.
    After performing the search, select a user to act as guarantor.
    4) Observe that there's no option to leave relationship field empty.
    5) Apply the patch.
    6) Repeat steps above.
    7) Observe that it has empty option that you can choose and save
    the form.

Mentored-by: Andrew Nugged <nugged@gmail.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25946: borrowerRelationship can be empty
Petro Vashchuk [Mon, 29 Mar 2021 13:58:25 +0000 (16:58 +0300)]
Bug 25946: borrowerRelationship can be empty

Do not split the config using comma.

From syspref description of borrowerRelationship preference:

> Guarantors can be the following of those they guarantee:
> (input multiple choices separated by |). Leave empty to deactivate.

As it doesn't mention comma at all, I removed ',' from split.
Of course if comma is actually a viable way to split separate choices,
I can obsolete this patch and append to the syspref description that it
also can be separated by comma.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 26517: Add unit test
Fridolin Somers [Thu, 24 Sep 2020 07:08:43 +0000 (09:08 +0200)]
Bug 26517: Add unit test

Run prove t/db_dependent/Members.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 26517: Avoid deleting patrons with permission
Fridolin Somers [Wed, 23 Sep 2020 14:50:09 +0000 (16:50 +0200)]
Bug 26517: Avoid deleting patrons with permission

The patron deletion script misc/cronjobs/delete_patrons.pl uses C4::Member::GetBorrowersToExpunge() to get patrons that may be deleted.
This method filters patrons from a staff category.
I propose to also filter patrons having permission, so a staff member.
Some small libraries do not define a "staff" category and give permissions to regular patrons.

Test plan :
1) Create a patron on adult type category with expiry date in the past and permission to access staff interface
2) Without patch
3) Run delete script : ./src/misc/cronjobs/delete_patrons.pl -v --expired_before='$(date -I)'
4) You see the patron will be deleted
5) Apply patch
6) Run delete script : ./src/misc/cronjobs/delete_patrons.pl -v --expired_before='$(date -I)'
7) You dont see the patron

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27835: DBRev 20.12.00.025
Jonathan Druart [Thu, 18 Mar 2021 14:04:47 +0000 (15:04 +0100)]
Bug 27835: DBRev 20.12.00.025

3 years agoBug 27816: "Click to edit" in Point of sale is untranslatable
Owen Leonard [Mon, 15 Mar 2021 17:06:16 +0000 (17:06 +0000)]
Bug 27816: "Click to edit" in Point of sale is untranslatable

This patch adds an option to the Point of sale jEditable configuration
to explicitly set the title attribute to "Click to edit." This will
allow the string to be picked up for translation.

To test, apply the patch and test that the correct string is
translated. In this example I'm testing fr-FR:

  - Update a translation:

    > cd misc/translator
    > perl translate update fr-FR

  The "Click to edit" string should already have been translated, so
  it's not necessary to update the .po file.

  - Install the updated translation:

    > perl translate install fr-FR

In the staff interface, switch to the language you're testing and open
the point of sale page. Add some items for purchase. They should appear
in the "This sale" table. Hover your mouse over the values in the "Coût"
and "Quantité" columns. You should see the translated string, "Cliquer
pour modifier."

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
3 years agoBug 27967: Add min attribute to borraccount modals
Martin Renvoize [Tue, 16 Mar 2021 16:39:13 +0000 (16:39 +0000)]
Bug 27967: Add min attribute to borraccount modals

This patch adds a min attribute to the form fields of the borrower
account page modals to prevent negative values being entered
inappropriately.

Test plan
1/ Trigger the refund modal from the borrower account page.
2/ Attempt to enter a negative value for the amount to refund and note
with the patch applied you face a validation error (without the patch,
upon submission of a negative value you will be faced with a server side
error)
3/ Trigger the discount modal from the borrower account page.
4/ Attempt to enter a negative value for the amount to discount and note
with the patch applied you face a validation error (without the patch,
upon submission of a negative value you will be faced with a server side
error)
5/ Signoff

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
3 years agoBug 27933: Fix patron search result ordering
Jonathan Druart [Wed, 17 Mar 2021 09:14:43 +0000 (10:14 +0100)]
Bug 27933: Fix patron search result ordering

On bug 27715 we restrict the order by dt params for security reasons.
However in some cases the param passed is "columnname" instead of
"table.columnname".
We should make sure the table is part of the sort fieldname.

Test plan:
Do a "normal" patron search (from the patrons home page) and another
patron search (guarantor for instance).
Sort by cardnumber, date of birth, expiration date, asc, desc and
confirm it works as expected.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
3 years agoBug 27835: Turn off by default
Jonathan Druart [Wed, 17 Mar 2021 09:34:16 +0000 (10:34 +0100)]
Bug 27835: Turn off by default

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
3 years agoBug 27835: (follow-up) Update language, remove warn, add feedback
Nick Clemens [Tue, 16 Mar 2021 13:22:26 +0000 (13:22 +0000)]
Bug 27835: (follow-up) Update language, remove warn, add feedback

This patch:
 - Updates lanugage to be clearer 'ChargeFinesOnClosedDays' vs 'ChargeFinesOnCloseDay'
 - Removes a stary warn
 - Add an 'updated' counter and provides feedback in fines.pl

Test plan:
 0 - Apply patches, updatedatabase
 1 - set finesCalendar to 'ignore', ChargeFinesOnClosedDays to "Don't charge"
 2 - Checkout an item due yesterday
 3 - Ensure circ rules have a fine amount and interval set
 4 - Make today a holiday
 5 - perl misc/cronjobs/fines.pl -v
 6 - 0 updated
 7 - ChargeFinesOnClosedDays to "Charge"
 8 - perl misc/cronjobs/fines.pl -v
 9 - 1 updated
10 - set fines calendar to 'use'
11 - perl misc/cronjobs/fines.pl -v
12 - 1 updated (NOTE: This is wrong maybe, but handle on another bug)
13 - set ChargeFinesOnClosedDays to "Don't charge"
14 - perl misc/cronjobs/fines.pl -v
12 - 0 updated

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
3 years agoBug 27835: Add a syspref to control fines calculation on closed days
Jonathan Druart [Tue, 16 Mar 2021 09:16:55 +0000 (10:16 +0100)]
Bug 27835: Add a syspref to control fines calculation on closed days

Bug 27180 added a patch to not update fines on holidays if finesCalendar was set to ignore.
At least it's what it advertised, but not what it did.

It seems that we need to add a new pref to control the calculation of
fines on closed days to answer the different use cases.

Test plan:
With this patch applied you can run the fines.pl cronjob and play with
the new pref ChargeFinesOnCloseDay to generate fines on close days.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
3 years agoBug 27835: Add new syspref ChargeFinesOnCloseDay
Jonathan Druart [Tue, 16 Mar 2021 09:16:51 +0000 (10:16 +0100)]
Bug 27835: Add new syspref ChargeFinesOnCloseDay

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
3 years agoBug 27835: Revert "Bug 27180: (follow-up) Remove unused %is_holiday"
Jonathan Druart [Tue, 16 Mar 2021 08:55:10 +0000 (09:55 +0100)]
Bug 27835: Revert "Bug 27180: (follow-up) Remove unused %is_holiday"

This reverts commit a26d529a2bc7faee3743b4cd1e603ba29411a0b9.

Revert "Bug 27180: Update fines on holidays"

This reverts commit 80e1b4e66f01a07cad9bf37625d879f649edf52a.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
3 years agoBug 27969: Change wording on returns page
Andrew Fuerste-Henry [Tue, 16 Mar 2021 18:59:11 +0000 (18:59 +0000)]
Bug 27969: Change wording on returns page

To test:
1- go to /cgi-bin/koha/circ/returns.pl, click Checkin settings to show options
2- it says "Remember due date ..."
3- apply patch, reload
4- it says "Remember return date ..."

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 18532: Add missing notice template for it-IT
Jonathan Druart [Wed, 17 Mar 2021 07:23:10 +0000 (08:23 +0100)]
Bug 18532: Add missing notice template for it-IT

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 18532: DBRev 20.12.00.024
Jonathan Druart [Tue, 16 Mar 2021 15:07:37 +0000 (16:07 +0100)]
Bug 18532: DBRev 20.12.00.024

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 18532: (follow-up) fix messages and bug in automatic_renewals script
Agustin Moyano [Tue, 16 Mar 2021 14:44:19 +0000 (11:44 -0300)]
Bug 18532: (follow-up) fix messages and bug in automatic_renewals script

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 18532: (follow-up) Fix atomic update
Tomas Cohen Arazi [Tue, 16 Mar 2021 13:18:38 +0000 (10:18 -0300)]
Bug 18532: (follow-up) Fix atomic update

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>