Commit graph

51255 commits

Author SHA1 Message Date
772337f525
Bug 31383: (QA follow-up) Do not return 0 in ->get
The last statement evaluated is the if( $content->count ).
If that evaluates to false, the false expression value is returned.
In this case that is 0.
We should just return undef or empty list (scalar/list context).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 14:44:00 -03:00
a072b5305e
Bug 31383: Restore updated_on for individual content
Sponsored-by: Rijksmuseum, Netherlands
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 14:44:00 -03:00
8c68dd2c2a
Bug 31383: DBIC specific
Sponsored-by: Rijksmuseum, Netherlands
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 14:43:59 -03:00
35ab9f625d
Bug 31383: DBIC changes
Sponsored-by: Rijksmuseum, Netherlands
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 14:43:58 -03:00
aaae302382
Bug 31383: DB changes
Sponsored-by: Rijksmuseum, Netherlands
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 14:43:58 -03:00
44d1ebece8
Bug 31383: Adjust and add tests
Sponsored-by: Rijksmuseum, Netherlands
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 14:43:57 -03:00
f5ac2916f2
Bug 31383: Create a parent-child DB relation for additional content
In the design of additional contents the idea of a parent-child relation is implicitly present. You have a default page and translations.
But we do this in one table coming from the old news items.

Several reports show that we would be better off creating a parent table listing the main news items, CMS pages or HTML content. And a child table containing the title, content and lang.

Note that this first step is a prelimenary step to clean this area and make it more robust and extensible. More enhancements to come.

What is this patchset doing?
* DB changes
- Rename additional_contents.idnew with id
- Create a new table additional_contents_localizations(id, additional_content_id, title, content, lang) that will contain the translated contents
- Move the content to this new table
- Remove title, content and lang columns from additional_contents
- Replace the notice templates that are using ''<news>" (should only be ISSUESLIP) and remove support for this syntax. Also add a warning in case other occurrences of uses of the old syntax exist.

* CRUD
- We add a new Koha::AdditionalContentsLocalization[s] couple, and move some logic from Koha::AdditionalContent[s] to there. Note that, to prevent too much drastic changes in notice templates, and to make them easy to use, the different attributes of the content object is accessible from the translated content object (ie. Koha::AdditionalContentsLocatlization->library is available and return $self->additional_content->library). I think it's an elegant way to keep things simple.
- No changes expected for "NewsLog" logging
- Little behaviour changes for pages, see tools/page.pl changes. We are now passing the id of the content, and the desired language, instead of the mix of "page_id" or code and lang. Note that here we certainly need to rename "language" query param to not change the full interface language.

Test plan:
0. Preparation steps, use master
  a. Create notice templates that are using "<< additional_contents.code >>". This won't be replaced, but we want the update process to alert us.
  b. Create several news, additional contents, pages. Some with translated contents, some without.
  c. Make sure ISSUESLIP has the "<news>" section. If you are using the sample data there is nothing to do here
  d. Turn on NewsLogs
1. Apply the patches, restart_all, updatedatabase
=> Confirm that the new table is created and filled with the contents you had prior to the update
=> Confirm that additional_contents_localizations.updated_on has been kept to the previous values
=> Confirm that ISSUESLIP has been replaced properly
=> Confirm that you get a warning about the additional_contents
2. Create, update, delete news, html customs, pages
=> Confirm that the additional_contents_localizations.updated_on is only adjusted when required
=> Confirm that the logs are correctly created when NewsLogs is on
3. Check some items out, generate a slip
=> Confirm that the news are displayed at the bottom of the slip, and that the publication date is correctly formatted
4. Have several HTML customizations (like OpacNav, opacheader), in translated in different languages
=> Confirm that the default values is displayed when you are using the interface in a language without translation
=> Confirm that the translated version is picked when it exists

Notes for QA:
* I am not sure we really need the alert during the update DB process about the additional_contents leftover. We should not have them outside of ISSUESLIP.
Shouldn't it hurt?
* There is something ugly in sample_news.yml, the id is hardcoded. But how do we prevent that and keep translatability?

Sponsored-by: Rijksmuseum, Netherlands
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 14:43:56 -03:00
55a30f7c15
Bug 25816: DBRev 23.06.00.040
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 14:43:56 -03:00
474d6c7462
Bug 34831: Add input types "tel", "email" and "url" to vendor edit form
This patch updates the vendor edit form so that phone, email, and url
fields have an input type corresponding to the field's content.

