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>
Jonathan Druart [Thu, 12 May 2022 09:52:45 +0000 (11:52 +0200)]
Bug 23991: Move SearchSuggestion to Koha::Suggestions
The C4::Suggestions::SearchSuggestion subroutine is badly written and
can be replaced by calls to Koha::Suggestions->search.
The hard part in this patch is suggestion.pl, the other occurrences have
been replaced easily.
Test plan:
The idea is to test the whole suggestion workflow.
1. Create a suggestion on OPAC
2. Create a suggestion on the staff interface
3. Edit suggestions
4. Filter suggestions (use the different filters and "organize by"
values)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 23991: Remove SearchSuggestion tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 23991: (QA follow-up) Save some DB queries
This patch makes the suggestion-related pages rely on array size instead
of querying the DB each time they need to. In the case of
suggestion/suggestion.pl it goes from 4 COUNT(*) to 1.
To test, with KTD:
1. Run on the host machine:
$ docker exec -ti koha_db_1 bash
$ mysql -ppassword
> SET GLOBAL general_log_file='/var/log/mysql/mycustom.log';
> SET GLOBAL log_output = 'FILE';
> SET GLOBAL general_log = 'ON';
> \q
$ tail -f /var/log/mysql/mycustom.log | grep suggestions
2. Visit the different pages changed on this bug
=> SUCCESS: Some queries
3. Apply this patch
4. Repeat 2
=> SUCCESS: Less queries!
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 23991: Fix branchcode and budgetid filtering
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 23991: Fix conflict with bug 28941
Well, this patchset fixed the security bug...
Redoing on top of bug 28941
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 23991: (follow-up) Missing semicolon
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 23991: Fix 'all' libraries
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 23991: (follow-up) Add value to filter_archived
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Wed, 1 Jun 2022 14:40:49 +0000 (14:40 +0000)]
Bug 30327: Add options for sorting components
This patch adds two new sysprefs:
ComponentSortField
ComponentSortOrder
These allow the user to choose how components should be sorted when displaying on the details page
of a record, and the corresponding search for all components
This also updates our search from simple_search_compat to search_compat to allow for sorting options
Note:
Some sorting under ES is unclear - this is a separate issue to be invesitgated
Our Zebra index does not offer 'record number' sorting, I will file a bug for that
To test:
1 - Enable UseControlNumber (or not)
2 - Add some components to a record by control number or title depending on above
3 - Enable ShowComponentRecords syspref
4 - View the record that has components
5 - Note they are not sorted
6 - Apply patch, updatedatabase
7 - reload record
8 - Note components are sorted by title ascending
9 - Try different values for ComponentSortField and ComponentSortOrder
10 - Confirm sorting changes with system preferences
11 - Repeat test on staff and opac, with ES and Zebra search engines
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Mon, 20 Jun 2022 13:20:58 +0000 (13:20 +0000)]
Bug 30994: Typo: item was on loan. couldn't be returned.
This patch updates some language in the inventory template to make it
readable and consistent: Punctuation fixed, capitalization made more
consistent, language corrections ("check in" instead of "return").
To test you can try to apply the patch and trigger the various errors in
the inventory interface, but it's probably enough to visually confirm
the changes in the patch.
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>
Alex Buckley [Wed, 22 Jun 2022 08:38:58 +0000 (08:38 +0000)]
Bug 30991: Fix remaining instances of [% ELSE %]0[% END %] in templates
The construct of [% ELSE %]0[% END %] breaks translations as it is
translated as [% ELSE %][% END %]. Note: No 0 in the ELSE statement.
This patchset either removes occurances of a lone 0 in template ELSE
statements, or splits it over multiple lines so the 0 is not removed in
the translated templates.
Test plan:
1. Install the en-NZ translation
2. Search the translated templates for '[% ELSE %][% END %]' and confirm
there are are instances of that
3. Apply patch
4. Update your en-NZ translation
5. Repeat step 2 and confirm there are no more instances of [% ELSE %][%
END %] in the translated templates
Note: I removed the [% ELSE %] statement from opac-bottom.inc as that
statement was empty in the en translation so it didn't look to be
needed.
Sponsored-by: Catalyst IT, New Zealand Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Thu, 16 Jun 2022 12:15:17 +0000 (13:15 +0100)]
Bug 29282: (QA follow-up) Class consistency
This patch updates the field classes introduced in this patchset to
improve class name consistency. We remove the _field apendment and to
repvent a clash we update the existing 'renewals' class elsewhere to
'renewals-info' to more clearly reflect it's content.
Test plan
1) The patchset should continue to function as described in prior patches
2) Build the CSS for the staff client
3) Check the 'Checkouts' table on various screens and confirm the
renewals information still displays as it always has in the table.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Lucas Gass [Fri, 13 May 2022 15:24:04 +0000 (15:24 +0000)]
Bug 29282: (follow-up) Account for otherholdings table
This patch accounts for the otherholdins table. To test:
1. Turn on SeparateHoldings
2. Find a record where the items are split by SeparateHoldings.
3. Make sure you can hide columns from the table in the Other holdings tab.
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Mon, 14 Feb 2022 19:14:58 +0000 (19:14 +0000)]
Bug 29282: Add issues and renewals columns to holdings tbale on details page
To test:
1 - Apply patch, restart all
2 - View a record with items in the staff client
3 - Note issues and renewals columns not shown
4 - Click the gear to edit visible columns
5 - Issues and renewals are present and hidden
6 - Click to view columns
7 - Confirm counts show, or 0 if item has not circulated/been renewed
8 - Circulate/renew an item
9 - Verify counts increase
10 - Make columns visible by default in Admin->Table settings
11 - Confirm columns show by default on details page
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Thu, 9 Jun 2022 18:30:10 +0000 (18:30 +0000)]
Bug 30936: (follow-up) Add markup comments
This patch adds comments to the template to highlight the markup
structure.
This patch should have no effect on the page's appearance or
functionality.
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>