koha.git
14 months agoBug 33238: Fix bad suggestions query (Bug 29886 follow-up)
Janusz Kaczmarek [Wed, 15 Mar 2023 19:25:53 +0000 (20:25 +0100)]
Bug 33238: Fix bad suggestions query (Bug 29886 follow-up)

With IndependentBranches Koha explodes with Error 500 when a non
superlibrarian tries to add to basket from suggestions.  In errorlog you
would find "DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception:
DBD::mysql::st execute failed: Column 'branchcode' in where clause is
ambiguous".

Test plan:
==========
1. Have a Koha instance with IndependentBranches, some accepted
   suggestions, and a vendor defined.
2. Be a non superlibrarian librarian with permissions to
   manage acquisitions.
3. Create a new basket and try to add an item to the basket
   "From a suggestion".
4. Koha would generate error 500.
5. Apply the patch.
6. Try to add an item to the basket "From a suggestion".
7. You should succeed.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 18829: (QA follow-up) Replace forbidden indirect syntax
Tomas Cohen Arazi [Mon, 17 Apr 2023 11:24:12 +0000 (08:24 -0300)]
Bug 18829: (QA follow-up) Replace forbidden indirect syntax

This pattern is forbidden and was overlooked by QA.

To test:
1. Run:
   $ ktd --shell
  k$ prove t/00-testcritic.t
=> FAIL: Tests fail with 'Subroutine "new" called using indirect
syntax...'
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 18829: (QA follow-up) I18N, test character and breadcrumbs
Katrin Fischer [Mon, 10 Apr 2023 17:00:21 +0000 (17:00 +0000)]
Bug 18829: (QA follow-up) I18N, test character and breadcrumbs

* Removes a 'heart' character from the file, probably added for testing
* Corrects breadbrumbs to make QA test tool happy
* Makes JS message translatable (test by manipulating the link to an invalid record number in DOM)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 18829: (follow-up) Don't messup record encoding
Nick Clemens [Mon, 27 Mar 2023 12:04:56 +0000 (12:04 +0000)]
Bug 18829: (follow-up) Don't messup record encoding

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 18829: (follow-up) Return 404 when record cannot be loaded
Nick Clemens [Mon, 27 Mar 2023 11:53:45 +0000 (11:53 +0000)]
Bug 18829: (follow-up) Return 404 when record cannot be loaded

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 18829: (QA follow-up) Fix punctuation, capitalization and page title
Katrin Fischer [Sat, 22 Aug 2020 10:05:19 +0000 (10:05 +0000)]
Bug 18829: (QA follow-up) Fix punctuation, capitalization and page title

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 18829: Elasticsearch - Put a better display for the view of ES indexed record
Axel Amghar [Mon, 29 Apr 2019 09:27:49 +0000 (11:27 +0200)]
Bug 18829: Elasticsearch - Put a better display for the view of ES indexed record

To test:
- apply the patch
- go to global sysPref
- make sure that SearchEngine have "ElasticSearch" as value
- Search whatever you want in Search the catalog and select a record
- Search the link (Ctrl f) : "Elasticsearch Record :" , click on the link
- make sure that the pop-up open and you should see the elasticsearch result in JSON (the pop-up look the same as MARC preview)
- note fields are alphabetized
- from the command line delete the es record:
    curl -XDELETE es:9200/koha_kohadev_biblios/data/5
- click the preview link, it syas record not found
- check the logs - you see the error on missing record

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33229: Remove unecessary txn
Jonathan Druart [Wed, 22 Mar 2023 13:34:28 +0000 (14:34 +0100)]
Bug 33229: Remove unecessary txn

We don't need a transaction here.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33229: Clear patron reading history when privacy is set to never
Nick Clemens [Tue, 14 Mar 2023 20:02:10 +0000 (20:02 +0000)]
Bug 33229: Clear patron reading history when privacy is set to never

This patch adds a check to patron store routine. When privacy is changed
to 'Never' we should immediately clear their history

To test:
1 - Set system preferences:
   AnonymousPatron - to a valid borrowernumber
   OPACPrivacy - Allow
2 - Checkout some items to a patron with priacy set to default, return them
3 - Log in to opac as patron
4 - Confirm you can see your history
5 - Change history to Never
6 - Confirm history still viewable
7 - Apply patch, restart all
8 - Set privacy to Default
9 - Confirm you can still see history, not deleted when not set as Never
10 - Set privacy to 'Never'
11 - Confirm history is anonymized

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33181: Use template wrapper for tabs on record merge pages
Owen Leonard [Thu, 9 Mar 2023 15:43:24 +0000 (15:43 +0000)]
Bug 33181: Use template wrapper for tabs on record merge pages

This patch updates the include file which is used by both the
bibliographic and authority recrd merge pages. The markup is updated to
use the new tab WRAPPER directives.

To test, apply the patch and perform a catalog search which will return
more than one record.

 - Select two or more records and choose "Merge records" from the edit
   menu at the top of the search results.
 - On the following page you should see one tab for each record you
   selected from the search results.
 - Clicking each tab should show you the correct bibliographic details.

Perform the same tests from the authority search results page.

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33187: Use template wrapper for tabs article requests and holds awaiting pickup...
Owen Leonard [Thu, 9 Mar 2023 19:28:47 +0000 (19:28 +0000)]
Bug 33187: Use template wrapper for tabs article requests and holds awaiting pickup pages

This patch updates the article requests management and holds awaiting
pickup templates in the staff interface so that they use the new WRAPPER
directive for building tabs.

To test, apply the patch and make sure the ArticleRequests system
preference is enabled.

- Go to Circulation -> Article requests
- You should see three tabs, "New," "Pending," and "Processing."
- The tabs should look correct and work correctly.
- Go to Circulation -> Holds awaiting pickup
- You should see three tabs, "Holds waiting", "Holds waiting over X
  days," and "Holds with cancellation requests." ("X" is the value in
  the ReservesMaxPickUpDelay system preference)

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33129: Use template wrapper for breadcrumbs: Administration part 6
Owen Leonard [Fri, 3 Mar 2023 16:01:41 +0000 (16:01 +0000)]
Bug 33129: Use template wrapper for breadcrumbs: Administration part 6

This patch updates several administration templates so that they
use the new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

Administration ->
 - Search engine configuration (Elasticsearch)
 - Share content with Mana KB
 - Circulation and fine rules
 - SMS cellular providers (SMSSendDriver preference must be set)
 - System preferences -> Local use (list, add, edit, confirm delete)
 - Library transfer limits (Advanced editor)
 - Transport cost matrix
 - Usage statistics
 - Z39.50/SRU servers administration (list, add, edit, both Z39.50 and
   SRU servers)

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33191: AutoEmailPrimaryAddress options don't match labels in memberentry
Caroline Cyr La Rose [Mon, 13 Mar 2023 19:32:38 +0000 (15:32 -0400)]
Bug 33191: AutoEmailPrimaryAddress options don't match labels in memberentry

This patch changes the wording for the EmailFieldPrimary system
preference to make it clearer.

