Commit graph

53237 commits

Author SHA1 Message Date
daf37b85d7
Bug 35581: Koha::*Illbatch* -> Koha::*ILL::*Batch*
Koha/Illbatch.pm -> Koha/ILL/Batch.pm
Koha/Illbatches.pm -> Koha/ILL/Batches.pm
Koha/REST/V1/Illbatches.pm -> Koha/REST/V1/ILL/Batches.pm
t/db_dependent/Koha/Illbatch.t -> t/db_dependent/Koha/ILL/Batch.t
t/db_dependent/Illbatches.t -> t/db_dependent/Koha/ILL/Batches.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-22 08:57:41 +02:00
64c06fa87c
Bug 35581: Koha::Illbackend -> Koha::ILL::Backend
Koha/Illbackend.pm -> Koha/ILL/Backend.pm
Koha/REST/V1/Illbackends.pm -> Koha/REST/V1/ILL/Backends.pm

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-22 08:57:40 +02:00
58bcedc7f5
Bug 36400: (follow-up) remove option editorconfig from .prettierrc.js
- The option doesn't seem do what it's intended for:
	- The debug logs still show options from the .editorconfig (which is actually what we want in this case).
- The option causes unwanted warnings when using the cli.
- In summary: we have to keep in mind that the rules are now hierarchical:
	1. .editorconfig
	2. .prettierrc.js

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>
2024-04-22 08:57:40 +02:00
d58dfd1cef
Bug 36400: Centralize {js,ts,vue} formatting config in .prettierrc.js
Let's centralize all formatting for js, ts and vue files in a .prettierrc.js.
    The goal here is to preserve eslint's linting but ignore all of its formatting options.

    Seems to work for vue files in vscode, vscodium and neovim w/ vscode-eslint-language-server.

    To test:
    1) Pick any vue file for example.
    2) Run format via your editor and either npx prettier -c .prettierrc.js <PATH_TO_VUE_FILE> [you can also use the -w flag to directly write].
    3) Look for unexpected changes: vue files should be already formatted w/ these inline flags (see: https://wiki.koha-community.org/wiki/Coding_Guidelines#JS14:_Prettier_JavaScript): [--trailing-comma es5, --arrow-parens avoid].
    4) Sign off if you're happy and comment or show what went wrong in a comment.

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>
2024-04-22 08:57:39 +02:00
411f49a9b9
Bug 35363: Update transfer order pop-up window with consistent footer markup
This patch updates the "Transfer order" pop-up window so that it has a
fixed footer consistent with other similar pop-up windows.

In order to make navigation between pages within the pop-up window
easier I've added a button in the footer which can take the user back to
the previous step, including any necessary parameters.

To test, apply the patch and go to Acquisitions.

- Locate a vendor with a basket, and a basket with one or more orders.
- On the basket detail page, click the "Transfer" link in the "Modify"
  column.
- In the pop-up window, test each step:
  - Vendor search
  - Vendor selection
  - Basket selection
- Confirm that at any step you can use the new button to go back to the
  previous step.

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-04-22 08:57:39 +02:00
ad1d8fd561
Bug 35568: Add a transform_prepared_letter plugin hook to allow modification of notices created via GetPreparedLetter
A plugin hook for GetPreparedLetter would be very useful. It could be used to add universal headers and/or footers to messages, attach news, and modify notices in other ways in whole or in part. It could even be used for call webhooks when certain types of notices are sent.

For example, the MessageBee ( https://uniquelibrary.com/messagebee/ ) plugin for Koha generates YAML based notice content, which is then further processed by the before_send_messages hook. This process is unreliable due to the possible changes in data between the creation of the yaml and the reading of that yaml and transforming it into JSON with much more data. For example, the yaml may contain an issue_id, but that checkout may have been returned in the meantime. A hook like this would allow the MessageBee plugin to skip the yaml step and create the json data directly which is then sent to MessageBee for transmission to the patron.

Test Plan:
1) Apply this patch
2) prove t/db_dependent/Koha/Plugins/Transform_prepared_letter_hook.t
3) Download and install the Kitchen Sink plugin v2.4.0
   https://github.com/bywatersolutions/dev-koha-plugin-kitchen-sink/releases/tag/v2.4.0
