Lucas Gass [Fri, 1 Mar 2024 15:46:04 +0000 (15:46 +0000)]
Bug 36187: Corrected set data.patron_id in select_suggestor()
To test:
1. Make a new suggestion in the staff interface and attempt to set the "Created by" patron to someone other than the logged in user.
2. Submit the suggestion.
3. select suggestedby from suggestions where suggestionid = X; ( Where X is the suggestionid )
4. The value is NULL
5. On suggestion/suggestion.pl the "Suggested by" column is blank.
6. APPLY PATCH
7. Try 1 - 3 again. This time the suggestedby should be correctly set.
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Wed, 20 Dec 2023 09:35:17 +0000 (10:35 +0100)]
Bug 35610: Add FK on old_reserves.branchcode
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Fridolin Somers [Mon, 18 Mar 2024 15:32:57 +0000 (16:32 +0100)]
Bug 36323: Move koha_perl_deps.pl to misc/devel
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Thu, 14 Mar 2024 15:17:55 +0000 (16:17 +0100)]
Bug 24879: Adjust tests
Installer scripts cannot be run from the UI:
debian/templates/apache-shared-intranet.conf:RewriteRule ^/cgi-bin/koha/(C4|debian|etc|installer/data|install_misc|Koha|misc|selenium|t|test|tmp|xt)/|\.PL$ /notfound [PT]
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Julian Maurice [Thu, 1 Feb 2024 08:15:23 +0000 (09:15 +0100)]
Bug 35960: Use .val() instead of string concat to prevent potential XSS
Test plan:
1. Log out
2. Go to /cgi-bin/koha/mainpage.pl#somestring"with<html>char
3. Open the brower's inspector and find "auth_forwarded_hash" input
4. Make sure the value attribute is there and corresponds to the URL's
fragment. It should be URI-encoded.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Andreas Jonsson [Thu, 7 Mar 2024 09:12:25 +0000 (09:12 +0000)]
Bug 36244: Do template toolkit processing first
To avoid injection of template toolkit code
from database fields that are controlled by
untrusted sources.
Test plan:
* review subtest 'Template toolkit syntax in
parameters' in t/db_dependent/Letters.t
* Run the unit test:
prove t/db_dependent/Letters.t
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Andreas Jonsson [Thu, 7 Mar 2024 09:07:49 +0000 (09:07 +0000)]
Bug 36244: Unit test for tt syntax in parameters
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Kyle M Hall [Thu, 28 Mar 2024 14:55:05 +0000 (10:55 -0400)]
Bug 36447: Circ rules slow to load when many itemtypes and categories
It seems that we loop all categories and item types to build the circ
matrix. We should only loop over values that have actually been used
in circulation rules.
Test Plan:
1) Create 1000 itemtypes and category codes. You can use the following
script:
use t::lib::TestBuilder;
my $builder = t::lib::TestBuilder->new();
$builder->build( { source => 'Category' } ) for 0..1000;
$builder->build( { source => 'Itemtype' } ) for 0..1000;
2) Note the lengthy load time for smart-rules.pl
3) Apply this patch
4) Restart all the things!
5) Reload the page
6) Note the much faster load time!
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Kyle M Hall [Fri, 1 Mar 2024 14:50:07 +0000 (09:50 -0500)]
Bug 36159: Patron imports record a change for non-text columns that are not in the import file
When importing patrons we assume a default of '' for borrower columns not supplied in the file.
When saving we compare the new object we built to the one form the database - for columns are that are not text type we get undef from the db and '' in the object we make. This means we see a difference and log into the BorrowersLog:
This can mean a lot of useless logging in sites that do automated imports
Test Plan:
1) Enable 'BorrowersLog' system preference
2) Import the borrowers file attach do this bug report file, matchig on cardnuber, and overwriting
Contents of the borrowers file are :
surname,firstname,branchcode,categorycode,cardnumber,dateenrolled,patron_attributes,lastseen
Acosta,Ednb,CPL,PT,23529001000463,02/01/2013,,
3) Check the logs, note the modification of columns that have no date
4) Import the file again with the same settings
5) Note the new action log
6) Apply this patch
7) Restart all the things!
8) Import the file again with the same settings
9) Note no new action log was created!
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Marcel de Rooy [Fri, 29 Mar 2024 08:23:57 +0000 (08:23 +0000)]
Bug 36368: (QA follow-up) Remove unneeded line
As Emmy stated on comment9, this line is indeed unneeded (and wrong).
A successful cud-insert/cud-save does not come here.
And it is set for add_form, edit_form and duplicate later on.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Emmi Takkinen [Wed, 20 Mar 2024 13:33:21 +0000 (15:33 +0200)]
Bug 36368: Declare template param "op" after variable $op is set
If an error occurs while adding new patron, after fixing the error and
hitting save, patron entry page reloads to "Modify patron" section
and error "Patron not found. Return to search" is displayed. But no
patron is saved.
This happens because we declare template param op too early in the
code and it receives value "cud-insert" instead of "add_form" as it should.
To test:
1. Add new patron and cause an error (wrong age etc.).
2. Attempt to save patron, error message is displayed.
3. Fix your errors and attempt to save again.
=> Error message "Patron not found. Return to search" is displayed and new
patron is not saved to database.
4. Apply this patch.
5. Repeat steps from 1 to 3.
=> Saving patron should now work.
=> To be save, test if modifying patron also works as it should.
Sponsored-by: Koha-Suomi Oy Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Pedro Amorim [Fri, 9 Feb 2024 09:55:35 +0000 (08:55 -0100)]
Bug 34886: Comment failing tests
These tests highlight the fact that the 'place hold' button visibility in the
search results page **does not** match the 'place hold' button visibility in
the detail page, given the same conditions.
Since that this is a known behavior, these tests should be commented out as they
are failing by design.
prove t/db_dependent/selenium/opac_holds.t
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Pedro Amorim [Thu, 1 Feb 2024 15:42:12 +0000 (14:42 -0100)]
Bug 34886: Add selenium tests
Tests added to cover different use cases and combinations of circulation rules values for authenticated and unauthenticated users
At the moment, 2 tests are failing, documented on the [DO NOT PUSH] commit.
These 2 failing tests fail for the search results page but pass on the detail page counterpart. Ideally they should match, for consistency sake.
But this may be the use case "details page should be more correct, results page is always an approximation" mentioned by Nick.
More test combinations may be added in the future.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Nick Clemens [Thu, 28 Sep 2023 13:14:54 +0000 (13:14 +0000)]
Bug 34886: Adjust other opac detail scripts
Same chanegs as before, but for MARC and ISBD details pages
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Nick Clemens [Thu, 28 Sep 2023 12:27:21 +0000 (12:27 +0000)]
Bug 34886: Adjust holdability checks on opac details page
This patch tries to simplify some of the logic here to match that on the search results. When we don't have a patron, we fallback to determining if an item can be held buy determining whether there are any items that don't have holds disallowed at the all libraries level. We also remove items with non-holdable statuses like withdrawn etc (and check some system preferences)
If we don't have a patron, then we are done, however, if we do, then we need to check each item against the policies related to that patron.
This patch also removes two checks at the end:
CountItemsIssued($biblionumber)
$biblio->has_items_waiting_or_intransit
These seem to be from bug 4319 - however, those rules are checked by IsAvailableForItemLevelRequest and are only relevant when we have a patron. These checks essentially assumed 'onshelfholds' policy of 'If any unavailable' For consistency sake I think we should follow the same logic as the results page.
To test:
1 - Find a record with two items, of different types, set a 'Default checkout, hold and return policy' of 'No holds allowed'
2 - Search opac, not logged in, and verify neither the results page or details page shows the place hold button
3 - Delete that rule, make both items withdrawn
4 - Search opac, not logged in, and verify neither the results page or details page shows the place hold button
5 - Mark one item as not withdrawn
6 - Search opac, not logged in, and verify both the results page or details page shows the place hold button
7 - Log in to opac
8 - Search opac, logged in, and verify both the results page or details page shows the place hold button
9 - Place an 'On shelf holds policy' rule for that patron category of 'If any unavailable'
10 - Search opac, logged in, and verify the results and details page shows the place hold button
11 - Set the other item to not withdrawn
12 - Search opac, logged in, and verify the results page shows the place hold button, but details does not
13 - Try various other scenarios - details page should be more correct, results page is always an approximation
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Thu, 28 Mar 2024 15:13:59 +0000 (15:13 +0000)]
Bug 36418: Catch more cases where header response should be application/json
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Mon, 25 Mar 2024 16:30:51 +0000 (16:30 +0000)]
Bug 36418: Explicitly set response to json
To test:
1. Add some checkouts and load the issues-table
2. Select 'Check in' checkbox for that item and click "Check in selected items"
3. The row becomes read and reads "Unable to check in"
4. Reload the page, the item has actually checked in
5. Try the 'Renew' checkbox and click "Renew selected items"
6. It just spins and spins.
7. Reload the page, the item has actually renewed.
8. APPLY PATCH and restart_all
9. Try the steps again and this time everything should work properly.
10. tests these URLs
http://localhost:8081/cgi-bin/koha/svc/recall
http://localhost:8080/cgi-bin/koha/svc/club/enroll
http://localhost:8081/cgi-bin/koha/svc/mana/increment : empty response
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Wed, 27 Mar 2024 07:33:56 +0000 (08:33 +0100)]
Bug 36302: Restore passing deferLoading to DT
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Thu, 16 Nov 2023 13:20:58 +0000 (13:20 +0000)]
Bug 35346: Update template logic to display 'Essential'
This patch updates the cookie consent template logic to always display
the 'Accept essential cookies' button and only expose the 'Accept all
cookies' button when there are additional cookies to accept, i.e. when
JSConsents is populated.
Test plan
1) Enable CookieConsent
2) Note you see 'Accept essential cookies' in both OPAC and Staff client
until you have accepted them
3) Add a cookie to ConsentJS
4) Note that you will now see 'Accept all cookies' as well as the 'Accept
essential cookies' button.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Thu, 16 Nov 2023 13:14:39 +0000 (13:14 +0000)]
Bug 35347: Display 'More information' button regardless of JSConsents
This patch moves the "More informatin" button outside of the JSConsents
block so that you are able to access the information modal regardless of
whether you have tracking cookies added to your configuration or not.
Test plan
1) Enable CookieConsent
2) Note that the 'More information' button now appears in the footer on
both staff and opac until you have accepted cookies.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Mon, 20 Nov 2023 08:00:10 +0000 (08:00 +0000)]
Bug 34793: (follow-up) Add table classes to popup
This patch adds the appropriate table classes to the Popup html
customisation block. This ensure we have proper table display formatting
in the modal on the OPAC.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Aude Charillon [Fri, 17 Nov 2023 15:35:58 +0000 (15:35 +0000)]
Bug 34793: (follow-up) Rename 'Cookie consents' to 'Cookies policy'
The modal is not always about consent, but rather about displaying the
libraries cookie policy. It makes sense to update the heading to reflect
that.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Aude Charillon [Fri, 17 Nov 2023 15:30:22 +0000 (15:30 +0000)]
Bug 34793: Add default HTML Customisations for cookie information
This patch adds some default html customisation content for the cookie
consent feature.
Test plan
1) Run through the installer and pick to import the sample news items
2) Confirm that after enabling the CookieConsent preference that the
default content appears in the cookie bar at the bottom of the page
and in the modal that appears after clicking 'More information'
Mentored-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Tue, 23 Jan 2024 19:32:03 +0000 (19:32 +0000)]
Bug 35882: Use template wrapper for accordions: Notices
This patch updates the notices template so that Bootstrap
accordion markup for the notice edit view is generated by WRAPPERs.
To test, apply the patch and go to Tools -> Notices.
- Edit any notice.
- The list of message transport types (Email, Print, SMS) should be
displayed as before: Collapsible panels where clicking the transport
type heading expands the corresponding information.
- Confirm that changes to notices are correctly saved.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Tue, 23 Jan 2024 19:33:33 +0000 (19:33 +0000)]
Bug 35883: Use template wrapper for accordions: Table settings administration
This patch updates the table settings administration page so that
Bootstrap accordion markup is generated by WRAPPERs.
This patch also makes some changes to fix the automatic scroll when a
table configuration button was clicked.
To test, apply the patch and go to Administration -> Table settings.
- The list of modules should be displayed as before: Collapsible panels
where clicking the module name heading expands the corresponding
panel of settings.
- Test that direct links to configurable tables still work correctly:
- Go to Administration -> Libraries.
- Click the "Configure" button at the top of the table of libraries.
- You should be taken to the table settings page.
- The "Administration" panel should be expanded by default.
- You should be scrolled down automatically to the "Libraries"
table.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Tue, 23 Jan 2024 19:22:12 +0000 (19:22 +0000)]
Bug 35880: Use template wrapper for accordions: Patrons requesting modifications
This patch updates the patrons requesting modification page so that
Bootstrap accordion markup is generated by WRAPPERs.
To test, apply the patch and make sure you have the OPACPatronDetails
system preference enabled.
- Create at least two different patron modification requests:
- Log in to the OPAC using two different patron accounts, each time
following the sidebar link for "Personal details."
- Make some changes to the patron records and submit them.
- In the staff interface, from the home page, click the "Patrons
requesting modifications" link.
- You should see the list of updates in the same format as before:
Collapsible panels where clicking the patron name heading expands the
corresponding information.
- View the detail or checkout page for one of your updated patrons.
- Click the "Review pending modifications" link.
- The modifications page should open with that patron's information
exapanded.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Tue, 23 Jan 2024 18:54:02 +0000 (18:54 +0000)]
Bug 35877: Use template wrapper to build Bootstrap accordion components
This patch adds Template::Toolkit WRAPPER blocks to html_helpers.inc so
that templates can build Bootstrap accordion components while keeping
the Bootstrap structural markup separate.
Each individual component of a Bootstrap accordion interface is defined:
To test, apply this patch and one of the dependent patches.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
When the user clicks on a hidden tab, 'shown.bs.tab' is triggered and
then another click event is triggered. And because the table was loaded
on tab click, it was loaded twice.
Visually it could have caused the rows to be duplicated (it was random,
probably due to timing, network latency, ...)
I don't know why we need to trigger a click in this case, but removing
this will probably break something else, so the fix here is to load the
table on 'shown.bs.tab' event instead of 'click'
This patch also contains a small fix in refreshReturnClaimsTable which
was reloading the table right after the table initialization.
Test plan:
1. Check out an item, and in the checkouts table, click "Claim returned"
2. Open the network tab of your browser's developer tools
3. Click on the "Claims" tab, verify that only one call is made to
svc/return_claims
4. Verify that the claims table is displayed correctly
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Thu, 8 Feb 2024 13:57:30 +0000 (13:57 +0000)]
Bug 36035: Wrong text colour in addorderiso2709.pl
This patch updates the "Order staged MARC records" page so that the
class which is added upon selection is more unique to avoid a collision
with some default DataTables styles. These classes are used in
JavaScript selectors, not for visual style.
The patch also adds some custom CSS variables to global.scss to override
the defaults for the DataTables "selected" style, in case this issue
crops up again.
To test, apply the patch and rebuild the staff interface CSS. Follow the
test plan from the bug report:
1) In system preferences, click Search and then select the Acquisitions
option from the left hand menu
2) Paste the following into MarcFieldsToOrder
4) Save the sysprefs
5) Navigate to acquisitions and go into a basket
6) Click "Add to basket" and select "From a new file"
7) Download the file attached to this bug
8) Import the file and when the job is complete click "Add staged files
to basket"
9) Click the checkbox next to the record to display the items.
- The expanded form should look correct.
10) Add one or more items to the order and confirm that submitting the
form works correctly.
To test the new default "selected" DataTables style, view a page with a
DataTable, e.g. Administration -> Libraries.
- Right-click on one of the table rows and choose "Inspect"
- Click the table row element, e.g. '<tr class="odd">'
- Double-click the class name and replace it with "selected."
- The row you inspected should now have a pale green background and text
colors should remain the same.
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Pedro Amorim [Thu, 19 Oct 2023 13:53:29 +0000 (13:53 +0000)]
Bug 35107: Show type disclaimer value and date in request details
Test plan, k-t-d:
1) Install FreeForm and BLDSS backends, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev-plus.sh)
2) Set ILLModuleDisclaimerByType system preference , visit:
/cgi-bin/koha/admin/preferences.pl?tab=interlibrary_loans#interlibrary_loans_Workflow
3) Copy the example code, click the 'Click to edit' link to open the text area, and paste the example yaml:
all:
text: |
<h2>HTML title</h2>
<p>This is an HTML paragraph</p>
<p>This is another HTML paragraph</p>
av_category_code: YES_NO
article:
text: copyright text for all article type requests
av_category_code: YES_NO
bypass: 1
4) Create a new FreeForm request, visit:
/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=FreeForm
5) Set type 'Book', put'9780822370451' in ISBN, put '42' in the cardnumber, and pick a library
6) You should now be in the type disclaimer stage, click 'Submit'
7) Notice the disclaimer value and date are displayed under 'Details from supplier'
8) Click the top 'Switch provider' button and pick BLDSS
9) You should get one result, click the 'Request BLL01018665793' link to finish the migration
10) You should now be in the ILL table, click the request that was just migrated to BLDSS
11) Notice the type disclaimer information is no longer visible
12) Apply patch, restart plack: koha-plack --restart kohadev
13) Refresh the BLDSS request, the information should now be visible in the 'Request details' section
Signed-off-by: Richard Bridgen <richard.bridgen@nhs.net> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
We needed to call getAll instead of get to fetch all the vendors
Test plan:
Have more than 20 vendors and create/edit an agreement.
Notice that the vendor list contains all the vendors
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Matthias Le Gac <matthias.le-gac@inlibro.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Fridolin Somers [Wed, 3 Aug 2022 01:17:25 +0000 (15:17 -1000)]
Bug 31286: Embed see-from headings into bibliographic records export
In misc/export_records.pl add an option to add see-from headings (from authorities 4xx) into bibliographic records export.
Like it is done during record indexing.
Test plan :
1) Choose a biblio record having a field (for example 650) linked to an authority with a see-form.
2) Export this record without see-from headings :
misc/export_records.pl --starting_biblionumber=X --ending_biblionumber=X --filename /tmp/record_without.xml --format xml
3) Export this record with see-from headings :
misc/export_records.pl --starting_biblionumber=X --ending_biblionumber=X --filename /tmp/record_with.xml --format xml --embed_see_from_headings
4) Compare /tmp/record_without.xml and /tmp/record_with.xml
=> you should see two 650, one with main heading and one with see-from heading
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Fri, 26 Jan 2024 18:47:50 +0000 (18:47 +0000)]
Bug 23208: perltidy
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Fri, 26 Jan 2024 18:43:06 +0000 (18:43 +0000)]
Bug 23208: Add ability to set a default hold ratio value
To test:
1. APPLY PATCH, updatedatebase, restart_all
2. Search for the system preference 'HoldRatioDefault'.
3. It should be set to 3. Change the value to something else.
4. Load the report at 'circ/reserveratios.pl'. Circulation > Hold ratios
5. The default value should be the value you set in the new system preference.
6. Run the report with the default value and make sure it works.
7. Change the value and run the report. The new value should be retained.
8. Leave the page and come back. Again the default value from the new system preference should be set.
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Fri, 26 Jan 2024 18:42:14 +0000 (18:42 +0000)]
Bug 23208: Add system preference HoldRatioDefault
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Wed, 27 Dec 2023 17:35:31 +0000 (17:35 +0000)]
Bug 35653: Log import_patrons.pl info to action logs
To test:
1. APPLY PATCH
2. Create a CSV file with a few lines that contain at least firstname, surname, cardnumber
3. Turn on "CronjobLog".
4. Run the import patron script. I did this: perl /kohadevbox/koha/misc/import_patrons.pl --file 'test1.csv' --matchpoint cardnumber -c
5. Check the action logs for cronjobs.
6. You should see info. about the import patron script.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 34943: (QA follow-up) Use `before_biblio_action` and an `action` param
This patch harmonizes the hook name and parameters with the rest of the
codebase.
To test:
1. Apply this patch
2. Run:
$ ktd --shell
k$ qa
=> SUCCESS: All looks green, and tests still pass (i.e. they were
correctly adjusted to the new schema).
3. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch implements a hook allowing record modification right before
they are written on the DB. The idea is that a plugin could be used to
add machine-generated fields/subfields.
To test:
1. Apply the unit tests patch
2. Run:
$ ktd --shell
k$ prove t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t
=> FAIL: Tests fail! The hook is not implemented so the desired results
don't appear (added fields/subfields).
3. Apply this patch
4. Repeat 2
=> SUCCESS: It works!
5. Run:
k$ qa -c 2
=> SUCCESS: All green!
6. Sign off :-D
Sponsored-by: Theke Solutions Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 35457: Move SerialsDefaultEMailAddress and SerialsDefaultReplyTo to serials preferences
This patch moved the SerialsDefaultEMailAddress system preference and
the SerialsDefaultReplyTo system preference to the Serials preferences.
To test:
1. Apply patch
2. Go to Administration > System preferences > Acquisitions
--> SerialsDefaultEMailAddress and SerialsDefaultReplyTo should not
be there
3. Go to Administration > System preferences > Serials
--> There should be a new section called "Notifications" with
the two system preferences
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch corrects the default UNIMARC bibliographic framework to
place all the 4XX subfields in tab 4.
To test:
1. Go to Administration > MARC Bibliographic framework test
--> There should be errors indicating subfields from 4XX fields
are in tabs 3 and 4
2. Apply patch and reset_all
3. Redo step 1
--> It should now say that all subfields for each tag are in the
same tab (or ignored)
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Brendan Lawlor [Fri, 22 Mar 2024 17:25:20 +0000 (17:25 +0000)]
Bug 36371: Check if patron attribute is defined in circ-menu.inc
This patch changes the conditional that determines if a patron attribute is displayed in the patron brief info. Instead of checking the value of the attribute we should check if the attribute is defined.
To test:
1. Create a patron attribute, eg. party_mode, check 'display in patron's brief info' and tie to the YES_NO authorised value.
2. Find a patron and set your attribute to Yes
3. Confirm you see the attribute and its value both in the "Additional attributes and identifiers" section of the patron detail page and in the patron brief info area
4. Set your attribute to No
5. Confirm you see the attribute and its value in "Additional attributes and identifiers" but it no longer shows in the brief info
6. Apply patch and restart_all
7. Notice that your attribute now displays in the brief info, such as Party mode: No
8. Set the attribute to the first empty option
9. Check the patron record brief info to confirm that the attribute does not display when the value is empty.
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Tue, 7 Nov 2023 14:03:00 +0000 (14:03 +0000)]
Bug 35279: Add fallback to print for 'Send welcome email'
We update the 'Send welcome email' button to read 'Send welcome notice'
and add a fallback to enqueue a notice for print when the user doesn't
have an email address defined.
Test plan
1) Apply patch
2) Use the 'Henry Acevedo' user who doesn't yet have a valid email
address.
3) Click the 'Send welcome notice' button available from the 'more'
menu.
4) Note that no notice is queued at all.
5) Copy the content of the 'email' WELCOME notice into the 'print'
template.
5) Repeat step 3.
6) Note that this time a 'print' type notice is queued for the user.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 30554: Use XSLT (if enabled) in authority search cataloguing plugin
Test plan:
1. Set AuthorityXSLTResultsDisplay to a valid XSL file (see bug 30554
attachments, there is an example XSL file)
2. Go to the bibliographic record editor (edit an existing one or create
a new one)
3. Find a field linked to authorities and open the plugin
4. Start a search and verify that the results are displayed using the
XSLT output (if using the example file it should be a link saying
"Authority #<authid>")
Sponsored-by: Écoles nationales supérieure d'architecture (ENSA) Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Nick Clemens [Wed, 20 Dec 2023 19:06:57 +0000 (19:06 +0000)]
Bug 35621: Map ÿ to y for searching (Non-ICU)
To test:
1 - Find or add a record with title: Chevilly-Larue, L'Haÿ-les-Roses, Fresnes, Rungis [par] Sté éditions et de publicité L.F.B.
2 - Search for 'L'Hay-les-Roses'
3 - No results
4 - Apply patch, copy the file:
sudo cp /kohadevbox/koha/etc/zebradb/etc/word-phrase-utf.chr /etc/koha/zebradb/etc/word-phrase-utf.chr
5 - Restart all, Reindex
restart_all
sudo koha-rebuild-zebra -v -f kohadev
6 - Search again
7 - Success!
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Martin AUBEUT <martin.aubeut@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Thu, 14 Dec 2023 22:39:00 +0000 (22:39 +0000)]
Bug 35576: Add classes to hq-callnumber column in holds report
To test:
1. APPLY PATCH
2. Make sure you have item.itemcallnumber data.
3. Have some holds and build the holds queue: perl /kohadevbox/koha/misc/cronjobs/holds/build_holds_queue.pl
4. To make testing easier add the following to IntranetUserCSS:
.hq-callnumber .location { background: lightblue; }
.hq-callnumber .itemcallnumber { background: lightgoldenrodyellow; }
5. Run the holds queue and notice that the data in the 'Call number' column has a lightblue (location) and lightgoldenrodyellow (call number) background.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Wed, 13 Dec 2023 20:58:01 +0000 (20:58 +0000)]
Bug 35564: Add homebranch to the holds queue report
To test:
1 - Place some holds in your system
2 - perl misc/cronjobs/holds/build_holdsqueue.pl
3 - View the holds queue
4 - Note there is no holding branch column
5 - APPLY PATCH
6 - Reload and try again
7 - Note the column is not there
8 - Click column setting gear to expose the column
9 - Go to Admin -> Table settings and make sure you can expose the column via Table settings
Laura Escamilla [Tue, 5 Dec 2023 14:57:58 +0000 (14:57 +0000)]
Bug 35034: Add parameter that links titles to their records
To recreate:
1. Select two items from the catalog and begin a merge.
2. Notice that the title of the items, their biblionumber and a
hyperlink to their MARC record is available.
3. Apply the patch and refresh the page. The biblionumber for each title
is now hyperlinked and leads to the item’s bib records.
4. Sign off and have a great day :)
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Wed, 29 Nov 2023 23:19:12 +0000 (23:19 +0000)]
Bug 35444: Add hidden span with information about the loggedinuser categorycode
To test:
1. APPLY PATCH
2. Log into the staff interface and use the browser's dev tools to look
for the HTML class 'loggedincategorycode'. It should match the
current logged in user's categorycode.
3. You could also use a console.log like so:
console.log( $('.loggedincategorycode').text() );
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 35518 moved some code blocks to after the call to
get_user_and_template() so that userenv would be populated before it
was needed. This caused a couple variables to be set before the
AutoSwitchPatron block could prevent them from being set. Which broke
AutoSwitchPatron functionality. This clears two variable so that
AuthSwitchPatron works again.
The AutoSwitchPatron clears the $borrowernumber variable to switch
patrons. With the AuthSwitchPatron block moved, the $patron variable
still gets set, and the patron doesn't get switched. The clears the
$patron variable too.
Also clear the barcode list.
The AutoSwitchPatron block got moved, and now the @$barcodes variable
gets filled and not cleared. Leading to a 'Barcode not found' error
when the patron is auto switched.
Test plan:
1. Ensure AutoSwitchPatron is turned on.
2. Select the card number of two patron accounts.
3. Find the first patron in circulation.
4. Enter the second patron's card number in the item barcode field to
switch patrons.
5. Observe the error about item barcode not existing, and the patron did
not switch.
6. Apply patch and restart services.
7. Enter the second patron's card number in the item barcode field
again.
8. Observe that the patron was switched with no error about an invalid
barcode.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Nick Clemens [Mon, 27 Nov 2023 16:31:41 +0000 (16:31 +0000)]
Bug 35386: Add RESTAPIRenewalBranch system preference
This patch adds a new system prefernce, RESTAPIRenewalBranch, analogous to the existing OpacRenewalBranch system preference.
The preference allows choosing how the renewal branch is recorded in the statistics table.
In order ot preserve existing behaviour, the default is to use the api user's branch.
To test:
1 - Checkout some items to a patron
2 - Add an API user account with circulation permissions and a different homebranch
3 - POST a renewal to: http://localhost:8080/api/v1/checkouts/{checkout_id}/renewal
4 - Check statistics table and confirm the api users branch was used
5 - Apply patches, restart all
6 - Repeat API renewal, confirm same branch used
7 - Change the RESTAPIRenewal syspref
8 - Repeat API renewal and confirm specified branch is used
9 - Confirm the syspref works for all settings
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Katrin Fischer [Sun, 10 Dec 2023 15:45:28 +0000 (15:45 +0000)]
Bug 35531: Add context for translating gender option "Other"
To test:
* Apply patch
* Verify the option "Other" for gender is correctly displayed when:
* Editing a patron record in the staff interface
* Viewing the 'Details' tab of a patron in staff interface
* Triggering a "duplicate" patron warning and looking at the details
of the existing patron record
* Self registering a patron in the OPAC
* Viewing 'Personal details' tab in the OPAC for a registered patron
* If you are using ktd, run: gulp po:update --lang de-DE
* Verify string "gender" appears with the occurences of "Other"and
"Other:" in
misc/translator/Koha-messages.pot
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Wed, 18 Oct 2023 16:00:45 +0000 (16:00 +0000)]
Bug 35097: Use country-list.inc to display choices for UsageStatsCountry preference
This patch updates the system preferences interface so that it uses
country-list.inc for the selection of countries for the
UsageStatsCountry preference.
To test, apply the patch and restart services.
- Go to Administration -> System preferences and search for
"UsageStatsCountry"
- The dropdown of countries should look correct.
- Select a country, save, and confirm that your choice is saved
correctly.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Marcel de Rooy [Mon, 13 Nov 2023 14:26:37 +0000 (14:26 +0000)]
Bug 35316: Fix column settings for holds history
Test plan:
Verify that you are able to toggle the column on the holdshistory
form.
Verify that you are able to hide the column via Table settings
by default.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
David Gustafsson [Mon, 23 Oct 2023 15:49:06 +0000 (17:49 +0200)]
Bug 35133: Don't lazily define accessor methods when invoked through SUPER
To test:
1) Apply Bug 32476
2) Run tests in t/db_dependent/Patrons.t
3) This should produce multiple "Subroutine Koha::Patron::SUPER::dateexpiry redefined at ..." warnings
4) Apply patch
5) Run tests in t/db_dependent/Patrons.t again
6) The warnings in 3) should now no longer appear
Signed-off-by: matthias le gac <matthias@babel.inlibro.net> Signed-off-by: Phan Tung Bui <phan-tung.bui@inlibro.com> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Pedro Amorim [Mon, 7 Aug 2023 10:04:25 +0000 (10:04 +0000)]
Bug 34431: Add status and status_alias filters to clear
Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Pedro Amorim [Fri, 4 Aug 2023 16:06:40 +0000 (16:06 +0000)]
Bug 34431: Update tests
Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>