To test:
1. Go to Administration > Global system preferences
2. Search for EmailFieldPrimary
3. Read the sentence and choices, make sure it makes sense, grammar and
   spelling are correct
4. Optionally, try the different options, they should work as before

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33192: DBRev 22.12.00.020
Tomas Cohen Arazi [Fri, 14 Apr 2023 14:31:04 +0000 (11:31 -0300)]
Bug 33192: DBRev 22.12.00.020

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33192: (QA follow-up) Add execution bit
Tomas Cohen Arazi [Fri, 14 Apr 2023 14:29:22 +0000 (11:29 -0300)]
Bug 33192: (QA follow-up) Add execution bit

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33192: (QA follow-up) Fix it-IT sample data and unit tests
Katrin Fischer [Mon, 10 Apr 2023 14:40:56 +0000 (14:40 +0000)]
Bug 33192: (QA follow-up) Fix it-IT sample data and unit tests

To test:
* prove t/db_dependent/Message.t
* Run the it-IT web installer and make sure 'email' is set.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33192: Update all occurrences of AutoEmailPrimaryAddress
Martin Renvoize [Mon, 13 Mar 2023 14:05:51 +0000 (14:05 +0000)]
Bug 33192: Update all occurrences of AutoEmailPrimaryAddress

This patch updates all references to AutoEmailPrimaryAddress to refer to
EmailFieldPrimary instead.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33192: Update AutoEmailPrimaryAddress to EmailFieldPrimary
Martin Renvoize [Mon, 13 Mar 2023 14:04:45 +0000 (14:04 +0000)]
Bug 33192: Update AutoEmailPrimaryAddress to EmailFieldPrimary

This patch updates the database to reflect the new name for the
AutoEmailPrimaryAddress system preferences

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33509: Don't show Other holdings when there are no alternate holdings
Katrin Fischer [Wed, 12 Apr 2023 19:58:03 +0000 (19:58 +0000)]
Bug 33509: Don't show Other holdings when there are no alternate holdings

With bug 33509 alternate holdings defined in AlternateHoldingsField
are shown in the staff interface result list. This works greatly
when there are items or when there is are alternate holdings (the
configured field/subfields exist in the record), but not when there
are no items and no alternate holdings.

To test:
* Add 100a to AlternateHoldingsField
* Make a search with some records without items
  Sample data: perl
* Make sure the alternate holdings show when there are no items
  and 100a exists
* Change to 100z
* Verify the result list now shows "Other holdings:" with nothing below
* Apply patch
* Repeat
  * Alternate holdings should still show nicely
  * Without alternate holdings 'no items' is displayed

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33231: (QA follow-up) Simplify conditional for date display
Nick Clemens [Thu, 13 Apr 2023 16:27:57 +0000 (16:27 +0000)]
Bug 33231: (QA follow-up) Simplify conditional for date display

This patch simply checks if we have a value for copyrighydate and
displays publicationyear if not. Even if copyrightdate is requested (MARC21)
but isn't populated, the publicatoinyear won't replace it because we
haven't transformed that field.

I think this read a bit easier, but RM can weigh in

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33231: (Bug 30813 follow-up) No publication date nor edition statements in Z39...
Janusz Kaczmarek [Tue, 14 Mar 2023 21:30:31 +0000 (22:30 +0100)]
Bug 33231: (Bug 30813 follow-up) No publication date nor edition statements in Z39.50 biblio search results

After executing Z39.50 search, the result table is not populated
with publication dates.  This is the result of code refactoring
made by Bug 30813.  The removed function _add_rowdata treated
in special way the publication date putting it in $row in under
special, non MARC variant dependent key 'date'--since
the z3950_search.tt looks under breeding_loo.date.

Same effect (no data in the result table) with edition statement.
Reason: editionstatement coming from TransformMarcToKoha vs edition
expected by z3950_search.tt.

Test plan:
==========
1. Have a Koha instance with some Z39.50 servers defined.
2. In Cataloging, perform a Z39.50 search for any term.
3. In the result table you would not get the publication dates nor
   edition statement (if present in the record).
4. Apply the patch.
5. Repeat the search.
6. You should see the publication dates (according to the current
   mapping, i.e. for MARC 21 coming from 260 $c or 264 $c subfield)
   and edition statements from the records found.

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>
14 months agoBug 31695: Type standard number is missing field ci_raw in field_config.yaml
Fridolin Somers [Wed, 5 Oct 2022 20:21:14 +0000 (10:21 -1000)]
Bug 31695: Type standard number is missing field ci_raw in field_config.yaml

In Elasticsearch fields config field_config.yaml, default type as a field 'ci_raw'. This is used for exact search.
This field is missing for type  standard number 'stdno'.

Test plan :
1) In the staff interface, go to Administration, and search for SearchEngine
2) Make sure that the SearchEngine preference is set to Elasticsearch and save
3) Return to Administration and select "Search engine configuration"
4) Change the type of "Heading-Main" to "Std. Number" and save
5) Rebuild the index (e.g. "koha-elasticsearch --rebuild -d kohadev")
6) Go to the main staff page and select Authorities
7) Search for a heading (e.g. "A Dual-language book")
=> Result is found with or without patch
8) Click on the sliders and select "is exactly" for the operator and search
=> Result is found only with patch
9) Apply the patch
10) Rebuild the index (e.g. "koha-elasticsearch --rebuild -d kohadev")
11) Click on the sliders and select "is exactly" for the operator and search
=> Result is found only with patch

Signed-off-by: Kevin Carnes <kevin.carnes@ub.lu.se>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33360: (follow-up) Adjust wording in verbose mode
Marcel de Rooy [Wed, 12 Apr 2023 13:17:11 +0000 (13:17 +0000)]
Bug 33360: (follow-up) Adjust wording in verbose mode

Koha reports 'sending mail' while we actually are still
processing mail. It could still be delayed, fail, etc.

Test plan:
Run process_message_queue in verbose mode. If a message
get processed, you should see:
    Processing email message to patron: 51 at /usr/share/koha/C4/Letters.pm line 1008.

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: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33360: Update koha-conf.xml
Marcel de Rooy [Wed, 12 Apr 2023 11:59:45 +0000 (11:59 +0000)]
Bug 33360: Update koha-conf.xml

Test plan:
We already tested it. Just look at changes in this patch.

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: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33360: Adjust Letters.t for limit parameter and domain limits
Marcel de Rooy [Tue, 4 Apr 2023 14:10:21 +0000 (16:10 +0200)]
Bug 33360: Adjust Letters.t for limit parameter and domain limits

Includes:
[1] Add a counter in the send_or_die mock.
[2] Correct from processed count to sent count.
[3] More extensive testing for limit parameter and domain limits.

Test plan:
Run t/db_dependent/Letters.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: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33360: Improving limit behavior in SendQueuedMessages
Marcel de Rooy [Mon, 3 Apr 2023 14:29:22 +0000 (16:29 +0200)]
Bug 33360: Improving limit behavior in SendQueuedMessages

Includes:
[1] Do no longer use the limit in the sql selection, but apply the
limit as a maximum for the number of sent messages. This is more
practical in terms of not flooding your mail server (and the
receiving ones).