4) Generate any notice or slip, such as a checkin or checkout notice
5) Note that all notices now end with "Thanks for using your local library!"

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-04-22 08:57:38 +02:00
ad62f81b03
Bug 35616: DBIC schema update
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-22 08:57:38 +02:00
ae6c181b63
Bug 35616: DBRev 23.12.00.026
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-22 08:57:37 +02:00
0c1e18d655
Bug 35616: (QA follow-up): tidy up code and fix exec permission
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-22 08:57:37 +02:00
47a75e62e6
Bug 35616: Update catalog concerns to set/filter on source
This patch updates the catalog concerns feature to respect the new
'source' field in the API.  We both set the source for new ticket
submissions and use it for filtering in the corresponding display
tables.

To test:
1) Nothing should noticably change here.. follow the test plan for bug
   31028 and confirm all continues to work as described there.

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-04-22 08:57:36 +02:00
576b253782
Bug 35616: API specification update
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-04-22 08:57:36 +02:00
df2a432c65
Bug 35616: Add source field to tickets table
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-04-22 08:57:35 +02:00
df1f5da673
Bug 36309: Make create_superlibrarian.pl output more useful
In situations in which you are not familiar with all the Koha settings,
and table structure, the fact this script just fails telling there's a
broken FK is just not practical.

We should capture those exceptions and display a useful message instead.

This script does that. It adds some validations and some exception
handling too. It prints a nice message about the bad value the user
passed, and the valid values too!

To test:
1. Run this on a fresh KTD:
   $ ktd --shell
  k$ perl  misc/devel/create_superlibrarian.pl \
      --userid tcohen \
      --password tomasito \
      --cardnumber 123456789 \
      --categorycode POT \
      --branchcode ATO
=> FAIL: It explodes with a MySQL exception message!
2. Apply this patch
3. Repeat 1
=> SUCCESS: It tells you which value is wrong and what values you can
pick to make the command work
4. Pick a valid value, and repeat
=> SUCCESS: Now the other value is wrong, a nice message is displayed!
5. Fix with a valid value and repeat
=> SUCCESS: Patron created!
6. Sign off :-D

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-04-22 08:57:35 +02:00
ba0f7f7378
Bug 36204: (follow-up) Add parenthesis to match display in other places
Updated display to:
Acevedo, Henry (othername)

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-22 08:57:34 +02:00
202cf958fc
Bug 36204: Add othernames field to PatronAutoComplete display
To test:
1. APPLY PATCH
2. Make sure PatronAutoComplete is on.
3. Find or add othernames to a patron record.
4. Search for that patron and make sure othernames properly displays in the dropdown.
5. Add a middle name to that patron and search again, make sure the display looks good.
6. Remove the othernames field and search again, make sure the display looks good.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-22 08:57:34 +02:00
6695cf5e8d
Bug 35151: (follow-up) Remove ILLModuleCopyrightClearance from .pref file
Previous patches removed the preference from the database and sysprefs.sql,
but the yaml file was missed.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-22 08:57:33 +02:00
fd70e36e6f
Bug 33393: DBRev 23.12.00.025
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 19:54:48 +02:00
ec920d1048
Bug 33393: Specify layout this works with a bit more clearly in system preference description
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 19:54:47 +02:00
6d94160541
Bug 33393: tidy layout1page.pm
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 19:54:46 +02:00
a0ec74ea53
Bug 33393: Add note to system preference explaining text length
Sponsored-by: Pymble Ladies' College
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-04-19 19:54:46 +02:00
098b6a6fab
Bug 33393: Enable libraries to configure their own text in the 1-Page order PDF
Test plan:
1) Apply patches and restart services
2) Upgrade Koha schema:
sudo koha-upgrade-schema <instance>
3) Go to Koha Administration -> Libraries. Ensure Library A has an
address, phone and fax.
4) Go to Koha Administration -> System preferences. Search for
OrderPdfFormat. Set this to English 1-page layout option.
5) Go to Acquisitions. Use an existing vendor or create a new one.
Ensure the vendor has a postal address, phone, fax and accout number.
6) Create a basket for this vendor. Add many orders to this basket, for
example 25 items (this is to make the Order PDF cover multiple pages).
7) Close the basket and add it to a basket group of the same name.
8) Edit the basket group. Add an address in the delivery place, and a
delivery comment. Check the box to close the basket group and Save.
9) Click the button to Export as PDF.
10) View the exported PDF. Confirm the PDF is multiple pages long. If it
is not then re-open the basketgroup and add more orders to the basket
and repeat steps 7, 8, and 9
11) If the PDF is multiple pages long then confirm:
- The text "Order number must appear on all related correspondence, shipping papers and invoices. Notify us immediately if you are unable to supply item(s)." appears above the order table.
- The page numbers at the bottom of the first page are not obscured by
the order table.
- That the order table starts near the top of the second page, and not
half way down.
12) Change content in the '1PageOrderPDFText' syspref (use the Enter key
    to split text over multiple lines) and save
