Commit graph

52916 commits

Author SHA1 Message Date
ddb2ab7a9f
Bug 34943: Unit tests
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>
2024-03-25 09:53:19 +01:00
Caroline Cyr La Rose
e5d1fb041d
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>
2024-03-25 09:53:19 +01:00
faee93aef6
Bug 36030: acqui/basket: Do not place hold on deleted biblio
Trivial fix.

Test plan:
Find a deleted biblio record in ACQ (in active orders part) and
verify that there is no Place hold option on that row.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-25 09:53:18 +01:00
Caroline Cyr La Rose
49a7950f38
Bug 34663: Errors in UNIMARC default framework
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>
2024-03-25 09:53:17 +01:00
Brendan Lawlor
93d3b0b0f7
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>
2024-03-25 09:53:17 +01:00
3b37e9e454
Bug 35850: Adjust tests to changed IDs
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-25 09:53:16 +01:00
d0c8c8796c
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>
2024-03-22 15:47:36 +01:00
2ad4c93cdc
Bug 30554: Embelished MARC21 XSLT example
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-22 15:47:35 +01:00
jeremy breuillard
01e2a6d983
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>
2024-03-22 15:47:35 +01:00
1412f6c65b
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>
2024-03-22 15:47:34 +01:00
248544e292
Bug 35850: Use template wrapper for tabs: Header search forms
This patch updates search header includes so that the tabs use WRAPPER
to build markup.

To test, apply the patch rebuild the staff interface CSS.

Test at least one page which uses each updated search include. Search
header tabs should look correct and work correctly.

- Acquisitions
  - Suggestions
- Administration
    - Budgets and funds
    - Cities
    - Currencies
    - Desks
    - Patron categories
    - System preferences
    - Z39.50
- Advanced search
- Authorities
- Bibliographic detail page
- Cataloging home page
- Check in
- Check out
- Acquisitions -> Vendor -> Contracts
- ERM
- Staff interface home page
- Serials
- Tool -> Notices

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>
2024-03-22 15:47:34 +01:00
a64a24bfee
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>
2024-03-22 15:47:33 +01:00
ce4e4ba516
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

Signed-off-by: Michelle <mspinney@clamsnet.org>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-22 15:47:33 +01:00
Laura Escamilla
fcbb5fceb8
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>
2024-03-22 15:47:32 +01:00
4a40327452
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>
2024-03-22 15:47:32 +01:00
Michael Hafen
4d351d2c6d
Bug 36139: Bug 35518 Follow-up to fix AutoSwitchPatron - clear variables
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>
2024-03-22 15:47:31 +01:00
b7ad3364cb
Bug 36331: (follow-up) Ignore non_priority holds when checking renewability
When changing the fetch of holds, the check for non-priority was lost - added a loop to pull those out
so the totals and checks are correct

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Tidied (tcohen)
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-22 15:07:40 +01:00
158bcd03e6
Bug 35386: DBRev 23.12.00.012
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-22 15:07:39 +01:00
c3104f4f1c
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>
2024-03-22 15:07:39 +01:00
Katrin Fischer
5f6c0f0c3e
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>
2024-03-22 15:07:38 +01:00
39ff256231
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>
2024-03-22 15:07:38 +01:00
faee84f3d4
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>
2024-03-22 15:07:37 +01:00
74550c754c
Bug 35316: Add callnumber to holdshistory
Test plan:
Verify that column Call number now shows on the form.

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>
2024-03-22 15:07:37 +01:00
c9c2331ba7
Bug 36012: Extend cypress's requestTimeout value
default to 5000 but tests are failing because of slow Jenkins's nodes.
We could try and extend to 10000 (10s) and see if it gets better.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Tests pass with and without the patch on my computer. Tested with:

yarn cypress run --env KOHA_USER=koha,KOHA_PASS=koha \
        --spec t/cypress/integration/ERM/Agreements_spec.ts

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-22 15:07:36 +01:00
David Gustafsson
7054edf183
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>
2024-03-22 15:07:36 +01:00
c529e53b89
Bug 34431: (QA follow-up) Fix duplicate backend options
Prevent adding backend option if the option already exists

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-22 15:07:35 +01:00
ec28e4c958
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>
2024-03-22 15:07:35 +01:00
57367be7a0
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>
2024-03-22 15:07:34 +01:00
9d69823486
Bug 34431: Add a status_alias filter input, if any status_alias exist
This patch also makes it so that the status input filter is enabled by default, and shows all existing statuses by default, or all existing statuses for a specific backend, if and when selected.

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>
2024-03-22 15:07:34 +01:00
48c6fae7ba
Bug 34431: Show both status and status_alias - if exists - in table column
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>
2024-03-22 15:07:33 +01:00
f08d94133d
Bug 34431: Allow for x-koha-embed in ill/backends endpoint
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>
2024-03-22 15:07:33 +01:00
891700d640
Bug 34431: Add 'type' to existing_statuses method
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>
2024-03-22 15:07:32 +01:00
80bd0a19dd
Bug 35536: (follow-up) Add missing koha_object(s)_class definitions
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-22 15:07:31 +01:00
Matthias Meusburger
72fae3a9c9
Bug 25813: Enhance patron expiration in SIP display
Currently, the patron information returned by SIP only shows
 "PATRON EXPIRED" when the patron card has expired.

 This patch makes the display more consistant with the Opac display
 and also complies with the NotifyBorrowerDeparture system preference.

 Test plan:

  - apply the patch

  - set NotifyBorrowerDeparture to 0

  - check that nothing is ever displayed about the card expiration

  - set NotifyBorrowerDeparture to a value greater than 0

  - check that the following message will be displayed for a card that will
    expire within NotifyBorrowerDeparture days:
    "Your card will expire on {correctly formatted date}"

  - check that the following message will be displayed for a card that has
    expired:
    "Your account has expired as of {correctly formatted date}"

 You can use src/C4/SIP/interactive_patron_dump.pl for easier testing.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-22 15:07:31 +01:00
41a918975a
Bug 35793: Remove now obsolete unit test file
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-22 15:07:30 +01:00
Julian Maurice
de91b2e5d9
Bug 35943: Fix group/subgroup filtering of saved reports
Use code instead of name for filtering and escape regexp special
characters.

This patch also disables datatables' smart filtering as it is not
recommended to use with regexp filtering

https://datatables.net/reference/api/search()

Test plan:
1. Create a report in a group named "Foo + Bar" and in a subgroup named
   "Baz + Quux"
2. Create other reports in group "Foo + Bar" but in other subgroups, as
   well as in other groups. This is useful to see the effect of
   filtering
3. Go to the saved reports page and verify that navigating between tabs
   have the desired result. Same for the subgroup select

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>
2024-03-22 12:26:45 +01:00
b23996ee7a
Bug 35790: Remove Koha::Template::Plugin::Biblio::CanArticleRequest
It is no longer used anywhere.

Test plan:
  % git grep CanArticleRequest
should not return any results

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-22 12:26:45 +01:00
b19ff6f4c7
Bug 35793: Remove Koha::Template::Plugin::Cache
Introduced in 2011 by bug 7387 but has never been used.
Removing it.

Test plan:
 git grep Cache **/*.tt **/*.inc
should not return relevant results.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-22 12:26:44 +01:00
ea80d2f140
Bug 35789: Remove Koha::Template::Plugin::Biblio::ArticleRequestsActiveCount
Can be replaced with biblio.article_requests.filter_by_current.count

Test plan:
Turn on article requests (syspref + circ rule)
Request an article (detail page of a bib record)
On the left you see "Article requests" tab with the number of current
article requests.

It should show the correct number (same as before this patch).

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-22 12:26:44 +01:00
f108f73445
Bug 35548: Test KitchenSink plugin
Removed from Plugins.t on bug 35507.
Restoring it here on its own.
Simplified a bit.

NOTE: The CREATE IF NOT EXISTS seems to commit even when the
table already exists. Therefore mocking install too.

Test plan:
Check number of records in plugin_data/methods.
Run t/db_dependent/Koha/Plugins/KitchenSink.t
Check again number of records in plugin_data/methods. Same?

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-22 12:26:43 +01:00
Aleisha Amohia
553126e5a3
Bug 35768: Show 'Used in' records link for results in cataloguing authority plugin search
To test:

1. Edit a biblio record
2. Go to the 100 tab and click the plugin launcher icon for an author
   tag i.e. next to 100$a
3. Search for an authority and observe the results
4. Notice that the number of times this authority has been "Used" in a
   record is now a link, and clicking it does a search showing those
   records.

Sponsored-by: Education Services Australia SCIS
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-22 12:26:43 +01:00
f49f76d60a
Bug 35857: Update authority search pop-up windows with consistent footer markup
This patch updates the cataloging authority finder template in order to
style submission and close buttons in a fixed footer at the bottom of
the pop-up window, with markup consistent with other pop-up windows.

Some inline CSS has been removed in favor of styling the "Clear" button
like a default button. Unrelated, "No results found" message has been
wrapped in a "dialog message" div for consistency's sake.