[2] Replace call of _get_unsent_messages by Koha objects search.

[3] Do no longer report the number of messages seen, but report the
number actually 'sent'.

[4] If we lookup the to_address but we need to delay a message, save
the email address for the next run. Also optimizing patron lookup
in _send_message_by_email.

[5} Add support for $where parameter in SendQueuedMessages. Used by
process_message_queue.pl.

[6] Handle scalar/array for letter_code and type parameter too.

Test plan:
[1] Adjust your domain limit settings in koha-conf.
    Use notices to three domains. Group A and B.
    <message_domain_limits>
    <domain><name>A</name><limit>1</limit><unit>1h</unit></domain>
    <domain><name>B/name><belongs_to>A</belongs_to></domain>
    <domain><name>C</name><limit>1</limit><unit>1h</unit></domain>
    </message_domain_limits>
    Replace A, B and C with your choice. Do not forget the belongs_to.
    Restart all.
[2] Disable cron job for message queue.
[3] Generate two notices for each domain A, B and C (in that order).
    Make sure that borrowers involved have correct address.
[4] Run process_message_queue.pl -limit 1
[5] Check that one is sent for A, 5 pending.
[6] Run process_message_queue.pl -limit 2
[7] Check that one is sent for C, 4 pending.
[8] Run process_message_queue.pl (without limit).
[9] Check that nothing is sent, 4 pending.
[10] Check that message_queue.to_address is filled for those 4.

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: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33360: Incorporate Koha::Notice::Util in Letters:SendQueuedMessages
Marcel de Rooy [Thu, 30 Mar 2023 06:58:10 +0000 (08:58 +0200)]
Bug 33360: Incorporate Koha::Notice::Util in Letters:SendQueuedMessages

Minimal adjustment to get the feature working.
Will still be improved in follow-up.

Test plan:
[1] Add a domain limit to your koha-conf:
    <message_domain_limits>
    <domain><name>gmail.com</name><limit>1</limit> <unit>1h</unit></domain>
    </message_domain_limits>
    Replace gmail.com by the domain you want to send to.
    Restart all.
[2] Disable cron job for message queue.
[3] Generate two pending notices in the queue.
[4] Run process_message_queue.pl
[5] Check that one is sent, one is still pending.
[6] Run again.
[7] Check: nothing is sent, last one still pending.

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: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33360: Extend Koha::Notice::Util with domain groups
Marcel de Rooy [Mon, 3 Apr 2023 14:29:22 +0000 (16:29 +0200)]
Bug 33360: Extend Koha::Notice::Util with domain groups

The functionality is extended a bit here by:
[1] Allowing to combine domains in a shared count.
[2] Only counting sent messages for the specified
    domains when it is really needed.

Test plan:
Run t/db_dependent/Koha/Notice_Util.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: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33360: Add Koha::Notice::Util for mail domain limits
Marcel de Rooy [Thu, 30 Mar 2023 12:56:55 +0000 (14:56 +0200)]
Bug 33360: Add Koha::Notice::Util for mail domain limits

Ground work in new module.
Includes unit test.

Test plan:
Run t/db_dependent/Koha/Notice_Util.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: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 32956: Use template wrapper for HTML customizations tabs
Owen Leonard [Wed, 8 Feb 2023 17:46:48 +0000 (17:46 +0000)]
Bug 32956: Use template wrapper for HTML customizations tabs

This patch updates the HTML customizations template to replace tab
markup with the use of WRAPPERs.

- Apply the patch and go to Tools -> HTML customizations.
- Create or edit an entry.
- You should see tabs for each available language, for example
  Default, English, French.
- Test adding content to each language to confirm that the correct
  information is saved under the correct tab.

Signed-off-by: Philip Orr <philip.orr@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 32955: Standardize structure around action fieldsets in various templates
Owen Leonard [Wed, 1 Feb 2023 11:59:09 +0000 (11:59 +0000)]
Bug 32955: Standardize structure around action fieldsets in various templates

This patch updates various templates so that fieldsets with the
"action" class are placed outside the form's main fieldset.

To test, apply the patch and check the following pages to confirm that
changes to form structure look correct:

- Cataloging -> Quick spine label creator
- Patrons -> Patron details -> Files
- Patrons -> Patron details -> Housebound
- Circulation -> Upload offline circulation file
- Tools -> Patron card creator -> Manage -> Images
- Point of sale -> Transaction history -> "Older transactions" form

Signed-off-by: Philip Orr <philip.orr@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 31722: Fixed EDIFACT message to only display if EDIFACT is turned on
Philip Orr [Thu, 30 Mar 2023 10:09:32 +0000 (10:09 +0000)]
Bug 31722: Fixed EDIFACT message to only display if EDIFACT is turned on

This patch makes a small change to the display of the note
"No EDIFACT configuration for..." on the basket group page to
only display if the system preference EDIFACT is set to "Enable".

To Test:
1. apply patch
2. navigate to a vendor over Acquisitions -> Vendor e.g. My Vendor
3. create a basket group (doesn't have to have any baskets, an empty one will do)
4. close the basket group
5. set system preference "EDIFACT" to "Enable"
6. navigate to Administration -> EDI Accounts and make sure the vendor doesn't have
   an EDI account configured
7. navigate to your vendor's closed basket groups
   over Acquisitions -> Vendor -> Basket groups (left panel) -> Tab "Closed"
8. you should see a message "No EDIFACT configuration for (name of vendor)" in the
   Action column
9. set system preference "EDIFACT" to "Disable"
10. go back to your vendor's closed basket groups
11. you shouldn't see the message "No EDIFACT configuration for (name of vendor)"

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33375: Quote reserved keyword 'rank' in advanced editor
David Cook [Fri, 31 Mar 2023 00:55:56 +0000 (00:55 +0000)]
Bug 33375: Quote reserved keyword 'rank' in advanced editor

This change quotes the 'rank' keyword in the advanced editor,
so that it doesn't cause fatal crashes when using MySQL 8

Test plan:
0. Apply patch and koha-plack --restart kohadev
1. Enable advanced editor
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=EnableAdvancedCatalogingEditor
2. Go to http://localhost:8081/cgi-bin/koha/cataloguing/editor.pl#new/
3. Click on "Advanced" on the left nav
4. Note that "LIBRARY OF CONGRESS" is ordered before "NATIONAL LIBRARY OF FRANCE"
5. Rejoice!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33088: Remove background-job-progressbar.js in batch_record_modification.tt
Fridolin Somers [Sat, 18 Mar 2023 03:08:56 +0000 (17:08 -1000)]
Bug 33088: Remove background-job-progressbar.js in batch_record_modification.tt

It must be removed, we don't need it since bug 22417

Test plan :
Play with batch record modification and check there is no JS error

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 32127: Add unit test
Fridolin Somers [Wed, 29 Mar 2023 08:52:08 +0000 (22:52 -1000)]
Bug 32127: Add unit test

Run prove t/db_dependent/Template/Plugin/Categories.t

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 32127: Sort by description in Koha::Template::Plugin::Categories
Fridolin Somers [Mon, 7 Nov 2022 21:42:49 +0000 (11:42 -1000)]
Bug 32127: Sort by description in Koha::Template::Plugin::Categories

Like in Koha::Template::Plugin::Branches, methods in
Koha::Template::Plugin::Categories must return categories sorted by
description.

Test plan :
1) Create a new patron category with code ZZZ and description AAAAAA
2) Go to patron search /cgi-bin/koha/members/members-home.pl
3) Look at filter by category :
=> Without patch the value AAAAAA is last
=> With patch the value AAAAAA is first
4) Click on 'New patron'
=> Without patch the value AAAAAA is last
=> With patch the value AAAAAA is first

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33345: On-site checkout checkbox does not work since issue date using flatpickr
Fridolin Somers [Mon, 27 Mar 2023 21:29:01 +0000 (11:29 -1000)]
Bug 33345: On-site checkout checkbox does not work since issue date using flatpickr