To test, apply the patch and go to Acquisitions.

- Create or edit a vendor.
- In the form, check that each field looks correct:
  - Company details ->
    - Phone
    - Fax
    - Website
  - Contact details
    - Phone
    - Alternative phone
    - Fax
    - Email
  - Interfaces
    - URI
    - Account email

In a desktop browser the inputs won't display any differently, but if
you test the patch in a sandbox you can try it in a mobile device
browser to confirm that the onscreen keyboard changes based on the type
of input.

Signed-off-by: Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:43:04 -03:00
Laura Escamilla
0566556cb0
Bug 34501: Added Non-public notes to the member purchase suggestion table
Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:43:04 -03:00
cd033bfc60
Bug 34171: Use barcodedecode when attaching items to another record
Bug 26351 added barcodecode that transforms scanned barcodes either
by using itemBarcodeInputFilter  or via a plugin to various pages in
Koha, including checkout and checkin. But the feature for attaching
items to a new record was missed.

To test:
* Add an item with barcode "ab" to any record
* Set itemBarcodeInputFilter to "Remove spaces from"
* Search for another record in the catalog
* Edit > attach item > "a b"
* The item is not found.
* Apply patch, restart_all
* Try again with "a b"
* Verify that the item is found and attached to the record

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:43:03 -03:00
aa771cf3ec
Bug 34547: (follow-up) add recall cases
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:43:02 -03:00
f25fa87198
Bug 34547: Add transfer reason to checkedintable on returns.tt
To test:
1. Apply patch, restart_all
2. Check some items out and prepare some reasons that would initiate a branchtransfer. According the schema it can be any of the following: 'Manual', 'StockrotationAdvance', 'StockrotationRepatriation', 'ReturnToHome', 'ReturnToHolding', 'RotatingCollection', 'Reserve', 'LostReserve', 'CancelReserve', 'TransferCancellation', 'Recall', 'RecallCancellation.
3. CHeck in some the items and notice the 'Transfer reason' column in the table. Make sure the reasons are acurate and make sense.
4. To go Table settings and find the 'checkedintable'. Make sure you can properly hide the column from the display.

Signed-off-by: AndrewA <andrew.auld@ptfs-europe.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:43:02 -03:00
5282a9c4ce
Bug 33947: Remove GetAllIssues
No more occurrences of GetAllIssues, remove it!

Test plan:
  git grep is your friend

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:03:03 -03:00
31c4ecce6a
Bug 12732: (follow-up) Use data-order instead of data-sort
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:03:03 -03:00
bb69f4c384
Bug 12732: Add basket creation date to late orders table for sorting
This patch modifies the late orders page so that the table of
information contains a column for basket creation date. This will allow
administrators to configure the table to sort by default on basket
creation date if they wish.

To test, apply the patch and restart services.

- Go to Acquisitions -> Late orders.
- The table of late orders should include a column labeled "Basket date"
  showing the basket creation date.
- The dates should be formatted correctly and the column should sort
  correctly.
- Go to Administration -> Table settings and navigate to the settings
  for the lateorders page.
- Try changing various settings for the table to confirm that everything
  works correctly, including setting the default sort to use the basket
  date column.

Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:03:02 -03:00
4e3b0d6161
Bug 25816: (QA follow-up) Add system preference
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:03:02 -03:00
Matthias Meusburger
71b22b663c
Bug 25816: Add opac messages in SIP display.
Test plan:

 - Add one or more opac messages to a patron
   (patron detail -> add message -> Add a message for: OPAC)

 - Check that the messages will be displayed, with correctly formatted dates.

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:03:01 -03:00
e8b66cadf2
Bug 34014: (follow-up) No need to parse old record before updating
If the old record doesn't parse correctly it will cause a failure - the check is just to ensure we
are editing an existing biblio, just getting the metadata object should confirm it exists

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:03:00 -03:00
f7630f5de4
Bug 34014: (follow-up) Tidy
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:03:00 -03:00
5506a031ed
Bug 34014: Unit test
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:02:59 -03:00
8dc2152e2f
Bug 34014: Add support for advanced cataloging editor
To test:
1 - Enable the advanced cataloging editor
2 - Edit record 369 in the advanced cataloging editor
3 - On load, get a notice that there were issues and to check logs
4 - Save record
5 - Close and reopen in editor
6 - Confirm warning is gone

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:02:58 -03:00
66d519ae41
Bug 34014: Allow staff to edit degraded records
This patch adds an eval to the call for the record form metadata