13) Back in the Acquisitions module click the button to Export as PDF
14) View the exported PDF. Confirm the following:
- The text above the order table is what you saved in the
1PageOrderPDFText system preference
- The page numbers at the bottom of the first page are not obscrued by
the order table.
- That the order table starts near the top of the second page and not
halfway down.
15) Empty the 1PageOrderPDFText system preference and save
16) Back in the Acquisitions module click te button to Export as PDF
17) View the exported PDF and confirm the line of text between the
Tel/Fax line and the order table has been removed.

Sponsored-by: Pymble Ladies' College
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-04-19 19:54:45 +02:00
bc6d4d7b09
Bug 33393: Add system preference
Sponsored-by: Pymble Ladies' College
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-04-19 19:54:45 +02:00
b1aa99e96d
Bug 35967: Add more test cases
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 19:54:44 +02:00
1b52c5c539
Bug 35967: (QA follow-up) status is not nullable
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 19:54:44 +02:00
Aleisha Amohia
9d8254efd3
Bug 35967: Add REST API endpoint to list patron recalls
This enhancement adds a REST API endpoint to list a patron's recalls:

/api/v1/patrons/{patron_id}/recalls

This depends on the logged in patron having the manage_recalls subpermission.

To test:

1. Log in to the staff interface as your superlibrarian self (Patron A)
2. Go to Koha Administration -> Global system preferences. Enable the UseRecalls system preference
3. Set the relevant recalls circulation and fines rules
4. Search for an item (Item A)
5. Check out Item A to yourself (Patron A)
6. Log in to the OPAC as Patron B, a patron who does not have the manage_recalls permission
7. Search for Item A and request a recall
8. While still logged in to the OPAC as Patron B, hit this URL: https://your-opac-url/api/v1/patrons/patron-b-borrowernumber/recalls (swap out your URL and Patron B's borrowernumber)
9. Confirm you are given an error: "Authorization failure. Missing required permission(s)."
10. Log out of the OPAC and log back in, this time as Patron A
11. Hit the URL again https://your-opac-url/api/v1/patrons/patron-b-borrowernumber/recalls
12. Confirm you are able to view a list of Patron B's recalls
13. Confirm tests pass: t/db_dependent/api/v1/patrons_recalls.t

Sponsored-by: Auckland University of Technology

PA amended: QA follow-up: tidy

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 19:54:43 +02:00
6764166b20
Bug 19605: (QA follow-up): available_backends fix reduce
available_backends was only considering dir backends for reduce, it should consider all backends, including plugin backends.

This relates to the ILLOpacbackends syspref, where if you add a backend name that happens to be a plugin, it was not disabling it for the OPAC.
This change considers all backends for Illopacbackends, regardless of if its a plugin or a directory backend.

This was made evident while writing tests for bug 36197.
Regression tests for this particular use case, and others, are part of bug 36197.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 19:54:43 +02:00
764e6cd57a
Bug 19605: Another fix after bug 35536
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 19:54:42 +02:00
984710c3bf
Bug 19605: Fix after bug 35536
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 19:54:42 +02:00
f45be5c15a
Bug 19605: Clarify method name
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 19:54:41 +02:00
e06cd47e25
Bug 19605: Rename method and use the instantiated plugin in the call
This patch makes the backend instantiation happen through a plugin
object method instead of a static one. This way, the (already)
instantiated plugin can be reused (if needed) in the plugin workflow
like this:

sub new_il_backend {
    my ($self, $params) = @_;
    return Custom::Backend->new(
        {
            config => $params->{config},
            logger => $params->{logger},
            plugin => $self,
        }
    );
}

The passed plugin object would then be used to retrieve whatever
plugin-defined configurations, template paths or even helper methods. On
INN-Reach, it gives the backend access to API user agents, task queue
injection, etc.

This patch also renames the method so it is more straight-forward this is
related to ILL.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 19:54:41 +02:00
a78753367d
Bug 19605: Tidy
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 19:54:40 +02:00
37935c7284
Bug 19605: Add support for ILL backends as plugins
This is designed to maintain existing functionality of loading ILL
backends through the backend_dir config (default Koha/Illbackends/).

A check for a plugin of a given backend name takes precedence over a
backend of the same name loaded the old way through backend_dir, this
means that if this happens, the backend plugin is used and NOT the
backend present in backend_dir.

Old backend_dir backends AND new backend plugins coexist.

