To test:
1. APPLY PATCH
2. yarn build
3. cypress run --spec t/cypress/integration/Tools/ManageMarcImport_spec.ts
4. It should now pass
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch modifies the Acquisitions and Cataloging Z39.50 search forms
so that the pagination form includes a hidden ISSN input. This is
necessary for the form to submit the same search parameters each time
the user requests a new page of results.
To test, apply the patch and go to Acquisitions.
- Search for a vendor, and create a basket if necessary.
- Add to the basket and choose "From an external source."
- In the "ISSN" field, enter a partial ISSN number, e.g. 0361, and
search.
- At the bottom of the search results, click the "Next page" button.
- The second page of results should load correctly. At the top of the
table of results it should say "You searched for: ISSN: 0361"
- Perform the same test in Cataloging:
- Cataloging -> New from Z39.50/SRU
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Test plan (ktd):
1 - Have henry acevedo have no mail and set messaging preference "Hold filled to sms"
2 - Have edna acosta have not messaging preference
3 - Place an hold on two books for edna acosta and henry acevedo, check in both books and select the button to fill the hold
4 - Check in notices and see that both received a notice
5 - Apply tests and run tests -> they should fail
6 - Apply patch, run rest -> they should pass
7 - Unfill both holds and fill them back. Henry should keep receiving notices while Edna should not anymore.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Two unit tests have been moved/replaced to fit the desired behaviour
- "patron notified when item set to waiting" -> does not fit the desired behaviour.
The desired behaviour for mails/sms is already tested
The desired behaviour for prints is changed to "patron not notified if
no messaging preference is specified"
- "patron not notified a second time (bug 11445)" -> Moved into
_koha_notify_reserve tests
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
To test:
1. Set 'EasyAnalyticalRecords' to 'Show'.
2. Find or create a parent record that has at least 2 items on it. Note the itemnumbers and the framework.
3. Edit that framework so you can add a 773$0, 773$9, and 773$t
4. Find or create a child record.
5. Make at least 2 773 entries on the child record. Add the biblionumber of the host record to the 773$0.
6. In each entry for the 773$9 add one of the itemnumbers from the host record.
7. For the 773$t and the biblio title of the host record.
8. Save.
9. Now attempt to put a hold on the child record.
10. 500 error:
11. APPLY PATCH and restart_all
12. Try placing the hold again, this time it succeeds.
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
If you click Edit on a line with a note, the note field is not displayed
in the editing line and is blanked upon save (i.e., the note is lost,
even if you made no edits on the note). Value of the note is stored to
data-attribute which was changed to use Bootstraps own data-attribute.
So now the value must be fetched with keyword "bsContent" instead of
just "content".
To test:
1. Add note for a circulation rule.
2. Edit the rule.
=> Note that notes value is not displayed in editing row.
3. Apply this patch.
4. Edit rule again.
=> Note that notes value is now displayed as expected.
Sponsored-by: Koha-Suomi Oy
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
The term 'If any unavailable' is not very clear but it is also
very hard to find something short and better.
A next available hold is possible when at least one item is
unavailable (checked out, on order, waiting/transit hold).
A item level hold is possible when the specific item is
unavailable.
Test plan:
Read the patch. The code did not change.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch removes extra spaces breaking CSV parsing in tools like Excel.
To test:
1. Perform an item search selecting the CSV option
2. Open the CSV with a TEXT EDITOR of your choice
=> FAIL: Notice the extra spaces after the commas (those used as separators, no the ones within the double quotes)
3. Apply this patch
4. Repeat 1-2
=> SUCCESS: No extra spaces!
5. Sign off :-D
Note: On the first attempt you can open the file on Excel if you have it and notice things are not aligned.
Note2: Using double quotes on all fields regardless of the context works for most parsers, but is not correct CSV. Will deal with it on a separate bug.
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Adds a read-only "Consents" section to the staff patron detail page
showing the patron's consent status for GDPR (when PrivacyPolicyConsent
is enabled) and any plugin-defined consent types.
Each consent displays with visual status indicators:
- Green checkmark with timestamp when consent was given
- Red X with timestamp when consent was refused
- Gray "Not specified" when no consent recorded
Test plan:
1. Enable PrivacyPolicyConsent system preference
2. As patron in OPAC: give/refuse consent at "Your consents"
3. As staff: view patron detail page
4. Verify "Consents" section shows correct status and timestamp
5. Test with no consent recorded (should show "Not specified")
6. If available, test with plugin-defined consent types
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This change impacts the display of patron fields listed in system preferences:
BorrowerMandatoryField
BorrowerUnwantedField
PatronSelfModificationBorrowerUnwantedField
PatronSelfRegistrationBorrowerMandatoryField
PatronSelfRegistrationBorrowerUnwantedField
To test:
1 - confirm that the sysprefs listed above include "Alternate contact: First name (contactfirstname)" and "Alternate contact: Surname (contactname)"
2 - confirm that toggling the display of these fields hides/shows the Guarantor first name and Guarantor surname fields in a patron record
3 - apply patch, restart_all
4 - confirm that sysprefs now show "Guarantor first name (contactfirstname)" and "Guarnator surname (contactname)"
5 - confirm toggling the display of these fields still hides/shows the correct fields in a patron record in the staff client, in self-ref, and in OPAC self-modification
Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
To Test:
BEFORE APPLYING PATCH:
1- Go to any patron account > Add message
2- Add a message for: "Staff - Internal note"
3- Add a second message for: "OPAC - [NAME OF THE PATRON SELECTED]"
4- Add any language (I'll use french-Canada, fr-CA, in this case):
From your koha instance, enter on the command line:
./misc/translator/translate install fr-CA
5- Go to Administration > System preferences > enter language
6- Make sure to check 'Français (fr-CA)' box from the 'StaffInterfaceLanguages'preference and save.
7- Go back to the specific patron in which you added the messages
8- Switch language to 'Français' (bottom left corner)
9- Notice that:
--> 'OPAC' is still the same (Since we spell OPAC the same way in both english and french. However, it might not be the case in other languages).
--> 'Staff note' is not translated.
10- apply patch
AFTER APPLYING PATCH:
11 - From you koha instance, enter on the command line:
./misc/translator/translate update fr-CA
./misc/translator/translate install fr-CA
12- Reload patron's page
13- Notice that 'Staff note' is now translated
** You should see this output: 'Note interne'
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch updates the cataloging search results page so that the search
term is shown in the page title, breadcrumb, and headings.
To test, apply the patch and go to Cataloging in the staff interface.
- Perform searches which will return varying results:
- A search which returns records in both the catalog and the reservoir
(perform some Z39.50 searches if the reservoir is empty).
- A search which returns records in the catalog but not the reservoir.
- A search which returns records in the reservoir but not the catalog.
- A search which returns no results at all.
- In all cases, check the page title, breadcrumbs, and headings. Your
search term should appear as expected.
- Test that the correct strings are translatable. In this example I'm
testing fr-FR:
- Update a translation:
> gulp po:update
> cd misc/translator
> perl translate update fr-FR
- Open the corresponding .po file for the strings pulled from the
template e.g. misc/translator/po/fr-FR-messages.po
- Locate strings pulled from addbooks.tt for translation, e.g.:
#: koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt:93
#: koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt:207
#, fuzzy, perl-brace-format
msgid "No catalog search results for '{query}'"
msgstr "Résultats de recherche pour '{query}'"
- Delete the line starting with "#, fuzzy"
- Edit the "msgstr" string however you want (it's just for testing)
- Install the updated translation:
> perl translate install fr-FR
- Switch to your updated translation in the staff interface and perform
the same tests as above. The translations should appear as expected.
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch updates a batch of OPAC templates so that title tags can
be more easily translated.
To test, apply the patch and confirm that the following pages have
correct title tags:
- The summary page for a logged in user
- Most popular
- Purchase suggestions
- Recent comments
- Tags
- Lists
- List of lists
- List contents
- Send list
- Share a private list
- Send a cart
- View a subscription -> More details
- The opac-showmarc page isn't usually accessed directly but you can
test it by opening the URL, e.g.
http://localhost:8080/cgi-bin/koha/opac-showmarc.pl?viewas=html&id=5
- Self checkin (with SelfCheckInModule enabled).
- Self checkout (with WebBasedSelfCheck enabled).
- Self checkout help
- Self checkout slip
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This ensures that the 'Confirm request' will always be the first button in the toolbar.
Test plan:
1) Apply patch (skip this if sandbox)
2) Enable the ILLModule sys pref
3) Create a new request, visit:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
4) Add any type, '42' as cardnumber, any library. Click 'Create'.
5) Notice the 'Confirm request' button is shown first, and with the 'primary button' styling.
Signed-off-by: Photonyx <Headtummy@gmail.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This makes the button stand out from the other available actions
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Note: tests have to be performed on addReturn and have therefore been
added in a separate test
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch adds the optional 'tranferbranch' parameter to the
CanBookBeReturned routine. This allows for passing the correct
'ReturnToX' transfer to be tested at return time for transfer limit
restrictions.
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Mathieu Saby <mathsabypro@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
We want to prevent returns where the item cannot be transfered 'back to
where it came from (be that Homebranch or Holdingbranch as defined
respectively in the circulation rules).
This patch clarifies the tests further by testing this transfer
functionality distinctly from the 'AllowReturnToBranch' preference
functionality.
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Mathieu Saby <mathsabypro@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This follow-up patch actually fixes the issue.
This patch forbids a patron to return a book to a library
from where the book may not return to its home or holding library.
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Mathieu Saby <mathsabypro@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
I'm not sure about the requirements for this bug. This patch extends the
tests to cover the new combinations introduced and highlights exactly
what changes in the logic.. which appears to be fairly little.
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Mathieu Saby <mathsabypro@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Test case:
* UseBranchTransferLimits must be set
* define your branch transfer limit. Refuse transfers from libraryA to libraryB
* checkout a book owned by libraryB, from libraryB, with a librarian located at libraryB
* move the librarian to libraryA ("Set Library" link top/right)
* check-in the book => it's possible whatever your setup
After the patch, the behaviour respect the branch transfer limit parameter:
you can check-in if you accept transfers, you can't if you refuse them.
(Note: IndependantBranches must be OFF, otherwise it's not possible to do the checkin whatever the branch transfer limits)
TEST PLAN:
Note: older signoffs did not validate this test plan
Considering you use a ktd-like database.
Log in at centerville
Allow transfers between centerville, Midway and Franklin, don't allow transfers between Fairfield, Liberty and all other libraries. In addition, allow the transfer between Liberty and Midway
Transfer as much books as you can from Centerville to Midway.
Log in as Midway, check out as many books from Centerville as you can to Henry Acevedo. If you don't have enough books during the test plan, feel free to check out books again. During the whole test, without further precision, items checkout out in such conditions should be checked in.
You will also need 6 checked out floating books at midway
Note:
'-> ok' means the checkin is allowed
'-> not ok' means the checkin is not allowed
Apply patch
I - Test AllowReturnToBranch
During this part of the test plan, you want to have all following configuration :
'CircControlReturnsBranch' -> 'The library the item is checked in at'
In CIRC rules: 'Default holds policy and return policy' -> 'Item returns home' (make sure you have no other holds policy on any library)
'AllowReturnToBranch' -> as follows
1 - Set to "Either at the library the item is from or at the library the item was checked out from"
X a - Check in to Centerville -> ok
X b - Check in to Midway -> ok
X c - Check in to Franklin -> not ok
X d - Check in to Fairfield -> not ok
2 - Set to "Only at the library the item was checked out from"
X a - Check in to Centerville -> not ok
X b - Check in to Midway -> ok
X c - Check in to Franklin -> not ok
X d - Check in to Fairfield -> not ok
3 - Set to "Only at the library the item is from"
X a - Check in to Centerville -> ok
X b - Check in to Midway -> not ok
X c - Check in to Franklin -> not ok
X d - Check in to Fairfield -> not ok
4 - Set to "Any library"
X a - Check in to Centerville -> ok
X b - Check in to Midway -> ok
X c - Check in to Franklin -> ok
X d - Check in to Fairfield -> not ok
II - Transfer and check out 6 floating items at midway.
1 -
X a - Check in to Centerville -> ok
X b - Check in to Midway -> ok
X c - Check in to Franklin -> ok
X d - Check in to Fairfield -> ok
2 - Set 'AllowReturnToBranch' to 'home library'
X a - Check in to Centerville -> ok
X b - Check in to Midway -> not ok
III - Pathological & asymetrical cases.
During this part of the test plan, you want to have all following configuration :
'CircControlReturnsBranch' -> 'The library the item is checked in at'
'Default holds policy and return policy' -> 'Item returns home' (make sure you have no other holds policy on any library)
'AllowReturnToBranch' -> 'Any library'
FOR THIS PART OF THE TESTS ONLY (until IV): Don't allow tranfers from midway to centerville, but allow from centerville to midway
X 1 - Check in a book at midway -> not ok
Set 'Default holds policy and return policy' -> 'Item returns to issuing library'
X 2 - Check in a book at centerville -> ok
FOR THIS PART OF THE TESTS ONLY (until IV): Don't allow tranfers from centerville to midway
X 3 - Check in a book at centerville -> not ok
X 4 - Set 'AllowReturnToBranch' to "Only at the library the item was checked out from"
X a - check in to Centerville -> not ok
X b - check in to Midway -> not ok
IV - Test 'CircControlReturnsBranch'
(remove the precedent transfer restriction)
During this part of the test plan, you want to have all following configuration :
'Default holds policy and return policy' -> 'Item returns home' (unchanged)
'Default checkout, hold and return policy for Midway' -> 'Item returns to issuing library'
'Default checkout, hold and return policy for Franklin' -> 'Item floats'
'Default checkout, hold and return policy for Fairfield' -> 'Item returns to issuing library'
'Default checkout, hold and return policy for Liberty' -> 'Item returns home'
'AllowReturnToBranch' -> "Any library" (unchanged)
'CircControlReturnsBranch' -> as follows
1 - 'The library the item is checked in at'
X a - Check in to Centerville -> ok
X b - Check in to Midway -> ok
X c - Check in to Franklin -> ok
X d - Check in to Fairfield -> not ok
X e - Check in to Liberty -> not ok
2 - 'The library the current item is held by
X a - Check in to Centerville -> ok
X b - Check in to Midway -> ok
X c - Check in to Franklin -> ok
X d - Check in to Fairfield -> not ok
X e - Check in to Liberty -> ok
3 - 'the library the item is owned by'
X a - Check in to Centerville -> ok
X b - Check in to Midway -> ok
X c - Check in to Franklin -> ok
X d - Check in to Fairfield -> not ok
X e - Check in to Liberty -> not ok
Sponsored-by: National Library of Finland
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Mathieu Saby <mathsabypro@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This change removes the "catalogue/getitem-ajax.pl"
which appears to be an unused file in Koha.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
To test:
1. Apply patch
2. Search fof the FilterSearchResultsByLoggedInBranch system preference and set it to 'Do'.
3. Do a catalog search and notice the 'Show local items only' button above the "Location" column.
4. Click it to show information ( in that column ) that is only related to the branch you are currently logged in at.
5. In the same result set have some items that are checked out, withdrawn, lost, damaged, and notforlaon.
6. Play more with the search results and ensure everything is accurate.
7. Set the FilterSearchResultsByLoggedInBranch system preference to 'Don't' and confirm that there is no button to filter by branch anymore.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This follow-up applies the same variable-based simplification pattern
to the remaining operations in smart-rules.pl:
- cud-set-branch-defaults: 2 code paths reduced to 1
- cud-add-branch-cat: 4 code paths reduced to 1
- cud-add-open-article-requests-limit: 4 code paths reduced to 1
- cud-del-open-article-requests-limit: 4 code paths reduced to 1
- cud-add-branch-item: 4 code paths reduced to 1
Note: cud-delete-branch-cat was NOT simplified because it contains
additional business logic (setting itemtype rules only when deleting
the default categorycode), which is not simply a matter of converting
'*' to undef.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Testing plan:
- Apply patch
- Run tests
- Go to admin > circ and fine rules
- Create a few Holds and bookings policies
- For All Libraries
- For a specific library
- Delete the policies
- (optional) a simple `SELECT * FROM circulation_rules` can confirm policies were created/deleted correctly
Signed-off-by: Eric Phetteplace <ephetteplace@cca.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
The ES query builder correctly handles this parameters (passed from
search.pl and opac-search.pl) when it builds the ES query. But the
returned 'query_cgi' that is used later for keeping the search results
query context for building things like facets, just doesn't pass this
values around, leading to a loss of them on the generated links.
This patch makes sure they are passed around.
To test:
1. Apply the regression tests
2. Run:
$ ktd --shell
k$ prove t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t
=> FAIL: Tests fail! These params are not passed around!
3. Set ElasticsearchMARCFormat="Searchable array"
4. Reindex all the things:
k$ koha-elasticsearch --rebuild -d -v kohadev
5. Go to advanced search, using the 'More options' option.
6. Check 'Search entire MARC record' and 'Apply weights to search'
7. Perform a search on 'FULL TEXT'
=> SUCCESS: The URL contains `whole_record=on` and `weighted_fields=on`
8. Hover on any facet and look at the link
=> FAIL: It doesn't contain them!
9. Apply this patch
10. Restart all
k$ restart_all
11. Refresh the search results
12. Repeat 6
=> SUCCESS: Links have the needed parameters!
13. Repeat 2
=> SUCCESS: Tests pass! the parameters are passed around!
14. Sign off :-D
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Tests verify that whole_record and weighted_fields parameters are
correctly included in the query_cgi string returned by build_query_compat(),
ensuring these parameters are preserved in facet links and pagination.
To test:
1. Apply this patch
2. Run:
$ ktd --shell
k$ prove t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t
=> FAIL: The values are not being passed around
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch makes the plugin hook load plugins using `get_enabled_plugins()`. This has
the immediate effect of using the already cached plugin objects without reinstantiating them.
This way transactions don't get broken for schema reloads. Also, only enabled plugins
are loaded/attempted to be loaded.
To test:
1. Run:
$ ktd --shell
k$ prove t/db_dependent/Koha/Plugins/Notices_content_hook.t
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests still pass: fundamental behavior remains unchanged.
4. Sign off :-D
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
We must use bKohaColumnsUseNames to correctly deal with the column
visibility if some columns are shown/hidden depending on sysprefs.
On the holds history table we have "item type" that is hidden if
AllowHoldItemTypeSelection is disabled.
Test plan:
1. Create a hold and select an item type
Note: I think there is a bug if you select it from "Hold next available
item", use "Hold details". Please confirm?
2. Go to the holds history view
3. Hide some columns
4. Modify the value of AllowHoldItemTypeSelection
5. Reload the page and notice that the state of the table is restored
correctly, however the "item type" column is shown or hidden
depending on the syspref's value.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
The fallback to 'Standard' if 'FreeForm' needs to happen earlier in the code, before other backend checks are performed
Test plan, before applying patch:
1) Enabled ILLModule
2) Login to OPAC and access a FreeForm URL directly:
<opac_url>/cgi-bin/koha/opac-illrequests.pl?backend=FreeForm&op=add_form
3) Notice you get a 404. Apply patch and restart plack.
4) Repeat 2) Notice you get the 'Standard' form as expected. Create the ILL request. It's created as a 'Standard' request.
Signed-off-by: Leo O’Neill <leo.o’neill@uwl.ac.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Test plan:
prove t/db_dependent/Reserves.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Local cover images are no longer displayed in OPAC lists since Bug 41078.
In Koha versions prior to 25.05.05, local cover images were correctly displayed in OPAC lists.
This appears to be a regression.
To reproduce
1. Set the system preferences LocalCoverImages and OPACLocalCoverImages to Show.
2. Find a bibliographic record and open the record detail page.
3. Upload a local cover image file for the record.
4. Create a public list and add the record to the list.
5. In the OPAC, open the public list.
--> The local cover image is missing.
6. Apply the patch.
7. Reload the OPAC list page.
--> The local cover image is now displayed correctly.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
start_server from Net::Z3950::SimpleServer is going to fork and the DB
server is aborting the connection
db-1 | 2025-10-03 12:02:12 272 [Warning] Aborted connection 272 to db: 'koha_kohadev' user: 'koha_kohadev' host: '172.19.0.6' (Got an error reading communication packets)
Test plan:
prove t/db_dependent/Koha/Z3950Responder/ZebraSession.t
=> Without this patch you will see a warning in the db container log
=> With this patch apply the warning no longer appears
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
We sent a SIGKILL to the daemon which does not let it cleanup
Updating to SIGTERM (15) and handle the dbh disconnect gracefully in the
daemon.
Also handle SIGINT (ctrl+c) only because I think it can be useful (?)
Test plan:
prove t/db_dependent/www/search_utf8.t
=> Without this patch there are 3 warnings in the DB container log
db-1 | 2025-10-03 12:30:57 362 [Warning] Aborted connection 42 to db: 'koha_kohadev' user: 'koha_kohadev' host: '172.19.0.6' (Got an error reading communication packets)
=> With this patch applied there are none.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Since CSRF protection, 'op' arg for creating/editing an object uses add_form and edit_form.
This is missing only in admin/z3950servers.pl
This patch also removes TT variable add_form to avoid confusion
Test plan :
1) Create a new z3950 server
2) Enter mandatory datas in form and save
3) Edit this server
4) Copy this server
5) Repeat 1 to 4 for a SRU server
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Since CSRF protection, 'op' arg for creating/editing an object uses add_form and edit_form.
This is missing only in admin/oai_servers.pl
This patch also removes TT variable add_form to avoid confusion
Test plan :
1) Create a new OAI repository
2) Enter mandatory datas in form and save
3) Edit this repository
4) Copy this repository
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
prove t/db_dependent/Koha/Patrons.t
Test plan, k-t-d:
1) Enable ILLModule
2) Create an ILL request for patron 'John', visit:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
3) Type 'John' and pick the only result. Set a type and library. Click 'Create'.
4) Go to patrons search and search for 'jo':
<staff_url>/cgi-bin/koha/members/members-home.pl
5) Tick the checkbox for John and someone else from the list. Click 'Merge selected patrons' from the top toolbar
6) Select the other patron (not John) as the 'patron to keep'. Click Merge patrons.
7) Notice '1 Illrequest was merge' message shows.
8) Visit the ILL list table, visit:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl
9) Notice the ILL request now belongs to the other patron, not John (who no longer exists).
Signed-off-by: Richard Bridgen <richard.bridgen@nhs.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Richard Bridgen <richard.bridgen@nhs.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch adds the collection code to the transfers to receive report
It wraps it in a span for styling/hiding
To test:
1 - Transfer some books with collection code set to another branch
2 - Sign in as that branch
3 - Circulation -> Transfers to receive
4 - No collection code shown
5 - Apply patch
6 - Refresh
7 - See collection code
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
1) Enable ILLModule
2) Create an ILL request:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
3) Pick any type, add '42' for cardnumber and any library
4) Edit item metadata (assuming ID 1):
<staff_url>/cgi-bin/koha/ill/ill-requests.pl?op=edititem&illrequest_id=1
5) Click 'Add new field' under 'Custom fields'
6) Add any value for 'key' e.g. "test" and '0' for value.
7) Click 'Update'. Notice the custom field doesn't show.
8) Apply patch. Refresh. Verify it shows now.
Signed-off-by: Richard Bridgen <richard.bridgen@nhs.net>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
TEST PLAN:
1 - Apply tests patch
2 - Run 'prove t/db_dependent/Koha/Suggestions.t' -> it fails on
rejecter
3 - Apply this patch
4 - Run 'prove t/db_dependent/Koha/Suggestions.t' -> it works
Note: this patch also provide tests for remaining accessors in the
subtest
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>