As requested, I have embelished the syspref description to more
accurately depict the fallback sequence for email delivery.
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>
Alex Buckley [Wed, 22 Apr 2020 00:01:58 +0000 (00:01 +0000)]
Bug 24197: Changed use of 'branch' terminology to 'library'
Sponsored-by: Catalyst IT 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>
Alex Buckley [Tue, 21 Apr 2020 23:21:20 +0000 (23:21 +0000)]
Bug 24197: Added new local use syspref which sets the email address that failed overdue notices are set to.
Test plan:
1. Set no email addresses in patron record then checkout
items to the patron making the due date in the past
2. Visit patron's home library page: Administration > Libraries
Set a branch email and in global system preferences observe there is no syspref
named RedirectAddressForFailedOverdueNotices
3. Manually run overdue_notices.pl
4. Check the message_queue database table and observe there is a
print overdue notice and a email notice with to_address of the
branch email address
5. Apply patch
6. Run database update:
cd installer/data/mysql
sudo koha-shell <instance_name>
./updatedb.pl
7. Confirm there is a new system preference named:
RedirectAddressForFailedOverdueNotices
Give it a different email address to that in the branch email.
7. Repeat steps 1,3,4 and observe that the failed overdue notices have been
sent to the email defined in RedirectAddressForFailedOverdueNotices
Sponsored-By: Catalyst IT 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>
Martin Renvoize [Wed, 2 Sep 2020 13:40:08 +0000 (14:40 +0100)]
Bug 25541: (QA follow-up) Default to disabled + Correct message
This patch defaults the 'holds_block_checkin' configuration to disabled
(to maintain current behaviour on upgrades). It also updates a
copy/paste for siplog logging to make the message triggered by this
action unique as expected.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Tue, 19 May 2020 12:35:06 +0000 (08:35 -0400)]
Bug 25541: Add ability to prevent checkin via SIP of items with holds
Some libraries would like patrons to be unable to return items with
holds via SIP. Instead, the screen message should indicate that the
patron should return that item at the circ desk so a librarian can use
it to fill the next hold right away and place it on the hold shelf.
Test Plan:
1) Apply this patch.
2) Place a hold for an item.
3) Enable the new SIP option no_holds_checkin for a SIP account.
4) Restart the SIP server.
5) Check in the item using the SIP CLI tool using the SIP account
for which you set the new option.
6) Note the checkin fails with a screen message indicating you should
return the item to the circulation desk.
Signed-off-by: Peter Lau <peter.lau@yccece.edu.hk> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Wed, 22 Jul 2020 12:28:44 +0000 (13:28 +0100)]
Bug 26041: Enable keyboard navigation without 'ctrl'
This patch enables keyboard navigation using the arrow keys without the
need to hold the control key for the jQuery UI datepicker.
Test plan
1/ Navigate to an item in the opac and attempt to place a hold
2/ On the resultant screen, use keyboard navigation to trigger the 'Show
more options' dropdown.
3/ Focus on one of the date inputs using keyboard navigation.
4/ Use 'ctrl + arrow' keys to navigate the datepicker.
5/ Note that prior to the patch using 'bare' arrow keys does not trigger
anything
6/ Apply the patch and confirm that the datepicker can now be naviated
using the arrow keys without holding the ctrl key.
7/ Confirm that using the ctrl key combinations continue to work as
expected too.
8/ Signoff
Signed-off-by: Brandon J <brandon.jimenez@inLibro.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 17801: Use issuedate for limits in Most Circulated Items
To test:
1 - Have two checkouts in old_issues
issue 1: timestamp 2020-08-01 00:00:00, issuedate 2019-08-01 00:00:00
issue 2: timestamp 2020-07-01 00:00:00, issuedate 2019-07-01 00:00:00
2 - Perform a Most Circulated Items search for checkout dates 2020-06-01 to 2020-09-01. Both checkouts appear in search
3 - Repeat search with checkout dates 2019-06-01 to 2019-09-01. Neither checkout appears in search
4 - apply patch, restart all
5 - Repeat search with checkout dates 2020-06-01 to 2020-09-01. Neither checkout appears in search
6 - Repeat search with checkout dates 2019-06-01 to 2019-09-01. Both checkouts appears in search
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>
Nick Clemens [Tue, 18 Aug 2020 13:33:33 +0000 (13:33 +0000)]
Bug 26236: Fix translating interface from DB term to readable term
When viewing the logs we try to swith the db values like 'cron' to friendly terms like
'Cron job'
The values we use for building the selectors on the page ar eupper case, but DB values are lower case
If we simply force upper case in the comparison we can ensure we always match correctly
To test:
1 - Enable some 'Logs' setting in System preferences
2 - Perform some action in koha that will log
Run a cronjob
Change a syspref
etc.
3 - Browse to Tools-> Log viewer
4 - Click 'Submit' to see all logs
5 - Note the 'Interface' column contains lower case DB values
6 - Apply patch
7 - Reload the page
8 - Values in interface are now Camel cased and more friendly
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>
Joonas Kylmälä [Fri, 21 Aug 2020 13:23:38 +0000 (16:23 +0300)]
Bug 26271: Add null to the list of accepted account_line data types
The database schema for accountlines table allows the
manager_id/user_id column to be NULL. If request to
/api/v1/patrons/<patron_id>/account returns such an accountline where
it is NULL we get 500 error as response. Adding NULL to allowed data
types fixes this issue.
To test:
1) Run prove t/db_dependent/api/v1/patrons_accounts.t and notice it
doesn't fail
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>
Bug 15851: (follow-up) Only display the analytics link when required (staff)
This patch replicates the introduced behaviour, for the admin interface.
To test, follow the test plan from the OPAC, but on the intranet.
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 15851: Only display the analytics link when required
This patch makes opac-detail.pl query for analytics the same way it
would do with the generated link (i.e. based on UseControlNumber) and
passes a flag to the XSLT so it displays (or not) the 'Analytics' link.
To test:
1. Apply the first patch
2. Have a known record without analytics
3. Open the record in the OPAC
=> FAIL: It shows the 'Analytics' link
4. Have a record known to have analytics and open in OPAC, on a separate
tab
=> SUCCESS: It shows the 'Analytics' link
5. Apply this patch and restart_all
6. Reload the tabs
=> SUCCESS: It shows the link where it has to, and hides it where it
shouldn't be displayed
7. Sign off :-D
Sponsored-by: Orex Digital Signed-off-by: Hugo Agud <hagud@orex.es> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The current XSLT displays the link to linked analytics only for serials.
This patch makes it show for all the relevant position 7 on the leader
values. I left out a and b as recommended by expert librarians on my
team, but I can revert that if required.
The current implementation adds a new CSS class for each case, so
libraries willing to keep the current behaviour or just have more
granular control on the cases they want the link to display, just can.
This patch makes sense with the follow-up one, which will display the
link only if there are really related records.
To test:
1. Open a non-serial record, notice there's no link to analytics
2. Apply this patch and reload
=> SUCCESS: There's an 'Analytics' link
3. Inspect the produced HTML
=> SUCCESS: A special class with analytic_* value has been added, and
thus we now can control its display through CSS
4. Sign off :-D
Sponsored-by: Orex Digital Signed-off-by: Hugo Agud <hagud@orex.es> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Tue, 1 Sep 2020 19:22:31 +0000 (21:22 +0200)]
Bug 26313: (follow-up) Fix OPAC and "Show volumes" links
Elasticsearch requires the booleans in search requests to
be uppercase. This fixes the "Show analytics" link in
OPAC (same as first patch for intranet) and the "Show volume"
link.
To test both patches:
Set UseControlNumber = Use
1) "Show analytics"
- Turn SearchEngine to Elasticsearch and make sure it works
- Pick any serial record in your database, make sure 001 is set
- Go to new > new child record
- Fill in 245 and save
- For both staff and OPAC:
- Click on the "In" link, it should bring you to the parent record
- Click on "Show analytics", it should show your analytical record
- Switch to "Zebra" - verify links still work.
2) "Show volumes"
- Turn SearchEngine to Elasticsearch again
- Pick any serial record in your database, make sure 001 is set
- Set LDR, pos. 19 = a - Set
- Note 001 value
- Find another record and edit it
- Set LDR, pos. 19 = a or b, LDR 7 not a or b (m will work)
- Set 773$ title of set record $w 001 of set record
- For both staff and OPAC:
- Click on the "In: link, it should bring up your set record
- Click on the "Show volumes" link, it should bring up the volume
- Switch to "Zebra" - verify all links still work.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Tue, 1 Sep 2020 12:32:56 +0000 (12:32 +0000)]
Bug 26313: "Show analytics" link must use uppercase for booleans
In elasticsearch we only treat AND and OR as boolean operators if
they are capitalized
To test:
- Turn SearchEngine to Elasticsearch and make sure it works
- Pick any serial record in your database, make sure 001 is set
- Go to new > new child record
- Fill in 245 and save
- Click on the "In" link, it should bring you to the parent record
- Click on "Show analytics" => there will be no result
- Apply patch
- restart and reload
- Try again
- It works!
- Switch SearchEngine syspref to 'Zebra'
- Test again
- It still works!
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
David Cook [Tue, 1 Sep 2020 05:19:14 +0000 (15:19 +1000)]
Bug 26331: Make svc/letters/preview executable
Without this patch, you can't preview letters when running Koha in CGI mode.
To test:
1. Run Koha as CGI (and not Plack)
2. Go to /cgi-bin/koha/tools/letter.pl?op=add_form&branchcode=&module=circulation&code=CHECKIN
3. Try to preview the notice (using a valid barcode)
4. Note in the browser console that svc/letters/preview is generating a 500 error
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>
David Cook [Thu, 3 Sep 2020 05:40:57 +0000 (05:40 +0000)]
Bug 26362: Show correct libraries in overdues report
Currently the overdues report does the following display:
Patron library = home branch
Home library = holding branch
Holding library = patron branch
This patch corrects the display of libraries in the overdues report.
To test:
0) Do not apply patch
1) Go to http://localhost:8081/cgi-bin/koha/circ/circulation.pl?borrowernumber=51
2) Go to http://localhost:8081/cgi-bin/koha/circ/set-library.pl
3) Choose "Troy"
4) http://localhost:8081/cgi-bin/koha/circ/circulation.pl?borrowernumber=51
5) Checkout "39999000004571" with due date of "09/01/2019 23:59"
Note the facts:
Patron library = Centerville
Home library = Fairview
Holding library = Troy
6) Go to http://localhost:8081/cgi-bin/koha/circ/overdue.pl
7) Change "Columns" visibility to show Holding and Home libraries
8) Note that the libraries are incorrect:
Patron library appears to be: Fairview
Home library appears to be: Troy
Holding library appears to be: Centerville
9) Apply the patch
10) koha-plack --restart kohadev
11) Go to http://localhost:8081/cgi-bin/koha/circ/overdue.pl
12) Change "Columns" visibility to show Holding and Home libraries
13) Note that the libraries are correct:
Patron library appears to be: Centerville
Home library appears to be: Fairview
Holding library appears to be: Troy
Signed-off-by: Emmi Takkinen <emmi.takkinen@outlook.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 17 Feb 2020 15:44:37 +0000 (16:44 +0100)]
Bug 24663: Handle special cases for recovery password and selfreg
The password recovery and self-registration features need to be
accessible at the OPAC even if not public.
Test plan:
Self register a new account, then ask for a new password with OpacPublic
turned off
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 17 Feb 2020 12:31:38 +0000 (13:31 +0100)]
Bug 24663: Force authentication in svc/records/preview (?)
Was this wrong?
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 17 Feb 2020 12:20:48 +0000 (13:20 +0100)]
Bug 24663: Remove authnotrequired if set to 0
It defaults to 0 in get_template_and_user
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 17 Feb 2020 12:16:48 +0000 (13:16 +0100)]
Bug 24663: Test OpacPublic for all OPAC scripts
Prior to this patchset there were 3 different calls to
get_template_and_user (or checkauth) with the authnotrequired param:
* authnotrequired => 0
* authnotrequired => 1
* authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 )
The first one says that an unauthenticated user can access the page, the
second that the user has to be authenticated, and the last one that it
depends on the OpacPublic syspref.
Actually we must replace the first one with the third one, if the OPAC
is not public, the authentication must be forced.
To do so we are going to remove the "authnotrequired => 0" occurrences,
and check the OpacPublic syspref's value in C4::Auth
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Wed, 5 Aug 2020 13:48:59 +0000 (13:48 +0000)]
Bug 25360: (follow-up) Remove the https FIXME in Auth.pm
The FIXME is no longer valid since we fixed the X-Forwarded headers
for Plack. And since we do not even use using_https anymore in
the templates (see bug 21094).
Test plan:
Run Auth.t
Git grep for using_https
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>
David Cook [Mon, 4 May 2020 01:12:26 +0000 (11:12 +1000)]
Bug 25360: Use secure flag for CGISESSID cookie when using HTTPS
This patch adds the secure flag to the CGISESSID cookie when using HTTPS.
This prevents the cookie being used again over a normal HTTP
request.
Bug 25360: [Follow-up] Test for "on" or "ON" value for HTTPS env var
This patch tests for HTTPS "on" or "ON" before setting the secure
cookie.
Bug 25360: [Follow-up] Fix typo in C4/InstallAuth.pm
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Amended number of tests in Context.t Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 23634: (QA follow-up) Our PUT is really a PATCH
This patch makes the controller not expect that there will always be all
the email fields. So it now checks if an email field was passed, and
changed, and renders the error if that stands.
To test:
1. Run:
$ kshell
k$ prove t/db_dependent/api/v1/patrons.t
=> FAIL: Tests written by Nick highlight a problem
2. Apply this patch
3. Repeat 1
=> SUCCESS: Problems solved
4. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Mon, 13 Jul 2020 10:33:11 +0000 (10:33 +0000)]
Bug 23634: (QA follow-up) Adjust tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Fri, 10 Jul 2020 08:38:31 +0000 (09:38 +0100)]
Bug 23634: (QA follow-up) Catch all email cases in API
The API was only catching the primary email change case, but we need to
catch email, emailpro and B_email.
We were also not accounting for any of the emails (on PUT or from the
DB) being undefined.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Tue, 19 Nov 2019 16:59:06 +0000 (16:59 +0000)]
Bug 23634: (follow-up) Prevent updates on POST
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Tue, 19 Nov 2019 14:51:50 +0000 (14:51 +0000)]
Bug 23634: Prevent non-superlibrarians from editing superlibarian emails
This patchset prevents a non-superlibrarian user from editing a
superlibrarians email address via memberentry. This is to prevent a
privilege escalation vulnerability whereby a user could update a
superlibrarians contact details to match their own and then request a
password reset via the OPAC.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Tue, 19 Nov 2019 14:11:34 +0000 (14:11 +0000)]
Bug 23634: Add is_superlibrarian method to Koha::Patron
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Thu, 9 Apr 2020 17:22:01 +0000 (13:22 -0400)]
Bug 25101: Add ability to skip previewing results when batch extending due dates
For sites with very large amounts of due dates to extend ( tens of thousands ), it can take a very long time of the results to load ( if at all ). It would be good to have a way to bypass the confirmation screen, instead directly updating the due dates before displaying the results.
Test Plan:
1) Apply this patch
2) Browse to tools/batch_extend_due_dates.pl
3) Note the new "Preview results" checkbox
4) Submit form with the checkbox unchecked, due dates should be updated
without previewing the checkouts
5) Submit form with the checkbox checked, tool should function as
it did previously
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Bug 25101: (QA follow-up) Add hint to new option
Adds a hint about the large numbers behind the new
checkbox option.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Bug 25101: (QA follow-up) Fix hint for new option
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Tue, 4 Aug 2020 11:33:44 +0000 (11:33 +0000)]
Bug 21066: Update translated news and notices
Replace timestamp by publicationdate in translations.
Applies to sample notices and sample news.
Test plan:
Run a new install or pick a sql file and run it on cmdline.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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>
Marcel de Rooy [Tue, 4 Aug 2020 11:30:46 +0000 (11:30 +0000)]
Bug 21066: Update English sample notices
Applies to sample notices and sample news.
Replace timestamp by publicationdate.
Also adjust notice in TemplateToolkit.t.
Test plan:
Run dbrev and verify if ISSUESLIP refers to opac_news.publicationdate.
Run t/db_dependent/Letters/TemplateToolkit.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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>
Marcel de Rooy [Mon, 3 Aug 2020 14:27:24 +0000 (14:27 +0000)]
Bug 21066: Update NewsChannels.t
Removing the weird '' => 1 from the hash too.
NOTE: The following line in the module seems to be useless:
$data->{$data->{'lang'}} = 1 if defined $data->{lang};
Test plan:
Run t/db_dependent/NewsChannels.t
Run t/db_dependent/Koha/News.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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>
Marcel de Rooy [Mon, 3 Aug 2020 13:41:11 +0000 (13:41 +0000)]
Bug 21066: Resolve SQL errors in strict mode
DBD::mysql::st execute failed: Incorrect integer value: '' for column `koha_master`.`opac_news`.`number` at row 1 [for Statement "INSERT INTO opac_news ( content,number,lang,title,branchcode,borrowernumber,expirationdate,publicationdate ) VALUES ( ?,?,?,?,?,?,?,? )" with ParamValues: 0="test", 1="", 2="", 3="test", 4=undef, 5="51", 6='2020-08-11', 7='2020-08-04'] at /usr/share/koha/C4/NewsChannels.pm line 68.
DBD::mysql::st execute failed: Incorrect integer value: 'a' for column `koha_master`.`opac_news`.`number` at row 1 [for Statement "UPDATE opac_news SET lang = ?,publicationdate = ?,expirationdate = ?,number = ?,content = ?,branchcode = ?,title = ? WHERE idnew = ?;" with ParamValues: 0="", 1='2020-08-03', 2=undef, 3="a", 4="test", 5=undef, 6="test", 7="9"] at /usr/share/koha/C4/NewsChannels.pm line 107.
Test plan:
Do not apply this patch.
Enable strict mode in koha-conf.
Add new record in tools/news leaving 'Appear in position' blank.
The record is not added; you have a warn in your plack-error log.
Apply patch and try again.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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>
Bug 21066: Code changes needed for replacing opac_news.timestamp
Test plan:
Perform some CRUD operations on the news page in staff.
Verify that news on opac and staff respect publicationdate.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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>
Change timestamp to publicationdate, add updated_on as 'real' timestamp.
Test plan:
Run install or upgrade. Check table opac_news.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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, 20 Aug 2020 12:32:43 +0000 (14:32 +0200)]
Bug 24147: Don't assume search_related will return ordered values
This test is failing randomly because it assume the order is always the
same. But it's not.
Note: Koha::Objects->search_related is never used , last use removed from
commit 9aa724cdf29a57bc91e42b240b5bcd19e3814ada
Bug 19599: Speed anonymise_issue_history up
We should keep it however IMO
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch makes the button present some space between the icon and the
text.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 25584: Refresh checkouts table when a return claim is added
This patch triggers a checkouts table refresh when a return claim is
added. I also noticed the same when a return claim is deleted so it is
now also refreshed.
To test:
1. Set the ClaimReturnedLostValue to some valid value (2)
2. Check something out for a patron, and choose to display all checkouts
=> SUCCES: There's the checkouts table, showing the checkout
3. Click on the 'Claim returned' button and confirm
=> SUCCESS: There's no 'Claim returned' button anymore
=> ERROR: The checkout row doesn't display anything about the claim
4. Go to the 'Claims' tab, delete resolve and delete the claim
5. Go to the Checkouts tab
=> ERROR: It doesn't reflect the changes either
6. Apply this patch and start over
=> SUCCESS: Once the claim returned is added, the checkouts table is
refreshed and the information updated
=> SUCCESS: On the Claims tab, if you delete the claim and go to the
Checkouts tab, you are presented the button again.
7. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 31 Aug 2020 12:26:26 +0000 (14:26 +0200)]
Bug 26324: Fix spelling resizable vs resizeable in Dopop
The correct spelling of the parameter is resizable
https://developer.mozilla.org/fr/docs/Web/API/Window/open
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>
David Nind [Fri, 14 Aug 2020 12:23:10 +0000 (14:23 +0200)]
Bug 25630: (follow-up) Fix capitalization and terminology for system preferences
Additional capitalization, punctuation, terminolgy and improvements to
text for system preferences:
- Punctuation (such as full stops at the end of sentences)
- Capitalization
- Terminology (staff interface, use of "Don't" instead of "Do not")
- Rearranged/rephrased for better readability
To test:
- Verify that the changes listed are consistent and make sense.
- Check that on the staff interface home page that the window title says
"Koha staff interface".
- Verify that in system preferences the name of the tab for Staff
interface displays correctly, and that clicking on it brings up the
staff interface preferences.
- For Patrons > CollapseFieldsPatronAddForm check that the edit and add
patron form works correctly (edit a patron, add a new patron, check that
labels display correctly).
Staff interface home page
-------------------------
- Change the page title in browser from "Koha staff client" to "Koha
staff interface".
Administration
--------------
Google OpenID Connect:
. GoogleOpenIDConnectAutoRegister: change "Don't Allow" to "Don't allow"
and change "users" to "patrons".
. GoogleOpenIDConnectDefaultBranch: move the input field to the end of
the sentence.
. GoogleOpenIDConnectDefaultCategory: move the input field to the end of
the sentence.
. GoogleOpenIDConnectDomain: reword to "Restrict Google OpenID Connect
to domain (or subdomain of this domain): ____. Leave blank for all
Google domains.".
Interface options:
. SendAllEmailsTo: add a full stop.
Share anonymous usage statistics:
. UsageStatsLibrariesInfo: change "Do not share" to "Don't share"; add a
full stop; for note "Don't share" should be "No".
. most preferences: for note "Don't share" should be "No" (don't share)
(for preferences UsageStatsCountry, UsageStatsGeolocation,
UsageStatsLibrariesInfo, UsageStatsLibraryName, UsageStatsLibraryType,
and UsageStatsLibraryUrl), various edits to make more readable and
consistent.
Authorities
-----------
General
. AuthorityControlledIndicators: change "biblio field" to "bibliographic
field".
. AutoCreateAuthorities: change "do not generate" to "don't generate".
Linker:
. CatalogModuleRelink: change "Do not" to "Don't".
. LinkerKeepStale: change "Do not" to "Don't".
. LinkerModule: change "Default" to "default".
. LinkerOptions: add a full stop.
. LinkerRelink: change "Do not" to "Don't".
Cataloguing
-----------
Display:
. MergeReportFields: change "example:" to "Example:"
Exporting:
. BibtexExportAdditionalFields and RisExportAdditionalFields: change
"Include following" to "Include the following"; add ":" at end of
sentence, change "specificy" to "specify", and add full stops at end of
complete sentences.
Interface:
. EnableAdvancedCatalogingEditor: format NOTE in bold.
Record structure:
. AlternateHoldingsField: change "(This" to "(this", change "; for
instance" to ", for example", remove full stop.
, MarcFieldForCreatorId: format NOTE in bold.
. SubfieldsToAllowForRestrictedBatchmod: change "pref" to "system
preference".
Circulation
-----------
Batch checkout:
. BatchCheckoutsValidCategories: add a full stop.
Checkin policy:
. CalculateFinesOnReturn: only bold "NOTE", not the whole sentence (x2).
. StoreLastBorrower: change "opacreadinghistory/AnonymousPatron" to "the
opacreadinghistory and AnonymousPatron".
. UpdateItemLocationOnCheckin: change note "for these locations only can
location and permanent_location differ," to "for these locations the
location and permanent_location can differ,"
. UpdateNotForLoanStatusOnCheckin: change "E.g.," to "For example,"
Checkout policy:
. AgeRestrictionMarker: change "E.g.," to ". For example,"
. AllFinesNeedOverride: change "system preference noissuescharge" to
"the noissuescharge system preference".
. AllowFineOverride: add "the" before "noissuescharge".
. AllowRenewalLimitOverride: change "with respect to" to "for".
. AutoRemoveOverduesRestrictions: change "Do not" to "Don't".
. DefaultLongOverdueChargeValue: change "user" to "patron".
. ItemsDeniedRenewal: change . "e.g.," to "For example:", format the
note the same as other notes with NOTE in bold.
. OnSiteCheckoutsForce: change "on-site" to "on-site checkout", "(Even"
to "(even", and "user" to "patron".
. RentalFeesCheckoutConfirmation: change "do not ask" to "don't ask".
. RestrictionBlockRenewing: change "If patron" to "If a patron", change
"Allow" and "Block" to "allow" and "block".
. UseTransportCostMatrix: "Transport" to "the transport".
Interface:
. AllowOfflineCirculation: change "Do not enable" to "Don't enable".
. ExportRemoveFields: add a full stop.
. ShowAllCheckins: change "Do not show" to "Don't show".
. UpdateTotalIssuesOnCirc: change "Do not" to "Don't".
Interlibrary loans:
. CirculateILL: add a full stop.
. ILLCheckAvailability: add a full stop.
Self check-in module (sci-main.pl):
. SelfCheckInModule: change "module. (available" to "module (available",
add a full stop.
Self check-out module (sco-main.pl):
. AutoSelfCheckAllowed: change "automatically login" to "automatically
log in".
. WebBasedSelfCheck: change "system. (available" to "system (available",
add a full stop.
Enhanced content
----------------
Novelist Select:
. NovelistSelectStaffView: change "staff" to "staff interface".
Babelthèque:
. Babeltheque_url_js: rewitten
. from "______ Defined the URL for the Babeltheque javascript file
(eg. http://www.babeltheque.com/bw_XX.js)"
. to "Use this URL for the Babelthèque javascript file: ________
(e.g. http://www.babeltheque.com/bw_XX.js)."
. Babeltheque_url_update: rewritten
. from "______ Defined the URL for the Babeltheque update
periodically (eq. http://www.babeltheque.com/.../file.csv.bz2)."
. to "Use this URL for the Babelthèque periodic update: _______ (e.g.
http://www.babeltheque.com/.../file.csv.bz2)."
I18N/L10N
---------
. dateformat and TimeFormat: Change "Note" to "NOTE" to be consistent
with other notes, change <b> tag to <strong> as it is more semantically
correct.
Logs
----
Debugging:
. DumpTemplateVarsIntranet: change "variable" to "variables" and "staff
intranet" to "staff interface".
. DumpTemplateVarsOpac: change "variable" to "variables".
Logging:
. AuthFailureLog: add full stop.
. AuthSuccessLog: add full stop.
OPAC
----
Appearance:
. BiblioDefaultView: change "bib" to "bibliographic".
. HighlightOwnItemsOnOPAC: change ". (Non-XSLT Only)" to " (non-XSLT
only).".
. OpacAdditionalStylesheet: change "specified" to "specific".
. OPACDisplay856uAsImage: change all options in the drop down list so
they start in lowercase.
. OpacHighlightedWords: change ";" to a full stop, add a full stop at
the end.
. OPACHoldingsDefaultSortField: add a full stop.
. OpacMaxItemsToDisplay: change "user" to "patron".
. OPACMySummaryHTML: change "user" to "patron".
. OpacSeparateHoldings: change "user's to "patron's".
. OpacStarRatings: change "user" to "patron" for the drop down option.
. OPACShowUnusedAuthorities: change "Do not show" to "Don't show".
. OPACUserSummary: change "user's to "patron's", change "fines" to
"charges".
. OPACXSLT*: change "Leave" to "leave".
. Remove empty row at bottom of appearance options.
Features:
. OpacBrowser: change "OPAC" to "the OPAC".
. OpacBrowseSearch: reword as "[Enable/Disable] interface for browsing
all holdings (Elasticsearch only)."
. OpacCloud: change "OPAC" to "the OPAC".
. OPACDetailQRCode: change "Don't enable" to "Disable".
. OPACFinesTab: change "Fines" to "charges", change "the My Accouunt" to
"their account". (Should now show as "..patrons to access the charges
tab on their account page on the OPAC."
. OpacHoldNotes: change "Do not allow" to "Don't allow", change "users"
to "patrons".
. OpacResetPassword: change "users" to "patrons", add full stop.
. SocialNetworks: change "in opac" to "on the OPAC".
Note: Also deleted lines with # in front of them for the OpacBrowser and
OpacCloud system preferences in the Policy section - these look like
duplicated entries to me (previously lines 600-611).
Policy:
. OPACFineNoRenewalsIncludeCredits: change "users" to "patrons".
Self registration and modification:
. PatronSelfRegistrationConfirmEmail: change "Do not require" to "Don't
require", change "users" to "patrons".
. PatronSelfRegistrationEmailMustBeUnique: change "Do not consider" to
"Don't consider".
. PatronSelfRegistrationPrefillForm: change "Do not display and prefill"
to "Don't display and prefill".
Patrons
-------
General:
. AllowPatronToControlAutorenewal: add full stop.
Notices and notifications:
. EnhancedMessagingPreferences: change "Staff" to "staff".
- FallbackToSMSIfNoEmail: change "Send" to "sending".
Patron forms:
. BorrowerUnwantedField: add full stop.
. CollapseFieldsPatronAddForm:
. Dropdown list changes:
.. "Organization/Patron identity" => "Patron identity".
.. "OPAC/Staff login" to "OPAC/Staff interface login".
. Requires changes to the memberentrygen.tt - check that the add and
edit form for a patron dispaly correctly:
.. change "Contact" to "Contact information".
.. change "Library set-up" to "Library setup".
.. change "OPAC/Staff login" to "OPAC/Staff interface login".
Patron relationships:
. PrefillGuaranteeField: change drop down list option "Main address -
street number" to "Main address - Street number" to match with format of
other entries.
Security:
. RequireStrongPassword: change "More" to "more".
Searching
---------
Search form:
. AdvancedSearchTypes: change "staff-side" to "staff interface".
. expandedSearchOption: change "staff" to "staff interface".
Serials
-------
. makePreviousSerialAvailable: change "Do not make" to Don't make";
"syspref" to "system preference".
. PreserveSerialNotes: change "Do not" to "Don't".
. RoutingListNote: change "Include following" to "Include the following"
Staff interface
---------------
Tab label and link:
. This tab was previously labelled "Staff client".
. Change tab label on the left hand side from "Staff client" to "Staff
interface".
. Change URL when selected from "preferences.pl?tab=staff_client" to
"preferences.pl?tab=staff_interface".
. Check that the link works as expected.
Appearance:
. IntranetFavicon: change "Staff" to "staff".
To test:
- Verify:
- AccountAutoReconcile (Do not to Don't for consistency with other prefs)
- IndependentBranchesPatronModifications (p)
- IndependentBranchesTransfers (p)
- GoogleOpenIDConnect (google to Google)
- UsageStatsLibrariesInfo (c)
- opacSerialDefaultTab (c)
- StaffSerialIssueDisplayCount (staff interface)
- SubscriptionDuplicateDroppedInput (c)
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Sun, 31 May 2020 13:58:42 +0000 (15:58 +0200)]
Bug 25630: Fix capitalization and terminology fixes for Searching system preferences
- Rephrases LoadSearchHistoryToTheFirstLoggedUser system preference
- Consistently use "staff interface"
- Add ending punctuation to some preferences
To test:
- Read through the Searching system preferences
- Verify consistent use of staff interface
- Verify LoadSearchHistoryToTheFirstLoggedUser description is
improved
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Sun, 31 May 2020 13:54:08 +0000 (15:54 +0200)]
Bug 25630: Fix capitalization and terminology for Staff interface system preferences
This changes "staff client" to "staff interface" and fixes capitalization
in a couple of cases.
For terminology changes see:
https://wiki.koha-community.org/wiki/Terminology#S
To test:
- Read through the preferences of the "staff interface" tab.
- Staff interface should be used consistently.
- Firefox "PlugIn" was changed to "add-on" reflecting Mozilla's
own terminology.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Sat, 23 May 2020 15:19:37 +0000 (15:19 +0000)]
Bug 25448: Update German (de-DE) framework files
The updated files have been auto-generated based on the
po files and downloaded from
https://translate.koha-community.org/files/
To test:
- Make sure German language is installed, see:
https://wiki.koha-community.org/wiki/Installation_of_additional_languages_for_OPAC_and_INTRANET_staff_client
- Run the web installer and choose de-DE
- Select all sample files
- Make sure they all install without any errors
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Wed, 22 Jul 2020 15:21:39 +0000 (11:21 -0400)]
Bug 19889: Add feedback when exclusion is updated on moredetail.pl
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Agustin Moyano [Wed, 10 Jun 2020 19:18:01 +0000 (16:18 -0300)]
Bug 19889: Make it possible to exclude items and categories from local holds priority
This patch adds the ability to exclude patrons (by category) from local
holds, and items, by editing the item itself or by batch item
modification tool.
To test:
1. apply patches
2. updatedatabase
3. Enable LocalHoldsPriority preference, and leave
LocalHoldsPriorityPatronControl in pickup library, and
LocalHoldsPriorityItemControl in holding library.
4. Search for a biblio with one item.
5. Place a hold with a patron (patron1) and set pickup location to a different
library of the item's home library
6. Place another hold with another patron (patron2) and set pickup location to be
the same as the item's home library
7. ./misc/cronjobs/holds/build_holds_queue.pl
8. Go to circulation -> holds queue
9. Search by the item's home library
CHECK => only the hold for patron2 (with the pickup location the same as the
item's home library) appears in the table
10. Go back to the biblio details page and click on "Items" tab
CHECK => There is a new section in the item's details between "Statuses"
and "History" called "Priority"
11. Set exclude to "Yes" and update
12. repeat steps 7 to 9
SUCCESS => only the hold for patron1 now appears, even the other hold had local
hold priority
13. Repeat step 10 and 11 but this time set exclude to "No"
14. repeat steps 7 to 9
CHECK => the hold for patron2 is back
15. Edit patron2's category and set exclude from local holds priority to
"Yes"
16. Repeat steps 7 to 9
SUCCESS => the hold for patron1 is back
17. Go to tools -> Batch item modification and in barcode list place
several (existing) barcodes and press continue
CHECK => There is a new section in the bottom called "Priority"
18. Set exclude to "Yes" and save
SUCCESS => all items in the list now have exclude setted to "Yes"
19. Try to checkout the first item to a patron3
SUCCESS => Alert message appears saying that patron1 has a hold on that
item
20. Click on Yes and then checkin that item
SUCCESS => There is a modal window saying that a hold was found for
patron1
21. prove t/db_dependent/HoldsQueue.t t/db_dependent/Holds/LocalHoldsPriority.t
22. Sign off
Sponsored-by: Cooperative Information Network (CIN) Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Agustin Moyano [Wed, 10 Jun 2020 19:15:55 +0000 (16:15 -0300)]
Bug 19889: Add tests
Sponsored-by: Cooperative Information Network (CIN) Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Agustin Moyano [Wed, 10 Jun 2020 19:14:41 +0000 (16:14 -0300)]
Bug 19889: set exclude_from_local_holds_priority columns as boolean in schema
Sponsored-by: Cooperative Information Network (CIN) Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
JD Amended patch: fix md5sum Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Agustin Moyano [Wed, 10 Jun 2020 19:13:35 +0000 (16:13 -0300)]
Bug 19889: Add exclude_from_local_holds_priority columns to item, deleteditems and categories tables
Sponsored-by: Cooperative Information Network (CIN) Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Wed, 19 Aug 2020 12:56:08 +0000 (13:56 +0100)]
Bug 26250: StockRotationItems.t and StockRotationStages.t
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Wed, 19 Aug 2020 12:03:29 +0000 (14:03 +0200)]
Bug 26250: Fix tests when SearchEngine=Elastic
Most of the time the tests are failing because the item is not created
correctly (missing biblio and/or biblioitem).
The usual error is:
t/db_dependent/selenium/regressions.t ..... 5/5 Can't call method "leader" on an undefined value at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch.pm line 534.
In this patch we are making sure $builder->build({ source => 'Item' })
is replace with $builder->build_sample_item
Test plan:
Turn on Elastic and confirm that all the tests pass!
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Fri, 21 Aug 2020 14:07:46 +0000 (16:07 +0200)]
Bug 26069: Pass correct URL to twitter
We don't provide the url of the detail page so the twitter JS code
retrieve the current location, with the search terms.
Test plan:
Do a search
Click on a result
Click on the twitter button and confirm that the link only contain
biblionumber=x in the parameter
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Ere Maijala [Thu, 18 Jun 2020 13:43:42 +0000 (16:43 +0300)]
Bug 25504: Improve REST API spec loading errors
Test plan:
1. Introduce a typo in swagger.json or another spec json file.
2. Restart plack if used or try to access the REST APIs
3. Without the patch, verify that an incomplete error message and potentially lots of stack trace are logged.
4. With the patch, verify that much more meaningful error messages are logged and stack trace is omitted.
5. Fix the problem introduced in step 1 and verify that no messages are logged, or only warning about bundle is logged with Debian Stretch.
6. Repeat with a REST API plugin.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Mon, 24 Aug 2020 14:24:39 +0000 (14:24 +0000)]
Bug 25273: (follow-up) Don't die on unknown authtype
We are guessing authtype code and inserting the heading built accorindg to C4::Heading
If we can't identify the auth type, we can format the heading. There is a record in the koha test
data that is missing the heading field so type cannot be idenfitied
This prevents us from dying n a record where we cannot identify the type.
Note: This code will also be triggered for custom authority types, higlighting
that they won't link because of hardcoded mappings in C4::Heading. We must tackle this
on a new bug
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Tue, 28 Apr 2020 12:19:56 +0000 (12:19 +0000)]
Bug 25273: Make match-heading rely on authority type configuration
The match-heading field is a special field used only by the linker, not accessible
to staff or patrons via the interface. This field is used to store the constructed
'search form' used for matching bib headings to authority fields.
In bug 24269 I attempted to use the mappings defined in the inferface and also inject the search term.
This did not work as too many subfields were indexed on their own and leading to false matches.
In this bug we remove the mappings for this field, and create it ourselves during
the indexing process. The C4::Headings module is still used to generate the correct form,
however, the mappings are set based on the authority types in the system. This gives the user
the ability to add new typoes, but prevents mapping changes from breaking linker functionality
To test:
1 - Start form a sample database with ElasticSearch working
2 - Download via Z39.50 2 authorities, one of which is a narrower heading of the other, e.g.:
Waterworks
Waterworks - Costs
3 - Place a heading for the broader term in a record. e.g. Waterworks
In 650$a, without the cataloguing authority plugin. We don't want
the link created now.
You need syspref BiblioAddsAuthorities => allow
4 - Make sure linker is set to default
5 - Attempt to link the records
misc/link_bibs_to_authorities.pl
6 - Linking fails
7 - Apply patch
8 - refresh index settings (if using a custom file, remove 'match-heading')
You can reset mappings in the UI or run this:
misc/search_tools/rebuild_elasticsearch.pl -v -d -r
9 - Reindex ES
10 - Try to link again
11 - It succeeds!
12 - Run the tests
prove t/db_dependent/Koha/SearchEngine/Elasticsearch.t
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Bug 25273: (follow-up)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Thu, 27 Aug 2020 16:27:09 +0000 (16:27 +0000)]
Bug 17661: (follow-up) Update regex to support Unicode characters
Rather than limiting initials to [A-Z] we should test for a broad
range of uppercase letters.
The ES/Zebra changes are slightly different because of Perl vs Java regex
conventions. POerl may support either, but I found 'Uppercase' to be a bit more explicit
More info here:
https://perldoc.perl.org/perlunicode.html
TO test:
Same plan as before but use Ж. as the ending initial
Confirm the period is preserved and other punctuation removed
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The current code for facets doesn't pull strip ending punctuation from facets
This causes duplicate facets for terms that should be combined
Sometimes series can have different punctuation depending on the field they are in
Author initials punctuation should be preserved
To test:
1 - Do search and pull up some records
2 - Edit some of the records to have authors like:
Date, C.J.
Date, C.j.
Date, C.J .
3 - Edit the records to have some series statments like:
830 $aDate, C.J. ;$v5
830 $aDate, C.J. ; $v5
830 $aDate, C.J.; $v5
4 - Add some 490s to the record with first indicator 1 and series like:
You wouldn't want to--
You wouldn't want to
You wouldn't want to..
5 - Search again and note you have 3 facets each for author and series
6 - Apply patch
7 - Repeat
8 - Now you get 2 facets for author, period not removed when following Upper case immediately, is otherwise
9 - Now you should have a single series facet
10 - Switch search engine to ES (index before applying patch)
11 - Note facets are separate again
12 - Reset mappings and reindex
perl misc/search_tools/rebuild_elasticsearch -v -r
13 - Repeat search, facets combined as above
Signed-off-by: Sarah Cornell <sbcornell@cityofportsmouth.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Tue, 25 Aug 2020 19:30:00 +0000 (19:30 +0000)]
Bug 26289: Add missing variable definition to templates
This patch puts definition of the missing "searchid" variable into an
include file to be used by various bibliographic detail pages. The
variable is required by several JavaScript functions.
To test, apply the patch and locate or create a record with no items.
Open the labeled MARC view and choose Edit -> Delete record. Confirm the
deletion. The deletion should complete correctly.
Perform the same test with the detail view, ISBD view, MARC view, and
items view.
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Mon, 24 Aug 2020 13:22:24 +0000 (09:22 -0400)]
Bug 26281: Add cancellation reason to holds history
Bug 25534 adds the ability to store the cancellation reason when a hold
is cancelled and communicate it to the user. It would be great if the
cancellation reason could also be shown on the holds history.
Test Plan:
1) Apply this patch
2) Cancel a hold with a reason
4) Browse to holds history for the holds' patron
5) Note the reason shows in the status column if one was provided
Working ok.
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Wed, 26 Aug 2020 10:58:44 +0000 (12:58 +0200)]
Bug 26015: Replace 2 missing occurrences
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Fri, 14 Aug 2020 17:09:58 +0000 (17:09 +0000)]
Bug 26015: Terminology: Fix tons more staff clients to staff interfaces
This takes care of more occurences of staff client and changes it to
staff interface, including in code comments.
To test:
- I think in this case careful code review is what we look for.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>