Since Bug 30718, date due uses flatpickr.
The JavaScript code setting due date via on-site checkout checkbox needs to be adapted.
Sort of like Bug 30717.

This patch renames the variable sent to template
'today_due_date_and_time' to avoid confusion with variable 'todaysdate'
used in other templates.

Test plan :
1) Enable system preference 'OnSiteCheckouts'
2) Go to a patron circulation page /cgi-bin/koha/circ/circulation.pl
3) Click on settings icon inside barcode input
=> Check due date input is empty
4) Click on 'On-site checkout'
=> Check due date input is filled with today date at 23:59
5) Fill barcode input and do check-out
6) Check due date is correct

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 32418: Remove useless statement
Jonathan Druart [Fri, 14 Apr 2023 06:24:07 +0000 (08:24 +0200)]
Bug 32418: Remove useless statement

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 32418: (follow-up) Remove jQuery, Fix typos in url, add biblio as template param
Paul Derscheid [Thu, 13 Apr 2023 09:27:31 +0000 (09:27 +0000)]
Bug 32418: (follow-up) Remove jQuery, Fix typos in url, add biblio as template param

To test:
1. Go to any record
2. Hit the edit button on an item in the holdings table
3. Modify the URL so that the query param for the itemnumber is either
    3.1 empty: /cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=384&itemnumber=
    3.2 an itemnumber that doesn't exist:
      /cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=384&itemnumber=9999999999
    3.3 whatever else you come up with..
4. Check the same thing for the dupe option (op=dupeitem)
5. Sign off

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 32418: Can't call method 'unblessed' on an undefined value at cataloguing/additem.pl
Paul Derscheid [Mon, 20 Feb 2023 10:06:32 +0000 (11:06 +0100)]
Bug 32418: Can't call method 'unblessed' on an undefined value at cataloguing/additem.pl

Check whether the current op is edititem or dupeitem and if so check
whether the itemnumber supplied as a query param actually exists.

If it doesn't, redirect to the additem op and hide all UI elements except
for a dialog that gives options to add a new item to the record or to
view the records holdings.

This behaviour was adapted from the addbiblio view, as suggested by
Fridolin.

To test:
1. Go to any record
2. Hit the edit button on an item in the holdings table
3. Modify the URL so that the query param for the itemnumber is either
    3.1 empty: /cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=384&itemnumber=
    3.2 an itemnumber that doesn't exist:
      /cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=384&itemnumber=9999999999
    3.3 whatever else you come up with..
4. Check the same thing for the dupe option (op=dupeitem)
5. Sign off

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33485: (bug 32939 follow-up) Fix title endpoint
Jonathan Druart [Tue, 11 Apr 2023 12:57:47 +0000 (14:57 +0200)]
Bug 33485: (bug 32939 follow-up) Fix title endpoint

The change is obvious, we shoulf call the title endpoint, not package.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 32716: larger proxy_buffer_size in NGINX example config
Galen Charlton [Tue, 24 Jan 2023 19:10:32 +0000 (14:10 -0500)]
Bug 32716: larger proxy_buffer_size in NGINX example config

This patch updates the example NGINX config to increase the
proxy_buffer_size to 16k. The default value of 4k (on some platforms)
has empirically been shown to be a bit too small for the Link
headers emitted by the REST API when pagination is requested.

To test
-------
[1] Set up a Koha system with NGINX as a reverse proxy in
    front of it (either in front of Apache or in front of
    of Starman).
[2] Perform a patron search that returns at least two pages
    of results and navigate to the second page.
[3] Note that the navigation can fail with a 502 HTTP error
    and an "upstream sent too big header while reading response
    header from upstream" error in the NGINX log.

    The problem is most likely when the pagesize of the server
    running NGINX is 4096 bytes.
[4] Update the NGINX configuration per this patch and restart
    NGINX.
[5] This time, repeating step 2 should work.

Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33481: Pass content-type when requesting EBSCO's webservice
Jonathan Druart [Tue, 11 Apr 2023 11:37:14 +0000 (13:37 +0200)]
Bug 33481: Pass content-type when requesting EBSCO's webservice

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33307: Use template wrapper for tabs: Lists
Owen Leonard [Thu, 9 Mar 2023 18:14:04 +0000 (18:14 +0000)]
Bug 33307: Use template wrapper for tabs: Lists

This patch updates the lists template so that it uses the new WRAPPER
directive to build tabbed navigation.

To test, apply the patch and go to the lists page in the staff
interface.

- Confirm that the two tabs, "Your lists" and "Public lists" look
  correct and work correctly.
- Test that the correct tab is selected when you add the "public" or
  "private" parameter to the url:

  /cgi-bin/koha/virtualshelves/shelves.pl?op=list&public=1
  /cgi-bin/koha/virtualshelves/shelves.pl?op=list&public=0

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33294: Use template wrapper for tabs: Checkout history
Owen Leonard [Tue, 21 Mar 2023 16:43:06 +0000 (16:43 +0000)]
Bug 33294: Use template wrapper for tabs: Checkout history

This patch updates the checkout history template so that it uses the new
WRAPPER directive to build tabbed navigation.

In order to make the template logic a little easier to parse I moved the
table of checkouts into its own BLOCK to be used when on-site checkouts
are enabled or disabled.

To test, apply the patch and locate a patron who has a checkout history.

- If you have on-site checkouts enabled you will see three tabs: All,
  Checkouts, and On-site checkouts.
- Each tab should work correctly: The checkouts tab showing only regular
  checkouts, the on-site checkouts tab showing only on-site checkouts.
- If you have on-site checkouts disabled there should be no tabs, the
  table of checkouts should be displayed inside a "page-section" div
  instead.

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33293: Use template wrapper for tabs: Holds
Owen Leonard [Tue, 21 Mar 2023 16:25:48 +0000 (16:25 +0000)]
Bug 33293: Use template wrapper for tabs: Holds

This patch updates the holds template so that it uses the new WRAPPER
directive to build tabbed navigation.

Note: this patch includes indentation changes, so check the diff
accordingly.

To test, apply the patch and locate a bibliographic record which
can be placed on hold.

