David Cook [Mon, 16 Nov 2020 00:31:21 +0000 (00:31 +0000)]
Bug 27029: Add data-biblionumber attribute to OPAC detail page
This patch adds a data-biblionumber attribute to the
div#catalogue_detail_biblio elements on opac-detail.pl, so that
Javascript running on the page can easily fetch and use the
record's biblionumber.
Signed-off-by: Mark Hofstetter <mark@hofstetter.at>, <koha@trust-box.at> 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 f17a631d873f971ac139534fc2867c7ac86b7bd5) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Petro Vashchuk [Thu, 21 Jan 2021 12:11:24 +0000 (14:11 +0200)]
Bug 27508: do nothing if tag label elements don't exist
When JavaScript make copy of DOM set for MARC tag, it tries to reassign
label elements to another id, the problem is there is no check for
existence of that label element, so in case when option
"advancedMARCeditor" is set to "Don't display", labels were absent
which caused JavaScript to crush in the middle of process with uncaught
exception.
This patch wraps this label assignment in try/catch hook like it's done
in the code around for other elements, to allow the script to proceed
when description labels are not present.
To test:
1) Check in the system preferences interface subsection that
"advancedMARCeditor" is set to "Display".
2) Go to the "Add MARC record" cataloguing section and press "Repeat
this tag" button near the MARC tag record to ensure that it makes
duplicate in the interface as expected.
3) Then again in the system preferences interface subsection change
"advancedMARCeditor" to "Don't display".
4) Return back to the "Add MARC record" interface, refresh the page to
have no MARC field labels displayed, and try duplicating the tag
again.
5) Ensure that it doesn't work, also you can notice a JavaScript error
"Cannot read property "setAttribute" of undefined..." in the
JavaScript console of your browser.
6) Apply the patch.
7) Repeat the test sequence (changes will be in the step 5), ensure that
the tag gets duplicated even when description labels are not present.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 43f9758c3d3fe660cff464e1b575bb3e99cb73da) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Fri, 22 Jan 2021 16:43:58 +0000 (16:43 +0000)]
Bug 27531: Remove type attribute from script tags: Cataloging plugins
This patch removes the no-longer-valid "type" attribute from script tags
found in cataloging plugin templates.
I don't think testing each plugin individually is a reasonable thing to
ask for a test. I think a visual verification of the changes in the
patch should be enough.
Signed-off-by: Lucas Gass <lucas@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 32d482130749fdb17cb33e2ee48b0ae0acce835a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Tue, 27 Oct 2020 12:23:45 +0000 (12:23 +0000)]
Bug 25614: Move ILL request keyword filter to sidebar
On the ILL request list page there are two filters for the table: One in
the sidebar and one configured automatically by the DataTables plugin. I
think these two systems are conflicting somehow to prevent the "clear
filter" button in the table toolbar from working correctly.
This patch doesn't fix the bug but avoids it: Since the filter field in
the table toolbar is duplicating the functionality of the form in the
sidebar, we could hide it and rely on the sidebar filter instead.
To test, apply the patch and go to the ILL requests page in the staff
interface.
- The table of requests should display without a search form or "clear
filter" button at the top.
- The left-hand sidebar form should now have a "keyword" filter option
which searches any column in the table.
- Other filter fields should work as before.
Signed-off-by: David Nind <david@davidnind.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 6c5ad42eddce1c357bf6dc64301f774f93a06e0e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
James O'Keeffe [Tue, 19 Jan 2021 21:16:49 +0000 (21:16 +0000)]
Bug 11344: Perldoc issues in misc/cronjobs/advance_notices.pl
This patch removes the double ups in the perldoc of the above file,
deleting the less clear double ups. The missing "-c" in OPTIONS
appears to have been fixed in an earlier patch (it is there
already).
Task Plan:
1. Run perldoc misc/cronjobs/advance_notices.pl in the terminal. Note
the double ups of NAME, SYNOPSIS, and DESCRIPTION
2. Apply the patch
3. Run the command again. The double ups should be gone, with the more
clear version of each of NAME, SYNOPSIS, and DESCRIPTION remaining.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> 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 5cb6927458dfd9195a7f9cb536b2ca386f7ffb88) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 27327: Get rid of indirect object notation in Koha::Club::Hold
This patch makes the code follow the PERL29 coding guideline. Period.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 17a3476d7e45fae092fdd20ce78df8b0945d1fb1) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Eden Bacani [Tue, 19 Jan 2021 20:14:32 +0000 (20:14 +0000)]
Bug 22152: Hide tools navigation when printing reports
1. Go to reports and print any report
2. Check that navigation does not show up when report is printed.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 214ff006e1fd230c95c43da60804b72a92238079) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Catherine Ma [Thu, 21 Jan 2021 02:23:22 +0000 (02:23 +0000)]
Bug 27022: Publisher number 028 does not display according to framework settings
Test plan:
1. search the catalogue for an item
2. check if you can see the publisher number below the item title (you shouldn't)
3. click on the item and check if you can see the publisher number on
this page (you shouldn't)
4. in a new browser, repeat steps 1-3 on the OPAC
5. apply patch
6. repeat steps 1-4, however this time the publisher number SHOULD
display under the item titles
Sponsored by Catalyst IT
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> 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 9f7eb070cc7baadd305b3546f36c40b434504abf) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Mazen Khallaf [Tue, 19 Jan 2021 02:01:43 +0000 (02:01 +0000)]
Bug 27179: Misspelling of Method in REST API files
Test Plan:
1. Run "git grep -i mehtod" (which should return 2 files)
2. Apply patch
3. Rerun grep command (should return no files)
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a22b3bb504b0a9a77aa9ce3e9f326cc71fcf8d96) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Mazen Khallaf [Tue, 19 Jan 2021 01:49:43 +0000 (01:49 +0000)]
Bug 27210: Typo in patron-attr-types.tt
Test Plan:
1. Make sure the ExtendedPatronAttributes syspref is active
2. Go to Administration > Patron attribute types
3. Click New patron attribute type
4. Check the sentence next to the Editable in OPAC checkbox (Should say
"Requires above, does not work during self-registration if
PatronSelfRegistrationVerifyByEmail if set." - Notice the use of
'if set')
5. Apply Patch
6. Repeat steps 2-4 (Should now say "Requires above, does not work
during self-registration if PatronSelfRegistrationVerifyByEmail
is set." - Notice the use of 'is set')
7. If it says 'is set', the patch works as expected.
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c5170f8ee1b6ce3007787d2415aba7794dbaded3) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
ava li [Tue, 19 Jan 2021 21:01:15 +0000 (21:01 +0000)]
Bug 24811: French SQL files "news" link fixed
This fixes a broken link in the sample news items for fr-FR and fr-CA.
Test plan:
1) Apply the patch.
2) Install the French language files - see
https://wiki.koha-community.org/wiki/Installation_of_additional_languages_for_OPAC_and_INTRANET_staff_client
3) When Koha is in French, from the home page of the staff interface go to Tools/Outils > News/Annonces, and make sure the two news items are there.
-If not, try importing the two files into your database or reset and install Koha in French (fr-FR or fr-CA).
4) There should be a news item with the heading Et maintenant ?, click the 5th link "proposez des correctifs et des améliorations".
5) If should take you to
https://wiki.koha-community.org/wiki/Version_Control_Using_Git
and there is no 404 error, the patch has worked!
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c6009f32205c7b6c19a4dfe0346a1ebed0c05a71) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
ava li [Tue, 19 Jan 2021 03:44:44 +0000 (03:44 +0000)]
Bug 24810: French SQL files for "news" removed "3"
TEST PLAN
Follow https://wiki.koha-community.org/wiki/Installation_of_additional_languages_for_OPAC_and_INTRANET_staff_client in order to install french.
When koha is in french, from home go to tools/outils, then
news/Annonces, make sure the two files are there.
Preview them there or view them from the homepage and check that the 3
is gone.
If the files are not there, try importing the two files into your
database.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 42aac43290dbcb8cb1cfecbe685e738c8a95ee67) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Ella Wipatene [Thu, 21 Jan 2021 02:45:07 +0000 (02:45 +0000)]
Bug 24055: (follow-up) Description of PayPalReturnURL system preference
Have rephrased it as 'configured return URL' as this is what they call
it on the PayPal website.
To test:
- Go to Administration/ System preferences
- Search for PayPalReturnURL
- Verify description has changed to 'configured return URL' as one of
the options.
Sponsored.by: Catalyst IT
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 297d93ec449c08430c13ba75659f48e6a3f563c0) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Katrin Fischer [Sat, 11 Apr 2020 20:05:14 +0000 (20:05 +0000)]
Bug 24055: Rephrase description of PayPalReturnURL slightly
changes 'OPAC's alias' to 'specified URL' as suggested by
Tomas on comment#2.
To test:
- Go to Administration / System preferences
- Search for PayPalReturnURL
- Verify description has changed to "specified URL" as
one of the options
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> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4b31073af292e391cd1df1be3894029460fa6040) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Thu, 21 Jan 2021 16:09:58 +0000 (16:09 +0000)]
Bug 20527: (QA follow-up) Fix type 'Wiriteoff'
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c706b8aa13edd39769324ad2d5937d9d4d5ae583) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Eden Bacani [Thu, 21 Jan 2021 02:54:30 +0000 (02:54 +0000)]
Bug 20527: Corrected paid to amountwrittenoff
Test Plan
1. Go to My account and go into accounting
2.Create manual invoice (If you already have invoices skip this step)
3.On the Make a payment tab click on Write off under actions of an
invoice
4. Click on Writeoff amount label and make sure that the amount written
is highlighted in green.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f3992816b20bf97de904d485e775c32b93df0726) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Amy King [Tue, 19 Jan 2021 01:55:00 +0000 (01:55 +0000)]
Bug 27027: Fixed typo - extra dot removed
Test Plan
Before applying patch
1. Open koha-tmpl/intranet-tmpl/prog/en/modules/admin/background_jobs.tt
2. Note how in line 125 "has successfully been modified.." has two full
stops
3. Apply patch
4. Repeat step 1
5. Note how there is only now one full stop in line 125 "has been
successfully ben modified."
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 040d79a02c8bb9a860e2c431e1c3ade8732a607a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Ella Wipatene [Thu, 21 Jan 2021 01:46:21 +0000 (01:46 +0000)]
Bug 11996: (follow-up) Updating the uk-UA currency
I have changed GRN to UAH in both
installer/data/mysql/ru-RU/optional/sample_currency.sql and in
installer/data/mysql/uk-UA/optional/sample_currency.sql
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 732e69f4b25b7af22ab034f143b8df5d7ffd263a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Ethan Amohia [Thu, 17 Jan 2019 02:42:32 +0000 (02:42 +0000)]
Bug 11996: Made RUB default currency for ru-RU
Didn't know how to change the uk-UA default currency.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6bb8065af69438673ca5ed0bca0664c366a87e02) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Eden Bacani [Thu, 21 Jan 2021 01:20:49 +0000 (01:20 +0000)]
Bug 24447: Changing 'DUE' to example in database that exists.
Test Plan:
1.Using perldoc C4/Members/Messaging.pm check that message_name
attribute name example is Item_Due and not DUE.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0a0ff7c5ceab836631be060a4571681ff40e275c) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 23290 explicitly disabled entity expansion during XML parsing for security reasons.
However, many XSLTs define the following entity:
<!ENTITY nbsp " " >
They don't use the entity  , but its presence could lead to confusion.
Signed-off-by: Eden Bacani <eden.bacani@gmail.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 10c08b6552c7063c4c029701018d6f54e6549acb) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Wed, 22 Apr 2020 11:10:56 +0000 (12:10 +0100)]
Bug 25245: Add plugins_nightly.pl to the default cron
Signed-off-by: Kyle M Hall <kyle@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 1ce9e0160cf7e7264400244f23b314cc8a94ad0e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Mon, 27 Apr 2020 12:30:24 +0000 (13:30 +0100)]
Bug 25245: (follow-up) Use Koha::Logger
Update script to use Koha::Logger to capture method failures.
Signed-off-by: Kyle M Hall <kyle@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 441ba0bd2365b52753c2acbf887466df84245224) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Wed, 22 Apr 2020 11:04:37 +0000 (12:04 +0100)]
Bug 25245: Add plugins_nightly.pl cronjob script
This script simply iterates through installed plugins that impliment a
cronjob_nightly method and runs said method.
Signed-off-by: Kyle M Hall <kyle@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 63b926b28b7cb8905fbc12ff3c016231bcc05e7d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Mazen Khallaf [Tue, 19 Jan 2021 01:33:19 +0000 (01:33 +0000)]
Bug 26982: Typo in system preference UsageStats: statisics
Test Plan:
1. Go to Administration
2. Go to System Preferences
3. Go to Administration (on the right)
4. At the bottom, under 'Share anonymous usage statistics', find
UsageStats
5. In the value box, the bottom line should say 'statisics' instead of
'statistics'
6. Apply the patch
7. Repeat steps 1-4
8. In the value box, the bottom line should now say 'statistics'
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> 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 c32111642aa8ddae65aca44fafd9c724dbcddc51) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Catherine Ma [Tue, 19 Jan 2021 01:08:28 +0000 (01:08 +0000)]
Bug 27457: Set focus for cursor to Debit type code field
Test Plan:
1.Click administration
2.Click debit types
3.Click new debit type
4.Check if the cursor is in the first form field (it shouldn't)
5.Add patch
6.Repeat steps 1-3
7.Check if the cursor is in the first form field (it should)
Sponsored by Catalyst IT Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> 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 958a91dc4ec3965956bfbdb8d4cdae5db07c7a0f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Amy King [Wed, 20 Jan 2021 00:57:35 +0000 (00:57 +0000)]
Bug 27458: Set focus for cursor to Credit type code field
Test Plan:
Before applying patch
1. Click on Administration
2. Scroll down to Accounting and click on Credit types
3. Click New credit type
4. Note how the cursor does not focus on Credit type code field
5. Apply patch
6. Repeat steps 1-3
7. Note how the cursor now focuses on Credity type code field
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
JD amended patch: Edit commit title
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d05547dcb64895febca9a79b818d47119fee9a6b) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
- <td>[% name %]</td>
+ <td>[% INCLUDE 'patron-title.inc' patron=patron %]</td>
We can simply remove the $name variable from the controller script.
Test Plan:
1. Check out a book
2. Check in a book
3. Note what happens
4. Apply patch
5. Repeat step 1-2
6. Note that it doesn't break and everything still works
JD Amended patch: fix commit message
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 113992e620095aac59253cf653acfa47f1ec7768) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Thu, 18 Jun 2020 17:23:04 +0000 (13:23 -0400)]
Bug 25808: Renewal via the SIP 'checkout' message gives incorrect message
If a renewal via SIP cannot be made because the patron has reached the maximum number of renewals,
the AF screen message should read "Item has reached maximum renewals!",
instead we get "Item checked out to another patron".
Test Plan:
1) Check out an item to a patron
2) Using the SIP CLI tool, run checkout messages until the checkout has
reached the maximum number of renewals
3) Note the incorrect message in the AF field
4) Apply this patch
5) Restart the SIP server
6) Run another SIP checkout message
7) Note the message is now correct!
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 6cdfa37e63901c713f817fb44c279367a0c21ab0) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Andreas Roussos [Fri, 8 Jan 2021 14:45:32 +0000 (15:45 +0100)]
Bug 27192: Automatically set focus to the item type input box
When adding a new item type, you have to click inside the
"Ιtem type:" input box before you can start entering text.
This patch fixes that by adding the "focus" class to the relevant
<input> element so that cursor focus is set when the page loads.
Test plan:
1) Try to add a new item type: notice how you have to manually
click inside the "Item type:" input box before you start typing.
2) Apply this patch.
3) Repeat step 1) -- this time the "Item type:" input box should
gain focus automatically.
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 a219a78239049245768ae3abd781136745f9a01f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick [Thu, 19 Dec 2019 03:20:36 +0000 (03:20 +0000)]
Bug 24272: add check_sysprefs_cache.pl
This script ensure that no sysprefs have been changed directly in the database and/or
that the cache has not become corrupted. We have occasionally seen this happen on production sites
To test:
1 - In the staff interface go to Administration
2 - Search for system preference 'IntranetUserJS'
3 - Add content to the syspref:
console.log('Hi!');
4 - On the command line launch mysql
sudo koha-mysql kohadev
5 - Alter the syspref directly
UPDATE systempreferences SET value = "console.log('Bye!');" WHERE variable = 'IntranetUserJS';
6 - run the script
perl misc/maintenance/check_syspref_cache.pl
7 - You are warned about the altered system preference
Signed-off-by: David Nind <david@davidnind.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 de5527f37d898e756cac4d8ed9de63c6576c1241) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Lucas Gass [Fri, 13 Nov 2020 23:01:29 +0000 (23:01 +0000)]
Bug 27023: Add class names in acq suggestion table (suggestions column)
Test plan:
1. Apply patch
2. Add some suggestions via the OPAC, fill out all the input fields
3. Go to the suggestion managemnet page and look specficially at the Suggestions column.
4. There should be no display change in the table but you should now <span> with classes like 'suggestion_coprightdate', suggestion_isbn, suggestion_publishercode, suggestion_collectiontitle, and suggestion_itype
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 33ede26f32feb64d8e0bb98510b1e5f9a110647f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Wed, 13 Jan 2021 10:11:36 +0000 (11:11 +0100)]
Bug 27416: Make "Modify tag" and "Add tag" translatable
Those two strings are not translatable as they are passed from the
controller.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4491cdd803226c22c585f3a23f6aa77000841bed) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Fridolin Somers [Tue, 10 Nov 2020 14:51:24 +0000 (15:51 +0100)]
Bug 26991: Add action logs to search engine administration
Search engine administration is very important,
we should log who/when it is changed.
I don't add a preference system to disable it,
like there is no for preference system logs.
Test plan :
1) Use searchengine Elasticsearch
2) Go to Administation > Search engine configuration (Elasticsearch)
3) Click on 'Reset Mappings' and accept
4) Edit some lines and save
5) Go to 'Tools' > 'Log viewer'
6) Select only 'Search engine' in Modules and submit
7) Select only 'Edit mappings' in Actions
8) Check you see a log
9) Select only 'Reset mappings' in Actions
10) Check you see a log
Signed-off-by: David Nind <david@davidnind.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 5bc62d240cfa0e026876cbbbef79731ed3877949) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Fridolin Somers [Wed, 20 Jan 2021 08:37:45 +0000 (09:37 +0100)]
Bug 17229: Fix unit test warning
Remove warning :
t/db_dependent/ILSDI_Services.t .. 3/10 Null value for biblionumber in Item not allowed at /home/koha/src/t/lib/TestBuilder.pm line 387
$biblio_with_no_item is a Koha::Biblio object.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e1cbdc3691a95ae297b275a9bd8978fa01806f92) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Julian Maurice [Wed, 31 Aug 2016 13:27:44 +0000 (15:27 +0200)]
Bug 17229: Check if patron is expired in CanItemBeReserved
This way, calls to ILS-DI HoldTitle and HoldItem do this check too
Added test plan to commit message :
-Set Syspref BlockExpiredPatronOpacActions to "ON",
-Set a patron's category variable "Block expired patrons" to "Follow SysPref" or -"Block" (ideally test both).
-Get the id of a patron from this category (ie : 1234).
-Set this patron's expiration date to a date earlier than today.
-Get a biblionumber which can be reserved (ie : 5678).
Put the following string in your webbrowser (replacing OpacBaseUrl, 1234 and 5678 by your own values) :
http://[OpacBaseUrl]/cgi-bin/koha/ilsdi.pl?service=HoldTitle&patron_id=1234&bib_id=5678&request_location='127.0.0.1'
Should not create a new hold for the patron and report an error.
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> Signed-off-by: David Nind <david@davidnind.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 9c3f267350b07c16b4c8297ee7c05853748a26f9) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Thu, 21 Jan 2021 16:21:15 +0000 (17:21 +0100)]
Bug 27509: Prevent cn_sort value to be lost when editing items
This is a bit dirty, cn_sort is not passed from the UI but built in
Koha::Item->store depending on the values of itemcallnumber and
cn_source.
It must be updated only if one of those 2 attributes are modified.
The problem is that, as it's not passed, $item->{cn_sort} does not exist,
and set_or_blank will set it to undef.
The trick here is to backup the value before set_or_blank and set it
back to the item object.
Another solution would be to force the processing of cn_sort each time
we call Koha::Item->store. I don't think that's a good idea.
Test plan:
- Create a new item with a cn_source value and an itemcallnumber value
- write a quick report to see the cn_sort value: SELECT cn_sort FROM items WHERE itemnumber=your itemnumber, see your item has a cn_sort value
- edit your item and save it without changing either the cn_source of the itemcallnumber
- run your report again, cn_sort is not modified
- edit your item, changing either the cn_source or itemcallnumber
- run report again, cn_sort is modified as expected
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit dcd4ab94cd0a7b0a599cdc507810f9a8eb819202) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Pasi Kallinen [Thu, 21 Jun 2018 08:15:23 +0000 (11:15 +0300)]
Bug 20971: Prevent Storable::thaw to fail on LastCreatedItem
Sometimes additem.pl will complain about "Storable::thaw failed to
thaw LastCreatedItem-cookie.", see bug 14844. Now, actually fix the bug.
The bug is caused by trying to URI (un)escape MARC::Record, binary data.
We'll use a base64 url-safe version instead.
Test plan:
1: Set PrefillItem to 'The new item is prefilled...'
2: Set a SubfieldsToUseWhenPrefill, 'c' for example
3: Add a new item for biblio A with 'c' set.
4: Double check 'c' value is set for next new item A.
5: search and add a new item for biblio B
6: 'c' is not set
Apply patch
7: logout, login
8: repeat steps 3, 4, and 5 .
9: now 'c' is set.
Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> Signed-off-by: James O'Keeffe <jamespfk@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
JD amended patch: fix commit title and add test plan Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9a7f7787376253e0c0cda905734006ceba472d60) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Tue, 22 Dec 2020 19:28:28 +0000 (19:28 +0000)]
Bug 27297: Add required and blank options to av-build-dropbox.inc
This patch adds two options to av-build-drobx
required - which will add the required attribute to the select
blank - which will add a blank option to avoid preselecting others
To test:
1 - In OpacSuggestionMandatoryFeilds select itemtype
2 - Go to OPAC
3 - Add a suggestion
4 - Don't fill out any fields
5 - Submit
6 - Suggestion is added
7 - Delete it
8 - Apply patch
9 - Add a suggestion
10 - Note itemtyp edefaults to 'None'
11 - You cannot submit until you select a value
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.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 cb95c9140316d4b9dc28cd696d14106b460774aa) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Wed, 9 Dec 2020 15:39:09 +0000 (15:39 +0000)]
Bug 27180: Update fines on holidays
This patch removes code that prevents fines from being update on holidays.
The fines are already being calculated, and that takes the calendar into account if
needed, so fines won't be assessed on holidays if they shouldn't.
To test:
1 - set finesCalendar to 'ignore'
2 - Checkout an item due yesterday
3 - Ensure circ rules have a fine amount set
4 - Make today a holiday
5 - run fines.pl
6 - No fine assessed
7 - Apply patch
8 - run fines.pl
9 - Fine assessed!
10 - set finesCalendar to 'use'
11 - checkout an item, due yesterday
12 - run fines.pl
13 - no fine assessed
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 80e1b4e66f01a07cad9bf37625d879f649edf52a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Wed, 13 Jan 2021 11:22:53 +0000 (11:22 +0000)]
Bug 27420: Use object accessor for $attr_type->class()
We introduced a bug in the patron attribute forms with bug 5161.
Test plan
1/ Create two PA_CLASS authorized values
2/ Create two corresponding patron attribute types referencing the above
classes.
3/ Edit a patron, both attributes should appear within their own
fieldsets at the bottom of the member entry form.
4/ Set a value for the first of the two patron attributes and save
5/ Edit the patron again, note that the first attribute no longer
resides within it's own fieldset
6/ Apply the patch
7/ Edit the patron again, note that the first attribute now resides
inside it's own fieldset again
8/ Signoff
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.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 08396d4b2ffe7db4f7550631a751603f01387095) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Thu, 14 Jan 2021 09:42:53 +0000 (10:42 +0100)]
Bug 15448: Fix ISE
The method Koha::Items->itemnumber is not covered by tests!
Trace begun at /kohadevbox/koha/Koha/Objects.pm line 592
Koha::Objects::AUTOLOAD('Koha::Items=HASH(0x55981fd94790)') called at /kohadevbox/koha/opac/opac-reserve.pl line 465
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9790b5ca3a1b8a92d56a14207d6245c02dfe7fd6) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 15448: (follow-up) Adapt to changes on bug 24254
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 8af3ecdd538f22bfbf4d99bda629283fe856f3de) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 15448: (follow-up) Fetch the patron category once
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c9f66f5e6b5360a57885c26436c7eb3f2747bd28) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 15448: Filter out items hidden in OPAC on placing hold
This patch leverages on bug 24254's
Koha::Items->filter_by_visible_in_opac to filter out items that
shouldn't be presented to the end user in the OPAC interface.
To test:
1. Circulation and Fine rules for item-level holds are set to allow.
2. Setting the OpacHiddenItems preference to "ccode: [SUPPRESS]"
3. An item with collection Code Suppress is set.
4. Search for the title in the OPAC.
=> SUCCESS: The Suppress ccode item isn't shown.
5. View the detail page for the title.
=> SUCCESS: The suppress ccode item isn't shown.
6. Place a hold on the item:
-- Click "Show more options"
-- Select "A specific item"
=> FAIL: the ccode with the opachiddenitems rule has an item that appear in the list to place a hold
7. Apply this patch and repeat 6
=> SUCCESS: The item doesn't show!
8. Sign off :-D
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 051f5519861cb2365ddd06d08a9047648af2318b) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 24254: Implement separate filters and add patron param
This patch introduces two new methods for stacking filters on
Koha::Items:
- filter_out_lost
_ filter_out_opachiddenitems
This two filters are what actually happened inside the
filter_by_visible_in_opac. Everything is covered by tests.
In the process I added a Koha::Patron param to the method that is
internally used to decide if the OPACHiddenItems syspref needs to be
honoured or not. This *could* be better done with a fallback to
C4::Context->userenv if no param is passed.
I decided to leave that part for later, if we really find it would help
(e.g. if bug 10589 gets some action and we really need something here to
handle that).
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Items.t
=> SUCCESS: Tests pass!
3. Sign off :-D
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 42c4089fad79461f5aaea3c3354e902d192af543) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 24254: Read the OpacHiddenItems preference internally
After discussing the 'rules' parameter usefulness we decided it was not
the best idea, and the gains in terms of 'performance' would me
meaningless (in-memory caching of sysprefs). This patch makes a really
minor tweak to the tests so they mock the C4::Context->yaml_preference
method, but keeping the same original rules to highlight no behaviour
change takes place.
Then the rules parameter is removed from the calls, and the tests should
keep passing.
A minor change to make $rules = undef is made to highlight the // {}
behaviour when reading the syspref..
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Items.t
=> SUCCESS: Tests pass!
3. 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 b1eda4facde26883e76ee321e142650525438846) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
On C4::Search and C4::Circulation the uses of the items.itemlost field
highlight the fact that the comparisson itemlost <= 0 was wrong, as it
is evaluated as a Perl boolean.
The column can only be an int and NOT NULL, so we need to check if it is
0 to ponder if not hidden.
This patch changes the tests to reflect this, and adjust the
Koha::Items->filter_by_visible_in_opac implementation to adapt to this.
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Items.t
=> SUCCESS: Tests pass!
3. 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 a592ebb3bb115f05812f140e8528dc1297a9dbfa) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds a method based on the original idea from Nick, but on
Koha::Items.
The idea is to build a proper filter, based on the current rules for
hiding things, directly on the DBIC query. The caller takes care of
knowing if the filtering should apply (i.e. checking the patron category
exceptions) and then it would do something like:
my @items;
if ( <patron_category_does_not_have_exception> ) {
@items = $biblio->items->filter_by_visible_in_opac(
{
rules => $rules
}
);
}
else {
# still want to enforce 'hidelostitems'
@items = $biblio->items->filter_by_visible_in_opac;
}
To test:
1. Apply this patches
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Items.t
=> SUCCESS: Tests pass!
3. Look at the use cases on the tests, read the code
=> SUCCESS: It all makes sense
4. Compare with Koha::Item->hidden_in_opac
=> SUCCESS: It all makes sense
5. Sign off :-D
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> 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 2250cf0293c690c6d1e79090aa3cec7b43cb2797) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> 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 ab6711572a4b107684c9f1a7b3d7f98998714a61) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Fridolin Somers [Thu, 12 Nov 2020 09:11:33 +0000 (10:11 +0100)]
Bug 25054: Display search field aliases in Search Engine Configuration
It'd be great if the Search Engine Configuration page would display
the various aliases (shortcuts) available : ti for title, sn for local-number, etc.
Patch changes Koha/SearchEngine/Elasticsearch/QueryBuilder.pm to move
hard-coded vars at the beging and adds a method to provide to %index_field_convert via a method.
Test plan :
1) Use Elasticsearch
2) Go to Administration > Search engine configuration (Elasticsearch)
3) Check you see new column 'Aliases' with for example ti for title.
4) Perform a search 'ti:<title>' and check you get results
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit fd8aee927005f27fb10ed8944afbbd318e610dfb) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Lucas Gass [Wed, 13 Jan 2021 00:06:27 +0000 (00:06 +0000)]
Bug 26962: (follow-up) Catch other #000066 occurrences
Addtional test steps:
-Check printing an invoice, inscept the page and make sure none of the colors are set to #000066
-For the OPAC you must rebuild the CSS ((https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client)
-Look at some areas where you might print in the OPAC (try a list), inscept the page and make sure there is no colors set to #000066
-You can also use Jonathan's method of 'git grep -l -c 000066' to make sure no occurrences are left.
-I left macles.tt as is because I am not sure about that template
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f2a537c88b8b632eb3393a51012ca51c893e7ca5) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Lucas Gass [Fri, 6 Nov 2020 22:48:06 +0000 (22:48 +0000)]
Bug 26962: Make print.css pure black
Test plan:
1. Generate some different notice/slips like ISSUESLIP, HOLD_SLIP, any slip you like
2. Inspect and see that body, p tags and see that the computed color is #333333 or #000066.
3. Apply patch
4. The computed style for color should not be #00000
5. This prints much better, especially on thermal/receipt printers
Signed-off-by: David Cook <dcook@prosentient.com.au> 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 d0b82280f82f0846938bf101502c403a09cfc4e4) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Lucas Gass [Wed, 23 Dec 2020 20:47:32 +0000 (20:47 +0000)]
Bug 27306: Add subtitle to return-claims-table
To test:
-turn on claim returned
-find some items with a 245b or add a 245b to some items
-check those items out and mark them as claimed returned
-on the borrowers /cgi-bin/koha/circ/circulation.pl page look at the return-claims-table
-no subtitle
-apply patch and clear browser cache, restart_all
-now you should see the subtitle
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 ee6c4548ad27c3efd4c78956e70336baffb994b0) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Thu, 3 Dec 2020 12:06:46 +0000 (12:06 +0000)]
Bug 26713: Add pagination to bottom of saved SQL reports table
This patch adds a second pagination menu to the bottom of the report
results table.
To test, apply the patch and go to Reports.
- Run a report which will return multiple pages of results (greater
than 20).
- The results should display with a pagination bar at the top and bottom
of the table.
- Confirm that both pagination menus work correctly.
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 dbc74154754c4d5d03baa7c96b8511e0c2e0d036) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Thu, 24 Dec 2020 13:35:28 +0000 (13:35 +0000)]
Bug 27308: Skip blank lines when inserting new
The intent of the macro insert new function is to add a new field at the correct numerical place in the record. If you have a blank line while editing, however, the new line will be inserted at the blank line, rather than checking the rest of the record.
To test:
1 - Create a macro like
new 690=‡aLOCAL SUBJECT
2 - Insert a blank line into your record somewhere before where the 690 should be inserted
3 - Run the macro
4 - Line is inserted before the blank line
5 - Apply patch
6 - Reload (ensure cache is cleared and JS files are reloaded)
7 - Remove the previously created field, but leave the blank
8 - Run the macro
9 - Field is created at correct position
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 27308: (QA follow-up) Remove commented line
I don't think we need to keep the original line as a comment.. this
patch simply cleans it up.
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 3b0f86b53173d30da5dbb42710a7c9bf9edaa3bb) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Thu, 24 Dec 2020 14:04:55 +0000 (14:04 +0000)]
Bug 27307: Don't drop phrase directive when searching keyword index
We convert 'keyword' to '' as an index since we want it to search all fields
When we are searching 'as phrase', however, we should not drop the search type
To test:
1 - Enable IntranetCatalogPullDown
2 - Set searchEngine to Elasticsearch
3 - Perform a search for 'Keyword as phrase' for a phrase that does appear in a record
4 - You get the result
5 - Reverse the order of words in the phrase
6 - You still get a result?
7 - Apply patch
8 - Restart all the things
9 - Reversed search does not return record
10 - Correct order and search, correct record returned
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9cfce5f010c485ee5e046bcc99a9d33a70d9213a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Mon, 23 Nov 2020 18:37:48 +0000 (18:37 +0000)]
Bug 26957: Don't remove words that are also operators from search terms
FindDuplicate has a hardcoded regex to remove 'and', 'or', and 'not' from any search fields, however,
is does this with no regard for these terms being embedded in the middle of a word or phrase.
E.g.:
'Coupland' becomes 'Coupl'
'Frog and toad' becomes 'frog toad'
etc.
This patch simplay removes the substitutions as we already quote the terms as well
To test:
1 - Add records to your system like:
The night circus by Erin Morgenstern
Frog and toad all year
Nothing ever happens
2 - Attempt to add purchase suggestions like
title: the night circus, author:Morgenstern, Erin
title: For and toad all year
title:nothing ever happens (case is important)
3 - No warnings about existing biblios
4 - Apply patches
5 - Delete existing suggestions
6 - Repeat step 2
7 - Each attempt should warn you of existing biblio
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a52a9d787544aae384aee1a33c9d3bb35d98f8fa) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>