To test, apply the patch and go to Cataloging -> New record.

- In the "Add MARC record" form, locate a tag which is linked to an
  authority type, e.g. 100$a.
- Click the icon to the right of the field to trigger the authority
  search window.
- There should be a fixed footer in the pop-up window with buttons for
  "Submit," "Clear form," and "Close window." Test that each behave
  correctly.
  - The search results view should have the same footer.
  - Clicking "Choose" from the search results should close the window
    and populate the MARC tag with the correct authority data.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-22 12:26:42 +01:00
34cc0d29df
Bug 35536: Remove last two references to resultset PluginData
Test plan:
Run t/db_dependent/Koha/Plugins/Plugins.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-22 12:26:41 +01:00
9b9ae27a0e
Bug 35536: Silence tests when run from koha-qa.pl
Extending the regex in Plugins::_verbose.

Test plan:
Run qa tools on patch set.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-22 12:26:41 +01:00
d8e04545b8
Bug 35536: Refine verbose handling in some Koha::Plugins calls
Three routines in Plugins got the verbose parameter on 35507.
We can refine this a bit further.
The idea here is report when you are installing plugins but not
report when just calling plugins (flooding logs).

[1] GetPlugins: Most callers do not expect (or check) results for
    failing plugins. This patch makes GetPlugins only return
    errors when passing the *errors* flag (in 2 cases).
    [a] The misc/devel script prints warnings now using verbose,
        so does not need the errors flag anymore.
    [b] plugins/plugins-home is the only case left. Tiny adjustment
        to keep current behavior. Fixed colspan in template.
        Does not need verbose in favor of 'errors' (passed to
        template).
    [c] For most calls we do not want verbose. New default is 0.

[2] InstallPlugins
    [a] Disabled verbose in plugin-upload. Not really needed.
        Added a FIXME; we need to improve individual install.
    [b] misc/devel: No warnings anymore when calling InstallPlugins
        after GetPlugins.

[3] get_enabled_plugins
    [a] Plugins->call does not need verbose.
    [b] Plugins->feature_enabled does not need it too.

Test plan:

[1] See previous plan. With TestMR data but without patch, run
misc script and go to plugins-home. Do you see load errors on
commandline or form?

[2] Run plugins/plugins-upload (uploading just some file is good
enough); verify that you do not see TestMR lines in logfile.

[3] Run t/db_dependent/Koha/Plugins/Plugins.t for the additional
test on verbose and errors flag.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-22 12:26:40 +01:00
e32174f29a
Bug 35536: Reorder rollbacks
Time to move all RemovePlugins calls BEFORE rollbacks.
Broken.t did not even include a transaction! Some modules
are removed there as well.

Test plan:
Search for wrong order with:
  grep -Pzo "txn_rollback;\n.*RemovePlugins" $(git grep -l RemovePlugins)
  No occurrences left? Think of another grep :)
Check number of records in plugin_data/methods.
Repeat: prove $(git grep -l Koha::Plugin | grep -P "^t\/db")
And check number of records again. Same?

Bonus: Apply TestMR plugin patch (marked DO NOT PUSH).
Run perl -MKoha::Plugins -e"Koha::Plugins->new->InstallPlugins".
Check plugin records in database.
Keep those records but remove last patch from git.
Run previous prove and verify no data changes since last check.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-22 12:26:40 +01:00
9d73d40ea3
Bug 35536: Add RemovePlugins calls in plugin unit tests
[1] Replace Methods->delete by RemovePlugins.
    git grep -l "Plugins::Methods->delete" | xargs sed -i -e's/Plugins::Methods->delete/Plugins->RemovePlugins/g'
[2] Replace $schema->resultset('PluginData')->delete by destructive parameter.
[3] Add RemovePlugins too in Handler->delete too. Note that this call
    might be better off with disable? Added a comment.

Test plan:
prove $(git grep -l Koha::Plugin | grep -P "^t\/db")

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-22 12:26:39 +01:00
950c1e63f8
Bug 35536: Add Koha::Plugins->RemovePlugins class method
Test plan:
Run t/db_dependent/Koha/Plugins/Plugins.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-22 12:26:39 +01:00
5ef6a3fce7
Bug 35536: Add Koha object classes for plugin_data
Test plan:
Read the patch.
The objects will be used in subsequent patches, and tested there.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-22 12:26:38 +01:00
e30915eb6b
Bug 35536: Reorganize Plugins.t
Move stuff in the middle into new subtest.
Add transaction around second set of subtests.

Test plan:
t/db_dependent/Koha/Plugins/Plugins.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-22 12:26:38 +01:00