- Start the process of placing a hold.
- If you have any patron clubs defined, there should be two tabs:
  Patrons and Clubs. Both should look correct and work correctly.
- If you have no patron clubs you should see only the Patrons tab.

Works as advertised.

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33186: Use template wrapper for tabs on search history and advanced search
Owen Leonard [Thu, 9 Mar 2023 18:47:04 +0000 (18:47 +0000)]
Bug 33186: Use template wrapper for tabs on search history and advanced search

This patch updates the search history and advanced search templates in
the staff interface so that they use the new WRAPPER directive for
building tabs.

The patch also makes a minor change to CSS in order to accommodate the
different markup.

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

- Go to the catalog's advanced search page. You should see tabs for each
  of the selections defined in the AdvancedSearchTypes system
  preference.
- The tabs should look correct and work correctly.
- If necessary, enable the EnableSearchHistory system preference.
- Click the logged-in user name in the header menu and choose "Search
  history."
- On this page you should see two tabs, catalog and authority. Both tabs
  should look correct and work correctly.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33185: Use template wrapper for tabs on authority and biblio MARC details
Owen Leonard [Thu, 9 Mar 2023 17:47:54 +0000 (17:47 +0000)]
Bug 33185: Use template wrapper for tabs on authority and biblio MARC details

This patch updates the MARC detail views of bibliographic and authority
records so that they use the new WRAPPER directives to build tabs.

To test, apply the patch and locate a bibliographic record in the
catalog.

- Click the "MARC" menu item in the left-hand sidebar.
- Confirm that all tabs work correctly.

Perform the same test by going to Authorities and doing a search for
authorities. Clicking one of the results should take you to a
tabbed MARC view.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33408: Fix template literal
Pedro Amorim [Wed, 12 Apr 2023 16:30:39 +0000 (16:30 +0000)]
Bug 33408: Fix template literal

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33408: Move providers into syspref array
Pedro Amorim [Wed, 12 Apr 2023 09:42:29 +0000 (09:42 +0000)]
Bug 33408: Move providers into syspref array

ERMProviders is a sys pref, place it in sysprefs

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33408: Add storeToRefs to ERMStore
Pedro Amorim [Wed, 12 Apr 2023 08:36:18 +0000 (08:36 +0000)]
Bug 33408: Add storeToRefs to ERMStore

It makes it so that any changes to the local property
is also reflected in the store and other components are
made aware of the new value. No need to explicitly
change both local property and store property values.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33408: Store sysprefs in a new ERM store
Jonathan Druart [Fri, 7 Apr 2023 08:40:08 +0000 (10:40 +0200)]
Bug 33408: Store sysprefs in a new ERM store

We need the sysprefs' values to be shared between the components

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33408: We need only one this.loaded call
Jonathan Druart [Wed, 5 Apr 2023 12:27:03 +0000 (14:27 +0200)]
Bug 33408: We need only one this.loaded call

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33408: Remove obsolete tests and template sys pref code
Pedro Amorim [Wed, 5 Apr 2023 11:43:52 +0000 (11:43 +0000)]
Bug 33408: Remove obsolete tests and template sys pref code

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33408: Prevent access to erm module by URL if sys pref is disabled
Pedro Amorim [Wed, 5 Apr 2023 11:45:45 +0000 (11:45 +0000)]
Bug 33408: Prevent access to erm module by URL if sys pref is disabled

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33408: Extend defaultCommandTimeout for cypress
Jonathan Druart [Wed, 5 Apr 2023 08:03:21 +0000 (10:03 +0200)]
Bug 33408: Extend defaultCommandTimeout for cypress

Sometimes the initial page load takes more than 4 seconds.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33408: Mock ERM sysprefs from cypress tests
Jonathan Druart [Tue, 4 Apr 2023 15:02:12 +0000 (17:02 +0200)]
Bug 33408: Mock ERM sysprefs from cypress tests

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33408: Fetch sysprefs from svc/config/systempreferences
Jonathan Druart [Tue, 4 Apr 2023 13:51:51 +0000 (15:51 +0200)]
Bug 33408: Fetch sysprefs from svc/config/systempreferences

It will be easier to mock/set them from cypress tests.

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33336: Use a dedicated column for plugin status in plugins table
Fridolin Somers [Sat, 25 Mar 2023 01:19:06 +0000 (15:19 -1000)]
Bug 33336: Use a dedicated column for plugin status in plugins table

In plugins table plugins/plugins-home.pl the status enable/disable is with the name, styled as a label.
With new interface ENABLED is yellow, this looks weird.
Also I bet this is bad for accessibility.

I propose to move this info to a dedicated column.
I use bootstrap classes bg-success and bg-warning like in about.pl

Test plan:
1) Install some plugins
2) Go to Administration > Manage plugins
3) Check you see table with column status
4) Disable a plugin
5) Check you see 'Disabled' in status

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 32998: Consolidate opac-tmpl/lib and opac-tmpl/bootstrap/lib
Owen Leonard [Fri, 17 Feb 2023 17:22:00 +0000 (17:22 +0000)]
Bug 32998: Consolidate opac-tmpl/lib and opac-tmpl/bootstrap/lib

This patch moves OPAC third-party assets from opac-tmpl/bootstrap/lib
to opac-tmpl/lib, eliminating some redundancy and making it simpler
to understand where such assets should be found.

To test, apply the patch and confirm that there is no longer a lib
directory under opac-tmpl/bootstrap.

Test various parts of the OPAC to confirm that assets are still loading
correctly. Everything should look right and work correctly. The
browser's developer console should be free of errors.

Signed-off-by: Philip Orr <philip.orr@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33289: Add API client class to interact with svc/config/systempreferences
Jonathan Druart [Tue, 21 Mar 2023 08:00:10 +0000 (09:00 +0100)]
Bug 33289: Add API client class to interact with svc/config/systempreferences

On bug 30708 we will need to modify sysprefs from the UI (Vue app), it
could be useful for other developments as well and so it is moved on its
own bug report.

Test plan:
It can be tested independently of bug 30708 using the following code:

const client = APIClient.sysprefs
client.sysprefs
    .update(
        "CardnumberLength",
        "42"
    )

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33466: Link to the vendor from the ERM module
Jonathan Druart [Tue, 11 Apr 2023 09:27:08 +0000 (11:27 +0200)]
Bug 33466: Link to the vendor from the ERM module

There are 3 tables in the ERM module where we display the vendor name
but without a link to the acquisition module.

This patch adds the links.

Test plan:
Create an agreement, a license and a local package.
Pick a vendor and notice that now there is a link on the list view.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33154: Tab WRAPPER follow-up: label text must be translatable
Owen Leonard [Tue, 7 Mar 2023 11:15:07 +0000 (11:15 +0000)]
Bug 33154: Tab WRAPPER follow-up: label text must be translatable

This patch updates templates which have already been updated to use the
new tab WRAPPER system for generating tab markup. Templates are changed
so that tab label strings are wrapped in <span> to make them
translatable.

The html_helpers include file is also updated so that the example code
in comments shows the right pattern (the breadcrumb example is similarly
corrected).

