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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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'
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
When the ILL notices were added, a bad rebase got rid of the notice
description in both messaging-preference-form.inc and opac-messaging.tt
This patch restores that line:
1. Set AutoRenewalNotices to 'according to patron...'
2. Edit a patron category
=> FAIL: There's an 'Unknown' label for 'Auto renewal'
3. Look at a patron's messaging preferences
=> FAIL: There's an 'Unknown' label for 'Auto renewal'
4. Look at a patron's messaging preferences in OPAC
=> FAIL: There's an 'Unknown' label for 'Auto renewal'
5. Apply this patch
6. Repeat 2, 3, 4
=> SUCCESS: 'Auto renewal' is displayed as expected
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Agustin Moyano [Thu, 10 Dec 2020 19:27:45 +0000 (16:27 -0300)]
Bug 18532: (follow-up) Fix notice message, add notice to all installer languages and fix preference message
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>
Nick Clemens [Thu, 14 May 2020 13:21:22 +0000 (13:21 +0000)]
Bug 18532: Add individual issues to digest notice and hide auto_renewals messaging preference when not needed
This patch enhances auto_renewals message, removes auto_renewals messaging preference when AutoRenewalNotices is not set to ‘preferences’ and uses that preference to send notices in automatic_renewals.pl script.
To test:
1. Apply patches
2. updatedatabase
3. make sure automatic renewals are allowed in circ rules, have a positive number of allowed renewals and a positive number for renewal period
4. Check AutoRenewalNotices preference
SUCCESS => AutoRenewalNotices has the value ‘cron’ (means that It keeps the usual behaviour)
5. Checkout two items for a patron, and set them as automatic renewal and set due date as your current yesterday
6. perl misc/cronjobs/automatic_renewals.pl -c -v
SUCCESS => items were renewed, but there is no message in message_queue table in mysql
7. Repeat step 5
8. perl misc/cronjobs/automatic_renewals.pl -c -s -v
SUCCESS => items were renewed, and there is one message per item in message_queue table in mysql
9. Change AutoRenewalNotices to ‘never’
10. Repeat step 5
11. perl misc/cronjobs/automatic_renewals.pl -c -s -v
SUCCESS => items were renewed, but there is no message in message_queue table in mysql, even with the -s switch
12. Check any patron’s category, and any detail page in staff or OPAC interface, and in any of them you should find Auto Renewals messaging preference
13. Change AutoRenewalNotices to ‘preferences’
14. Repeat step 12, but this time all of them shows the Auto Renewals messaging preference.
15. Repeat step 5 with a patron that has no messaging preference setted
16. perl misc/cronjobs/automatic_renewals.pl -c -s -v
SUCCESS => items were renewed, but there is no message in message_queue table in mysql, because patron didn’t choose to receive messages
17. Grab a category and modify auto renewals messaging preferences, and save
18. Create a new patron from that category.
SUCCESS => created patron has the same messaging preference for auto renewals
19. Grab that patron and change auto renewals messaging preference to email but not digest
20. Repeat step 5 for that last patron.
21. perl misc/cronjobs/automatic_renewals.pl -c -v
SUCCESS => Items were renewed, and there is a message for each item in message_queue table in mysql.
22. Change auto renewals messaging preference from the same patron and set to email and digest.
23. Repeat step 5.
24. perl misc/cronjobs/automatic_renewals.pl -c -v
SUCCESS => items where renewed, and now there is only one message in message_queue table with the details of both renewed items.
25. Check that any changes to a patron’s auto renewals messaging preference in staff is reflected in OPAC, and the other way arround too.
26. Sign off
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>
Nick Clemens [Thu, 14 May 2020 12:53:30 +0000 (12:53 +0000)]
Bug 18532: (follow-up) Remove digest switch and add preference
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>
Agustin Moyano [Tue, 29 Oct 2019 18:27:38 +0000 (15:27 -0300)]
Bug 18532: set auto_renewals as patron messaging preference
This patch adds the "Auto renewals" messaging preference on intranet and OPAC, and adds digest feature to misc/cronjobs/automatic_renewals.pl script.
(Deprecated test plan. Please check the last patch)
To test:
1. apply patches
2. perl installer/data/mysql/updatedatabase.pl
3. make sure automatic renewals are allowed in circ rules, have a positive number of allowed renewals and a positive number for renewal period
4. go to patron categories in administration of staff interface and choose a category.
CHECK => in "Default messaging preferences for this patron category" has a "Auto renewals" row and has email and digest options checked
5. grab a patron and go to details page
CHECK => patron's messaging preferences has a "Auto renewals" row with email and digest options checked
6. some settings and save
7. go to opac with that same patron to "your messaging" option
CHECK => patron's messaging preferences has a "Auto renewals" row, and displays changes made in staff interface.
8. uncheck email and digest from "Auto renewals" row and save
9. check out an item for that patron, and set it as automatic renewal and set due date as your current yesterday
10. perl misc/cronjobs/automatic_renewals.pl -c --send-notices -v
SUCCESS => item was renewed, and in message_queue table there is no new message for the patron
11. update patrons messaging preferences and set email option of "Auto renewals" row as checked
12. repeat steps 9 and 10
SUCCESS => item was renewed, but in message_queue table there is a new message of type AUTO_RENEWALS
13. update patrons messaging preferences and set email and digest options of "Auto renewals" row as checked
14. repeat steps 9 and 10
CHECK => item was not renewed
15. run step 10 again, but add -d flag, like this:
perl misc/cronjobs/automatic_renewals.pl -c --send-notices -v -d
SUCCESS => item was renewed, and in message_queue table there is a new message of type AUTO_RENEWALS_DGST
16. Sign off
Signed-off-by: tgoat <tgoatley@gmail.com> Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Marti Fuerst <mfuerst@hmcpl.org> 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>