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>
Katrin Fischer [Fri, 17 Jul 2020 23:17:45 +0000 (01:17 +0200)]
Bug 26015: Terminology: Use staff interface instead of staff client
We have agreed to use 'staff interface' instead of 'staff client'
and similar terms. This fixes the template files where staff client
appears:
To test:
- Check Administration > Patron categories
- Check the title of the staff interface start page in your
browser tab
- Check the description of hte catalogue permission
- One more: this changes the message shown when someone managed
to log in as the database user - as we no longer allow that, I am
not sure if it can be triggered.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> 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>
Nick Clemens [Wed, 29 Jul 2020 10:56:37 +0000 (10:56 +0000)]
Bug 25639: Add search query strings as global javascript variables
To test:
1 - Search on OPAC for "qwertyuiop"
2 - View the HTML source
3 - Find 'qwertyuiop' in the source, it is not easily accessible via JS
4 - Apply patch
5 - Repeat
6 - Note that now there are global variables with the query strings
7 - Add to OpacUserJs:
console.log( query_desc );
console.log( querystring );
console.log( query_cgi );
8 - Reload page and confirm variables are warned in the JS console (Press F12)
9 - Sign off
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>
Agustin Moyano [Tue, 25 Aug 2020 17:53:55 +0000 (14:53 -0300)]
Bug 22789: (follow-up) Fix atomic update, GUI and more than one hold
This patch
* sets one check for reserves and another for old_reserves in
atomic update
* Adds a message below the checkbox and adds detail when a hold is non
priority
* Fixes issue when there are more than one hold, but the first is non
priority
* Adds test case for this last scenario
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Agustin Moyano [Wed, 19 Aug 2020 21:12:32 +0000 (18:12 -0300)]
Bug 22789: Add non priority feature to C4 classes and staff interface
This patch implements necesary code to implement non priority feature
To test:
1) Apply all patches.
2) Run updatedatabase.
3) Checkout a specific item for patron1.
4) Place a hold on the same item for patron2 (do not check non priority
hold checkbox).
5) Try to renew the item for patron1.
CHECK => in checkouts table, there is a message that the item could not
be renewed because there was a hold.
6) Cleanup all checkouts and holds.
7) repeat steps 3 to 5, but this time check the non priority checkbox.
SUCCESS => item was renewed
8) prove t/db_dependent/Holds.t
Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Sat, 23 May 2020 06:23:37 +0000 (06:23 +0000)]
Bug 20057: Fix capitalization and rephrase system preference as a sentence
This makes changes to strings involved in this feature:
- Rephrases the system preference description into a sentence
- Rephrases message shown in OPAC on submitting (library has not actively
approved, so just say that the record has been modified)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Liz Rea [Tue, 19 May 2020 10:50:04 +0000 (12:50 +0200)]
Bug 20057: (follow-up) Add text for auto accepted changes
1. Apply patch.
2. Make sure syspref "AutoApprovePatronProfileSettings" is set to "Disable".
3. Edit patron personal details via opac interface.
4. Expect modifications to require manual approval by staff via link on main page.
-> 4a. Text for patron says that changes are pending acceptance by the library
5. Set syspref "AutoApprovePatronProfileSettings" to "Enable".
6. Edit patron personal details via opac interface again.
7. Expect modifications to have been approved automatically.
-> 7a. Text for patron says that changes have been submitted and accepted by the library.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
David Gustafsson [Tue, 19 May 2020 10:44:31 +0000 (12:44 +0200)]
Bug 20057: System preference for auto approval of patron profile changes
Testplan for this patch:
1. Apply patch.
2. Make sure syspref "AutoApprovePatronProfileSettings" is set to "Disable".
3. Edit patron personal details via opac interface.
4. Expect modifications to require manual approval by staff via link on main page.
5. Set syspref "AutoApprovePatronProfileSettings" to "Enable".
6. Edit patron personal details via OPAC interface again.
7. Expect modifications to have been approved automatically.
Signed-off-by: Liz Rea <liz@catalyst.net.nz>
This works, we may want some different text for this situation in the OPAC, it still says the librarian has to approve the change.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Sat, 23 May 2020 23:27:49 +0000 (01:27 +0200)]
Bug 25129: Update German (de-DE) web installer sample files for 20.05
This translates the new notices and CSV profie for late orders,
makes some minor changes to the patron category descriptions
and numbering patterin labelling.
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
Bonus:
- If you can speak German, you can check the translations as well :)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Fri, 17 Jul 2020 22:03:28 +0000 (22:03 +0000)]
Bug 26013: Fix formatting for dates on "Manage stage MARC records" page
The "staged" dates were not formatted according to system
preferences DateFormat and TimeFormat as the appropriate TT
filters were missing.
To test:
- Stage a record in MARC format
- Go to Staged MARC management
- Check the date in the list of imports
- Click on the import and check the "Staged:" date
- Apply patch
- Repeat and verify formatting is now correct
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Fri, 17 Jul 2020 23:07:07 +0000 (23:07 +0000)]
Bug 26014: Add publication year and edition to Z39.50 results in acquisition
The publication year and edition columns were present in
the Z39.50 results in cataloguing, but were missing in
acquisitions.
To test:
- Go to acquisitions
- Create a new basket
- Create an order within it from 'external source'
- Search for a title, for example with LOC
- In a separate tab, go to cataloguing
- Search the same record with Z39.50
- Compare result lists, date and edition are missing from acq
- Apply the patch
- Repeat search in acquisitions
- Verify result lists now match up
- Bonus: Date was changed to Year which is more fitting and
will translate better.
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Fridolin Somers [Fri, 7 Aug 2020 08:58:51 +0000 (10:58 +0200)]
Bug 26175: Remove warn if undefined barcode in misc/export_records.pl
When using misc/export_records.pl --deleted_barcodes if barcode is NULL you get warn :
Use of uninitialized value in say at /home/koha/src/misc/export_records.pl
Also exporting barcode if empty string makes no sense.
Test plan :
1) Delete an item with barcode = NULL
2) Run : misc/export_records.pl --date=`date +%d/%m/%Y` --deleted_barcodes --filename=/tmp/deleted_barcodes
3) Check you se no warn "Use of uninitialized value in say ..."
4) Delete an item with barcode = ''
5) Run 2)
6) Check there is no empty line in /tmp/deleted_barcodes
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>
JD Amended patch
<p>The included <a href="https://github.com/OAI/OpenAPI-Specification/blob/master/schemas/v2.0/schema.json">api/swagger-v2-schema.json</a> file is licensed under the[-the-] <a href="https://github.com/OAI/OpenAPI-Specification/tree/master/schemas/v2.0">Apache License, Version 2.0</a>, by the <a href="https://www.openapis.org/about">OpenAPI Initiative [-(OAI)</a></p>-]{+(OAI)</a>.</p>+}
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
David Cook [Wed, 1 Jul 2020 02:26:01 +0000 (02:26 +0000)]
Bug 23653: use local copy of swagger v2 schema
By default, JSON::Validator::OpenAPI tries to fetch the
swagger v2 schema from http://swagger.io/v2/schema.json.
If you've installed from CPAN, JSON::Validator::OpenAPI will
come with a cached copy, so it won't try to fetch it over HTTP.
However, if you've installed from libjson-validator-perl
from Debian/Ubuntu, the Debian package excludes the cached copy,
so JSON::Validator::OpenAPI tries to fetch it over HTTP.
Unfortunately, today and other days in the past, the file at
http://swagger.io/v2/schema.json has been unavailable, and this causes
Koha to crash in a perpetual loop.
This patch includes a copy of the swagger v2 schema, and it loads
it locally rather than fetching over HTTP.
The changes to Koha/REST/Plugin/PluginRoutes.pm are not required,
since the validator isn't currently called there, but I've added
a patch to future proof it.
To Test:
0a) Remove /usr/share/perl5/JSON/Validator/cache/36d1bd12eeed51e86c8695bd8876a9df
if it exists
0b) Block external access to http://swagger.io/v2/schema.json or
test during an outage when it's unavailable
0c) Do not apply patch
1) koha-plack --restart kohadev
2) Note that it crashes in a loop and is unavailable in web browser
3) Apply patch
4) koha-plack --restart kohadev
5) Note that Koha comes up and there are no errors in the Plack logs
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>