To test apply the patch and run the translation script to update the .po
files, e.g.

perl misc/translator/translate update fr-FR

Check the updated .po files for some of the lines modified in the patch:

 - koha-tmpl/intranet-tmpl/prog/en/modules/about.tt:31
 - koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt:69
 - koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt:330
 - koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt:141
 - koha-tmpl/intranet-tmpl/prog/en/modules/admin/item_circulation_alerts.tt:118
 - koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt:259
 - koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt:455
 - koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt:98

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33316: (QA follow-up) Add link to record, fix typo and heading
Katrin Fischer [Mon, 10 Apr 2023 16:38:14 +0000 (16:38 +0000)]
Bug 33316: (QA follow-up) Add link to record, fix typo and heading

* h2 h2 directly following each other make no sense. Changed to h2 h3
* ids changed to IDs
* Linked the record ID to the catalog entry
  Note: We also have this link in the batch record mod job details

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33316: Improve display of ES indexer jobs
Nick Clemens [Wed, 22 Mar 2023 19:54:48 +0000 (19:54 +0000)]
Bug 33316: Improve display of ES indexer jobs

We don't do a lot of processing to the data, but we can still
make the display a bit nicer, to show how many records were
done, and show the record ids.

To test:
1 - Do some batch modifications on a system running ES
2 - Check background jobs to see ES jobs
3 - Note display
4 - Apply patch
5 - Confirm display is improved

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33486: POD fix
Tomas Cohen Arazi [Thu, 13 Apr 2023 14:32:52 +0000 (11:32 -0300)]
Bug 33486: POD fix

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33486: Remove Koha::BackgroundJob::UpdateElasticIndex->process
Nick Clemens [Tue, 11 Apr 2023 13:43:51 +0000 (13:43 +0000)]
Bug 33486: Remove Koha::BackgroundJob::UpdateElasticIndex->process

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33111: (QA follow-up) Add more context to breadcrumb parts for easier translation
Katrin Fischer [Sat, 8 Apr 2023 22:46:26 +0000 (22:46 +0000)]
Bug 33111: (QA follow-up) Add more context to breadcrumb parts for easier translation

With the new wrappers we will translate every part of the
breadcrumb as a separate string and only once. So single words
like 'new' can be problematic in translation.

This changes:
* New > New identity provider
* Edit > Edit identity provider
* (Item search fields) <name of search field> > Edit <name of search field>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33111: Use template wrapper for breadcrumbs: Administration part 4
Owen Leonard [Fri, 6 Jan 2023 16:43:38 +0000 (16:43 +0000)]
Bug 33111: Use template wrapper for breadcrumbs: Administration part 4

This patch updates several administration templates so that they
use the new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

Administration ->
  - Library EANs (list, new, edit, confirm delete)
  - Identity providers (list, new, edit)
    - Manage domains (list, new, edit)
  - Item circulation alerts
  - Item search fields (list, new, edit)
  - Item types (list, new, edit, delete confirm)
  - Koha to MARC mapping
  - Library groups
  - MARC frameworks ->
    -> Actions -> MARC structure (list, new, edit, delete confirm)
       -> View, edit, and delete confirm
  - Record matching rules (list, new, edit, delete confirm)

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33077: Improve ease of translating template title tags
Owen Leonard [Mon, 27 Feb 2023 11:33:22 +0000 (11:33 +0000)]
Bug 33077: Improve ease of translating template title tags

This patch uses the cities administration page as a proof-of-concept for
using the [% t() %] construction to wrap translatable string in template
<title> tags. This should result in a significant improvement in
translatability.

To test, apply the patch and run the translation script to update the
.po files, e.g.

perl misc/translator/translate update fr-FR

Check the updated .po files:

 - In fr-FR-staff-prog.po you should no longer see a reference to
   cities.tt line 6, "#: koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt:6"
 - In fr-FR-messages.po you should see several strings which have been
   pulled individually from the <title> tag:
   - cities.tt:9, msgid "Modify city"
   - cities.tt:11, msgid "New city"
   - cities.tt:15, msgid "Confirm deletion of city"
   - cities.tt:19, msgid "Administration", msgid "Cities", msgid "Koha",
     and msgid "Administration"

Translate the strings in fr-FR-messages.po and install the updated
translation:

perl misc/translator/translate install fr-FR

Swith to the update language in the staff interface and confirm that the
Cities page title is translated correctly.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33001: (follow-up) Add spans for translatability
Owen Leonard [Thu, 23 Feb 2023 22:53:02 +0000 (22:53 +0000)]
Bug 33001: (follow-up) Add spans for translatability

This patch finds places in the updated breadcrumbs markup where a
translatable string is isolated in a way that makes it hard for the
translation script to find it, and wraps these strings with <span>

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=33005
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33001: Use template wrapper for breadcrumbs: Acquisitions part 2
Owen Leonard [Fri, 6 Jan 2023 11:49:32 +0000 (11:49 +0000)]
Bug 33001: Use template wrapper for breadcrumbs: Acquisitions part 2

This patch updates several acquisitions-related templates so that they
use the new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Acquisitions ->
  - Late orders,
    - moddeliverydate.tt
    - modordernotes.tt
    -- These two templates aren't linked to from anywhere, but
       you can navigate directly to:
       http://127.0.0.1:8081/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=X and
       http://127.0.0.1:8081/cgi-bin/koha/acqui/moddeliverydate.pl?ordernumber=1

  - Order search, order search results
  - Invoice search,
    - Invoice details,
      - Invoice files
  - Vendor -> Basket -> Add to basket ->
    - From a new (empty) record
    - From existing orders (copy)
    - From a subscription

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=33005
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33005: (QA follow-up) Update breadcrumb when editing a vendor
Katrin Fischer [Sun, 9 Apr 2023 00:26:22 +0000 (00:26 +0000)]
Bug 33005: (QA follow-up) Update breadcrumb when editing a vendor

When editing a vendor the last part of the breadcrumbs read:
Update: <vendor>

This is very unusual, so updated to the standard wording:
Modify <vendor>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33005: (follow-up) Add spans for translatability
Owen Leonard [Fri, 24 Feb 2023 12:44:31 +0000 (12:44 +0000)]
Bug 33005: (follow-up) Add spans for translatability

This patch finds places in the updated breadcrumbs markup where a
translatable string is isolated in a way that makes it hard for the
translation script to find it, and wraps these strings with <span>

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33005: Use template wrapper for breadcrumbs: Acquisitions part 3
Owen Leonard [Fri, 6 Jan 2023 11:50:00 +0000 (11:50 +0000)]
Bug 33005: Use template wrapper for breadcrumbs: Acquisitions part 3

This patch updates several acquisitions-related templates so that they
use the new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Acquisitions ->
  -> All available funds table
     -> Ordered
     -> Spent
  -> Vendor
     -> Vendor details
     -> Uncertain prices
     -> Receive shipments (must have at least one open basket)
        -> If necessary, receive a new shipment. Or click an
           invoice number to reach the "receive orders" page.
           -> Click "Receive" in the table listing baskets.
     -> Basket -> Add to basket
        -> From a suggestion
        -> From an external source

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33382: Use template wrapper for breadcrumbs: Patron clubs
Owen Leonard [Fri, 31 Mar 2023 13:34:54 +0000 (13:34 +0000)]
Bug 33382: Use template wrapper for breadcrumbs: Patron clubs

