This patch introduces tests for the per_page=-1 handling use case. From
now on per_page=-1 means 'all resources'.
On writing this I noticed that we always paginate results no matter
what, but there was a weird condition under which on pagination headers
were sent back to the API consumer. This is highlighted in the precedent
patch, which is not the -1 situation this one tries to tackle.
Both pagination and searching are broken with per_page=-1, which is a
standard, and we actually didn't explicitly set a way to request all
resources.
To verify this:
1. Apply the previous tests patch and this one
2. Run:
$ kshell
k$ prove t/Koha/REST/Plugin/Pagination.t \
t/db_dependent/Koha/REST/Plugin/Objects.t
=> FAIL: Things are damn broken
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d20bc39d759bc9321b1b7accb952f90351a14caa)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 61e8dc8c7d489329c27aca3b6b10137c289161cb)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Tue, 4 Aug 2020 11:55:13 +0000 (13:55 +0200)]
Bug 26133: Remove GetMarcHosts
We removed the single occurrence of this subroutine in the previous
patch
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 88ecaa54cdfec5d35091237821097877b0edb4eb)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Tue, 4 Aug 2020 11:54:28 +0000 (13:54 +0200)]
Bug 26133: Remove GetMarc* calls in detail.pl
There are several calls in catalogue/detail.pl that can be removed:
GetMarcISBN, GetMarcAuthors, GetMarcSubjects, GetMarcSeries, GetMarcUrls and GetMarcHosts
They pass a variable to the template that is never used.
Test plan:
Confirm that this TT variable is never used.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5c190388ae1b69889e28c2dae80e0d9ea9baff1a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit added code related to the itemtypes to the advanced search, but this code already existed.
The weird bit is:
$template->param(advancedsearchesloop => \@advancedsearchesloop);
my $types = C4::Context->preference("AdvancedSearchTypes") || "itemtypes";
my $advancedsearchesloop = prepare_adv_search_types($types);
$template->param(advancedsearchesloop => $advancedsearchesloop);
We are passing twice advancedsearchesloop to the template.
Test plan (for QA):
Review the changes and confirm that we can safely remove this code
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a51a4f117d13739687f7be47d56cae0352914901)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Wed, 22 Jul 2020 12:11:03 +0000 (14:11 +0200)]
Bug 26043: Fix random failure from Holds.t
# Failed test 'Test ModReserveMinusPriority()'
# at t/db_dependent/Holds.t line 202.
# got: undef
# expected: '1605'
# Looks like you failed 1 test of 66.
It is coming from Koha::Patron->holds that is ordering by reservedate,
so "sometimes" they are ordered in reverse (at least it's my
understanding of the problem).
Test plan:
Run the test file several times (from 20 to 60x), it must never fail
with this patch
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 80a611797bf67b263b6b84a6e931833ea336b6a5)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Wed, 29 Jul 2020 12:21:29 +0000 (12:21 +0000)]
Bug 25762: Typo in linkitem.tt
This patch corrects the same typo in two different templates:
’ -> ›
If you want to test beyond examining the patch, apply the patch
and go to Tools -> Rotating collections.
- Add an item to a rotating collection.
- In the browser's title bar (or the tab title if the title bar isn't
shown) the separator between the rotating collection name and "Add or
remove items" should be ">" instead of "`"
- Enable the EasyAnalyticalRecords system preference.
- View the detail page for a bibliographic record.
- From the "Edit" menu, choose "Link to host record"
- Check the title bar as you did previously.
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 19f9bc0528ec0f5cdf000b5120138652b3ece57c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Wed, 29 Jul 2020 12:58:22 +0000 (12:58 +0000)]
Bug 26085: Add the copy, print and export DataTables buttons to lost items report
This patch removes the in-page DataTables DOM configuration option so
that the default option is used. This will allow all the standard
controls to appear, including copy/print/export.
Since the default DataTables information includes the number of results
in the table, the template markup showing this information is removed.
To test, apply the patch and go to Reports.
- Run the "Items lost" report using parameters which will return
multiple results.
- On the results page confirm that the standard controls are present:
Result count, search form, columns filter, export buttons.
- Confirm that the "Activate filters" feature works, and that selecting
results activates the option to download a CSV using a CSV export
profile.
Note that the "Activate filters" feature doesn't play well with hidden
columns. However this issue predates the patch.
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a7c85ad16303bb1a041663a13336f8446c26ee64)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Thu, 30 Jul 2020 12:39:17 +0000 (14:39 +0200)]
Bug 26094: Add class to the "Suggest for purchase" button
Bug 14963 added a new "Suggest for purchase" button on the detail page
of bibliographic records at the OPAC.
This patch adds a specific CSS class to make it reachable easily
Like others button in this action list
Test plan:
Go to the detail page of a bibliographic record at the OPAc
Notice the new CSS class
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9f11ba114e13aee10e05ccb83096c7f02908085b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Fri, 17 Jul 2020 13:20:45 +0000 (13:20 +0000)]
Bug 26004: Remove unused jQuery plugin jquery.hoverIntent.minified.js from the OPAC
The jQuery plugin jquery.hoverIntent.minified.js hasn't been used in
Koha in long time. This patch removes it from the OPAC.
To test, apply the patch and search for instances of "hoverIntent."
There should be none.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5d69ae18b5727d122575eb12a34f1712cb96b5b3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Fri, 17 Jul 2020 18:09:30 +0000 (18:09 +0000)]
Bug 26011: Remove unused jQuery plugin jquery.metadata.min.js from the OPAC
The jQuery plugin jquery.metadata.min.js hasn't been used in
Koha in long time. This patch removes it from the OPAC.
To test, apply the patch and search for instances of "jquery.metadata."
There should be none.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7c100a7fd21bd4497be87df4b8cc94674a19c5f5)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Julian Maurice [Thu, 25 Jun 2020 07:25:41 +0000 (11:25 +0400)]
Bug 25873: Ignore malformed data for Elasticsearch integer fields
If we try to put malformed data into an integer field, Elasticsearch
rejects the whole document.
Setting 'ignore_malformed' to true allows to ignore malformed data and
process the other fields of the document normally
Test plan:
* Without the patch
1. In search engine configuration, change the type of a text field to
'Number' (for instance 'title')
2. misc/search_tools/rebuild_elasticsearch.pl -d -b
3. See that the index is empty (unless you have titles consisting only
of digits)
* With the patch
1. misc/search_tools/rebuild_elasticsearch.pl -d -b
2. Now records are correctly indexed
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit cb5acdc6702cef4668921ccf2537797358981fff)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 26084: Clarify language on ConsiderOnSiteCheckoutsAsNormalCheckouts
To test:
- apply patch
- confirm explanation reads as suggested
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 622ea4627ae50c49f7547ee3a3a8b4bde18e17a3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Fri, 31 Jul 2020 09:53:53 +0000 (11:53 +0200)]
Bug 26111: Add "Serials" (SER) to the reports dictionnary
It's missing in the template
Test plan:
Go go Home › Reports › Guided reports wizard › Dictionary
At step 2, notice that with this patch you have "Serials" in the
dropdown list (instead of an empty entry)
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b0eee4d2e1359050cee3dd23a121e75195b0ce11)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Thu, 30 Jul 2020 08:57:53 +0000 (10:57 +0200)]
Bug 25887: Keep library filter on the fund list view
The problem:
When filtering funds by library, the pull down for libraries resets to "empty" when the page is reloaded,
although the filter criteria is visible in the URL.
Test plan:
Create a fund for library A
Create a fund for library B
Go to the fund list view
=> All funds are listed
Select library A in the library filter, click "Go"
=> Funds for library A are listed
=> Library filter has "library A" selected
Edit fund for library B
=> The edit form has "library B" selected
Signed-off-by: Holly Cooper <hc@interleaf.ie> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 09ed4c0dd7277931c1e631c5b1329463fc9751e5)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Thu, 30 Jul 2020 09:59:44 +0000 (11:59 +0200)]
Bug 25852: Add tests
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e330e4ec222f8ac3a04339a020509e30aa0bf3ab)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Thu, 30 Jul 2020 10:00:03 +0000 (12:00 +0200)]
Bug 25852: Improve C4::Creators::Lib reliability under plack
This is certainly a major issue that leads to many side-effects.
Under plack, the structure of the default values are not handled
correctly.
Package variables are used to store stuff like the "layout type". They
are complex structures (arrays of hashes) and returned without being
copied.
When the caller (the controller script) retrieve them then modify the
returned structures, it actually modifies the package's variables.
One of the issue is:
Create a new layout
The script retrieve a structure with all "selected" flags are set to 0
It select the first one as default (BAR as selected => 1)
The user creates the new layout and will selected BIBBAR (for instance)
If you then edit this new layout, the script will retrieve the
"label_types" and set "selected" for BIBBAR. However BAR is still
selected!
The UI receives 2 selected and display the first selected one that has
the selected option.
Test plan:
1. Create a layout type for Barcode/Biblio
2. Choose fields to print and size of font
3. Save
4. Edit existing Layout
=> Withtout this patch "Barcode" is the preselected option
=> With this patch applied, the correct "Barcode/Biblio" option is
selected
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>
(cherry picked from commit 0a9d3f17d9e44b5326a42d14420d30243031629d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
David Cook [Wed, 8 Jul 2020 12:36:46 +0000 (12:36 +0000)]
Bug 25953: Add ID to installed plugins table on plugins-home.pl
This patch adds a "installed_plugins" ID to the table
of installed plugins.
The idea is that it will ease styling and DOM mods through Javascript.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c2111c1ce6532b73af3a4847500be8f305db570a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Mon, 27 Jul 2020 19:16:07 +0000 (19:16 +0000)]
Bug 26070: Remove GoogleIndicTransliteration system preference
The Google Transliterate API was deprecated on May 26, 2011. This patch
removes the feature and associated system preference.
To test, apply the patch and run the database update process.
- Go to Administration -> System preferences and search for
'GoogleIndicTransliteration.' There should be no results.
- Search the Koha codebase for references to
'GoogleIndicTransliteration.' There should be no current references..
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>
(cherry picked from commit 9b9e8fd32852acceb10cfc54d4a5a3acc0f6e232)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Katrin Fischer [Wed, 29 Jul 2020 22:51:34 +0000 (22:51 +0000)]
Bug 22660: (QA follow-up) Fix capitalization in system preference
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9e0d097a5692af07db020e6f806eeaa97d43ae1e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch makes some changes to the way assets are included based on
the value of the system preferece in order to minimize unnecessary
JavaScript includes.
The patch also adds HTML syntax-highlighting and linting like we have in
the system preferences editor.
Removed are two JS files which were not required.
To test, apply the patch and set the NewsToolEditor preference to
"CodeMirror."
- Edit a news item and confirm that the contents of the
editor show HTML syntax highlighting.
- Test HTML linting by adding some malformed HTML (missing closing tag,
for instance). The error should be highlighted.
- Set the NewsToolEditor to "TinyMCE" and confirm that WYSIWYG editing
still works correctly.
Lucas Gass [Fri, 8 May 2020 22:57:40 +0000 (22:57 +0000)]
Bug 22660: Add system pref to allow switching of editors in News Tool
This patch adds a system preference called 'NewsToolEditor' which allows for the choice between TinyMCE and CodeMirror in the News Feature.
TEST PLAN:
1. Apply patch and run updatedatabase
2. Go to Tools > News and make a new entry or edit an existing News item.
3. When you initially load you should gte the TinyMCE editor (WYSIWYG)
4. Search for the NewsToolEditor system preference and switch to CodeMirror.
5. Reload your News item and now you should see the CodeMirror editor.
6. Try saving content with both and maki sure it works.
7. Try adding some different HTML tags in CodeMirror mode, saving, and making sure it looks right when you switch back to TinyMCE
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 980dd605031e616f1d481852dffe9cc6779eb3e3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Fri, 10 Jul 2020 13:19:14 +0000 (13:19 +0000)]
Bug 25968: Make logs sort by date descending as a default
This patch adds DataTables with columns configuration to the log viewer.
The table of log entries is now sorted by default by date descending.
To test, apply the patch and go to Administration -> Table settings.
- Expand the "Tools" section and confirm that there is a section for
"logviewer."
- Go to Tools -> Log viewer.
- Perform a search which will return multiple results.
- Confirm that the results are sorted by date descending.
- Test that the table controls work correctly: Paging, columns, export.
- Return to the Table settings administration page and test that
changes to those settings are correctly reflected in the log viewer
table.
Signed-off-by: barbara <barbara.johnson@bedfordtx.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
JD amended patch: Fix indentation in .yml to match other entries
Test plan:
1) have books entered
2) log in create a list
3) add books to list
4) display list in OPAC
5) click the RSS link button.
-- output is displayed as html text
6) apply patch
7) repeat steps 4&5
-- output is displayed as xml tree
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> 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>
(cherry picked from commit 3d0da68d5ada37b40099fbc11b63202ccf7a48b2)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Thu, 18 Jun 2020 13:10:35 +0000 (13:10 +0000)]
Bug 25351: Move cart-related strings out of opac-bottom.inc and into basket.js
This patch adds the necessary JavaScript includes to the OPAC to
enable translation of strings in JavaScript. It also updates the
translation of cart-related strings by removing the strings from
opac-bottom.inc and putting them in basket.js where they are used.
To test, apply the patch and test that the correct strings are
translatable. In this example I'm testing fr-FR:
- Update a translation:
> cd misc/translator
> perl translate update fr-FR
- Open the corresponding .po file for the strings pulled from
JavaScript e.g. misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from bootstrap/js/basket.js for
translation, e.g.:
#: koha-tmpl/opac-tmpl/bootstrap/js/basket.js:89
msgid "Your cart is currently empty"
msgstr ""
- Edit the "msgstr" string however you want (it's just for testing)
- Install the updated translation:
> perl translate install fr-FR
In the OPAC, switch to the language you're testing. Confirm that your
translated string appears. In the above example, by clicking the "Cart"
icon in the header when there are no items in the cart.
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>
(cherry picked from commit 7c8276bf0e64a2dc90af4aab0d6e78893edc12b1)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Tue, 28 Jul 2020 07:23:35 +0000 (09:23 +0200)]
Bug 21268: Don't remove 0 allocated funds from fund list
If a fund is created with a amount of 0, it will not appear in the fund
list (when a new order is created for instance).
0 allocated funds can be used to track donations and other situations
where there is not an expected amount for the year.
Test plan:
0. Do not apply the patch
1. Create 1 active and 1 inactive budgets
2. Create some funds for each budgets, with amount > 0 and amount == 0
3. Add orders to basket
=> Note that the funds with amount == 0 are not displayed
4. Apply the patch
5. Add orders to basket (using the different possible ways we have)
=> Note that the funds with amount == 0 are displayed
This change is applied to the different views of the acquisition module.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 8ecaedc22db5a25db6ffa98e6a7fc2e7039656c7)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Katrin Fischer [Fri, 22 May 2020 23:12:22 +0000 (01:12 +0200)]
Bug 25499: Fix fund code column when closing a budget
When closing a budget the fund code column in the table is
always empty. This is due to a TT variable not being correct.
To test:
- Create a budget and fund
- Order anything, leave basket open or not, but don't receive
- Duplicate your existing budget
- Close the first budget in order to move the pending orders
- Verify the fund code is not showing in the table
- Apply patch and reload the patch
- Verify fund codes are now showing correctly
Bonus: Changes the column heading Fund id to Fund ID.
Signed-off-by: Abbey Holt <aholt@dubuque.lib.ia.us> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ab015f04dcd4956ca1ccd610d085e8b0c17ca733)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 25961: Add hooks for plugins to inject variables to OPAC XSLT
This patch adds the following plugin hooks:
- opac_results_xslt_variables
- opac_detail_xslt_variables
This hooks will inject variables returned by the plugin in the form of a
hashref, into the ones that are passed to the XSLT processing code.
To test:
1. Apply the 'DO NOT PUSH' commit
2. Install the Kitchensink plugin
3. Restart all
4. Search biblios in the OPAC
=> SUCCESS: A text is injected in front of the biblio title
5. Enter the detail page of any of the results
=> SUCCESS: A text is injected in front of the biblio title
6. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9676f537a448d50770c90d9d5a8b420a1f302444)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Mon, 6 Jul 2020 17:56:35 +0000 (17:56 +0000)]
Bug 25709: Rename systempreference to NotesToHide
In an effort to use more inclusive language we have added a new coding guideline:
https://wiki.koha-community.org/wiki/Coding_Guidelines#TERM3:_Inclusive_Language
This patchset renames a syspref to be clearer and follow the guideline
To test:
1 - Apply patch and updatedatabase
2 - git grep NotesBlacklist
3 - Note all remaining occurrences are translations, db updates, and release notes
4 - Add a field (e.g. '520' ) to the NotesToHide systempreference
5 - View a record with a 520 field on the opac
6 - Confirm the field does not show in the 'Title notes' tab
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>
(cherry picked from commit 5e45076c00b2f72537ba9c81c4535253f1aaadfb)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Kyle M Hall [Wed, 18 Sep 2019 14:28:33 +0000 (10:28 -0400)]
Bug 23086: Search for collection is broken
It appears that we are quoting the ccode values deep in the search code.
Under ICU chains this breaks searching by limits
To recreate
1 - Setup Koha using Zebra and icuchains
2 - Add ccode to AdvancedSearchTypes
3 - In koha-conf.xml set zebra debug level to include request
<zebra_loglevels>none,fatal,warn,request,info</zebra_loglevels>
4 - Set some items into different ccodes
5 - On opac perform a search for:
ccode:NFIC
6 - It works
7 - tail -n 50 /var/log/koha/kohadev/zebra-output.log
8 - Note search request like:
Search biblios OK 26 1 1+0 RPN @attrset Bib-1 @attr 1=8009 NFIC
9 - On opac go to advanced search, select Collection, and limit to smae code a s above
10 - No results
11 - Check the zebra-output.log:
Search biblios OK 0 1 1+0 RPN @attrset Bib-1 @attr 1=8009 'NFIC'
12 - Apply patch
13 - Restart all
14 - Repeat search by collection limit
15 - Success!
16 - Check the zebra-output.log:
Search biblios OK 0 1 1+0 RPN @attrset Bib-1 @attr 1=8009 NFIC
17 - Add a new ccode value: N)N
18 - Set some items to that ccode
19 - Confirm searching by that ccode works
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit bc1b76be4a35403239fbce6f349ee343435cc8a0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Wed, 15 Jul 2020 15:33:18 +0000 (15:33 +0000)]
Bug 23086: Unit test
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 40b6e1b8a1a6e74cb4e9a1c422ffa4faa0bdefc0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Lucas Gass [Mon, 6 Jul 2020 20:38:42 +0000 (20:38 +0000)]
Bug 25940: Check for reserve_id before Dopop
TEST PLAN:
1. Have an item belonging to a different branch and check it in.
2. When the modal pops up hit 'Yes, print slip' or 'Print slip' if AutomaticItemReturn is set to 'don't'
3. The first print dialog should appear with a URL like '/cgi-bin/koha/circ/transfer-slip.pl?transferitem=18&&branchcode=CPL&op=slip'
4. Close that print dialog and you will immediately see another one that says 'No slip template found'.
5. Notice the URL of the second pop-up is: /cgi-bin/koha/circ/hold-transfer-slip.pl?reserve_id=
6. There is no reserve id so the template is not found.
7. Apply patch
8. Repeat 1-6
9. You should no longer have two print dialogs
Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com> 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>
(cherry picked from commit 0ec7ba72861f21c2ce83d3a98446af7db7a3e321)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Fri, 12 Jun 2020 10:51:36 +0000 (10:51 +0000)]
Bug 25724: Do not call ModReserveStatus when completing transfer
I can not see how this code is useful here. It checks for a reserve with priority 0 and found = NULL
That is not a status that should occur when filling a transfer. Either the found is 'T' if we are transferring due
to the hold, or the hold was placed after the transfer was initiated, and so the priority is not 0
Additional, AddReturn checks for reserves later and asks the staff to confirm waiting status.
ModReserveStatus also calls CartToShelf regardless of what happens here.
To test:
1 - Set UpdateItemLocationOnCheckin to:
_ALL_: CART
2 - SetAutomaticItemReturn = Do
3 - Check an item in at a different branch than it's homebranch to create a transfer
4 - Check the item in at it's homebranch
5 - View the item details page
6 - Item is not in CART location
7 - Apply patch
8 - Repeat
9 - Item is in CART location after completion of transfer
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Jason Robb <jrobb@sekls.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e025cd76437b212746717ad54b5da22e410bbe8f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Fri, 12 Jun 2020 11:11:26 +0000 (11:11 +0000)]
Bug 25724: Unit tests
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Jason Robb <jrobb@sekls.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 028e9a07db625845482eff1b550a9bbe86ec6fbc)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Mon, 27 Jul 2020 13:15:44 +0000 (15:15 +0200)]
Bug 25729: Prevent Charges/Fees.t to fail on slow server
We must use t::lib::Dates::compare to compare dates
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit fcd659b2d4cf62df48113567c59392e8dff9696f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Tue, 21 Jul 2020 10:36:17 +0000 (12:36 +0200)]
Bug 26033: Use pic.infini.fr instead of framapic
https://framapic.org/ is closing
"""
Framapic will be closing its doors on Tuesday, January 12, 2021. You will find a similar service on this page.
Uploading images is now disabled, but you can still retrieve your images on the My images page.
"""
We can still use another service. However we may think about hosting the
service ourself!
Test plan:
Modify a selenium script to make it fail (for instance modify the path
for a find_element call)
Run it
Confirm that the screenshot has been uploaded correctly and that the
link works
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 8aa907379eb54d360746c3e15051327a1e6cc1fe)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Katrin Fischer [Fri, 17 Jul 2020 23:36:24 +0000 (23:36 +0000)]
Bug 26016: Fix capitalization for "MARC Preview"
To test:
- Go to any record in the staff catalog
- Check the display for the 'MARC Preview' link
- Apply patch
- It should have changed to 'MARC preview'
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1a505632b8d1300a02512cfe300056f7b3797bfb)
Josef Moravec [Mon, 30 Sep 2019 09:28:40 +0000 (09:28 +0000)]
Bug 23696: take deleted biblios into account when building oai sets
Test plan:
0) do not apply the patch
1) set up OAI and create at least one set
2) run build_oai_sets.pl
3) remember/write down number of records added
4) delete a biblio, the is included in set
5) run buid_oai_sets.pl again
6) the set is 1 record smaller
7) apply the patch
8) run build_oai_sets.pl
9) the number of record should be the same as in 3)
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e14c1702b446111f98ce6736aa7544df14b03d1d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Tue, 7 Jul 2020 18:36:32 +0000 (18:36 +0000)]
Bug 23797: (follow-up) Enable OpacLoginInstructions in header
The OpacLoginInstructions information should be available in the login
modal which is displayed when the login link in the header menu is
clicked.
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1bc9765d043169dfeb569e25659f553f39dc466b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Mon, 29 Jun 2020 13:07:42 +0000 (13:07 +0000)]
Bug 23797: (follow-up) Increase the size of opac_news.lang
This patch adds a database update to increase the size of the
opac_news.lang column in order to accommodate longer values.
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f8c5b54acfa94f2c5e04f3376223e883deef9937)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Tue, 24 Mar 2020 15:06:30 +0000 (15:06 +0000)]
Bug 23797: Convert OpacLoginInstructions system preference to news block
This patch builds on Bug 22318 to move the OpacLoginInstructions system
preference into the Koha news system, making it possible to have
language- and library-specific content.
To test you should have some content in the OpacLoginInstructions system
preference. Apply the patch and run the database update process.
- Go to the OPAC and click the login link.
- In the login modal, confirm that the content which was previously in
the OpacLoginInstructions system preference displays correctly
below the login form.
- While not logged in to the OPAC, navigate directly to
/cgi-bin/koha/opac-user.pl. The OpacLoginInstructions content should
display correctly here as well.
- In the staff client, go to Tools -> News and verify that the content
from OpacLoginInstructions is now stored in news items. There
should be one entry for each of the enabled translations in your
system, for instance 'OpacLoginInstructions_en',
'OpacLoginInstructions_fr-FR', 'OpacLoginInstructions_cs-CZ'
- Go to Administration -> System preferences and confirm that the
OpacLoginInstructions preference has been removed.
- To test the correct selection of language-specific content you must
run the translation update/install process for the languages you're
updating.
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit be1d25ba16014c5fb3c788f8a93c5ecf3f5d9dbf)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Wed, 11 Dec 2019 18:20:46 +0000 (18:20 +0000)]
Bug 23796: Convert OpacCustomSearch system preference to news block
This patch moves the OpacCustomSearch system preference into the Koha
news system, making it possible to have language- and library-specific
content.
To test you should have some content in the OpacCustomSearch system
preference. Apply the patch and run the database update process.
- Go to the OPAC and confirm that the content which was previously in
the OpacCustomSearch system preference now displays correctly where
it was before.
- In the staff client, go to Tools -> News and verify that the content
from OpacCustomSearch is now stored in news items. There should be
one entry for each of the enabled translations in your system, for
instance 'OpacCustomSearch_en', 'OpacCustomSearch_fr-FR',
'OpacCustomSearch_cs-CZ'
- Go to Administration -> System preferences and confirm that the
OpacCustomSearch preference has been removed.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 16053574a5bff66d86ebcc906ccbabe31c45d1c7)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Wed, 11 Dec 2019 17:03:01 +0000 (17:03 +0000)]
Bug 23795: Convert opaccredits system preference to news block
This patch builds on Bug 22318 to move the opaccredits system
preference into the Koha news system, making it possible to have
language- and library-specific content.
To test you should have some content in the opaccredits system
preference. Apply the patch and run the database update process.
- Go to the OPAC and confirm that the content which was previously in
the opaccredits system preference now displays correctly where
it was before.
- In the staff client, go to Tools -> News and verify that the content
from opaccredits is now stored in news items. There should be
one entry for each of the enabled translations in your system, for
instance 'opaccredits_en', 'opaccredits_fr-FR',
'opaccredits_cs-CZ'
- Go to Administration -> System preferences and confirm that the
opaccredits preference has been removed.
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c9eb2be381bf9b6848b14bd374ba004f41198ed0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Tue, 21 Jul 2020 15:03:54 +0000 (16:03 +0100)]
Bug 25765: (QA follow-up) Use method directly in cleanborrowers
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit bd9ece8c194ffc960b5709b884620bf24e29068b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Tue, 21 Jul 2020 14:58:02 +0000 (15:58 +0100)]
Bug 25765: (QA follow-up) Save a DB hit
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 83d63d2302ee77c68dbae8be80fc6a038fa5ce51)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Fridolin Somers [Tue, 16 Jun 2020 12:01:39 +0000 (14:01 +0200)]
Bug 25765: Replace LoginBranchname and LoginBranchcode with use of Branches template plugin
The template plugin Branches contains a method GetLoggedInBranchcode that returns current branch code.
This patch adds GetLoggedInBranchname to get current branch name.
It is used to replace vars LoginBranchname and LoginBranchcode sent to all templates in C4/Auth.pm.
In labels and patrons cards modules, I choose to remove a unseless display of
current branch in a hint.
In acqui/acqui-home.tt, I choose to remove a useless display of current
branch and also because table of founds contains a filter on library.
Test plan:
Check pages source code to see branch code or name is correct.
list of the pages:
/cgi-bin/koha/acqui/acqui-home.pl
/cgi-bin/koha/catalogue/detail.pl?biblionumber=XXX
/cgi-bin/koha/circ/branchoverdues.pl
/cgi-bin/koha/circ/set-library.pl
/cgi-bin/koha/circ/offline.pl
/cgi-bin/koha/labels/label-edit-batch.pl?op=new
/cgi-bin/koha/labels/label-manage.pl
/cgi-bin/koha/patroncards/edit-batch.pl
/cgi-bin/koha/patroncards/manage.pl
OPAC:
/cgi-bin/koha/opac-detail.pl?biblionumber=XXX
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit cbd86551571260ca6daade57920e0fb3f290dfb4)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Fridolin Somers [Tue, 16 Jun 2020 11:59:29 +0000 (13:59 +0200)]
Bug 25765: Add GetLoggedInBranchname method
Add GetLoggedInBranchname method to Branches templates plugin.
Also changes GetName method to use Koha::Library instead of direct SQL.
Test plan :
Run prove t/db_dependent/Template/Plugin/Branches.t
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0fcd0fd2707188368fa5b370b808e875c6ea5814)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Thu, 23 Jul 2020 09:15:24 +0000 (11:15 +0200)]
Bug 5087: Add server-side check
If a user to access a CSV profile that is not available at the OPAC we
should redirect to 404.
It will also handle undefined csv_profiles
For instance:
kohadev.mydnsname.org:8080/cgi-bin/koha/opac-downloadshelf.pl?shelfnumber=1&format=3
kohadev.mydnsname.org:8080/cgi-bin/koha/opac-downloadcart.pl?bib_list=1/2/&format=3
Bug 5087: (QA follow-up) Fix leakage in opac-downloadshelf.pl
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit db15f4af8dc021c0ac06c3447cb87c5e51952cd2)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 5087: (QA follow-up) used_for deserves an index
This patch introduces an index for the used_for column
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 92d0472d631817395ad71f89f962fa5166f15770)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 5087: (QA follow-up) Rename the attribute to fit later API usage
This patch renames the introduced attribute for later usage on the API,
and changes the logic to use it the other way around.
It also adds a KEY for the flag, as it will be used in WHERE statements.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 478093072000d01b2b5c20f05044e4bd3bbfeecd)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Aleisha Amohia [Thu, 20 Dec 2018 22:52:59 +0000 (22:52 +0000)]
Bug 5087: Ability to define whether CSV profile shows in OPAC
To test:
1) Update database
2) Update schema
3) In staff side, go to Tools -> CSV profiles
4) Make a CSV profile with profile type = MARC and usage = Export
records
5) Leave 'Show option in OPAC' unchecked and save
6) Go to OPAC and add an item to your cart
7) Click Cart, click Download, confirm that your newly created CSV
profile does not show as an option
8) Go back and edit CSV profile on staff side
9) Check the 'Show option in OPAC' checkbox and save
10) Go back to download cart in OPAC
11) Confirm the CSV profile now shows in the dropdown
Sponsored-by: Catalyst IT Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ae3644a5947ea410fc3e8ac8b64307df7d1cbb18)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Wed, 8 Jul 2020 14:24:37 +0000 (14:24 +0000)]
Bug 25955: Fix getting index_name
To test:
1 - Have a site running ES
2 - perl misc/maintenance/compare_es_to_db.pl
3 - Lots of output, all bad
4 - Apply patch
5 - Repeate
6 - Whew, looks correct
Signed-off-by: Didier Gautheron <didier.gautheron@biblibre.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 005219ea6fc53a52a41169e96024244abb394ee1)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 25845: (QA follow-up) Call it REST API instead of just API
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 015ed932114ff48e944739afa9123d2501d65e14)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 25845: Add 'api' to the log viewer interface options
This patch simply adds the API option to the log viewer.
To test:
1. Have BorrowersLog set
2. Update some patron using the API. For example
curl --location --request PUT 'http://koha:koha@kohadev-intra.mydnsname.org:8081/api/v1/patrons/1' \
--header 'Content-Type: application/json' \
--data-raw '{
"firstname": "Tomasito",
"surname": "None",
"address": "Address",
"category_id": "ST",
"city": "Córdoba",
"library_id": "MPL"
}'
3. Open the log viewer
=> FAIL: There's no way to filter on interface, choosing API
4. Apply this patch
5. Reload the log viewer
=> SUCCESS: There are options to filter by 'API' interface
=> SUCCESS: Filtering by 'API' works
6. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9b526483c65550c0f36eabad70055bed79a8197c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Kyle M Hall [Wed, 1 Jul 2020 10:53:18 +0000 (06:53 -0400)]
Bug 25907: When cancelling a waiting hold on returns.pl, looks for new hold to fill without rescanning barcode
Right now, after canceling a hold on the checkin screen, a librarian
needs to rescan the item barcode to check and trap the next hold. This
is an extra unnecessary step.
Test Plan:
1) Place two or more holds on a record
2) Check in the item
3) Confirm the hold
4) Check in the item again
5) Cancel the hold
6) Koha should now display the modal asking to confirm the next hold
without the need to rescan the barcode!
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b31fdc8f55007217f95980692114a5b0a9a85bc0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Katrin Fischer [Sat, 30 May 2020 00:46:46 +0000 (00:46 +0000)]
Bug 25629: Fix capitalization in sample notices
This fixes the capitalization in sample notices files to
follow coding-guidelines. Only applies to English, translations
remain unchanged.
Additional fixes:
- Overdues slip added the letter code as subject instead of the description
- Opac changed to OPAC for self-registration verification emails
German (de-DE) file was not changed, as there is a pending translation
bug that will take care of these (bug 25129).
To test:
- Verify changes by running the web installer for the changed
files and verify sample notices install without error
- Verify subjects and notice descriptions are correct
- Run tests in t/db_dependent/Letters*
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>
(cherry picked from commit dc2c19bd515a4ce4057b41b2ae2bb668d345c461)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Fri, 17 Jul 2020 06:44:45 +0000 (07:44 +0100)]
Bug 25998: (QA follow-up) Add DBIC level relation
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 997094cc38a46372777f39f0bfa249b87fe76d58)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Thu, 16 Jul 2020 08:40:23 +0000 (09:40 +0100)]
Bug 25998: Add 'library' relation to Koha::Account::Line
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 16413beea6a2f5667a3a68971158ad1d7ea4b48a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Fri, 17 Jul 2020 07:01:06 +0000 (08:01 +0100)]
Bug 25998: Add Unit Tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e9927e729066be42a039b7e3f1abb5143820d1cb)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Mason James [Thu, 18 Jun 2020 01:26:20 +0000 (13:26 +1200)]
Bug 25792: Rename 'ttf-dejavu' package to 'fonts-dejavu' for Debian 11
to test...
1/ attempt to install koha 20.05 package on deb11, fail :'(
2/ apply patch and build new koha package
3/ attempt to install new koha package on deb11, succeed!
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 14932ae7d3bf864f64bffc9b1b015a07e11c8e2e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Fri, 17 Jul 2020 12:34:18 +0000 (12:34 +0000)]
Bug 25723: (QA follow-up) Handle holiday and exception on same day
When a holiday is entered, then exceptions generated on a range, there exists both a holiday and exception in
the special holidays table. We should cache the exception over the holiday instead of both
Also, !1 in perl returns '' rather than 0, so we should explicitly set the value
Add blank line to clear pod error from qa tools
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Re-introduce the blank line mentioned in the commit message, it was accidentally removed by automatic formatting Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 223b603f08267f801860bf5deaaa1884e58eab1e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Wed, 17 Jun 2020 13:04:14 +0000 (14:04 +0100)]
Bug 25723: (QA follow-up) Silent POD warning
I didn't introduce the method that is warned about, but adding POD for
it seemed reasonable and will silence the QA Script warning.
Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5851539424d04eda0da52ef8744925227dd6ce0f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Wed, 17 Jun 2020 12:46:34 +0000 (13:46 +0100)]
Bug 25723: Remove tests for removed method
We removed the exception_holidays (and single_holidays) methods as part
of this patchset. As such, we should no longer test them ;)
Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 25f0d425eaa7c66953d02c5a5717b1b2abcb89a6)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Wed, 17 Jun 2020 12:18:24 +0000 (13:18 +0100)]
Bug 25723: Update cache flushing calls
This patch updates the previous single_holidays and exeption_holidays
cache flushing calls to match the new cache key structure of the updated
routines.
Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 61141c28b0fcbbb021371bb4c2dd8e818aec0691)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Wed, 17 Jun 2020 10:14:30 +0000 (11:14 +0100)]
Bug 25723: Use the same code for single and exception holidays
This patch refactors is_exception_holiday and is_single_holiday to
utilise a single _holidays method which combines the logic of the
previous single_holidays and exception_holidays methods.
As Koha::Calendar is instantiated at a branch level, we also move split
the cache into branches too.
Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ae0b2befe8c9086df24469cb546c7c5f8d98de95)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Fri, 12 Jun 2020 15:30:28 +0000 (16:30 +0100)]
Bug 25723: Use a hasref for lookup
Rather than using an array of dates and iterating them, use a hashref
and do a direct lookup
Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e1dfe50522a01a7640fcca6e2a015206939579c9)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Fri, 12 Jun 2020 15:02:26 +0000 (16:02 +0100)]
Bug 25723: Drop DateTime::Set from cpanfile
Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit cd862763c9654ded15c1a7d79fafb2ec73e4f20e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Fri, 12 Jun 2020 14:11:52 +0000 (15:11 +0100)]
Bug 25723: (follow-up) Fix Unit Test
The unit test previously relied on the internals of exception_holidays.
Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5b2990d270fdde9fd7f69f6402db9ee171b6473e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Fri, 12 Jun 2020 10:53:49 +0000 (11:53 +0100)]
Bug 25723: Drop DateTime::Set dependancy
This patch removes our use of DateTime::Set and replaces it with a quick
hashref implimentation
Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0f0553da225052ff5b8b9bca7a386e04472f32da)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
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>
(cherry picked from commit 2440d480ca24bd1d15731fbd32aec0ea3aa71086)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Improve wording and grammar for automatic renewal error messages.
Test plan:
1. Review the error message changes and make sure they make sense.
The new message make sense to me.
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 379fd6d838d9909ea5784011486f3d184766a833)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Fri, 15 May 2020 09:51:46 +0000 (10:51 +0100)]
Bug 25511: Add --force option to update_dbix_class_files.pl
This adds a --force option to the aforementioned script allowing those
in the know to overwrite the schema when changes above the found are
detected.
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 34666e26902facdc3bc7e46a7ecd539f69f813e5)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Fri, 8 May 2020 15:11:19 +0000 (15:11 +0000)]
Bug 25427: Make authority subfield management interface consistent MARC view
This patch makes a couple of minor changes to the authority MARC
subfield structure administration interface to make it more consistent
with the corresponding MARC subfield interface.
To test, apply the patch and go to Administration -> Authority types.
- Pick an authority type to edit, for instance PERSO_NAME, and choose
'MARC structure' from the Actions menu.
- Pick a tag to edit and select "Subfields" from the Actions menu.
- In the table of subfields for that tag, each subfield in the first
column should link to the edit interface for that subfield (its tab
pre-selected).
- The "Edit" button in that table should do the same.
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f1f3117583a41d02f2ad794622f9becd469720f0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Mon, 13 Jul 2020 15:18:23 +0000 (15:18 +0000)]
Bug 25984: Add minimum height and width to shelf browser covers
This patch adds a class to the shelf browser cover image links and a
style for these links defining a minimum height and width. This allows
the browser's default tab focus outline to be visible.
This patch also adds a check for an enabled cover image service before
displaying the cover image links.
This patch introduces whitespace changes so diff accordingly.
To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
- Enable the OPACShelfBrowser system preference.
- Enable at least one cover image service (Amazon, Google, Coce, etc).
- Locate a title in the OPAC which has items attached.
- On the bibliographic detail page, click the "Browse shelf" link in the
table of holdings to display the shelf browser.
- Use the tab key to move the focus to cover images in the shelf
browser.
- Confirm that the focus outline moves through each cover link whether
or not there is a cover image available.
- Diable all cover image services.
- Test the shelf browser again and confirm that it's not necessary to
tap through an empty row.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e722dd1725e113acd79dcb9e8eed2cd4da35aa33)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Mon, 29 Jun 2020 14:55:17 +0000 (15:55 +0100)]
Bug 25244: Add specific aria-label to search results
This patch adds an arai-lebel to the select checkboxes on the search
results page of the OPAC.
Test plan
1/ Perform a search that will yield some results
2/ Inspect the 'checkbox' on the left side of the results table
3/ Note that there is no arai-label
4/ Apply patch
5/ Refresh the search results page
6/ Inspect the 'checkbox' on the left side of the results table
7/ Note that the aria-label now appears and contains relavant
information
8/ Signoff
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Bug 25244: (follow-up) QA corrections
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d1a7112a9054305ead325daedd6bb106a31b346f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Julian Maurice [Fri, 3 Jul 2020 13:36:04 +0000 (17:36 +0400)]
Bug 25922: Fix typo 'arial-label' -> 'aria-label'
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 73ff914d5d537947b5fdc4cd602e79f41af5179a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Fri, 3 Jul 2020 13:07:25 +0000 (14:07 +0100)]
Bug 25922: Add aria-label to the allowlist for translation
This patch adds aria-label to the allowlist for translations.
To test:
- Apply patches from here and bug 25244
- kshell
- cd misc/translator
- perl translate update de-DE
- Check for the aria-label in the diff
- Verify the strings appear in the po files now
- Translate them
- perl translate install de-DE
- Verify the translated strings appear in the template
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 280f1bdeb3cbec9f57d71e980490e32af61eecfb)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Thu, 11 Jun 2020 11:45:57 +0000 (12:45 +0100)]
Bug 25237: Fix semantic heading for opac-details
Prior to this patch the opac-details view contained semantically incorrect h3
headings for the author information.
Test plan
1/ Perform a search in the OPAC that will yield results
2/ Navigate to any results detailed view
3/ Inspect the page and note that there are semantically incorrect headings
H1 (Page title) > H2 (Item title) > H5 (Author)
4/ Apply the patch
5/ Reload the page
6/ Inspect the page and note that the semantically incorrect author block has
been converted to a span with an 'h3' class for styling
7/ Note the page still appears nicely
8/ Signoff
Bonus points: Check with XSLT views enabled and disabled.
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>
(cherry picked from commit 6b49a70b94d6b5e0e2e1cde3025ade1278814925)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Thu, 11 Jun 2020 09:14:03 +0000 (10:14 +0100)]
Bug 25155: (follow-up) Increase headings levels by 1
In the previous patch we reduced the headings levels by 2, but this was
one level too many as we already have an H1 in the navbar and so all
other heading sets should start at level 2 to semantically follow the
title heading.
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>
(cherry picked from commit c9a0243f3abf407e1a89d7bfc125911cc153b3cc)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Thu, 11 Jun 2020 08:32:45 +0000 (09:32 +0100)]
Bug 25155: Fixing semantic headings login modal
The login modal headings were semantically incorrect prior to this
patch.
Test plan:
1) Click the 'Log in to your account' option to expose the modal
2) Use a headings inspector and note we jump from H1 (Page Title) -> H3
(Modal Title)
3) Apply the patch and reload the page.
4) Click the 'Log in to your account' option to expose the modal
5) The modal should still appear well formed
6) Use a headings inspector and note we jump from H1 (Page Title) -> H2
(Modal Title) -> H3 (Shibboleth title if enabled)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 513b226873759ba3df6765dce635fe96cf5a51f3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Hayley Mapley [Thu, 11 Jun 2020 01:13:30 +0000 (13:13 +1200)]
Bug 25155: Fixing semantic headings in opac-auth.tt
Test plan:
1) Follow test plan from comment #1
2) Apply the patch
3) Reload the page, and note that is still displays fine
4) Check that the main heading is now an h1, and that the other headings
on the page make sense
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0bc47b5302fba91c1315acee5533ec5917df5761)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Wed, 1 Apr 2020 16:06:33 +0000 (16:06 +0000)]
Bug 24625: Store showLastPatron information using localStorage
This patch removes the use of jquery.cookie to store "last patron"
information, using localStorage instead. jquery.cookie.js is obsolete.
See Bug 24624.
localStorage has been chosen as an alternative in this situation because
it does not require transmission between the client and the server. See
Bug 12410.
Because there is no "session only" option with localStorage, additional
handling of the showLastPatron data is added to the login page. That
takes care of "stale" last patron information if user didn't log out but
the session expired for some reason.
To test apply the patch and enable the showLastPatron system preference.
1. Load a patron's account for checkout
2. Navigate away from patron-related pages: Perform a catalog search
from the search header form and open the detail page from the search
results. Confirm that the correct last patron information still
shows.
3. Load another patron's account for checkout
- There should now be a "Last patron" link in the breadcrumbs bar
which links to the patron in step 1. Hovering your mouse over the
link should display a tooltip containing the patron's name and
card number.
- Click the "X" to clear the last patron information. The last
patron link should go away.
4. Log out and log back in. The last patron information should be gone.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a512ae01fc7e17385e2d2dd42f53f79ae1f55d3a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>