If there is an error we catch it, display it, and attempt to strip bad characters from the record

To test:
1 - In koha testing docker attempt to view record 369 in the staff interface
2 - You see a warning about degraded view
3 - Attempt to edit the record
4 - Internal server error
5 - Apply patch, restart all
6 - Reload the editor
7 - Record successfully loads!
8 - You have a warning about encoding issues!
9 - Save the record
10 - No more warning!
11 - Edit again, no more warning!

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:02:58 -03:00
b905bf5d0e
Bug 35098: Fix display of clickable batch name in ILL table
Test plan, k-t-d:
1) Install FreeForm and enable ILLmodule, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
2) Install an ILL availability plugin (e.g. pubmed):
https://github.com/PTFS-Europe/koha-plugin-api-pubmed/releases/tag/1.1.1
3) restart plack:
koha-plack --restart kohadev
4) Create a new ILL batch, visit:
/cgi-bin/koha/ill/ill-requests.pl
5) Click '+New ILL requests batch'
6) Input a name, '42' on the cardnumber and pick a library. Click 'Continue'.
7) On the identifiers textarea, insert '123' and click 'Process identifiers'
8) After the metadata has been retrieved, click the bottom 'Add items to batch' button, click 'Finish and view batch'
10) Go back to ILL requests table, visit:
/cgi-bin/koha/ill/ill-requests.pl
11) On the top right of the table, click 'Columns' and enable Batch
12) Notice the batch column now shows correctly and is clickable

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:02:57 -03:00
5797f5095e
Bug 34990: Add persistent header when sending msg to RabbitMQ
Test plan:
NOTE: It is very hard to add a Koha unit test for adding this
single header when communicating to RabbitMQ via Stomp plugin.
When we would mock the send, we are only testing if perl can
pass a hashref to a subroutine ;)

Do NOT yet apply this patch.
Make sure that RabbitMQ runs.
Stop the koha-worker for long_tasks:
  koha-worker --stop --queue long_tasks myclone
Stage a MARC file.
Check queues with rabbitmqctl list_queues.
Look for: koha_myclone-long_tasks 1  (at least 1)
Stop rabbitmq (something like /etc/init.d/rabbitmq-server stop)
Start rabbitmq (/etc/init.d/rabbitmq-server start)
Check queue again with with rabbitmqctl list_queues.
Look for: koha_myclone-long_tasks 0
Your messages have been gone.

Now apply this patch.
Reiterate the former steps. But note that you will still see
a non-empty queue in the last step:
koha_myclone-long_tasks 1 (at least 1)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:02:56 -03:00
709dabb7e8
Bug 32305: Counterpart for es_indexer_daemon.pl
This is a kind of copy-and-paste variant of background worker.
We probably could do better than having two scripts here ;)

Test plan:
See former test plan. Apply it to ES indexing.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Removed queue from query at MQ side. Discussed on IRC.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:02:56 -03:00
f1edd8fe77
Bug 32305: Worker should ignore wrong status or queue in MQ mode
MQ mode: The worker has seen that MQ is running and consumes messages
instead of polling db only.

Test plan:
Stop worker for long tasks.
Make sure that Rabbit MQ runs.
Stage a file. (This adds a long task.)
Goto staff view of jobs and cancel this job.
Check if job is still in MQ with rabbitmqctl list_queues.
Now start worker for long tasks.
Check if job is gone in MQ with rabbitmqctl list_queues.
And check logfile for the adjusted warning like:
  [WARN] Job 5 not found, or has wrong status/queue main:: /usr/share/koha/misc/workers/background_jobs_worker.pl (134)

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Removed queue from query at MQ side. Discussed on IRC.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:02:55 -03:00
82e0edd876
Bug 35053: Make sure request is checked as an item-level request if item_id passed
This patch makes the validation code have the `$item` variable defined
when checking holdability, in the case both `item_id` and `biblio_id`
params are passed.

