Bug 30663: Add x-koha-override options to /suggestions
This patch adds the x-koha-override header parameter to the route that
is used to create suggestions, POST /suggestions.
The idea is that adding suggestions will be rejected under certain
conditions unless x-koha-override is passed with appropriate values. The
added overrides are:
* any
* max_total
* max_pending
Tests are added for the expected behavior.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This methods follow basically what's done in opac-suggestions.pl
I chose 'pending' as opposed to 'open' to follow what we use in the UI
which might be the case because of being more accurate for end users.
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Suggestions.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Thu, 5 May 2022 12:11:32 +0000 (13:11 +0100)]
Bug 29616: (QA follow-up) Use /public endpoints on OPAC
This patch updates the new modal to use the /public version of the
libraries endpoint for fetching library data. This ensure the feature
works as expected prior to patron login.
Nick Clemens [Thu, 21 Apr 2022 11:02:54 +0000 (11:02 +0000)]
Bug 30577: Move item specific pickup locations to the left
When placing holds, staff will set the pickup location at the top,
choose an item, then place the hold.
It is easy not to notice the item specific locations dropdown.
This patch moves it in line with the other selction areas on the request screen.
To test:
1 - Find a record on staff client, place hold
2 - Select a patron to load the request screen
3 - Note the location dropdown for next available hold
4 - Note the item specific locations on the far right
5 - Apply patch
6 - Reload the page
7 - Note the item specific location dropdowns are now moved to the left
8 - Place the hold, verify it works with the dropdowns
9 - Verify title levelholds still work as expected
10 - Verify multi-holds still work
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Wed, 6 Apr 2022 18:00:14 +0000 (18:00 +0000)]
Bug 30475: Convert tools pages tabs to Bootstrap (part 2)
This patch converts jQueryUI tabs on three tools templates to Bootstrap
tabs. The patch contains indentation changes, so diff accordingly.
To test, apply the patch and go to Tools -> Export.
- You should see at least two tabs, "Export bibliographic records" and
"Export authority records."
- Confirm that they look correct and work correctly.
Go to Tools -> Batch patron modification.
- Check the "By card number," "By borrowernumber," and "By patron list"
tabs.
Go to Tools -> Overdue notice/status triggers.
- Check the "First," "Second," and "Third" tabs.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Tue, 12 Apr 2022 17:26:03 +0000 (17:26 +0000)]
Bug 30474: (follow-up) Tie editor initialization to tab activation
The way Bootstrap tabs manipulate the DOM, CodeMirror has problems
initializing correctly, I think because of redraws and CodeMirror's
attemps to position things absolutely.
The solution seems to be to wait until after a Bootstrap tab has
activated before initializing the CodeMirror instance. This patch
implements that, along with a check to prevent double-initializing the
same textarea.
I've also made a similar change to the way TinyMCE is initialized, which
I hope will help with the issue of the editor not always loading
correctly.
To test, apply the patch and go to Tools -> HTML customizations.
- Test creation and editing of HTML customization entries using both
the default editor and the text editor (Edit -> Edit with text
editor).
- Verify that the editor (CodeMirror or TinyMCE) loads correctly and
looks correct, both upon page load and upon switching tabs between
"Default" and other language tabs
- Verify that your edits are saved correctly.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Wed, 6 Apr 2022 15:35:47 +0000 (15:35 +0000)]
Bug 30473: Convert suggestions page tabs to Bootstrap
This patch updates the suggestions page to use Bootstrap tabs
instead of jQueryUI.
To test you should have multiple suggestions from different libraries,
different item types, and different statuses.
Apply the patch and go to Suggestions.
- Suggestions should initially be displayed in tabs by status.
- Confirm that the tabs look correct and work correctly.
- Test that tabs work correctly for each option in the "Organize by"
dropdown in the left-hand sidebar.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds a temporary deprecation warning to let users know the
plugin needs to get updated before the next release.
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Plugins/Holds_hooks.t
=> SUCCESS: Tests pass, warning is displayed
3. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds a new 'after_hold_action' hook, that is called with the
'placed' action parameter.
To test:
1. Apply the unit tests patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Plugins/Holds_hooks.t
=> FAIL: Boo, the hook is not called
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Wed, 15 Dec 2021 09:09:22 +0000 (10:09 +0100)]
Bug 29698: Make items available for PREDUEDGST
With this patch you can access items using:
Number of items [% items.count %]
[% FOR i IN items %]
[% SET checkout = i.checkout %]
Item [% i.itemnumber %] is due on [% checkout.date_due | $KohaDates %]
[% END %]
== test plan ==
1. Add the following to PREDUEDGST and DUEDST:
Number of items [% items.count %]
[% FOR i IN items %]
[% SET checkout = i.checkout %]
Item [% i.itemnumber %] is due on [% checkout.date_due | $KohaDates %]
[% END %]
2. Find a patron and set there messaging prefs 'Item due' and 'Advanced
notices' so they get an email and 'digest only'.
On 'Advanced notices' set Days in advance to 1.
3. Check some things out to a patron and make them due tomorrow.
4. perl /kohadevbox/koha/misc/cronjobs/advance_notices.pl -v -c
5. Check the patrons notices and make sure the PREDUEDGST looks right.
6. Check some things out to a patron and make them due today.
7. Repeat 4.
8. Check the patrons notices and make sure the DUEDGST looks right.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Thu, 14 Apr 2022 18:02:22 +0000 (18:02 +0000)]
Bug 30549: Replace the use of jQueryUI Accordion on pending patron updates page
This patch updates the pending patron updates page to use Bootstrap
collapse instead of jQueryUI.
This patch contains whitespace changes, so view the diff with this in
mind.
To test, apply the patch and rebuild the staff client CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
- If necessary, log into the OPAC and submit an update via the "Your
personal details" page. Ideally do this for two or more patrons.
- In the staff client, follow the "Patrons requesting modifications"
link.
- On the "Update patron records" page you should see the headings
representing each of the patrons with pending updates. The first panel
should be expanded.
- Confirm that the panels expand and collapse correctly.
- Follow the "Patron details" link for one of these patrons.
- Click the "Review pending modifications" link on the patron detail
page.
- When the update page opens that patron's panel should be expanded.
Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Thu, 21 Apr 2022 18:17:41 +0000 (18:17 +0000)]
Bug 28138: (follow-up) Add empty option to payment type selection
This patch adds an empty <option> to the "Payment type" selection when
paying fine. This forces the user to actively make a selection. I've
also added the text "None selected" to the other empty <option> on the
page for consistency.
To test, apply the patch and test the pay fine interface with and
without the RequirePaymentType preference enabled. When enabled the
payment type should be required and it should default to "None
selected."
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Julian Maurice [Tue, 13 Apr 2021 08:06:24 +0000 (10:06 +0200)]
Bug 28138: Add syspref to make the payment type required
The payment type is already required when using the cash register
feature, but some users want to force selecting a payment type even
when cash registers are not used
The new system preference name is RequirePaymentType
Test plan:
1. Apply patch and run updatedatabase.pl
2. Disable UseCashRegisters and RequirePaymentType sysprefs
3. Create some authorised values in PAYMENT_TYPE category if needed
4. Create a manual invoice and pay it. Notice that the payment type is
optional.
5. Enable RequirePaymentType
6. Create a manual invoice and pay it. Notice that the payment type is
now required.
7. Enable UseCashRegisters and verify that the payment type is always
required, even if RequirePaymentType is disabled
Rebased by Thibaud Guillot <thibaud.guillot@biblibre.com> on 21-12-02
Signed-off-by: shiyao <shiyao@inlibro.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 30600: Fix recall reasons for branch transfers
When a recall triggers a branch transfer, the reason for the transfer is
'Recall'.
When a transfer is cancelled that was triggered by a recall, depending
on where it is cancelled, will use the 'Manual' or 'CancelRecall'
cancellation reasons.
This patch ensures branchtransfers.cancellation_reason adds 'CancelRecall',
and branchtransfers.reason adds 'Recall' as options.
Sponsored-by: Catalyst IT Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Wed, 23 Feb 2022 16:09:07 +0000 (16:09 +0000)]
Bug 30167: Use returned renewal date rather than fetching
This patch updates the three scripts that fetched the soonest renewal date
to use the return from CanBookBeRenewed
To test:
1 - Set a circulation rule with a 'no renewal before' set to 3, loan length set to 5
2 - Check out an item to a patron that uses this rule
3 - Verify the checkouts for the patron show the correct 'No renewal before' date
4 - Sign in to the patron's opac account
5 - Verify the item shows it cannot be renewed, and shows the correct date
6 - Go to Circulation->Renew
7 - Attempt to renew using barcode
8 - Confirm error shows the soonest renewal date
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Fri, 22 Apr 2022 09:46:06 +0000 (10:46 +0100)]
Bug 28998: (QA follow-up) Improve output on error
This patch updates the output_and_exit call to instead pass an error
parameter in the template and use it to display the warning instead of
the rest of the page content in the 'Manage two-factor authentication'
page.
This allows for translation and makes the page adhere to normal
practices.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Fri, 10 Sep 2021 09:27:33 +0000 (11:27 +0200)]
Bug 28998: Introduce Koha::Encryption
Test plan:
Run t/db_dependent/Koha/Encryption.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[AMENDED] Added copyright line to module. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Tue, 3 May 2022 07:06:41 +0000 (08:06 +0100)]
Bug 30536: Fix Query.t Unit Test
The stash_embed method no longer validates the query so this patch drops
the validation tests and instead just focuses on varifying the correct
output structure of the stash after the method call.
We have not lost validation however, it now happens only once at the
OpenAPI level and tests are present in t/db_dependent/api/v1/query.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Thu, 14 Apr 2022 15:06:24 +0000 (16:06 +0100)]
Bug 30536: Update spec files
This patch removes superflous x-koha-embed defintions at the top level
of the endpoint specifications. It also replaces a few x-koha-embeds at
the top level with parameter lists where this had been missed in
preceeding patches.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Thu, 14 Apr 2022 12:47:06 +0000 (13:47 +0100)]
Bug 30536: Remove validation overhead
With the introduction of proper validation of collection headers in
OpenAPI we no longer need to do our own validation here.
This patch removes the early validation of x-koha-embed headers in
preference to letting OpenAPI do it once and only once instead.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Thu, 14 Apr 2022 11:22:27 +0000 (12:22 +0100)]
Bug 30536: Refer to parameters enum
This patch updates the stash_embed method to use the parameters hash
enum instead of the top level x-koha-embed custom definition. This way
we can remove the requirement for defining this list twice.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds tests to make sure there's no behavior change regarding
error conditions. When requests include wrong x-koha-embed values, a 400
error should be returned, both in our original implementation or relying
on the Mojolicious::Plugin::OpenAPI features.
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/api/v1/query.t
=> SUCCESS: Tests pass
3. Apply the rest of the patches
4. Repeat 2
=> SUCCESS: Tests still pass
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Rudolf Byker [Wed, 8 Jan 2020 09:20:02 +0000 (11:20 +0200)]
Bug 10517: Use `DROP USER IF EXISTS` and remove ` || true`.
When restoring a Koha instance, and the database user does not exist, an error is shown,
although it is prevented from stopping the script by ` || true`. This patch removes the
` || true` guard, and rather uses `DROP USER IF EXISTS` which does exactly what one
would expect, without confusing error messages, whether the user existed or not.
To test:
1) Assume your Koha instance is called `asdf`.
1) Export the Koha instance using `koha-dump`.
2) Remove the instance completely using `koha-remove`.
3) Import it again using `koha-restore`.
4) No error should be shown, and the import should work. There was NO user to drop, therefore `DROP USER IF EXISTS` did nothing.
5) A database user called `koha_asdf` should exist, and have all privileges on the database of the same name.
6) Remove the instance again using `koha-remove`.
7) Now create a database user in MySQL called `koha_instance` where instance is the name of your dumped koha instance.
8) Import your koha instance again using `koha-restore`.
9) Again, no error should be shown, and the import should work. There WAS a user to drop, therefore `DROP USER IF EXISTS` dropped the user before creating a new one.
10) Again, a database user called `koha_asdf` should exist, and have all privileges on the database of the same name.
Sponsored-by: Reformational Study Centre Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Thu, 24 Mar 2022 11:42:55 +0000 (11:42 +0000)]
Bug 29537: Remove unnecessary if-else checks for soonest renew date
GetSoonestRenewDate() calculates the renewal due date now also
correctly for auto-renewals after the fixes from bug 29476 so we don't
have to add any if-else checks because of it being buggy anymore.
To test:
1) prove t/db_dependent/Circulation.t
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Wed, 19 May 2021 10:54:49 +0000 (10:54 +0000)]
Bug 22785: (follow-up) Don't sort by chosen and fix selection of matches
Previously the sorting took 'chosen' into account and would move a selected match to the
top on next load - it is better to preserve the same sorting every time
When loading matches the 'cehcked' variable was not being cleared, so multiple matches were
being marked 'checked="checked"'. Fixing this ensures the correct record displays as chosen
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Ben Daeuber <bdaeuber@cityoffargo.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Mon, 4 Jan 2021 14:23:52 +0000 (14:23 +0000)]
Bug 22785: Update Schema for boolean
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Ben Daeuber <bdaeuber@cityoffargo.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Mon, 31 Aug 2020 17:01:24 +0000 (17:01 +0000)]
Bug 22785: Allow option to choose which record match is applied during import
This patchset adds the display of all matches found during import to the import management screen
A staff member with the permission to manage batches will be able to select for any individual record which match, or none, should be used during import
To test:
1 - Import a batch of records or export existing records from your catalog
2 - Import the file (again) and select a matching rule that will find matches
3 - Note that you now have radio buttons allowing you to select a record, or none
4 - Test scenarios:
I - When 'Action if matching record found' is 'Ignore'
a - Imported record ignored if match is selected
b - 'Action if no match found' followed if no match is selected (Ignore matches)
II - When 'Action if matching record found' is 'Replace'
a - The chosen record is the one overlayed (you can edit the chosen record before importing to confirm)
b - 'Action if no match found' followed if no match is selected (Ignore matches)
III - When 'Action if matching record found' is 'Add incoming record'
a - Record is added regardless of matches
5 - Confirm 'Diff' 'View' links work as expected
6 - Confirm that after records are imported the radio buttons to choose are disabled
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Bug 22785: API files
Signed-off-by: Ben Daeuber <bdaeuber@cityoffargo.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Fri, 1 Apr 2022 15:50:32 +0000 (15:50 +0000)]
Bug 30436: Convert article requests tabs to Bootstrap
This patch converts the jQuery tabs on the article requests page to
Bootstrap.
To test you should have the "ArticleRequests" system preference
enabled. If necessary, create some article requests and mark some
"Pending," some "Processing," and leave some new.
- Apply the patch and go to Circulation -> Article requests.
- The page should show three tabs: New, Pending, and Processing.
- The tabs should look correct and work correctly.
- The DataTables under each tab should work correctly.
Owen Leonard [Wed, 20 Apr 2022 12:53:27 +0000 (12:53 +0000)]
Bug 30466: Convert serials pages tabs to Bootstrap
This patch modifies three serials templates in order to replace jQueryUI
tabs with Bootstrap tabs.
To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
- Go to Serials.
- Perform a serials search which will return one or more results.
- On the search results page you should see an Open and Closed tab.
- The tabs should look correct and work correctly.
- Confirm that "Select all" and "Clear all" controls work correctly in
each tab.
- Click one of the search results to view the details for that
subscription.
- You should see tabs for Information, Planning, Issues, and Summary.
You may also see an Acquisition details tab depending on your data.
- In the sidebar menu click "Serial collection."
- On this page you should see tabs corresponding to each year the serial
has been received.
- Under each tab the "Select all" and "Clear all" controls should work
correctly in the context of that tab. Other controls should apply to
all tabs.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Stenberg [Wed, 26 Aug 2015 18:22:30 +0000 (20:22 +0200)]
Bug 14242: Use ISBN-field to automatically fill out purchase suggestions
Add new jQuery plugin "autofill" which transforms selected element(s)
into search fields for Google Books API and automatically fills
requested fields with search result.
Use in OPAC purchase suggestions to automatically fill out fields when
entering ISBN-number.
Test plan:
1. Run updatedatabase.pl
2. Enable system precference "OPACSuggestionAutoFill"
3. Log into OPAC and go to purchase suggestions page
4. Write a valid ISBN (such as 0-9690745-2-2 or 978-1-78416-110-1) into
the ISBN field and click the 'search google books' button, or unfocus
the field.
5. Title, Author, Publisher, publication year and Item Type fields should now be filled
automatically.
6. Press "clear form" to undo - should restore all fields that the API pull
filled to empty
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Thu, 14 Apr 2022 18:27:47 +0000 (18:27 +0000)]
Bug 30550: OPAC recalls page tries to use jQueryUI datepicker
This patch updates the recalls page in the OPAC so that it uses
Flatpickr for the "Recall not needed after" field.
To test apply the patch and enable the UseRecalls preference if
necessary. You made need to update your circulation rules as well,
defining some default values for recalls.
- Log in to the OPAC.
- Locate a bibliographic record which has one item and that item is
checked out.
- Click "Place recall."
- The "Recall not needed after" field should be styled correctly, and
clicking it should trigger the calendar popup.
- You should be limited to selections after today's date.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Tue, 5 Jan 2021 13:42:20 +0000 (14:42 +0100)]
Bug 27344: Implement Elastic's update_index_background using Koha::BackgroundJob
This patch adds a background job submodule, UpdateElasticIndex, to deal
with async ES index update (not the deletion).
Using NYTProf (on a checkin):
Without
618ms, executing 35676 statements and 26355 subroutine calls in 266 source files and 83 string evals.
With
521ms, executing 13282 statements and 7979 subroutine calls in 195 source files and 26 string evals.
However there are some problems with this patch:
1. We don't want *all* the index update to be in the background_jobs
tabtle (we could add a filter on the list view)
2. We don't track the "progress" of the job as we are sending all the
records to Elastic. It is okish in my opinion but it must be noted.
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Marcel de Rooy [Fri, 21 Jan 2022 07:58:45 +0000 (07:58 +0000)]
Bug 29894: Send a confirmation notice
When registering or deregistering, send a confirmation.
Test plan:
Register or deregister with patron having email address.
Verify that you got a confirmation mail.
Run t/db_dependent/Koha/Auth/TwoFactorAuth.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Marcel de Rooy [Thu, 13 Jan 2022 14:27:36 +0000 (14:27 +0000)]
Bug 29873: Create QR code
Instead of using deprecated Google Charts API, and exposing our
secret in a GET parameter, we generate QR data ourselves.
Test plan:
[1] Enable two factor authentication in the prefs.
[2] Login in staff. Go to account. Select Manage 2FA.
[3] Verify that QR code is displayed.
[4] Register the QR in your authenticator app and test 2FA
by logging in again.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested with Google Authenticator and FreeOTP.
Bug 29873: (follow-up) Rename qr_dataurl
As requested by a QA team member.
We're moving to qr_code as method name. This is the same name as
the method in the underlying base class.
Apart from one sed statement, changing to self->SUPER on one line.
Test plan:
Can you still register, logout and login?
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 29873: (follow-up) Switch to GD
We do not need a new module, we could use GD instead.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
As asked on comment4:
[1] Add a required div as a visible hint when applicable.
[2] Differentiate alert for hold start and end date.
Test plan:
See former patch.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Marcel de Rooy [Tue, 15 Feb 2022 15:25:59 +0000 (16:25 +0100)]
Bug 30108: Allow making hold dates required
Side note: Template still referred to class holddateto while not
being used any longer. Replaced this occurrence by futuredate.
Test plan:
[1] Disable OPACAllowHoldDateInFuture.
[2] Set pref OPACMandatoryHoldDates to "end date".
[3] Verify that the end date is mandatory on opac-reserve.
[4] Set pref OPACMandatoryHoldDates to "start date".
[5] Verify that no dates are required.
[6] Enable OPACAllowHoldDateInFuture.
[7] Verify that start dates are required.
[8] Set pref OPACMandatoryHoldDates to "no dates".
[9] Verify that no dates are required again.
Bonus:
Check that more options box is opened when a date still is required.
In case of item level being forced, verify that more options is opened
regardless of pref setting.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Marcel de Rooy [Thu, 17 Feb 2022 13:22:35 +0000 (13:22 +0000)]
Bug 30108: Preference description
Test plan:
Check the preferences form, tab Circulation, tab Hold policy.
Look for OPACMandatoryHoldDates.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Marcel de Rooy [Thu, 17 Feb 2022 12:55:20 +0000 (12:55 +0000)]
Bug 30108: Database revision, adding new preference
Test plan:
Run upgrade or new install.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Thu, 31 Mar 2022 18:23:53 +0000 (18:23 +0000)]
Bug 30424: Reindent advanced search template in the staff interface
This patch reindents the advanced search template. Some lines have been
split to make the markup more readable.
To test, apply the patch and test the advanced search page in the staff
interface. Everything should work as normal. Be sure to test both the
"More options" and "Fewer options" views.
When viewing the diff for this change, ignore whitespace. The only
visible changes should be split lines.
Owen Leonard [Fri, 8 Apr 2022 12:20:00 +0000 (12:20 +0000)]
Bug 30545: Replace the use of jQueryUI Accordion on the notices page
This patch updates the notices edit interface in order to replace
jQueryUI accordion and tabs widgets with Bootstrap collapse and tabs.
To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
- Set the TranslateNotices system preference to "Don't allow."
- Go to Tools -> Notices and edit any notice.
- On the "Modify notice" page you should see three collapsed sections:
Email, Print, and SMS.
- Clicking the section headings should expand and collapse the panels.
- With one of the panels open, click Save -> Save and continue editing.
- When the page reloads the same panel should be expanded.
- Enable the TranslateNotices system preference.
- Return to the edit interface for one of your notices.
- You should now see at least two tabs: Default and English.
- The sections under each tab should continue to work correctly.
- Test the "Save and continue" functionality again. When redirected you
should return to both the correct tab and the correct panel, e.g. the
"Print" section under the "English (en)" tab.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Thu, 7 Apr 2022 16:02:37 +0000 (16:02 +0000)]
Bug 30494: Replace the use of jQueryUI Accordion on the table settings page
This page updates the table settings page so that it uses Bootstrap's
"Collapse" feature instead of jQueryUI's Accordion.
To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
- Go to Administration -> Table settings.
- You should see a list of table settings which looks much the same as
it did before, with arrow icons prefixing each section header. All
panels should be collapsed.
- Test expanding and collapsing panels to confirm it's working
correctly.
- When you expand a section the heading arrow should change from
right-pointing to down.
- Make a change to one of the table configurations. After clicking
"Save" the page should reload with the same panel expanded.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>