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>
Add a patron holds controller for the REST api and impliment the #list
methods.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Addd unit tests for the new patrons/{patron_id}/holds api route.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Add /api/v1/patrons/{patron_id}/holds route and holds object description
to the OpenAPI specification.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Thu, 28 Jan 2021 09:08:24 +0000 (09:08 +0000)]
Bug 26272: Add ajax driven cashup modal to library page
This patch adds an ajax driven cashup summary modal to the library
registers summary page.
Test plan
1/ Enable UseCashRegisters in the system preferences
2/ Add at least one cash register to your library
3/ Make some payments of various types (Cash, Card) against the cash
register
4/ View the register transactions details page
5/ Make a refund against a payment
6/ Cashup
7/ View the cashup summary by clicking on the 'Summary' link on the
register page.
8/ Navigate to the 'libraries' summary page
9/ View the cashup summary by clicking on the 'Summary' link in the
registers table.
10/ 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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 26633: (QA follow-up) Tests on error condition
This patch highlights a problem with the try/catch conditions in the
ad() controlled method. Tests are added, and the controller is fixed to
reflect the right behaviour.
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/api/v1/transfer_limits.t
=> SUCCESS: Tests pass! 409 is returned as appropriate!
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Tue, 27 Oct 2020 18:01:47 +0000 (14:01 -0400)]
Bug 26633: (QA follow-up) Action buttons should not remain grayed out if the same action is used multiple times in a row
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Fri, 23 Oct 2020 00:51:34 +0000 (00:51 +0000)]
Bug 26633: (QA follow-up) Change label to "collection" as we display the description
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Sun, 25 Oct 2020 00:54:54 +0000 (02:54 +0200)]
Bug 26633: Fix indirect object notation
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Thu, 8 Oct 2020 15:15:44 +0000 (11:15 -0400)]
Bug 26633: Add advanced editor for transfer limits
The current transfer limits editor works great for Koha instances with
small numbers of branches. However, for consortiums with dozens or even
hundreds of libraries, the editor does not work well or effectively.
We should provide an "advanced" editor displays all to/from library
combinations in a grid and allows them to be edited in a manner somewhat
similar to the transport cost matrix editor.
Test Plan:
1) Apply this patch
2) Browse to the transfer limits editor
3) Click the new "Switch to advanced editor" link
4) Select a collection code/item type to edit limits for
5) Test the "Check all" function
6) Test the "Uncheck all" function
7) Test the "Check" column function
8) Test the "Uncheck" column function
9) Test the "Check" row function
10) Test the "Uncheck" row function
11) Test individual checkboxes/table cells
Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org> Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org> Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org> Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Fri, 19 Feb 2021 10:12:32 +0000 (10:12 +0000)]
Bug 27716: Update permissions for patroncards creator
The various subpages of the label creator tool we're under the
'catalogue' permission. There is however a 'label_creator' subpermission
of tools which is more appropriate.
Test plan
1/ Setup a user with just the 'catelogue' permission (to enable logging
into the staff interface)
2/ With the patch applied you should not be able to access the following
pages (either via navigation in the UI or by typing them into the
browser address bar directly)
- /patroncards/add_user_search.pl
- /patroncards/edit-batch.pl
- /patroncards/edit-layout.pl
- /patroncards/edit-profile.pl
- /patroncards/edit-template.pl
- /patroncards/home.pl
- /patroncards/image-manage.pl
- /patroncards/manage.pl
- /patroncards/print.pl
3/ Signoff
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 [Fri, 5 Mar 2021 09:14:08 +0000 (10:14 +0100)]
Bug 27860: Fix password recovery
Same as the previous patch but for the password recovery feature.
Test plan:
1. Do not apply the patches
2. Set KohaAdminEmailAddress to an invalid email (root@localhost for
instance)
3. Use the password recovery feature
5. Boom (that must be fixed on a separate bug report)
6. Set KohaAdminEmailAddress to a valid email (root@example.org)
7. Use again the password recovery for a different user
8. Still Boom! (because it's processing the first invalid email)
9. Apply the patches, restart_all
10. Try again the password recovery
=> The email is sent!
Notice the change in DB, the first email is still there with status
"pending" and second email is sent!
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>
Jonathan Druart [Fri, 5 Mar 2021 09:04:14 +0000 (10:04 +0100)]
Bug 27860: Fix self-registration if messages with incorrect email are inqueued
If the pref KohaAdminEmailAddress was not set correctly (invalid email)
and has been used to generate message, the message_queue table can contain
some messages that are not sent (pending) and will be processed each
time a new self-reg is done.
The PatronSelfRegistrationVerifyByEmail feature must send only the
notice we just generated, not the whole pending queue.
Test plan:
1. Do not apply the patches
2. Set KohaAdminEmailAddress to an invalid email (root@localhost for
instance)
3. Turn on PatronSelfRegistrationVerifyByEmail
4. Self-reg a patron
5. Boom (that must be fixed on a separate bug report)
6. Set KohaAdminEmailAddress to a valid email (root@example.org)
7. Self-reg a patron
8. Still Boom! (because it's processing the first invalid email)
9. Apply the patches, restart_all
10. Self-reg a patron
=> The email is sent!
Notice the change in DB, the first email is still there with status
"pending" and second email is sent!
QA: at step 10. TODO first email must be 'failed' (highlight in tests) 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>
Jonathan Druart [Fri, 5 Mar 2021 09:01:30 +0000 (10:01 +0100)]
Bug 27860: Add message_id param to SendQueuedMessages
We could use C4::Letter::GetMessage, but the query in
_get_unsent_messages join on borrowers and return the branchcode.
To prevent any regressions it's preferable to not modify
SendQueuedMessages.
Ideally we obviously need a Koha methods to have better and clean code..
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>
Jonathan Druart [Wed, 3 Feb 2021 09:33:35 +0000 (10:33 +0100)]
Bug 27597: Remove leading colon in ES query
If we are searching on kw there is a leading colon at the beginning of
the generated query:
kw:foo becomes :foo
Note that it only happens when there is no other terms before.
Test plan:
0. Don't apply the patch
1. Search for kw:foo
2. Notice the error
Error: Unable to perform your search. Please try again.
and the logs say
Failed to parse query [(:foo*)]
3. Apply the patch
4. Repeat the search and notice that you know get:
"12 result(s) found for 'kw:foo'."
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Phil Ringnalda [Tue, 9 Mar 2021 03:33:06 +0000 (19:33 -0800)]
Bug 27737: (follow-up) Minimal CSS changes to avoid regressions
To keep the specificity of the rules we want to have apply to both the
biblio editor and also the authorities editor, we need to add the ID for
the authorities editor, rather than remove the ID for the biblio editor.
Also, the removal of the selectors for #authoritiestabs descendents was
regressing the display of authority record details, which is where that
plural authoritiestabs element lives.
Test plan:
1. With neither patch from this bug applied, Cataloging - New record -
Default framework.
2. Shrink and widen your browser window, noticing how the input fields
flex to remain the full width, keeping the controls to duplicate and
delete a subfield out directly to the right of the input.
3. Authorities - search for Perl (or any term that will match a record),
click the linked authority term to open the Authority detail display
4. Note how the field number, field description, and subfield descriptions
are all different colors, and subfield codes are on the same line as
the subfield contents.
5. Apply both patches from this bug.
6. Cataloging - New record - Default framework
7. Verify that the input fields still behave the same as you widen and
shrink your browser window
8. Authorities - New authority - Chronological Term
9. Verify that the input fields now behave like the ones in the biblio
editor, shrinking and widening to fill the width of the page, keeping
the controls to duplicate and delete subfields immediately to the
right of the field
10. Authorities - search for Perl, click the linked authority term to open
the Authority detail display
11. Verify that the tag number, field description and subfield descriptions
are still properly colored and subfield codes are still on the same
line as the subfield contents.
Signed-off-by: David Nind <david@davidnind.com>
Trivial fixup for a copy-paste failure, missed the y on
subfield_loop_mandator
Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Tue, 2 Mar 2021 17:44:35 +0000 (17:44 +0000)]
Bug 27737: Tag editor for authority lookup broken in authority editor
This patch changes the markup structure for the authorities
editor so that it better matches that of the basic bibliographic
record editor. This allows the authority-linking JavaScript to
correctly target fields on both pages.
To test, apply the patch and go to Authorities in the staff client.
- Create or edit an authority record.
- Switch to tab 5 and if necessary click one of the tag names (e.g.
"SEE ALSO FROM TRACING--PERSONAL NAME") to expand the subfields.
- Click the "..." plugin link next to subfield a ("Personal name" in
this example).
- In the popup window, search for an authority record.
- Click "Choose" next to one of the results.
- The popup window should close and the authority editor should contain
data from the record you chose, including a value in $9 and $a.
- Test with various records to confirm that data in other fields is
copied correctly, for instanct $d, dates associated with a name, $t
title of a work.
- Test other JavaScript-driven interactions in the editor:
- Duplicate repeatable tag
- Remove repeatable tag
- Empty tag
- Reorder sortable tags (e.g. multiple 500 tags)
- Reorder sortable subfields
- Duplicate repeatable subfield
- Remove repeatable subfield
- Empty repeatable subfield
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=22737
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>
Fridolin Somers [Mon, 1 Mar 2021 10:40:56 +0000 (11:40 +0100)]
Bug 27820: add all missing use in misc/cronjobs/plugins_nightly.pl
Koha::Plugins and C4::Context where missing.
Try::Tiny was missing for try/catch.
Test plan :
1) Use a plugin using hook 'cronjob_nightly'
2) Run script : misc/cronjobs/plugins_nightly.pl
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Samir Shah [Mon, 1 Mar 2021 07:49:03 +0000 (10:49 +0300)]
Bug 27820: fix missing import in plugins_nightly.pl
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Thu, 11 Feb 2021 10:19:57 +0000 (10:19 +0000)]
Bug 26273: (follow-up) Add 'Cashier' to the cashups table
This patch adds the 'Cashier' field as discussed on the bug report.
Test plan
1/ Apply patch and reload the register page to refresh the table
2/ Note that a 'Cashier' field now appears in the table
3/ Sorting and searching on 'Cashier' should work as expected
4/ Default sorting should remain as 'Date' order.
5/ Signoff
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Bug 26273: (QA follow-up) Check for null firstname
This patch adds a test for firstname being defined before constructing
fullname from it.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Wed, 10 Feb 2021 17:31:56 +0000 (17:31 +0000)]
Bug 26273: (follow-up) Format dates and money correctly.
This patch adds the missing formatting for the Datetime and Amount
fields.
Test plan
1/ Apply patch and reload register page to re-display the cashups table
2/ Note that the 'Date' field now displays a nicely formatted date
without an offset.
3/ Note that the 'Amount' field now displays the number according to
your money formatting preferences (with 2 decimal places in most cases)
4/ 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>
Martin Renvoize [Mon, 1 Feb 2021 14:50:02 +0000 (14:50 +0000)]
Bug 26273: Add historic cashups table to register page
This patch adds a historic cashups table to the bottom of the register
transaction details page. It will only display if one or more cashups
have taken place and contains links to allow display of the summary
detail modal for each cashup.
Test plan
1/ Enable UseCashRegisters
2/ Undertake a few transactions and cashups
3/ View the 'Register details' page
4/ Note the appearance of a 'Cashup history' section at the bottom of
the page
5/ Note that 'Summary' button displays the relevant modal
6/ Signoff
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Daniel Jones <daniel.jones@cheshiresharedservices.gov.uk> Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Bug 26273: (QA follow-up) Remove unrequired table_controls div
Looks like a copy/paste issue.. I don't believe we need this div at all
for the table to function as expected and adding it just creates uneeded
whitespace.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Bug 26273: (QA follow-up) Add horizontal rule to distinguish tables
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Fri, 18 Dec 2020 16:37:44 +0000 (16:37 +0000)]
Bug 22569: Add a 'Transfers to send' report
This patch adds a 'Transfers to send' report to the circulation page
which displays items which have been triggered for transfer but not
marked as sent.
Test plan
1) Setup a rotation plan and add some items to it as per the
manual
2) Run the stockrotation cronjob with the --execute flag
3) Check that the expected items appear in the new 'Transfers to send'
page.
4) Confirm that items marked with 'StockRotationAdvance' provide the
option to mark the item as 'In demand' (Which will cancel the
transfer and mark the item as in demand such that it will wait at the
current branch for an additional stage period before being
automatically picke for transfer again)
5) Setup a rotating collection
6) Trigger a collection transfer for the above collection
7) Check that the expected items appear in the new 'Transfers to send'
page'.