Otherwise, if the requested item is not holdable, but a biblio-level
hold *could* be placed, the item-level hold is placed.

This is highlighted by the regression tests.

To test:
1. Apply the regression tests patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/holds.t
=> FAIL: Tests don't pass. A request that should be rejected is allowed
because biblio-level hold is allowed.
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass! Item-level rules are checked and thus the
request rejected (code 403)
5. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:02:55 -03:00
683b74d202
Bug 35053: Regression tests
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:02:54 -03:00
bd30e81f12
Bug 35081: Make it possible to translate catalog concern status messages
The JavaScript in both OPAC and staff interface for submitting catalog
concerns contains English strings which are not properly wrapped with
the __() function to allow for translation. This patch fixes both
affected files.

The patch also modifies the dialog classes used in the staff interface
so that the messages are styled consistently.

To test, apply the patch and update a translation, e.g. fr-FR:
   - perl misc/translator/translate update fr-FR
- Edit the updated po file for the language you chose, e.g.
  misc/translator/po/fr-FR-messages-js.po, to fill in translated
  strings for the two catalog concern entries. For example:

  koha-tmpl/intranet-tmpl/prog/js/modals/add_catalog_concern.js:38
  koha-tmpl/opac-tmpl/bootstrap/js/modals/catalog_concern.js:55
  msgid "Your concern was sucessfully submitted."
  msgstr ""

- Install the updated po file:
   - perl misc/translator/translate install fr-FR
- Enable the translation if necessary under Administration -> System
  preferences -> language.
- Enable the "opaclanguagesdisplay" preference if necessary.
- Enable the " CatalogConcerns" preference if necessary.
- Locate a bibliographic record in the staff interface and view the
  detail page
  - From the toolbar, choose New -> New catalog concern.
  - Test submitting the form. When the form is submitted a message
    should display on the page: "Your concern was sucessfully submitted"

- Perform the same test in the OPAC, where the "Report a concern" link
  is in the right-hand sidebar menu of the bibliographic detail page.

- Perform the same tests, in both OPAC and staff interface, in your
  translated language to confirm that the translations show up
  correctly.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:02:53 -03:00
eec5d7e4be
Bug 35101: Stop screen from jumping back to top when using barcode.pl plugin
To test:
1. Set 'autoBarcode' to something other than 'don't generate automatically'
2. If the a framwwork make sure some 952 fields have the barcode.pl plugin enabled
3. Add a new item and click the '...' next to the 952 field with the barcode.pl plugin enabled.
4. The screen jumps back to the top, annoying.
5. Apply patch
6. Try again, it should not jump anymore!

Signed-off-by: Barbara Johnson <barbara.johnson@swbell.net>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:02:53 -03:00
f50d2c7d0e
Bug 35099: (bug 26314 follow-up) Fix detail view for records with invalid MARCXML
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 11:02:52 -03:00
b28f7ad0e6
Bug 30708: Last spec fixes
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 10:00:58 -03:00
a7237dde72
Bug 30708: Fix API specs
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 10:00:58 -03:00
fbb05f1487
Bug 30708: Add missing koha_object(s)_class definitions
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 08:48:46 -03:00
1ee763b709
Bug 30708: Some spec fixes
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 08:43:45 -03:00
f19531d908
Bug 30708: Add 'preservation' to Makefile.PL
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 08:33:34 -03:00
Katrin Fischer
5db28348ea
Bug 34300: (QA follow-up) Add permission check and fix missing table cells
* Changes text from "Place a hold on order" to the more common "Place hold"
* Adds permission check on reserveforothers.
* We were missing table cells in the footer rows of the table.

I would have liked to hide the column for someone missing permissions,
but I failed to get the datatable configuration right with the export
and column configuration settings.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 08:15:25 -03:00
01602b59d5
Bug 32721: DBRev 23.06.00.039
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-19 16:00:58 -03:00
d822253071
Bug 32721: Atomic update fixes
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-19 16:00:57 -03:00
96cac12e1d
Bug 32721: DBIC schema
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-19 16:00:56 -03:00
c48421e6ff
Bug 32721: (QA follow-up) Drop fields from API response
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Bug 32721: (QA follow-up) Rename fields to opac*

This patch updates the field names to reflect that they're OPAC
related.

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

Bug 32721: (QA follow-up) Fix rebase errors