This patch updates patron club templates so that they use the
new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Tools ->
  - Patron clubs
    - New club template
    - Edit club template
    - New club
    - Edit club
    - Club enrollments (from the "Actions" menu in the list of clubs)

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33373: Use template wrapper for breadcrumbs: Circulation part 3
Owen Leonard [Thu, 30 Mar 2023 19:15:10 +0000 (19:15 +0000)]
Bug 33373: Use template wrapper for breadcrumbs: Circulation part 3

This patch updates several circulation templates so that they use the
new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Circulation ->
  - Article requests -> Article request detail
  - Check in
  - Hold ratios
  - Transfers to send
  - Transfers to receive
  - Holds queue
  - Holds awaiting pickup
  - Set library

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33372: Use template wrapper for breadcrumbs: Circulation part 2
Owen Leonard [Thu, 30 Mar 2023 18:34:08 +0000 (18:34 +0000)]
Bug 33372: Use template wrapper for breadcrumbs: Circulation part 2

This patch updates several circulation templates so that they use the
new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Circulation
  - Check out
    - Check out to patron
  - Curbside pickups
  - Built-in offline circulation
  - Pending on-site checkouts
  - Overdues
  - Holds to pull
  - Renew

Signed-off-by: Philip Orr <philip.orr@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33180: Use template wrapper for tabs: Budgets and Search engine configuration
Owen Leonard [Thu, 9 Mar 2023 15:20:21 +0000 (15:20 +0000)]
Bug 33180: Use template wrapper for tabs: Budgets and Search engine configuration

This patch updates two administration templates so that they use the new
WRAPPER directive to build tabbed navigation: Budgets and Search engine
configuration.

Note: this patch includes indentation changes, so check the diff
accordingly.

To test, apply the patch and check the updated pages:

 - Administration -> Budgets
 - Administration -> Search engine configuration

On both pages tabs should look correct and work correctly.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33323: Select button in patron search modal is not translatable
Owen Leonard [Thu, 23 Mar 2023 17:42:46 +0000 (17:42 +0000)]
Bug 33323: Select button in patron search modal is not translatable

This patch modifies the JS which generates some markup during some kinds
of patron searches so that the strings labeling submit buttons can be
translated.

To test, apply the patch and go to Administration -> Funds.
- Add a fund or edit an existing one.
- Test the "Select owner" link
  - A popup should appear, and after performing a patron search which
    returns results you should see a "Select" column in the last column
    of the patron search results table.
- Test the "Add users" link
  - Perform the same test as above. The button in the last column should
    be "Add"
- The template accommodates two other cases, "Edit" and "Check out" but
  I was unable to find a place where they were used.

- To test translatability, run the translation tool for any language,
  e.g.

  perl misc/translator/translate update fr-FR

  Search the regenerated po file (in this example
  misc/translator/po/fr-FR-staff-prog.po) to confirm that the
  correct strings are there: "Select", "Add", "Edit, and "Check out"
  should each have entries for line 234, e.g.

  koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc:234
  c-format
  msgid "Select"
  msgstr "Sélectionner"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33265: Clean up serial links on serial edit page
Lucas Gass [Fri, 17 Mar 2023 20:47:09 +0000 (20:47 +0000)]
Bug 33265: Clean up serial links on serial edit page

To test:
1. Reviece a serial
2. Notice the unstyled links:
    * Serial collection #1
    * Subscription #1
    * Show biblio
3. Apply pacth
4. The links should now be styled.

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33261: Format dates in subscription_issues table
Lucas Gass [Fri, 17 Mar 2023 14:30:37 +0000 (14:30 +0000)]
Bug 33261: Format dates in subscription_issues table

To test:
* Add a subscription
* Receive some issues
* Go to the subscription detail page, issues tab
* Verify the dates there display as YYYY-MM-DD
* Change DateFormat system preference setting, nothing changes.
* Apply patch
* Date should now be formatted in the way specified in the DateFormat system preference

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33414: Add the data-order class
Jonathan Druart [Wed, 5 Apr 2023 07:11:41 +0000 (09:11 +0200)]
Bug 33414: Add the data-order class

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33414: Fix dates display in orders by fund
Fridolin Somers [Wed, 5 Apr 2023 02:55:49 +0000 (16:55 -1000)]
Bug 33414: Fix dates display in orders by fund

Since Bug 30718, dates are displayed in ISO format in orders by fund.
It removed dates formating in perl, this must be added in template.

Test plan :
1) Create some fresh orders on a fund F1
2) Go to Acquisitions > Orders by fund
3) Select fund F1 and 'To screen into the browser'
4) Submit
5) Check you see a formatted date in 'Entry date' column
6) Recieve some order from fund F1
Repeat 2 to 4
7) Check you see formatted date in 'Date received' column

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33332: Fix formatting of TT comments to improve translations
Owen Leonard [Fri, 24 Mar 2023 12:52:28 +0000 (12:52 +0000)]
Bug 33332: Fix formatting of TT comments to improve translations

This patch reformats some Template::Toolkit multi-line comments in
html_helpers.inc so that each line is commented separately. This seems
to prevent the translation tool from putting the comments into the po
file.

To test, apply the patch and confirm that pages which use the
breadcrumbs and tabs WRAPPER directives still work correctly:

- Breadcrumbs: staff client home page, about page, error page.
- Tabs: Administration -> Library transfer limits or circulation alerts.
- To test translatability, run the translation tool for any language,
  e.g.

  perl misc/translator/translate update fr-FR

Search the regenerated po file (in this example
misc/translator/po/fr-FR-staff-prog.po) to confirm that there is no
instance of something like "[%%# BOOTSTRAP BREADCRUMBS WRAPPER USAGE"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33007: Use template wrapper for breadcrumbs: Administration part 2
Owen Leonard [Fri, 6 Jan 2023 15:44:55 +0000 (15:44 +0000)]
Bug 33007: Use template wrapper for breadcrumbs: Administration part 2

This patch updates several administration templates so that they
use the new WRAPPER for displaying breadcrumbs.

Note: The patch includes indentation changes, so ignore whitespace
when viewing the diff.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

Administration ->
  - Authorized values
    - New category
    - View category
      - Add authorized value
      - Edit authorized value
 - Authority types
   - New authority type
   - Edit authority type
   - Confirm deletion of authority type
 - Manage jobs
   - Details of job
 - MARC bibliographic framework
   - New framework
   - Edit framework
   - Confirm deletion of framework
 - Library transfer limits
 - Libraries
   - New library
   - Edit library
   - Confirm deletion of library
 - Cash registers
   - New cash register
   - Edit cash register
 - Patron categories
   - New category
   - Edit category
   - Confirm deletion of category
 - MARC bibliographic framework test
 - Classification configuration
   - Modify classification source
   - Add classification source
   - Modify filing rule
   - Add filing rule
   - Modify splitting rule
   - Add splitting rule

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33006: (follow-up) Add spans for translatability
Owen Leonard [Fri, 24 Feb 2023 13:09:56 +0000 (13:09 +0000)]
Bug 33006: (follow-up) Add spans for translatability