Test plan, k-t-d:
1) Enable ILLModule and install FreeForm, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
2) Install the plugin ILL backend example .kpz located at:
https://github.com/ammopt/koha-ill-backend-plugin/releases/tag/1.0.0
3) koha-plack --restart kohadev
4) Visit ILL requests:
/cgi-bin/koha/ill/ill-requests.pl
5) Click "+ New ILL request". Notice it lists 'FreeForm' and
   'PluginBackend'
6) Click 'PluginBackend'. Enter a '123' in pubmedid, '42' in cardnumber
   and pick a library. Click 'Marke request'
7) Notice the request is created successfully.
8) Visit plugins:
/cgi-bin/koha/plugins/plugins-home.pl
9) Click "View plugin by class". Pick "ill backend plugins". Notice the
   correct plugin is listed.
10) Click "configure" on the ILL backend plugin. Notice it's a normal
    plugin configuration page

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 19:54:40 +02:00
513657b09a
Bug 19605: Update expandTemplate to expand_template method name
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 19:54:39 +02:00
7233681b6c
Bug 19605: Add 'ill_backend' plugin category
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 19:54:39 +02:00
136dc62c61
Bug 33174: Add warning about how many holds are being cancelled
To test:
1. Apply patch
2. Find or make a record with many holds on it.
3. Go to the Holds tab ( request.pl ).
4. Select some hodls to cancel and press "Cancel selected"
5. A modal popup will appear. Notice the warning telling you exactly how many holds you are about to cancel. Confirm the count is accurate.
6. Try using the select all button and make sure the warning is accurate.
7. Make sure you can cancel the holds.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 19:54:38 +02:00
518b3aa4a3
Bug 35862: Display modal search results to the right of form above 1200px
To test:
1. Apply patch
2. Rebuild CSS ( yarn build )
3. Look at some of the places where there is a modal patron search.
    -suggestion/suggestion.pl: Set to patron
    -members/memberentry.pl: Add guarantor

4. Make sure the modal looks good before and after you have searched for a patron.
5. Play with many different screen sizes, ensuring everything looks good and makes sense.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 19:54:38 +02:00
b9804c0781
Bug 34575: Add a CSS class to patron email
Adds a CSS class to the patron email section in the 'name-address' column of search results in members-home.pl
No functional behaviour change.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 19:54:37 +02:00
99014e9395
Bug 34574: Add CSS class to datatable select filter
Test plan:

1) Create a new patron category, visit:
/cgi-bin/koha/admin/categories.pl?op=add_form
2) Add a category code, en enrollment period, a category type and a really long description like:
"This is a real long description of the patron category code for demo purposes"
3) Now do the same but for a library, visit:
/cgi-bin/koha/admin/branches.pl?op=add_form
4) Add a library code and a really long name like:
"This is a real long library name for demo purposes"
5) Visit patrons home:
/cgi-bin/koha/members/members-home.pl
6) Hit "Search". Notice the "library" and "category" columns grow in width to match the largest option (added in previous steps)
7) Apply patch, add the following CSS to IntranetUserCSS:
.dt-select-filter{
	max-width:200px;
}
8) repeat 5) and 6). Notice the columns no longer grow in width.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 19:54:37 +02:00
0f31a5c9bc
Bug 35151: DBRev 23.12.00.024
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 19:54:36 +02:00
5e0d5d8c73
Bug 35151: (follow-up) Remove ILLModuleCopyrightClearance from sysprefs.sql
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 19:54:36 +02:00
c1ac7b4db9
Bug 35151: Convert ILLModuleCopyrightClearance system preference to additional contents
This patch moves the ILLModuleCopyrightClearance system preference into
HTML customizations, making it possible to have language- and
library-specific content.

To test you should have some content in the ILLModuleCopyrightClearance
system preference before applying the patch. Apply the patch, run the
database update process, and rebuild the OPAC CSS.

- In the staff client, go to Tools -> HTML customizations and verify
  that the content from ILLModuleCopyrightClearance is now stored there.
- The HTML customization entry form should offer
  ILLModuleCopyrightClearance as a choice under "Display location."
- Update and reinstall active translations (for instance fr-FR):
  - perl misc/translator/translate update fr-FR
  - perl misc/translator/translate install fr-FR
- Enable the translation if necessary under Administration -> System
  preferences -> language.
- Enable the "opaclanguagesdisplay" preference if necessary.
- Edit the ILLModuleCopyrightClearance HTML customization and add unique
  content to the "fr-FR" tab.

- Enable the "ILLModule" and "ILLModuleUnmediated" system preferences if
  necessary. You must have at least one ILL backend installed.
- Log into the OPAC and click the "Interlibrary loan requests" in the
  sidebar menu on the user summary page.