We let some superflous template params creep back in during a rebase
somewhere.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-19 16:00:56 -03:00
a96761bd51
Bug 32721: (QA follow-up) Add exec flag to DB update and expand tests
Added tests for case of no branch specific settings and when no branch passed

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-19 16:00:55 -03:00
e75461d6f0
Bug 32721: Highlight the branch specific option from the global syspref
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-19 16:00:55 -03:00
6deab09c13
Bug 32721: (QA follow up) - fix QA issues
This patches addresses issues raised by the QA tests. It also adds a missed import of the Branches file in the document head

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Bug 32721: (QA follow-up) Add missing imports

Missing imports added in three template files
Exec flag added to atomic update file
Tinymce imports removed

A new bug will be created to move codemirror into an inc file at latest
version

Test plan as before

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Bug 32721: Tidy up - duplicate fetching of userjs and css

Currently UserJS and UserCSS is injected into the template as a parameter through Auth.pm but is then fetched using Koha.Preference() in the template. This patch tidies this up by removing the parameters from Auth.pm

Test plan as per first commit

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-19 16:00:54 -03:00
dd3d59f1f8
Bug 32721: Add unit tests
Unit tests to test two new functions: GetBranchSpecificJS and GetBranchSpecificCSS

Test plan:
1) In the shell run prove -t t/db_dependent/Template/Plugin/Branches.t

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-19 16:00:53 -03:00
6eea26c729
Bug 32721: Database update to add userjs and usercss to branches table
This patch adds the columns for userjs and usercss to the branches table

Test plan as per previous commit

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-19 16:00:53 -03:00
82e2547e1b
Bug 32721: Add branch specific userjs and usercss
This patch allows for branch specific userJS and userCSS to be added through the libraries table. This works in conjunction with the global UserJS and UserCSS functionality and allows for multiple OPACs with different css and js options.

Test plan:
1) Add to apache conf (/etc/apache2/sites-available/kohadev.conf)
    SetEnv OPAC_BRANCH_DEFAULT "FFL"
    RequestHeader add X-Koha-SetEnv "OPAC_BRANCH_DEFAULT FFL"
2) In the container, run restart_all
3) Navigate to the OPACUserJS and OPACUserCSS system preferences and add the following: OPACUserJS - console.log('Hello from global sysprefs');, OPACUserCSS - 'body { background-color: black; }'
4) Refresh the OPAC and the background should be black and the message should be logged to the console in developer tools
5) Navigate to Administration > Libraries
6) On the Fairfield branch (if this does not exist you will need to create a branch with a code matching the code that you added to the apache conf file), click edit
7) At the bottom there should be two fields to add userjs and usercss, complete with Codemirror syntax checking
8) In userjs add console.log('Hello from branch level'); and in usercss add 'body { background-color: blue; } then save
9) Return to the OPAC and refresh
10) If you are logged out of the OPAC it should now be logging both the message from global and from the branch level and the background should be blue (if not you will need to log out)
11) Log back into the OPAC using a user that DOES NOT have a default branch matching the branch you added to the Apache conf
12) The OPAC should now revert to only showing the global message in the console with a black background

Sponsored-by: PTFS Europe

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-19 16:00:52 -03:00
7e23abcccb
Bug 34531: Fix template logic to not hide patron restrictions
To test:
1. From BorrowerUnwantedFields Hide Gone no address flag (gonenoaddress) and Lost card flag (lost).
2. Got to memberentrygen.tt and see that Patron restrictions is now hidden
3. Apply patch, now the Patron restrictions field should not be hidden.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-19 16:00:51 -03:00
dc9f6f09d8
Bug 35078: Remove invalid HTML from OpacShowSavings system preference
The options defined for the OpacShowSavings system preference contain
HTML: "on patron's checkout history page (the system preference
<em>opacreadinghistory</em> must be enabled)". This text ends up in an
<option> tag, and even though the form is rendered using the
multiple-select plugin the HTML still won't render and should
be removed.

To test, apply the patch and restart all.

- Go to Administration -> System preferences and search for
  "OpacShowSavings"
- Check the dropdown of options on the preference. The system
  preference names referred to should now be single-quoted instead of
  wrapped in visible <em> tags.
- Confirm that the preference still works correctly.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-19 16:00:51 -03:00