David Nind [Fri, 8 Jul 2022 12:25:01 +0000 (12:25 +0000)]
Bug 31122: Terminology - Replace occurences of 'Notices & slips' with 'Notices and slips'
Replace occurences of 'Notices & slips' with 'Notices and slips'
(replacing '&' and '&' with 'and'), as per the terminology
guidelines.
See the terminology list:
https://wiki.koha-community.org/wiki/Terminology
Test plan:
1. Find occurrences of 'Notices & slips':
- git grep 'Notices & slips' -- :^misc/translator/po
- git grep 'Notices & slips'
2. Review places in the staff interface where 'Messages & slips' is
displayed:
- Tools home page
- Tools > Notices & slips: page title and breadcrumb
- Other breadcrumbs:
. Tools > Notices & slips > New notice > [select any module]
. Tools > Notices & slips > [select Edit for any notice]
. Tools > Notices & slips > [select Delete for any notice]
3. Review other occurences:
. The cron job description for misc/cronjobs/holds/holds_reminder.pl:
misc/cronjobs/holds/holds_reminder.pl -man (scroll down to the
description)
. The TalkingTech README file:
vi misc/cronjobs/thirdparty/TalkingTech.README
4. Apply the patch.
5. Re-run the grep queries from step 1 - no occurences are now found.
6. Review places where 'Notices & slips' was found in steps 2 and 3 -
these should all be replaced with 'Notices and slips' and should
read correctly.
7. Sign off!
Alernative: review the diff for the patch and check that occurences of
'&' and '&' are replaced with 'and' and the updated text reads
correctly.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Florian Bontemps [Wed, 29 Jun 2022 15:18:17 +0000 (15:18 +0000)]
Bug 31067: Fixing missing permission check
This patch just fixes a missing permission on the intranet main page. Currently, the Additional Content modules allows people to edit, modify or create new additional content just by checking if they have any tool permission at all, and not the right one.
To test:
1 - From the staff client, create a news article for the intranet.
2 - Create (or use) an additional staff patron, giving them the necessary permissions to access the intranet, but no tool permission.
3 - Using another browser (or incognito mode), log on the intranet page with your new staff account, you should be able to see the news content, but not edit or delete it. That's the expected behavior.
4 - From your main admin account, give your test account the edit_additional_contents permission.
5 - Your test account should now be able to edit/delete the news content. This is also expected behavior.
6 - Using the main account again, remove this time the edit_additional_contents but add any other subtool permission (edit_calendar is a good one for instance)
7 - Repeat step 5 and confirm that your test account can still edit or delete the news content. This shouldn't happen.
8 - Apply patch
9 - Repeat steps 4-6, and confirm that your test account can now only edit or delete news content if they have the edit_additional_contents permission enabled.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Tue, 28 Jun 2022 10:06:57 +0000 (10:06 +0000)]
Bug 30769: Typo fix in request.tt
This patch fixes a small typo at
koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt:574
To test:
1 - Set item-level_itypes in administrative preferences to
bibliographic record
2 - Navigate to /reserve/request.pl in admin interface
3 - Notice that the typo is there in hold details
4 - Apply Patch
5 - Typo is fixed
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Petro Vashchuk [Tue, 21 Jun 2022 13:02:51 +0000 (16:02 +0300)]
Bug 31001: Fix "CGI::param called in list context" warning in basket.pl
CGI param basketno should be explicitly scalar,
or else error log gets flooded with this warning:
AH01215: CGI::param called in list context from
/home/vagrant/kohaclone/acqui/basket.pl line 175, this can lead to
vulnerabilities. See the warning in "Fetching the value or values of a
single named parameter" at /usr/share/perl5/CGI.pm line 412.
This patch fixes it by working with it in a scalar context.
The functionality still remains the same but warning doesn't flood
error log.
To reproduce:
1. Head over to the acquisitions page.
2. Pick existing vendor with email contact info or create a new one.
3. Create a new basket or use existing one, and if it doesn't have
any orders, add a new order to it.
4. Use the "E-mail order" button to send order.
5. Check the error log and find the upper mentioned warning.
(Note: if you're going to test this more than once, you might need
to restart your Plack in order for this warning to get added to your
log file again, reasons of that is that the authors of CGI.pm decided
to "warn only once")
6. Apply the patch.
7. Use the "E-mail order" button again, ensure that the same warning
doesn't get added to the log file again.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Thu, 16 Jun 2022 10:33:31 +0000 (12:33 +0200)]
Bug 30976: Display biblio's cover images first
If one add cover images at item's level, then biblio level, the cover images
of the items are displayed first on the main "cover slider" at the top of the page.
We should displayed biblio cover images first, then the ones for the items.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Fridolin Somers [Mon, 20 Jun 2022 21:23:32 +0000 (11:23 -1000)]
Bug 30903: (follow-up) Fix error message class
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 7 Jun 2022 13:57:35 +0000 (15:57 +0200)]
Bug 30903: Fix UI glitch on the quotes upload view
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 7 Jun 2022 13:56:59 +0000 (15:56 +0200)]
Bug 30903: Fix POST /quote
quote_id should not be required
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Mason James [Wed, 6 Jul 2022 10:54:55 +0000 (22:54 +1200)]
Bug 31108: rename ./t/00-check-atomic-updates.pl extension to *.t
to test...
1/ run prove, test is not run :(
prove ./t | grep 00-check-atomic-updates.pl | wc -l
0
2/ apply patch
3/ run prove, test is run :)
prove ./t | grep 00-check-atomic-updates.t | wc -l
2
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Marion Durand [Thu, 21 Oct 2021 08:00:21 +0000 (08:00 +0000)]
Bug 21903: (follow-up) koha-dump can export uploaded and temporary uploaded files
Minor improvment on display.
Solve the error message if the folder for uploaded temp files
doesn't exist.
Sponsored-by: Orex
Test plan:
- Apply the patch
- Try using koha-dump without any option
- Try using koha-dump with --uploaded_files
- Try using koha-dump with --uploaded_temp_files
- Try using koha-dump with both of the options above
Expected results: the .tar.gz dump will include uploaded and/or temporary
uploaded files if requested.
Change message and solve the error message if no temporary folder
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 21903: koha-dump can export uploaded and temporary uploaded files
Sponsored-by: Orex
Test plan:
- Apply the patch
- Try using koha-dump without any option
- Try using koha-dump with --uploaded_files
- Try using koha-dump with --uploaded_temp_files
- Try using koha-dump with both of the options above
Expected results: the .tar.gz dump will include uploaded and/or temporary
uploaded files if requested.
Signed-off-by: Hugo Agud <hagud@orex.es> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 24865: (QA follow-up) Remove hardcoded notice name from protected_letters
If the letter has been removed, fall back to itemnumber/due date. (Title is
no longer fetched.) We may assume that the notice is present.
Note: The option to 'protect' a notice may need some more thought. Perhaps
it needs to be an attribute on itself.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested by deleting notice, running fines again. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Kyle Hall [Thu, 17 Feb 2022 14:23:28 +0000 (09:23 -0500)]
Bug 24865: Customize the Accountlines Description
It would be great if we could customize what information was added to the "Description of charges" field when a fine was made so data could be stored even when the item is deleted.
Test Plan:
1) Create an overdue checkout that will get a fine
2) Run fines.pl
3) Note the description for the fine
4) Delete the fine from the database
5) Apply this patch
6) Run updatedatabase.pl
7) Restart all the things!
8) Run fines.pl
9) Note the description of the fine is unchanged
10) Delete the fine again
11) Browse to Slips & Notices
12) Edit the new notice OVERDUE_FINE_DESC
You will have access to the objects checkout, item, and borrower
13) Run fines.pl
14) Note your new description was used
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Fri, 22 Nov 2019 11:33:41 +0000 (12:33 +0100)]
Bug 24010: DB Changes
Amended-patch: adjusted to new atomic update format
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Fri, 13 May 2022 15:14:26 +0000 (15:14 +0000)]
Bug 24010: Number of issues to display to staff accepts non-integer values
This patch modifies the subscription entry form so that it will perform
a check on the staffdisplaycount and opacdisplaycount fields before
proceding to the second step. It verifies that the values are numeric.
The changes are made in the style of the existing form validation, which
should be rewritten to either use the validation plugin or to peform
checks in a way that all checks are run before warning the user.
However, this smaller change will work in the meantime.
To test, apply the patch and go to Serials -> New subscription.
- Fill out the form with at least the required fields, but put something
other than a number if the "Number of issues to display to staff" and
"Number of issues to display to the public" with non-numeric characters.
- When you click the "Next" button you should get an error message,
"Number of issues to display to staff must be a number."
- Correct the issues to display to staff field and submit again.
- You should get a different error message, "Number of issues to display
to the public must be a number."
- Correct this field and you should be able to proceed to the next step.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Lucas Gass [Fri, 6 May 2022 21:50:05 +0000 (21:50 +0000)]
Bug 30716: Add collection to cn_browser results
To test:
1. Go to MARC bibliographic framework, pick a framework and go to 952, subfield "o". Turn the cn_browser plugin on.
2. Pick or create an item in that framework, edit that item.
3. TO the right of the 952$o notice the "...". Click that start the call number browser.
4. Notice there is no column for collection.
5. Apply patch, restart_all
6. Notice there is now a column for with the items collection.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Katrin Fischer [Mon, 6 Jun 2022 21:34:26 +0000 (21:34 +0000)]
Bug 30567: Fix price formatting when adding a manual invoice with CurrencyFormat FR
In input fields we always use the decimal . while the display format
uses the decimal separtor definded by CurrencyFormat. When adding a
manual invoice without this patch, the amount is shown with comma, but
it should be . in the input field.
To test:
1- Go in Administration->Debit types
2- Click on New debit type
3- Fill the form:
Code: USEDBOOK
Default amount: 0.50
Description: Used book
Can be manually invoiced: Yes
4- Save
5- Go to any patron account
6- Go to the "Accounting" tab
7- Click on "Create manual invoice"
8- Fill the form
9- Choose the created debit (Used book)
10- Verify that the format is incorrect (0,50 instead of 0.50)
11- Apply the patch
12- Verify the amount is now using the correct format
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Tue, 19 Apr 2022 15:31:41 +0000 (15:31 +0000)]
Bug 30566: Incorporate link handling in OPAC's biblio-title include
This patch modifies the biblio-title include so that it can be used to
link to the bibliographic record using the default biblio view.
On pages where the biblio-title include was wrapped in an anchor tag, a
link parameter is added: [% INCLUDE 'biblio-title.inc' link=> 1 %]
To test, apply the patch and view the following pages in the OPAC to
confirm that titles are displayed correctly and that the link to the
bibliographic record is correct:
- Log in to the OPAC: On the "your summary" page, check checkouts,
overdues, holds, and article requests.
- Check the "your holds history" page.
- Locate a bibliographic record and click "Save to your lists."
In the popup, the title should be displayed correctly without a link.
- Place a hold, and check the hold confirmation page.
- Check the "Recent comments" page.
- Locate a record which has a local cover image attached, and view the
image.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Katrin Fischer [Fri, 17 Jun 2022 20:20:08 +0000 (22:20 +0200)]
Bug 30990: Fix DefaultHoldPickupLocation system preference description
Changes:
* branch to library
* staff client to staff interface
* adds an ending .
To test:
- Compare system preference descrpition before and after the
patch was applied.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Thu, 28 Apr 2022 08:28:50 +0000 (09:28 +0100)]
Bug 30275: (follow-up) Drop renewer_id constraint
This patch fixes some unit tests by ensureing we set a valid userid for
mock userenv setting so that the foreign key constraint doesn't fail and
it also removes the exception class and check for renewer_id from the
store method as, for example with autorenewals, the renewal may not have
been triggered by a actual user.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 30275: (QA follow-up) Rename columns to match API
This patch performs the following column renames:
* id => renewal_id
* issue_id => checkout_id
The idea is that no translation is needed for the API, and also, being a
new table, we can educate the users into the 'to be' terminology we are
leaning towards, instead of having them learn one naming to create
reports and then need to translate them once we normalize things in a
future.
That said, this is simple to review.
Apply this patch and repeat the test plan.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Fri, 18 Mar 2022 13:57:32 +0000 (13:57 +0000)]
Bug 30275: Fix checkouts.t unit test
We no longer require a mocked userenv for these tests to pass, we're
setting the userenv in api auth now. The mock just serves to break tests
for the renew method now that AddRenewal required a correctly set
userenv for 'number'.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Fri, 11 Mar 2022 13:04:24 +0000 (13:04 +0000)]
Bug 30275: Generated kohastructure.sql
This kohastructure update was generated using `koha-dump --schema-only`
in koha-testing-docker once the atomicupdate had been run against the
previous atomicupdate patch.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Isobel Graham [Thu, 30 Jun 2022 16:16:08 +0000 (17:16 +0100)]
Bug 30785: Fixed typo in SIP2SortBinMapping
To test:
1. Go to the admin page.
2. Search for the above preference.
3. Confirm that "Will" is now spelled correctly.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Fridolin Somers [Tue, 28 Jun 2022 06:08:33 +0000 (20:08 -1000)]
Bug 26311: (follow-up) Fix undefined values in sprintf
Avoid warns 'Use of uninitialized value in sprintf' by using
'0' if lower age is undefined
'unlimited' if upper are is undefined
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 26311: (follow-up) loop through the patron with date of birth and in categories having age limits
Also added category limits in message, for example (12-18)
Check patron :
- with no date of birth
- with invalid age in category having age required
- with invalid age in category having upper age limit
- with invalid age in category having age required and upper age limit
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Katrin Fischer [Mon, 14 Sep 2020 07:07:01 +0000 (07:07 +0000)]
Bug 26311: (QA follow-up) Rephrase output message
This is a suggestion for rephrasing the message slightly:
Before:
* Patron borrowernumber=15 in category 'J' has invalid age '56'
After:
* Patron borrowernumber=37 has an invalid age of 37 for their category 'K'
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Fridolin Somers [Thu, 27 Aug 2020 15:21:14 +0000 (17:21 +0200)]
Bug 26311: Add patron invalid age to search_for_data_inconsistencies.pl
Patron categories may have age limits.
Add to script misc/maintenance/search_for_data_inconsistencies.pl the list of patrons which age is invalid regarding there category.
Test plan :
1) Create an adult patron category limited to 18-99 years
2) Create a patron in the category
3) Edit in database its date of birth so that he is 17 years old
4) Run misc/maintenance/search_for_data_inconsistencies.pl
=> You see the patron
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Fri, 24 Jun 2022 11:44:09 +0000 (11:44 +0000)]
Bug 31040: jsTree image being used outside of jsTree plugin
This patch corrects OPAC templates which tried to use a jsTree image
asset which is missing following the jsTree upgrade (see Bug 11873).
Templates should use /images/spinner-small.gif instead.
To test, apply the patch and enable OpenLibrarySearch and populate
OverDrive and RecordedBooks preferences with credentials (they don't
have to be valid).
Perform a catalog search in the OPAC. When the search results page first
loads you should see messages about the services being queried:
Each should show a working "spinner" image while the queries are being
performed. If you have valid OverDrive credentials you can try clicking
through to the OverDrive search results page to confirm that the image
is working on that page too.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Wed, 29 Jun 2022 11:23:22 +0000 (11:23 +0000)]
Bug 31066: Update javascript to use 'text_plugin' type for regex option
To test:
1 - Confirm 952$o is not linked to a plugin in the default marc framework
2 - Send some tiems to batch modification
3 - Confirm you can select RegEx as an option for callnumber during modification
4 - Link 952$o to the cn_browser.pl plugin
5 - Repeat batch modification
6 - Note there is no regex option
7 - Apply patch
8 - Confirm there is a regex option
9 - Unlink 952$o from plugin
10 - Confirm you still have a regex option in batch modification
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Fri, 24 Jun 2022 14:39:07 +0000 (15:39 +0100)]
Bug 29958: Do not set dateaccessioned on updates
This patch reomves the second occurence of setting daeaccessioned today,
outside of the 'add/update' handling in Koha::Item->store.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Fri, 29 May 2020 14:10:58 +0000 (16:10 +0200)]
Bug 25622: Use special chars in DB password (koha-create)
On bug 23250 we decided to generate a password without special chars
then add a '@' at the end to comply with MySQL policy.
That is wrong, we should handle correctly the special chars we don't
want to be part of the password.
Confirm that you don't see one of the following chars : ' & \ < > /
2.
Copy from src and edit /usr/sbin/koha-create to add an echo $mysqlpwd
Create several instances, like:
koha-create --create-db x
koha-create --create-db xx
koha-create --create-db xxx
...
When you see a password with a special chars, do:
koha-shell xxx
grep '<pass>' $KOHA_CONF
And make sure the password does not contain "__DB_PASS__"
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Kevin Carnes [Tue, 22 Feb 2022 13:29:15 +0000 (14:29 +0100)]
Bug 30152: Elasticsearch - queries with OR don't work with limits
When a query with "OR" is combined with a limit in Elasticsearch, the precedence is not preserved and the results are not correct.
To test:
1) Set SearchEngine to Elasticsearch
2) Index records in Elasticsearch
3) Do an advanced search
4) Select More options
5) Enter a value for the first Keyword (e.g. Novels)
6) Change "and" before the second Keyword to "or"
7) Enter another value for the second Keyword (e.g. Prose)
8) Limit the search (e.g. Item type Books)
9) Do the search
10) Observe that records with the first keyword are not in the results
11) Apply the patch
12) Repeat the search
13) Observe that results with both keywords are in the results
14) Sign off
Sponsored-by: Lund University Library Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Fridolin Somers [Thu, 30 Jun 2022 04:40:35 +0000 (18:40 -1000)]
Bug 30430: (QA follow-up) Several fixes
Several fixes :
- Replace tab with spaces
tag_210 :
- Class 'value' and not 'valeur'
- Loop on subfields must restrict to abcdg otherwise last() may not be
correct (ie 214r and 214s)
tag_214 :
- Condition for coma after b should be same as after a : "position() != last()"
tag_210 and tag_214 :
- Space before ':' like in other fields
- ':' before c or g does not exist in opac, removed from intranet file
- Search links in intranet fixed (where composed with opac-search ^^)
- Search links using 'str:encode-uri' like other places
- Simplify title attribute with only 'Search for publisher' => Bad idea
to use double quotes in a text
tag_214_s and tag_214_r :
- Loop on field+subfield otherwise last() may not be correct
I've fixed intranet and copied to OPAC (only adapted search links)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
test plan :
- Apply patch
- Find a record with a B214
- Check on both Opac-Details and Opac-Result that the field is
displayed.
- Do the same checks on catalogue/search results and catalogue/details
in Staff interface.
- Add a 210 field to the record (legacy)
- It should be displayed as well
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Fri, 13 May 2022 17:12:36 +0000 (17:12 +0000)]
Bug 30859: Upgrade jQuery Validation plugin from v1.19.1 to v1.19.4
This patch updates the jQuery Validation plugin in both the OPAC and
staff interface. This upgrade brings the plugin to the current latest
version (1.19.4) which includes compatibility fixes for the latest
version of jQuery.
To test, apply the patch and test various forms in the OPAC and staff
interface to confirm that validation is still working correctly.
In the OPAC:
- Patron self-registration: Required fields, password match
and complexity. Test also the "Forgot password" and "Change password"
interfaces.
In the staff interface, for example:
- Patrons -> Patron password change: Required fields, password match and
complexity.
- Administration -> Patron categories -> New category:
- Required fields
- One or the other enrollment period inputs
- Digits required in password expiration, age required, upper age
limit
- Numbers required in enrollment and hold fee.
- Administration -> Budgets -> New budget:
- Required fields
- End date must be after start date
- Administration -> Cities & towns: Required fields
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Bug 31062: Change description of QOTD tool in tools-home
This patch changes the name and description of the QOTD tool in order
to make them more consistent with the other tool names and descriptions.
To test:
1) Go to Tools
2) Read the QOTD tool name and description, make sure they make
sense and that there are no typos
3) Test the link to make sure it goes to the tool
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
David Cook [Wed, 29 Jun 2022 08:46:21 +0000 (08:46 +0000)]
Bug 31064: Wrap local login with stylable element
Test plan:
0. Apply patch
1. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=OPACUserCSS
2. Set syspref to the following:
.local-login {
display: none;
}
3. Go to http://localhost:8080/cgi-bin/koha/opac-main.pl
3b. Note that the local login boxes are hidden
("Log in to your account:" remains so that other login options can
be supplied by OpacUserJS)
4. Click on "Log in to your account" on the top toolbar
4b. Note that the local login boxes are hidden
("Log in to your account:" remains so that other login options can
be supplied by OpacUserJS)
5. Go to http://localhost:8080/cgi-bin/koha/opac-user.pl
5b. Note that the local login boxes are hidden
("Log in to your account" remains so that other login options can be
supplied by OpacUserJS)
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Aleisha Amohia [Mon, 6 Jun 2022 23:52:59 +0000 (23:52 +0000)]
Bug 30823: Filling recalls uses 'FILL' action in action logs
This enhancement changes recall fulfillment actions to log with the
FILL action. It will also update existing recalls FULFILL actions in
the database to use the FILL action.
To test:
1) Enable the UseRecalls system preference and set up your
recalls-related circulation rules. Confirm RecallsLog is enabled.
2) Check out an item to Patron B.
3) Log into the OPAC as Patron A and search for the item.
4) Place a recall on that item.
5) Go back to the staff client and check the item in. Confirm the recall
as waiting for Patron A.
6) Check out the item for Patron A to fill the recall.
7) Go to Tools -> Log Viewer. Confirm there is a FULFILL action. Choose
the following search params to browse system logs:
- modules: recalls
- actions: fill
8) Submit the search and confirm the recall DOES NOT show.
9) Apply the patch, update database, restart services.
10) Refresh the log viewer and repeat step 7. Submit the search and
confirm the recall DOES show. Confirm there is no longer a FULFILL
action as both holds and recalls will use FILL.
11) Check in the item.
12) Repeat steps 2-6. We are ensuring that future recalls are logged
using the FILL action.
13) Repeat step 7. Confirm all test recalls are now showing in search
results.
Sponsored-by: Catalyst IT Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Mon, 27 Jun 2022 16:53:15 +0000 (17:53 +0100)]
Bug 31085: Reload return claims table on resolve
This is another fix for a bug in return claims. We now test for the
initialised datatable and call an ajax reload directly on it if we find
one instead of calling a undefined function (the function is out of
scope here).
NOTE: Taken as a whole commit follow-up on bug 28854 where the issue was
initially identified
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Mon, 27 Jun 2022 16:20:55 +0000 (17:20 +0100)]
Bug 31087: Prevent stringification of null in return claims
The return claims table was stringifying 'null'. This patch updates the
code to check for definition so we don't stringify incorrectly
Note: This patch was split out from a follow-up on bug 28854 as we felt
it should be treated separately for backportability.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
David Cook [Mon, 30 May 2022 03:31:44 +0000 (03:31 +0000)]
Bug 30865: Double-quote Host-item in Koha::Biblio->get_components_query
This patch adds double quotes around the term qualified by "Host-item"
in Koha::Biblio->get_components_query().
Without them, reserved charactrs like "=" will cause syntax errors like
"CCL parsing error (10014) Unknown qualifier ZOOM for query:
Host-item=(MyTitle = Mysubtitle)
at /usr/share/koha/lib/C4/Search.pm line 245."
Test plan:
0) Don't apply the patch
1) Create biblio with title and subtitle like (MyTitle : MySubtitle)
2) Note the warning "There was an error searching for analytic records,
please see the logs for details." on the detail page
3) Apply the patch
4) koha-plack --restart kohadev
5) Refresh the detail page
6) Note that the warning message is gone
7) prove t/db_dependent/Koha/Biblio.t
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Wed, 25 May 2022 14:51:41 +0000 (15:51 +0100)]
Bug 30744: Use RecordProcessor in get_marc_notes
This patch utilises RecordProcessor to filter the MARC::Record for the
right interface prior to constructing the marc notes array. We also
remove the use of C4::XSLT for replacing AV values in the MARC fields in
preference to using the RecordProcessor filter.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Tue, 7 Jun 2022 12:45:14 +0000 (13:45 +0100)]
Bug 30918: Allow passing filtered record to get_marc_notes
This patch does the absolute bare minimum to prevent private notes from
appearing on the OPAC.
Test plan
1. Go to Koha Administration -> Koha bibliographic frameworks
2. View the MARC structure for your BKS framework (or something else)
3. Search for tag 583, edit subfields
4. Go to subfield 'x' - nonpublic note. Confirm the OPAC visibility
checkbox is UNCHECKED.
5. Edit or create a record using the BKS framework. Put a note in the
583$x.
6. View this record in the OPAC
7. Go to the Title notes tab. Confirm the non-public note is
showing, even though the framework says it should not be
visible via the OPAC.
8. Apply patch
9. Confirm the non-public note is no longer visible
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Mon, 13 Jun 2022 13:26:33 +0000 (14:26 +0100)]
Bug 30848: Fix issue exposed by unit tests
This patch changes the 'map' to a simple for loop so that we can easily
map multiple subfields to a field without overwriting the first previous
subfields in the structure.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Thu, 26 May 2022 09:24:50 +0000 (10:24 +0100)]
Bug 30848: Add an ExpandCodedFields RecordProcessor filter
This patch introduces a RecordProcessor filter for MARC::Record objects
that replaces Koha codes with descriptions in the MARC::Record passed to the processor.
Martin Renvoize [Mon, 20 Jun 2022 15:27:51 +0000 (16:27 +0100)]
Bug 30889: Unit tests - process
This patch adds corresponding unit tests for the 'process' side of this
patchset. We check that the Context for the job to run in as set from
the Job context recorded at enqueue time.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Mon, 20 Jun 2022 15:01:28 +0000 (16:01 +0100)]
Bug 30889: Unit tests
This patch adds a unit test for the 'enqueue' part of the bug. We check
that the mocked context (and interface) are recorded with the job
enqueue in the new 'context' field.
We do not yet test the 'process' end, where we then read the context out
and set the job Context from it.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 7 Jun 2022 12:41:14 +0000 (14:41 +0200)]
Bug 30889: Set interface to 'intranet'
Is that correct?
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 7 Jun 2022 12:39:44 +0000 (14:39 +0200)]
Bug 30889: Set userenv for background jobs
We need to set the userenv when we process the jobs. It is useful for
stats (at least)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Tue, 28 Jun 2022 10:06:57 +0000 (10:06 +0000)]
Bug 31058: Fix import AutoUnsuspendHolds
This patch corrects missing import
To test:
1 - perl misc/cronjobs/holds/auto_unsuspend_holds.pl
2 - It dies
Undefined subroutine &main::AutoUnsuspendReserves called at misc/cronjobs/holds/auto_unsuspend_holds.pl line 38.
3 - Apply patch
4 - run again
5 - It succeeds!
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Katrin Fischer [Fri, 17 Jun 2022 22:34:45 +0000 (22:34 +0000)]
Bug 30939: Fix use statement for DelAuthority
Without this patch, the script won't delete any
unused authorities, but gives an error instead
and dies:
Undefined subroutine &main::DelAuthority called at ./misc/migration_tools/remove_unused_authorities.pl line 98.
To test:
- Run from koha-shell:
./misc/migration_tools/remove_unused_authorities.pl -t
- Verify several authorities are reported as unused
- ./misc/migration_tools/remove_unused_authorities.pl -c
- Verify the error message is shown when the first unused
authority is found and the script stops
- Apply patch and rerun:
./misc/migration_tools/remove_unused_authorities.pl -t
- Verify the error is gone, the script finishes and auhorities
are deleted
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Wed, 11 May 2022 15:47:59 +0000 (16:47 +0100)]
Bug 30677: Use lookahead in regex for biblioitem replacement
This patch takes Andrew's suggested fix using a lookahead regex to
correct our biblio vs biblioitem table name replacements.
Please use the preceeding unit test patch proposed by Jonathan to test.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Fri, 6 May 2022 11:53:01 +0000 (13:53 +0200)]
Bug 30677: Add tests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Wed, 4 May 2022 17:40:27 +0000 (17:40 +0000)]
Bug 30937: Add a detail view for libraries
This patch adds a view page for libraries, so that the user isn't
required to edit the library to see information about it.
To test, apply the patch and log into Koha as a user with permission to
manage libraries.
- In the list of libraries you should see that the library name in the
first column is now a link.
- When you click the link you should be taken to a view of all the
information about the library.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Petro Vashchuk [Mon, 16 May 2022 14:04:18 +0000 (17:04 +0300)]
Bug 30775: Make 952w to have datepicker plugin by default
This field (Price effective from) is very similar to 952d,
but it doesn't have dateaccessioned.pl plugin by default,
Apart of worse usability of this it is also allows to enter wrong
date which will be converted in 0000-00-00 in DB and even lead to
crashes by code in other places.
So, adding this plugin not only improves usability (user can have
datepicker) but also adds date field validation.
Test plan:
1. Head over to MARC frameworks from your administration page,
check 952 subfield structure of your default framework structure.
2. dateaccessioned.pl is set as a plugin for 952d by default
but is missing from 952w.
3. Apply the patch and reset your koha, drop db and use reset_all alias.
4. Check frameworks structure again and ensure that datepicker plugin
is set by default for 952w.
5. Edit some item to ensure that datepicker works for that 952w.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Wed, 23 Mar 2022 14:11:47 +0000 (14:11 +0000)]
Bug 26486: Group edit buttons in reports toolbar
This patch modifies the reports interface to change the reports toolbar
in two ways:
1. The Edit, Duplicate, and Delete buttons are now combined into a
button menu. My original idea was to have it be a split button, but
the logic for handling various permissions made the template logic
too convoluted.
2. The "Show SQL code" button is converted to a "Single toggle" button
(https://getbootstrap.com/docs/3.3/javascript/#buttons-single-toggle).
This type of button is specifically designed for this kind of
interface element.
This patch includes indendation changes, so please diff accordingly.
To test, apply the patch and go to Reports -> Saved reports.
- Logged in as a user with Create and Delete report
permissions:
- View an SQL report. In the toolbar you should see an "Edit" button
menu with three options: Edit, Duplicate, and Delete. Check that all
work correctly, including a deletion JavaScript confirmation dialog.
- Logged in as a user with Create but not Delete report permissions, you
should see an "Edit" button menu with two choices: Edit and Duplicate.
- Logged in as a user with Delete but not Create report permission (??)
you should see only a standalone delete button.
- Logged in as a user with Execute report permission, run an SQL report.
Test the "Show SQL code" button. The text should change to "Hide SQL
code" and the button should be styled to look like its "pressed"
state.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>