- Click "Create new request."
- You should be taken to a page with your ILLModuleCopyrightClearance
  content shown along with "Yes" and "No" buttons.
  - Clicking "Yes" should take you to the form for creating a new
    request.
- Switch to your updated translation and confirm that the content
  appears correctly.
- Remove all "ILLModuleCopyrightClearance" html customizations. Test the
  "Create new request" process in the OPAC again.
  - There should be no confirmation step before arriving at the form for
    creating a new ILL request.
- Go to Administration -> System preferences and search for
  "ILLModuleCopyrightClearance." It should return no results.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 19:54:35 +02:00
a4855c3ce2
Bug 36105: Add 'No status alias' option
1) Install FreeForm and enable ILLModule, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
2) Visit /cgi-bin/koha/admin/authorised_values.pl add search for 'alias', click on ILL_STATUS_ALIAS
3) Click on the 'New authorized value for ILL_STATUS_ALIAS' button and add 'alias_code' in authorized value and 'Alias Description' in Description
4) Visit /cgi-bin/koha/ill/ill-requests.pl and create a new FreeForm request
5) After created, click 'Manage request', and then click the 'Edit request' button
6) Edit the Status and select 'Alias Description', click 'Submit'
7) Create a second request but do not set a status alias this time
7) Visit /cgi-bin/koha/ill/ill-requests.pl and select 'Alias description' on the 'Status aliases:' left-side filter
8) Notice the correct record is returned.
9) Now repeat 7) and select 'No status alias'. Notice the request with an empty status_alias is returned
10) Repeat 7 but select 'All status aliases'. Notice both requests are returned

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nell O’Hora <nohora@aub.ac.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 19:54:35 +02:00
d7d22d38b8
Bug 32132: DBIC schema update
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 19:54:34 +02:00
065555dfc6
Bug 32132: DBRev 23.12.00.023
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 19:54:34 +02:00
Emmi Takkinen
d5e54b584b
Bug 32132: Do not allow NULL value in column aqbudgets.budget_period_id
If budget_period_id column is set as NULL, "Late orders"
page dies on error 500. Logs read:

Template process failed: undef error - DBIC result _type isn't of the _type Aqbudget at
/home/koha/Koha/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt line 157

This patch makes changes to column aqbudgets.budget_period_id so that it
no longer allows NULL values. This is in line with aqbudgets tables foreign key
"budget_period_id" which has ON DELETE CASCADE clause.

To test:
1. Run prove t/db_dependent/Koha/Acquisition/Fund.t
=> Tests should fail
2. Run updatedatabase.pl and restart services if needed
3. Rerun prove t/db_dependent/Koha/Acquisition/Fund.t
=> Tests should now pass

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 19:54:33 +02:00
66ddaa0131
Bug 35724: DBIC schema update
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 18:31:38 +02:00
e9da79efe1
Bug 35724: DBRev 23.12.00.022
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 18:31:37 +02:00
d1bd2e9c03
Bug 35724: (QA follow-up) Also account for port in FTP
We were only passing port into SFTP connections.. now that we allow
defining it, we should also pass it to FTP connections just in case
someone is still using those.

This patch adds such functionality and defaults to port 21 in this case
when the port isn't defined.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 18:31:37 +02:00
e881ace64a
Bug 35724: Sync database update and kohasctructure and set to int(11)
We use int(11) in the smtp_servers table for port, so I think it makes
sense to use the same here too.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 18:31:36 +02:00
0c6a2bd1ad
Bug 35724: Define non-standard ports for EDI SFTP in EDI accounts
Not all EDI vendors accept Koha servers connecting on port 22, sometimes
they require a different port to be used, so it would be helpful for
librarians to be able to configure non-standard EDI SFTP ports
themselves.

Test plan:
1. Set EDIFACT syspref = 'Enable' and define a EDI account: Administration > Acquisition parameters > EDI
accounts.
2. Create an EDI order: https://koha-community.org/manual/latest/en/html/acquisitions.html#ordering-via-edi
3. Confirm you can upload the EDI order and download the vendor invoice.
4. Apply patches, update database, and restart services.
5. Go to the EDI account you made in #1.
6. Confirm there are two new fields: Upload port and Download port, both
have the value of 22.
7. Create a new EDI order.
8. Confirm you can upload the EDI order and download the vendor invoice.
9. Change the EDI account. Set the Download port = 10022.
10. Create a third EDI order.
11. Confirm you can upload the EDI order and download the vendor
invoice.

Sponsored-by: Waikato Institute of Technology, New Zealand
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 18:31:36 +02:00