This patch finds places in the updated breadcrumbs markup where a
translatable string is isolated in a way that makes it hard for the
translation script to find it, and wraps these strings with <span>

This patch also modifies some of the templates to simplify
the logic controlling how different elements of the breadcrumbs are
shown or not.

This patch also modifies another problematic set of strings in
auth_tag_structure.tt outside the breadcrumbs.

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33006: Use template wrapper for breadcrumbs: Administration part 1
Owen Leonard [Sat, 18 Feb 2023 15:54:24 +0000 (15:54 +0000)]
Bug 33006: Use template wrapper for breadcrumbs: Administration part 1

This patch updates several administration templates so that they
use the new WRAPPER for displaying breadcrumbs.

Note: The patch includes indentation changes, so ignore whitespace
when viewing the diff.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

Administration
  -> Administration home page
     - Under "Additional parameters"
       -> Additional fields
          -> View, create, edit
       -> Advanced editor shortcuts
       -> Audio alerts
     - Under "Acquisition parameters"
       -> Budgets
          -> Add fund
          -> Close fund
          -> Budget details
             -> Planning
          -> Create, edit, duplicate
     - Under "Catalog"
       -> Authority types -> MARC structure
          -> New, edit, delete
          -> "Actions" -> Subfields
            -> Edit, delete
Acquisitions -> Vendor -> Contracts
  - View, edit, delete

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33130: Use template wrapper for breadcrumbs: Authorities
Owen Leonard [Wed, 1 Mar 2023 20:06:31 +0000 (20:06 +0000)]
Bug 33130: Use template wrapper for breadcrumbs: Authorities

This patch updates several administration templates so that they
use the new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Authorities home page
  - Authority search results
  - Authority detail
  - Authority add/edit
  - Authority merge

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33131: Use template wrapper for breadcrumbs: Catalog part 1
Owen Leonard [Fri, 3 Mar 2023 19:13:18 +0000 (19:13 +0000)]
Bug 33131: Use template wrapper for breadcrumbs: Catalog part 1

This patch updates several catalog templates so that they use the new
WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Advanced search
- Bibliographic detail page
- Labeled MARC detail page
- MARC detail page
- ISBD detail page
- Item detail page
- Image detail view (with LocalCoverImages enabled and a custom cover
  added)
- Checkout history
- Item search

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33147: Use template wrapper for breadcrumbs: Catalog part 2
Owen Leonard [Mon, 6 Mar 2023 13:23:23 +0000 (13:23 +0000)]
Bug 33147: Use template wrapper for breadcrumbs: Catalog part 2

This patch updates several catalog templates so that they use the new
WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Catalog search results
- Search history (from the user menu in the header)
- Bibliographic detail page -> Rota (must have StockRotation enabled).

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33324: Use template wrapper for tabs: Tools
Owen Leonard [Thu, 23 Mar 2023 16:12:15 +0000 (16:12 +0000)]
Bug 33324: Use template wrapper for tabs: Tools

This patch updates templates in the tools directory so that they use
the new WRAPPER directive to build tabbed navigation.

To test, apply the patch and test each page to confirm that tabs still
work as before:

- Cataloging -> Export
  - This page by default will have two tabs, "Export bibliographic
    records" and "Export authority records." You can edit koha-conf.xml
    to enable two additional options: backup_db_via_tools and
    backup_conf_via_tools
- Tools -> Batch patron modification
  - "By card number" and "By borrowernumber," and "By patron list" if
    you have any patron lists defined.
- Tools -> Overdue notice/status triggers

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33333: Use template wrapper for tabs: SQL reports
Owen Leonard [Thu, 23 Mar 2023 16:45:00 +0000 (16:45 +0000)]
Bug 33333: Use template wrapper for tabs: SQL reports

This patch updates the saved SQL reports template so that it uses the
new WRAPPER directive to build tab markup.

To test, apply the patch and go to Reports -> Use saved. In order to
properly test the patch you should have multiple reports defined with
multiple categories ("Accounts", "Acquisitions", "Catalog", etc.).

Clicking each tab should filter the table of reports correctly.
After navigating away from the page and back to it, your selected tab
should be remembered.

Signed-off-by: Alexandra Speer <alexandra.speer@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 32334: Fix spelling
Jonathan Druart [Fri, 7 Apr 2023 11:48:29 +0000 (13:48 +0200)]
Bug 32334: Fix spelling

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 32334: (follow-up) Improvement for schema parameter
Marcel de Rooy [Fri, 17 Mar 2023 07:46:44 +0000 (07:46 +0000)]
Bug 32334: (follow-up) Improvement for schema parameter

Essentially only adds a warn, some cosmetic changes too.

Test plan:
Copy your kohastructure to xx.sql.
Run sync_db_comments.pl -schema xx.sql. You will see usage.
Run sync_db_comments.pl -schema xyz.sql. You will see a warn and
the usage statement.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 32334: (follow-up) Fix for bug 31028, introducing IF NOT EXISTS
Marcel de Rooy [Thu, 16 Mar 2023 12:57:13 +0000 (12:57 +0000)]
Bug 32334: (follow-up) Fix for bug 31028, introducing IF NOT EXISTS

We need to expect CREATE TABLE IF NOT EXISTS now in kohastructure.

Test plan:
Run misc/maintenance/sync_db_comments.pl -reset

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 32334: (QA follow-up) Improve finding schema file
Marcel de Rooy [Wed, 15 Feb 2023 15:54:37 +0000 (15:54 +0000)]
Bug 32334: (QA follow-up) Improve finding schema file

Adds a schema parameter to the cmdline script now too.

Test plan:
Run sync_db_comments.pl with -schema file where file does not exist.
(On dev install) rename kohastructure.sql, try with[out] referring
to it using -schema. You could also use the standard path
intranet/cgi-bin/installer/data/mysql.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 32334: (QA follow-up) Remove fh and verbose parameter in favor of messages
Marcel de Rooy [Wed, 15 Feb 2023 14:47:45 +0000 (14:47 +0000)]
Bug 32334: (QA follow-up) Remove fh and verbose parameter in favor of messages

The module returns messages. The script can print them in verbose
mode. Test script adjusted accordingly.

Test plan:
Run t/db_dependent/Koha/Database/Commenter.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 32334: (QA follow-up) Remove unused modules
Marcel de Rooy [Wed, 15 Feb 2023 13:05:55 +0000 (13:05 +0000)]
Bug 32334: (QA follow-up) Remove unused modules

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 32334: (QA follow-up) Invert dry run mode to commit parameter
Marcel de Rooy [Wed, 15 Feb 2023 12:49:16 +0000 (12:49 +0000)]
Bug 32334: (QA follow-up) Invert dry run mode to commit parameter

Note: This is only done (and 'needed') for the command line, not
for the module subroutines.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>