This patch fixes a warning in the unit tests
Test plan:
1) prove t/db_dependent/api/v1/password_validation.t
2) There will be a warning in the output - 'Use of uninitialized value $status in numeric eq (==)'
3) Apply patch
4) Re-run the test
5) The warning will disappear
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Some actions such as archiving a suggestion were not being logged.
By moving the logging to Koha::Suggestion we can ensure more
modifcations will be logged.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
To test:
1. Apply patch, restart services, updatedatabase
2. Search for the system preference 'SuggestionsLog', it should be off.
Turn it on.
3. Create a purhase suggestion
4. Go to Tools > Log viewer. In modules check 'Suggestions'
5. You should see your newly created suggestion.
6. Create a suggestion from the OPAC.
7. You should see your newly created OPAC suggestion.
8. Modify the suggestion and check the logs again, the modification
should be logged.
9. Delete the suggestion, the deletion should be logged.
10. Do a purchase suggestion via the OPAC.
11 Check the logs to see the newly created suggestion, the interface
should be OPAC.
12. Turn off SuggestionsLog
13. No changes of any kind should be logged.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Ray Delahunty <lib-systems@arts.ac.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
To test:
1. Apply patch, restart services, updatedatabase
2. Search for the system preference 'SuggestionsLog', it should be off.
Turn it on.
3. Create a purhase suggestion
4. Go to Tools > Log viewer. In modules check 'Suggestions'
5. You should see your newly created suggestion.
6. Modify the suggestion and check the logs again, the modification
should be logged.
7. Delete the suggestion, the deletion should be logged.
8. Do a purchase suggestion via the OPAC.
9. Check the logs to see the newly created suggestion, the interface
should be OPAC.
10. Turn of SuggestionsLog
11. No changes of any kind should be logged.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Ray Delahunty <lib-systems@arts.ac.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
The log viewer (Tools > Additional tools > Log viewer) uses
'Intranet' as:
- an option for filtering what log entries to display.
- a value in the log entries interface column, for log entries.
Koha's terminology guideline is to use 'Staff interface' instead of
'Interface' (https://wiki.koha-community.org/wiki/Terminology#I).
Test plan:
1. Perform some actions that will create log entries when using the
staff interface. For example:
1.1 Enable the UseRecalls system preference.
1.2 Edit the title for a record.
1.3 Add an item for a record.
2. Use the log viewer to view the logged changes:
2.1 Go to Tools > Additional tools > Log viewer.
2.2 Select Submit.
2.3 Log entries are displayed for the changes made.
3. Note that:
3.1 For the log viewer 'Interface' filter options, "All" is
selected by default, and other options are Intranet, OPAC,
SIP, Command-line, REST API, and Cron job.
3.2 For the changes viewed in step 2, the value displayed in
the 'Interface' column is 'Intranet'.
4. Apply the patch.
5. Refresh the page.
6. Note that:
5.1 For the interface filter options, 'Intranet' is now changed
to 'Staff interface'.
5.2 In the list of log entries, the value in the interface column
is now 'Staff interface'.
7. Sign off D:
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
To test:
1. Set noItemTypeImages to 'Don't show'
2. Find a record with items and notice the holdings table never loads.
3. APPLY patch, maybe clear borwser cache too.
4. Try again, the holdings table should load.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Since Bug 36323 moved koha_perl_deps.pl it is not needed anymore in 00-strict.t
It fails with :
koha_1 | Can't stat koha_perl_deps.pl: No such file or directory
koha_1 | at /usr/share/perl5/Test/Strict.pm line 151.
Patch remove koha_perl_deps.pl from @dirs.
It contains misc.
Test plan :
prove t/db_dependent/00-strict.t
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
To test:
1. Go to a patron account and click on “New purchase suggestion” under the “Purchase Suggestions” tab.
1. Clicking on the button will take you to the suggestions management page.
2. Apply the patch.
3. Go back to the patron account and click on the “New purchase suggestion” link again. This time it will take you to the purchase suggestion form. You are now able to successfully submit a purchase suggestion.
4. Sign off and have an amazing day. :D
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
This patch adds a hint to the end of the script to notify the end user
that they may need to run the build_holds_queue cronjob if they are
using RealTimeHoldsQueue.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
If RealTimeHoldsQueue is on, touch_all_biblios triggers a update_holds_queue_for_biblios background job for each affected record. This will result in a as many background jobs being queued up as records! It makes far more sense for this script to not do that which gives the administrator the option for running the holds queue builder if the changes would affect holdability, or to not run it at all.
Test Plan:
1) Run touch_all_biblios.pl
3) Note a update_holds_queue_for_biblios background job is queued for each record touched
4) Apply this patch
5) Merge touch_all_biblios.pl again
6) Note that no update_holds_queue_for_biblios jobs were queued
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
I think there was a rebase issue here where we split the form into two
forms instead of one. This patch returns us to one form with two
different submit options (one for selected tags and one per tag) that
both trigger the confirmation modal before submitting to the controller.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This adds a type to the request (mocking it as a new ILL request of type journal being submitted)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch silences more warnings. To test
1. Be on 23.11.x
2. Apply the patches before this one
3. Run:
$ ktd --shell
k$ prove t/db_dependent/Illrequests.t
=> FAIL: Lots of warnings like this:
Subroutine Koha::Illrequest::SUPER::status redefined at /kohadevbox/koha/Koha/Object.pm line 955.
Subroutine Koha::Illrequest::SUPER::status_alias redefined at /kohadevbox/koha/Koha/Object.pm line 955.
illrequestattributes is DEPRECATED in favor of extended_attributes at t/db_dependent/Illrequests.t line 1071.
4. Apply this patch
5. Repeat 3
=> SUCCESS: No more warnings!
6. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This removes the "Dismiss" button from the SCO module. Currently, the
"Dismiss" button is present, however it does not function properly and
logs the user out if they press it. As noted on previous chats, keeping
the button would require serious changes, thus it's easier just to remove
the functionallity.
To test:
1) Enable WebBasedSelfCheck
2) Add an OPAC mesaage to a patron account
3) Login to self check ( http://localhost:8080/cgi-bin/koha/sco/sco-main.pl )
4) See the OPAC message, click dismiss.
5) Notice you are logged out at redirected to:
( http://localhost:8080/cgi-bin/koha/opac-dismiss-message.pl )
6) Apply patch
7) Log back into the self checkout module
8) Notice that there is no longer a "Dismiss" button for the message.
9) Log into OPAC into the same user's account
10) On the summary page, note that there is still a dismiss button.
11) Ensure this still works properly
12) sign-off
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
When one makes a GET call to holds endpoint and hold has
item attached to it, item_id is handled as string not integer
as it should.
To reproduce:
1. Make sure you have hold waiting in your database.
2. Call endpoint api/v1/holds/?q=[{"me.status":"W"}].
=> Note that holds item_id is displayed as item_id: "12345".
3. Apply this patch.
4. Call endpoint again.
=> item_id should now be displayed as 12345.
Also prove t/db_dependent/api/v1/holds.t.
Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch changes the process of removing a tag from a title on the
user's tag list. It now uses a confirmation modal dialog instead of a
JavaScript alert.
The patch also makes some minor tweaks to CSS to correct style on
"remove" links.
To test, apply the patch and rebuild the OPAC CSS.
- Log in to the OPAC as a user who has submitted multiple tags or tags
on multiple items.
- Open the "Tags" link in the sidebar of the user summary page.
- Click the "Remove tag" link next to one of the titles in the table
of the user's tags.
- You should see a modal confirmation message, "Are you sure you want
to remove the selected tag from this title?" It should show the
title and the tag which will be removed.
- Test both the "Yes, remove tag" and "No, do not remove tag" choices.
- Check the box next to one of the tagged titles and click the
"Remove selected tags" button at the bottom of the table.
- You should see a modal confirmation message, "Are you sure you want
to remove this item from the list?" It should show the title and
the tag which will be removed.
- Test boh the "Yes" and "No" choices.
- Check the box next to multiple tagged titles and click the
"Remove selected tags" button at the bottom of the table.
- You should see a modal confirmation message, "Are you sure you want
to remove the selected tags from these titles" It should show the
titles of all the records you selected and the corresponding tags to be
removed.
- Test both the "Yes" and "No" choices.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
I created a new system preference, SMSSendMaxChar, which allows you to set a limit for the number of characters in SMS messages to send. When a limit is set, messages that exceed it will be trimed.
TEST PLAN
1) Apply the patch
2) Run prove t/db_dependent/Letters.t
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds the following languages into advanced search "Languages" dropdown:
Greenlandic
Karelian
Cornish
Burmese
Punjabi
Pashto
Finnish Kalo
Akkala Sami
Kildin Sami
Ter Sami
Pite Sami
Kemi Sami
Ume Sami
Southern Sami
Northern Sami
Sami languages
Lule Sami
Inari Sami
Skolt Sami
Somali
Sotho
Votic
To test:
1. perl installer/data/mysql/updatedatabase.pl
2. Go to intranet advanced search
3. Click "More options"
4. See "Limits" fieldset, it should have "Language" drop down
5. Observe that the languages provided in this patch are visible in this dropdown
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Just noting that the order in this dropdown is hopeless.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch restores the plack.middleware.Koha.CSRF plack env setting to
allow passing to the errorDocument.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Update the note for the BlockExpiredPatronOpacActions system preference to
make it clearer, and to follow the standard convention for notes.
Order of options for 'Block expired patron OPAC actions' when editing the
patron category changed to alpabetical order, to match the system preference
order.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
New can_patron_place_ill_in_opac method to include all rules
that need checking to determine if a patron is allowed
to place an ILL request on the OPAC or not.
Added effective_BlockExpiredPatronOpacActions_contains rule to
this new method.
Test plan, k-t-d,:
1) Install FreeForm and enable ILLmodule, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
1.5) Checkout FreeForm's reorganize_ILL branch:
cd /kohadevbox/koha/Koha/Illbackends/FreeForm
git checkout reorganize_ILL
koha-plack --restart kohadev
2) Edit a patron category, visit:
<staff_url>/cgi-bin/koha/admin/categories.pl
3) Set 'Placing an ILL request' for the "Block expired patrons" input config
4) Add a new patron of one of the above category, make sure this patron is expired (set an expirydate to the past).
5) Login as that user and visit ILL page in OPAC:
/cgi-bin/koha/opac-illrequests.pl
6) Confirm there is no "Create a new request" button
7) Access the create a new request page url directly:
<opac_url>/cgi-bin/koha/opac-illrequests.pl?op=add_form&backend=FreeForm
8) Confirm you get a 403 page
9) Set the 'Block expired actions' to "Follow system preference BlockExpiredPatronOpacActions"
10) Test different values of the BlockExpiredPatronOpacActions system preference and confirm the behaviour matches what's configured
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Access {staff_url}/api/v1/patron_categories and notice all is as expected
Update some patron category's blocked expired patron OPAC actions and access the endpoint again, notice it's okay.
Updated API tests to include to_api confirming attributes are rendered correctly:
prove t/db_dependent/api/v1/patron_categories
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This is a squash of several improvements:
- Override weird blue color being applied from MultipleSelect when all options from an optgroup are selected;
- Fix input width depending on selected value. Now it should always be same width regardless;
- Updated the system preference UI wording to reflect new behavior;
- Updated UI labels in the patron category edit page to enforce that the actions being selected are "actions to be blocked"
- Corrected sysprefs.sql entry
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Address new new version of system pref
Address new version of categories DB table BlockExpiredPatronOpacActions column
Test plan, k-t-d, BEFORE applying patch:
1) Edit some patron categories, visit:
/cgi-bin/koha/admin/categories.pl
2) Set different values for the "Block expired patrons" input config
Set a category to block
Set a category to don't block
Set a category to follow the syspref
3) Take note of the current value of the BlockExpiredPatronOpacActions sys pref
Apply patch, then run the following commands
- koha-plack --restart kohadev
- yarn css:build
- run updatedatabase
4) Visit the patron categories you edited before, make sure they all have the correct values for the new config type
5) Check the BlockExpiredPatronOpacActions sys pref and make sure the new value is correct according to what was before
6) Add a new patron of one of the above categories, test that:
If 'hold' is a blocked action, patron is unable to place a hold in OPAC
If 'renew' is a blocked action, patron is unable to renew in OPAC
If 'follow sys pref' is the option, check that a patron may place a hold or renew an item according to the BlockExpiredPatronOpacActions sys pref value
prove t/db_dependent/Circulation.t
prove t/db_dependent/ILSDI_Services.t
prove t/db_dependent/Koha/Object.t
prove t/db_dependent/Koha/Patron/Categories.t
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
The sys pref now allows multipleselect values instead of YesNo
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Account for multiple values param
Input is now multipleselect select
JavaScript
Staff CSS updates to account for multiselect dropdown in categories admin page
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Check for 'renew' when appropriate
Check for 'hold' when appropriate
The following command must return nothing before this is pushed to
master:
git grep "\beffective_BlockExpiredPatronOpacActions\b"
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
effective_BlockExpiredPatronOpacActions
is now
effective_BlockExpiredPatronOpacActions_contains
This method has been updated to now consider an action param.
Returns true if the given action is to be blocked to expired
patrons or not.
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch fixes an error on the B_address2 field which sets it to be
required incorrectly
Test plan:
1) In PatronSelfRegistrationBorrowerMandatoryField, set B_address to be
required.
2) In the OPAC, navigate to the self registration form.
3) In the Alternate address section, fill in the Address field that you
have just set to be required. Ensure that you leave the Address 2
field blank.
4) Fill in all other required fields and submit the form, it should show
you that the Address 2 field is required, even though it shouldn't be
5) Apply patch
6) Refresh the page and repeat steps 1-5, it should allow youto submit
the form
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch fixes the ILL request table to display authors for journal article request types
Test plan:
1) Create an ILL request with the type of Journal Article and add an author in the Article author field
2) Click on the List requests button to see the table
3) The Author field should be blank for the request you created
4) Apply patch
5) Hard refresh the browser to reload the javascript
6) The author field should now be visible
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>