Julian Maurice [Tue, 15 Dec 2015 01:31:03 +0000 (02:31 +0100)]
Bug 15395: Allow correct handling of plural translation
Locale::Maketext does not allow correct handling of plural translation
for languages that have more than one plural forms.
Locale::Messages does.
So Koha::I18N is now a wrapper around Locale::Messages, just like
Locale::TextDomain, and export the same symbols as Locale::TextDomain.
You can refer to documentation of Locale::TextDomain to know how to use
exported subroutines.
This patch also brings Koha::I18N power to Template::Toolkit templates
by adding a TT plugin.
This plugin can be used like this:
[%# USE the plugin and define some macros %]
[% PROCESS 'i18n.inc' %]
[%# tn is the equivalent of __n %]
[%# macro names can't start with underscore, t is for "translate" %]
[% tn('item', 'items', num_items) %]
Extraction of strings from templates is a bit complicated and use
Template::Parser and PPI. Template is compiled into Perl code and then
analyzed by PPI. It is slow, but should be correct even with complex
constructions.
Remove dependency to Locale::Maketext and Locale::Maketext::Lexicon
Add dependency to Locale::Messages and PPI
Test plan for translation in Perl code:
1. Open a .pl script or .pm module with your favorite text editor
2. Add 'use Koha::I18N;' in the beginning of file
3. Use one of the subroutines exported by Koha::I18N and be sure to have
a way to visualize the result (pass result to the template for
example, or simply warn and watch the log file)
4. cd misc/translator && ./translate update fr-FR # try other languages
5. Open misc/translator/po/fr-FR-messages.po and translate your
string(s)
You may need to change the "Plural-Forms" header. See
https://localization-guide.readthedocs.org/en/latest/l10n/pluralforms.html
6. ./translate install fr-FR
7. Use your web browser to go to the page that should display the
translation, change language and verify the translation is correct
8. prove t/Koha/I18N.t
Test plan for translation in templates:
1. Open a template file (.tt or .inc) with your favorite text editor
2. Add the PROCESS directive mentioned above in the beginning of file
3. Use one of the t* macros defined in i18n.inc. They are used like
their "__" equivalent, with one difference: the 'x' variants take a
hashref instead of a hash as last parameter
4. cd misc/translator && ./translate update fr-FR
5. Open misc/translator/po/fr-FR-messages.po and translate your
string(s)
6. ./translate install fr-FR
7. Use your web browser to go to the page that should display the
translation, change language and verify the translation is
correct
Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Sun, 16 Sep 2018 16:25:16 +0000 (09:25 -0700)]
Bug 15184: Improve styling
- Move "Show inactive" checkbox closer to the "Show inactive" text.
- Put more space between the "Show inactive" checkbox and the "The
original..." text
- Add "Check boxes to duplicate the original values" at the top of the
fieldset
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Sat, 15 Sep 2018 21:00:31 +0000 (14:00 -0700)]
Bug 15184: Change permission (+x) on .pl
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Fri, 7 Sep 2018 16:46:12 +0000 (13:46 -0300)]
Bug 15184: Set created_by to the logged in user
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Fri, 7 Sep 2018 16:43:15 +0000 (13:43 -0300)]
Bug 15184: Do copy items for not a serial OR if items are created on ordering
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Fri, 31 Aug 2018 16:40:08 +0000 (13:40 -0300)]
Bug 15184: Remove the checkboxes on the last step
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Wed, 29 Aug 2018 18:17:40 +0000 (15:17 -0300)]
Bug 15184: add missing filters
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Wed, 29 Aug 2018 18:06:42 +0000 (15:06 -0300)]
Bug 15184: Add POD
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Fri, 27 Jul 2018 18:48:31 +0000 (15:48 -0300)]
Bug 15184: Add the ability to duplicate existing order lines
This patchset adds the ability to duplicate existing order lines to a
given basket. It will help acquisitions of serials of when the same
publication is ordered frequently.
The workflow will be:
- Create a new basket
- Use the "Add to basket" button
- Select the new entry "From existing orders (copy)"
- Search and select the order you want to duplicate
- Define some default values for these orders
- Duplicate!
Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Fri, 27 Jul 2018 18:48:23 +0000 (15:48 -0300)]
Bug 15184: Add the ordernumbers filters to GetHistory
It adds the ability to return the result of GetHistory given a list a
ordernumbers
Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Fri, 27 Jul 2018 18:47:06 +0000 (15:47 -0300)]
Bug 15184: Prepare the ground - Move funds and sort fields autoupdate
We are going to reuse the same logic: when a fund is selected the
statistic values are automatically updated.
Let move it to make it reusable more easily and isolate the code.
Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Fri, 27 Jul 2018 18:46:32 +0000 (15:46 -0300)]
Bug 15184: Prepare the ground - Move order search filters
We are going to reuse these filters so we move it to a separate include
file.
Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This new feature adds a link to the last patron consulted
in the staff site. It uses cookies to save this information.
When a staff site user accesses a patron record, the ID, name
and card number of the patron will be saved in the cookie.
To test:
1- Apply the patch
2- Go to a patron details' page
4- Go to another page
4- Verify that the link "Last patron" appears on the top-right
corner of the screen
5- Click on the link
6- Verify that you are at the patron's checkout page
7- Click on the "X" button next to the "Last patron" link
8- The link should be gone
9- Go to another page
10- The link shouldn't appear (until the next patron detail's
page)
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Andrew Isherwood [Tue, 17 Jul 2018 13:49:47 +0000 (14:49 +0100)]
Bug 21079: Unify metadata schema across backends
This patch contains a database upgrade that takes appropriate metadata
properties relating to articles in the FreeForm backend and creates
metadata that corresponds with the metadata being created by the BLDSS
backend. This enables us to create templates that can display metadata
equally across any backends that contain this metadata;
To test:
- Ensure you have at least one article request created with the FreeForm backend
- Check the metadata for the request:
=> TEST: You should have properties such as 'article_title', 'article_author' populated
=> TEST: You should NOT have properties such as 'container_title' &
'pages'
- Run the upgrade
=> TEST: For the same requests you should now have the following
properties (if their values were originally populated):
- container_title (this should correspond with what *was* 'title')
- title (this should correspond with 'article_title')
- pages (this should correspond with 'article_pages')
- author (this should correspond with 'article_author')
Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Katrin Fischer [Sat, 27 Oct 2018 13:08:18 +0000 (13:08 +0000)]
Bug 21413: (QA follow-up) Rename new option
Trying to make the terminology a little more consistent
as we already use items instead of copies directly
above and leaning on the description of the page it
refers to.
Old:
Skip copies marked as waiting holds
New:
Skip items on hold awaiting pickup
Skip items on hold awaiting pickup
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Kyle M Hall [Wed, 26 Sep 2018 14:41:14 +0000 (11:41 -0300)]
Bug 21413: Inventory - Skip items with waiting holds
This patch enables items to be skipped for inventory stocktaking
if the item is currently a waiting hold. The intention is to skip
items that should be on the holds waiting shelf in the library.
Test Plan:
1) Apply this patch
2) Generate a list of barcodes ordered by callnumber
3) Select one of those items and place it on hold, then confirm the hold
4) Remove that barcode from the list of barcodes
5) Browse to the inventory tool, choose your barcodes file
6) Run the inventory tool with that barcode file.
7) Note the tool says that item should have been scanned
8) Click the browsers back button to return to the previous page
9) Check the checkbox for "Skip copies marked as waiting holds"
10) Run the tool again, not it does not flag that item as previously
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
To test:
- Apply this patch
- Run:
$ kshell
k$ prove t/db_dependent/Items/GetItemsForInventory.t
=> FAIL: Tests fail!
- Apply the next patches on the bug
- Run:
k$ prove t/db_dependent/Items/GetItemsForInventory.t
=> SUCCESS: Tests pass!
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Aleisha Amohia [Thu, 18 Oct 2018 02:36:35 +0000 (02:36 +0000)]
Bug 12365: (follow-up) Putting backticks in atomicupdate
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 12365: (follow-up) Adding maxlength attribute and popover
Test that you can't add a note of more than 100 characters.
Test notes with rules, notes are hidden by 'View note' and the
popover correctly displays note.
View the note by hovering over the link
I've moved the Note column so the popover displays nicely and doesn't
cover the buttons. I've also changed the placement so that it doesn't
cover information in the row.
Update: Test that you can edit the note when clicking 'Edit' and that
behaviour is the same for editing all other fields
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Aleisha Amohia [Mon, 19 Jun 2017 19:47:52 +0000 (19:47 +0000)]
Bug 12365: Notes for rules
This patch adds a note column to the circ and fine rules to act as a
description line for the rule.
To test:
1) Apply patch, update database (may have to also update schema)
2) Go to Admin -> Circ and fine rules
3) Scroll to the right, notice new Note column
4) Confirm it works to create a brand new rule with a Note
5) Confirm it works to modify an existing rule with a Note
Sponsored-by: Catalyst IT
Lee Jamison <ldjamison@marywood.edu> rescued this patch.
It is a clean re-build of attachments 61865 and 63902
to fix the merge conflict introduced during application of both
attachments.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: macon lauren KohaCon17 <caballeromaricon@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Tue, 6 Nov 2018 14:03:28 +0000 (11:03 -0300)]
Bug 21770: Allow html_entity for href
We certainly should not expect this filter to be used much for href, but
we have one occurrence that needs it.
Test plan:
t/template_filters.t and xt/find-missing-filters.t must return green
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Tue, 6 Nov 2018 13:55:50 +0000 (10:55 -0300)]
Bug 21770: Add tests for html_entity
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
David Gustafsson [Fri, 23 Mar 2018 16:32:30 +0000 (17:32 +0100)]
Bug 20486: Add --marc_conditions option to export_records.pl
Add --marc_conditions option to export_records.pl script, for
excluding records based on conditions applied to MARC-record
data.
How to test:
1) Run tests in t/db_dependent/Exporter/Record.t
2) All tests should pass
Sponsored-by: Gothenburg University Library Signed-off-by: Maksim Sen <maksim.sen@inlibro.com> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Fridolin Somers [Fri, 2 Nov 2018 08:58:06 +0000 (09:58 +0100)]
Bug 21755: Show patron updated date in circ menu
In borrowers table the column updated_on stores the last updated date and time.
Display this in the circ menu.
Test plan:
1) Go to a patron details page /cgi-bin/koha/members/moremember.pl
2) Look at left menu, you see "Updated on" and a date and time
3) Edit this patron and save
4) Check that "Updated on" changed
5) Click on each tab of menu to check this date is displayed
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Devinim <kohadevinim@devinim.com.tr> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Wed, 17 Oct 2018 18:47:29 +0000 (15:47 -0300)]
Bug 21015: Remove unecessary 'use Koha::Schema' statements in t/
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Joonas Kylmälä [Fri, 29 Jun 2018 08:09:41 +0000 (11:09 +0300)]
Bug 21015: fix performance issue with C4::Members
loading Koha::Schema ("use Koha::Schema;") takes significantly time as
it loads almost a couple hundred classes. Koha::Database has done that
already once and we can use it to get the ResultSet "Borrower" as
well, so let's use that. This also make the code more unified because
Koha::Database is used throughout the code instead of Koha::Schema.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
To test, check the above mentioned system preferences to make sure the sentence is there and it is correct.
Followed test plan and patch is as described Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=12258
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Mon, 29 Oct 2018 12:32:58 +0000 (12:32 +0000)]
Bug 21628: (follow-up) Indentation and filter corrections
This patch modifies the new waiting_holds.inc to fix the indentation. A
template variable filter has been added to quiet QA tool warnings.
Buttons are now styled as Bootstrap buttons.
To test, apply the patch and view the holds report. Confirm that
everything looks correct. Validate the HTML and confirm that there are
no errors in the HTML of the body of the page.
Followed test plan, everything looked correct and no HTML errors on
waitingreserves.tt found by HTML validator
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Mon, 22 Oct 2018 15:20:45 +0000 (15:20 +0000)]
Bug 21628: Simplify holds awating pickup report
To test:
1 - Place a number of holds
2 - Check in the items and confirm the holds
3 - Visit /cgi-bin/koha/circ/waitingreserves.pl
4 - View the report
5 - Apply patch
6 - Confirm that the report looks the same
7 - Confirm cancelling holds works as before
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Followed test plan, patch worked as described Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 21715: Ease translation of account and account offset type descriptions
This patch moves accounts-related descriptions into a single file to
ease finding them, and also encloses descriptions inside <span> tags to
make it easier to translate.
To test:
- Apply this patch
- Verify the templates work as expected
=> SUCCESS: No behaviour change
- Sign off :-D
Bonus: there were two cases in which the INCLUDE line used 'accountline'
as parameter, making it fail to pick the right account type!
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Josef Moravec [Mon, 29 Oct 2018 23:36:11 +0000 (23:36 +0000)]
Bug 21719: Fix typos
This patch was generated using codespell
Test plan:
Read through changes and confirm they make sense
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=21706
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: “Lucas Gass” <lucas@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
David Cook [Thu, 25 Oct 2018 23:52:45 +0000 (10:52 +1100)]
Bug 21666: Replace unsupported use attribute with more widely supported attribute
search.js uses the 1=1004
author personal attribute which isn't supported by libraries like
Seattle Public Library.
This patch aligns search.js
with C4/Breeding.pm which uses the more widely supported 1=1003
author attribute.
To test:
1. Set up Seattle Public Library as a Z39.50 target
2. Try to search author using the Advanced Editor advanced search
3. Observe failure
4. Apply the patch
5. Try to search again
6. Observe successful retrieval of records
Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Alex Arnaud [Wed, 18 Apr 2018 14:19:34 +0000 (14:19 +0000)]
Bug 20602: Use weighted fields in OPAC simple search
Test plan (having Koha working with Elasticsearch):
- apply this patch,
- try searches with and without weight defined on search fields
https://bugs.koha-community.org/show_bug.cgi?id=20262 Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Alex Arnaud [Tue, 9 Oct 2018 14:27:20 +0000 (14:27 +0000)]
Bug 18316: (follow-up) remove use_dis_max
It is true by default on ES 5 and has been removed on ES 6
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Tue, 4 Sep 2018 12:46:30 +0000 (12:46 +0000)]
Bug 18316: (follow-up) Fix tests and update statement
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 18316: Fix field weight validation/deletion bug
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
David Gustafsson [Mon, 21 May 2018 12:24:36 +0000 (14:24 +0200)]
Bug 18316: Change search field weight field to decimal
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Alex Arnaud [Mon, 23 Apr 2018 10:25:14 +0000 (10:25 +0000)]
Bug 18316: (follow-up) Koha::SearchField::search_marc_maps return a result set - code refactoring for gettings weighted fields - Koha::SearchFields::weighted_fields return a result set
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Alex Arnaud [Thu, 12 Apr 2018 16:13:29 +0000 (16:13 +0000)]
Bug 18316: String changes
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Wed, 21 Mar 2018 13:27:12 +0000 (13:27 +0000)]
Bug 18316: Add weighting/relevancy options to ES query on simple search
The idea is the following: if some search field(s) are weighted in
search engine config page, Koha will query ES on all fields plus those with
the coresponding weights. Else, search is done on the entire record with
no weighting. The advanced search page is unaffected by these changes
Test plan (having Koha working with Elasticsearch):
- apply this patch
- have some weights defined for various fields
- try searches from the search bar and from the advanced search page
- confirm weighting affects the relevancy (in expected ways)
e.g.
1. search for 'a' from advanced search, note results
2. give 'title' a weight
3. search for 'a' using the simple search bar
4. results with 'a' in the title should now be more relevant
- confirm search results on advanced search page are unaffected
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Alex Arnaud [Thu, 29 Mar 2018 14:20:59 +0000 (14:20 +0000)]
Bug 18316: Ability to weight search fields
Weight can be defined between 1 and 99.
only search fields mapped with biblios can be weighted
Test plan:
- apply this patch,
- update schema file (perl misc/devel/update_dbix_class_files.pl),
- go to Administration > Search engine configuration,
- in search fields tab, define weights for some fields and save,
- check weights has been saved,
- reset some weights (empty) and save,
- check weights has been reset
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 21299: (QA follow-up) Rename module and subroutine
See QA request at comment7.
Removing camelcase from subroutinename.
Renaming module to Koha::Util::Navigation (after cmty feedback).
Test plan:
Run t/Koha/Util/Navigation.t.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 21299: Introduce localReferer in [opac-]changelanguage.pl
With the work from the former patch, we now have a nice and easy replace..
NOTE: The additional logic in opac-changelanguage.pl is now also applied
to the intranet counterpart (changelanguage.pl). This effectively makes
changelanguage.pl no longer refer to external URLs (as the opac already
did by testing the referer). Might be just theoretical, but consistent.
Test plan:
Test changing language from various OPAC and staff locations.
Include language=[some_language] in the URL before changing language.
[Bonus] Test calling changelanguage.pl from another server. You should no
longer be referred back to the calling server. (See below.)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Added link <a href="[mystaffserver]/cgi-bin/koha/changelanguage.pl?language=en">link</a> somewhere on external server.
Verified that without this patch, it hits the staff server and refers back to the caller. But with this patch, it refers to staff homepage. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 21299: Add localReferer function to Util module, add test
Before implementing the change in [opac-]changelanguage, we define a new
function (in Koha/Util.pm) and add tests.
Test plan:
Run t/Koha/Util/localReferer.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Marcel de Rooy [Fri, 2 Feb 2018 07:11:55 +0000 (08:11 +0100)]
Bug 15494: (QA follow-up) Additional polishing
[1] Fix two typos in Circulation.t.
Although the test does not fail, line 2127 contains two typos.
Changing INVISILE to INVISIBLE :)
And type should be itype.
[2] Remove $yaml as leftover from older code.
[3] Add a next when the split on /:/ does not give two results. This will
prevent uninit warnings (although still disabled now in Circulation).
[4] For the same reason we should switch the lines for NULL and empty
string. The undefs you insert should trigger a warn.
[5] The line for empty string should not insert undef, but empty string.
For the same reason adding the condition defined($_) ...
And proving it by adding two tests for the opposite values of
callnumber and itemnotes.
[6] Adding a strip spaces around the fieldname. User friendly..
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Wed, 24 May 2017 13:47:34 +0000 (09:47 -0400)]
Bug 15494: Add syspref
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Wed, 24 May 2017 13:31:59 +0000 (09:31 -0400)]
Bug 15494: Update display of renewal errors
To test:
1 - Define a rule to deny renewal
2 - Checkout an item meeting this rule
3 - Attempt renew an item via the OPAC
4 - Attempt renewal via SIP
5 - Attempt renewal via staff client
6 - Verify errors are reasonable
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Wed, 24 May 2017 12:52:27 +0000 (08:52 -0400)]
Bug 15494: Add _items_denied_renewal sub to C4:Circulation::CanBookBeRenewed
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Wed, 24 May 2017 12:50:16 +0000 (08:50 -0400)]
Bug 15494: Unit tests
prove -v t/db_dependent/Circulation.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Kyle M Hall [Tue, 25 Sep 2018 13:16:53 +0000 (10:16 -0300)]
Bug 21408: Inventory - Warn of items possibly scanned out of order
This patch addes the ability to choose to be warned if it's possible
an item was scanned out of order ( i.e. mis-shelved ).
Test Plan:
1) Apply this patch
2) Generate a list of barcodes ordered by callnumber
3) "Misplace" one callnumber by moving it to another area of the list
4) Browse to the inventory tool, choose your barcodes file
5) Check the checkbox for "Check barcodes list for items shelved out of order"
6) Click "submit", note the item has been flagged as possibly out of order
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Marcel de Rooy [Fri, 24 Aug 2018 07:19:48 +0000 (09:19 +0200)]
Bug 14391: (QA follow-up) Resolve POD warn on svc..systempreferences
*** WARNING: No items in =over (at line 48) / =back list at line 54 in file svc/config/systempreferences
*** WARNING: No items in =over (at line 73) / =back list at line 79 in file svc/config/systempreferences
=> If you use 'over', you should add 'item'-s.
Test plan:
Run perldoc svc/config/systempreferences
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Katrin Fischer [Sat, 19 May 2018 05:32:14 +0000 (05:32 +0000)]
Bug 14391: Add granular permissions to the administration module
So far the administration module only allowed for 2 permissions:
- circulation conditions (manage_circ_rules)
- everything else (parameters_remaining_permissions)
With this patch almost every section of the administration page
will have its own granular permission.
To test:
- Create different staff users:
1) One with parameters_remaining_permissions
2) One with parameters
3) One with catalogue and no parameters
4) One superlibrarian
- Apply the patch
- Run the database update
- Check the staff users:
1) All subpermissions, but manage_circ_rules
should be checked
2) Nothing should have changed
3) manage_item_serach_fields shoudl be checked
(page had catalogue permission before)
4) Nothing should have changed
- Try different settings of the permissions and
verify that
- Administration page behaves correctly
- Administration menu behaves correctly
! You shoudl only see what you have permission for
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Martin Renvoize [Fri, 19 Oct 2018 11:49:05 +0000 (12:49 +0100)]
Bug 21619: Expand tax abreviations in acquisitions form hints
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Martin Renvoize [Fri, 21 Sep 2018 10:42:28 +0000 (11:42 +0100)]
Bug 21387: Receive items from - form should include tax hints
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Fridolin Somers [Fri, 16 Mar 2018 10:59:04 +0000 (11:59 +0100)]
Bug 20435: Allow lowercase prefix in inventory value builder
Cataloging value builders for inventory stocknumberAV.pl and stocknumberam123.pl use a regexp to define if entered text is a prefix or not.
It actually only allows uppercase characters. A library may want to catalog with lowercase characters in inventory number and using those value builders.
Note that in database the text is not case-sensitive.
Test plan:
1) Configure stocknumberAV.pl value builder on an item subfield
2) Create an autorized value category 'INVENTORY'
3) Create in this category a value with code 'UC' and description '10'
4) Create in this category a value with code 'lc' and description '20'
5) Create a new item
6) Focus on stocknumber subfield
7) Enter '123' and click on value builder, the entry stays '123'
8) Enter 'UC' and click on value builder, the entry turn to 'UC 0000000011'
9) Enter 'lc' and click on value builder, the entry turn to 'lc 0000000021'
Same for stocknumberam123.pl
To elaborate on step #1:
Go to Administration->MARC Bibliographic framework
Click on the "Action" button to view the framework
for the item you will be creating, view MARC structure.
Search for Tag 952 (LOCATION AND ITEM INFORMATION (KOHA))
Select Actions->Subfields
Edit subfield i for "Inventory Number"
In the "Other options" pane, select the plugin to test.
Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Wed, 24 Oct 2018 15:39:13 +0000 (15:39 +0000)]
Bug 21647: Clean up SRU fields mapping templates
This patch makes corrections to the SRU field mapping templates
(bibliographic and authority):
- Bootstrap grid
- JavaScript to the footer
- Other markup corrections
To test, apply the patch and go to Administration -> Z39.50/SRU servers
- Add or edit an SRU server
- Click "Modify" next to the SRU search fields mapping field.
- Confirm that the popup window layout is correct.
- Confirm that adding information to the form is correctly saved to
the SRU server form.
- Test this process with SRU server record type set to both
"Authority" and "Bibliographic."
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Fri, 26 Oct 2018 18:50:59 +0000 (15:50 -0300)]
Bug 21696: Use Koha::Account->lines from Koha::Account
There is now Koha::Account->lines, we should use it instead of
Koha::Account::Lines->search
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 21673: (QA follow-up) Fix typo and remove unused library
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Thu, 25 Oct 2018 19:55:32 +0000 (16:55 -0300)]
Bug 21673: Use Koha::Account::Lines->total_amountoutstanding when needed
There are several times the same pattern to retrieve the sum of
amountoutstanding columns for Koha::Account::Line set.
We should use Koha::Account::Lines->total_outstanding instead.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
The actions_col template param requires a DB search, only to display the
'Actions' column header vs. an empty string. But there will always be
buttons in there, that were added *after*.
It made sense when only the 'Reverse' button was displayed, but now both
'Print' and 'Details' are displayed anyway.
This patch removes it for good :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Mark Tompsett [Mon, 15 Oct 2018 18:50:09 +0000 (18:50 +0000)]
Bug 20629: (follow-up) fix reverse_col value
Before this patch the Void button didn't appear.
After this patch the Void button appears on payments.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Kyle M Hall [Mon, 15 Oct 2018 16:53:27 +0000 (12:53 -0400)]
Bug 20629: Pass accountline objects to template instead of hashref
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Kyle M Hall [Mon, 15 Oct 2018 12:02:31 +0000 (08:02 -0400)]
Bug 20629: Remove ability to 'reverse' payments
Test Plan:
1) Apply this patch
2) Note all references to reversing payments have been removed
3) Note ability to void payments remains unchanged
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Wed, 26 Sep 2018 15:00:16 +0000 (15:00 +0000)]
Bug 20078: (follow-up) Prevent conflict from attribute duplication
To test:
1 - Apply first patch
2 - Attempt searching by arp, no results
3 - Apply this patch
4 - Copy bib1.att and ccl.properties to the correct locations
5 - Restart zebra
6 - Rebuild indexes
7 - Search agian, success!
Signed-off-by: Margie Sheppard - Central Kansas Library System CKLS <msheppard@ckls.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Mon, 12 Feb 2018 10:58:35 +0000 (10:58 +0000)]
Bug 20078: Add accelerated reading indexes to getIndexes
To test:
1 - Find a bib with 526$c and 526$d populated, or populate them
e.g. 526$a 5.5 | 526$d 14
2 - Try searching for 'arl:5.5' or 'arp:14'
3 - Your record should be returned in results
4 - Add the indexes as dropdowns by entering the following in intranetuserjs:
$(document).ready(function(){
// Add Accelerated Reading Level to advanced search
if (window.location.href.indexOf("catalogue/search.pl") > -1) {
$(".advsearch").append('<option value="arl">Accelerated Reading Level</option>');
}
// Add Accelerated Reading Point to advanced search
if (window.location.href.indexOf("catalogue/search.pl") > -1) {
$(".advsearch").append('<option value="arp">Accelerated Reading Point</option>');
}
});
5 - Search using these in the dropdown, your record will not be found
6 - Apply patch
7 - Repeat searches directly and by using dropdown, your record should be returned.
8 - prove t/db_dependent/Search.t
Signed-off-by: Margie Sheppard - Central Kansas Library System CKLS <msheppard@ckls.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>