Commit graph

45574 commits

Author SHA1 Message Date
e9b4dd2bd5 Bug 31064: Wrap local login with stylable element
Test plan:
0. Apply patch
1. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=OPACUserCSS
2. Set syspref to the following:
.local-login {
      display: none;
}
3. Go to http://localhost:8080/cgi-bin/koha/opac-main.pl
3b. Note that the local login boxes are hidden
    ("Log in to your account:" remains so that other login options can
    be supplied by OpacUserJS)

4. Click on "Log in to your account" on the top toolbar
4b. Note that the local login boxes are hidden
    ("Log in to your account:" remains so that other login options can
    be supplied by OpacUserJS)

5. Go to http://localhost:8080/cgi-bin/koha/opac-user.pl
5b. Note that the local login boxes are hidden
    ("Log in to your account" remains so that other login options can be
    supplied by OpacUserJS)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 89c910449d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-09 21:27:31 +00:00
e79648a25c Bug 30823: DBRev 22.05.03.003
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-09 21:23:32 +00:00
Aleisha Amohia
ec40a9c826 Bug 30823: Filling recalls uses 'FILL' action in action logs
This enhancement changes recall fulfillment actions to log with the
FILL action. It will also update existing recalls FULFILL actions in
the database to use the FILL action.

To test:
1) Enable the UseRecalls system preference and set up your
recalls-related circulation rules. Confirm RecallsLog is enabled.
2) Check out an item to Patron B.
3) Log into the OPAC as Patron A and search for the item.
4) Place a recall on that item.
5) Go back to the staff client and check the item in. Confirm the recall
as waiting for Patron A.
6) Check out the item for Patron A to fill the recall.
7) Go to Tools -> Log Viewer. Confirm there is a FULFILL action. Choose
the following search params to browse system logs:
- modules: recalls
- actions: fill
8) Submit the search and confirm the recall DOES NOT show.
9) Apply the patch, update database, restart services.
10) Refresh the log viewer and repeat step 7. Submit the search and
confirm the recall DOES show. Confirm there is no longer a FULFILL
action as both holds and recalls will use FILL.
11) Check in the item.
12) Repeat steps 2-6. We are ensuring that future recalls are logged
using the FILL action.
13) Repeat step 7. Confirm all test recalls are now showing in search
results.

Sponsored-by: Catalyst IT

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7b8939b2ec)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-09 21:20:48 +00:00
353d004119 Bug 31085: Reload return claims table on resolve
This is another fix for a bug in return claims. We now test for the
initialised datatable and call an ajax reload directly on it if we find
one instead of calling a undefined function (the function is out of
scope here).

NOTE: Taken as a whole commit follow-up on bug 28854 where the issue was
initially identified

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2485476b71)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-09 21:18:15 +00:00
f055a4ae65 Bug 31087: Prevent stringification of null in return claims
The return claims table was stringifying 'null'. This patch updates the
code to check for definition so we don't stringify incorrectly

Note: This patch was split out from a follow-up on bug 28854 as we felt
it should be treated separately for backportability.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 41ce80eb12)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-08-09 21:05:38 +00:00
484add49de Bug 30889: (follow-up) Warn if context is not defined
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit de90b39b4c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 17:25:21 +00:00
2b4eb64563 Bug 30865: Double-quote Host-item in Koha::Biblio->get_components_query
This patch adds double quotes around the term qualified by "Host-item"
in Koha::Biblio->get_components_query().

Without them, reserved charactrs like "=" will cause syntax errors like
"CCL parsing error (10014) Unknown qualifier ZOOM for query:
    Host-item=(MyTitle = Mysubtitle)
    at /usr/share/koha/lib/C4/Search.pm line 245."

Test plan:
0) Don't apply the patch
1) Create biblio with title and subtitle like (MyTitle : MySubtitle)
2) Note the warning "There was an error searching for analytic records,
   please see the logs for details." on the detail page
3) Apply the patch
4) koha-plack --restart kohadev
5) Refresh the detail page
6) Note that the warning message is gone
7) prove t/db_dependent/Koha/Biblio.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fd385d90b8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 17:23:01 +00:00
248dc2787e Bug 30744: Use RecordProcessor in get_marc_notes
This patch utilises RecordProcessor to filter the MARC::Record for the
right interface prior to constructing the marc notes array.  We also
remove the use of C4::XSLT for replacing AV values in the MARC fields in
preference to using the RecordProcessor filter.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 029d7bacf0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 17:21:23 +00:00
2ad8c15dbf Bug 30918: Allow passing filtered record to get_marc_notes
This patch does the absolute bare minimum to prevent private notes from
appearing on the OPAC.

Test plan
1. Go to Koha Administration -> Koha bibliographic frameworks
2. View the MARC structure for your BKS framework (or something else)
3. Search for tag 583, edit subfields
4. Go to subfield 'x' - nonpublic note. Confirm the OPAC visibility
   checkbox is UNCHECKED.
5. Edit or create a record using the BKS framework. Put a note in the
   583$x.
6. View this record in the OPAC
7. Go to the Title notes tab. Confirm the non-public note is
   showing, even though the framework says it should not be
   visible via the OPAC.
8. Apply patch
9. Confirm the non-public note is no longer visible

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0efae9ed05)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 17:19:15 +00:00
4edaa27fc2 Bug 30848: Add exec flag to test
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8c926c976a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 17:16:12 +00:00
965e985619 Bug 30848: Fix issue exposed by unit tests
This patch changes the 'map' to a simple for loop so that we can easily
map multiple subfields to a field without overwriting the first previous
subfields in the structure.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6c381c4b22)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 17:15:58 +00:00
66999034d4 Bug 30848: Expand unit tests
Add to the unit tests to test Library and Itemtype expansions as well as
linking multiple subfields of the same marc field to such expansions.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6b04e3e18f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 17:15:42 +00:00
0a86104294 Bug 30848: Add an ExpandCodedFields RecordProcessor filter
This patch introduces a RecordProcessor filter for MARC::Record objects
that replaces Koha codes with descriptions in the MARC::Record passed to the processor.

Target usage:

  my $biblio = Koha::Biblios->find(
      $biblio_id,
      { prefetch => [ metadata ] }
  );

  my $record = $biblio->metadata->record;

  my $processor = Koha::RecordProcessor->new(
    {
        filters => ('ExpandCodedFields'),
        options => {
            interface     => 'opac',
            frameworkcode => $biblio->frameworkcode
        }
    }
  );

  $processor->process( $record );

Test plan
* Read the included unit test and confirm it makes sense and passes

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 62bba6d9e1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 17:15:30 +00:00
54da779d5e Bug 30889: DBRev 22.05.03.002
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 17:10:58 +00:00
770b9a0757 Bug 30889: Update Scheme(DBIC)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 17:08:00 +00:00
016aee9aa5 Bug 30889: Add comment for the new DB field
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b983e3c505)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 17:06:29 +00:00
dd65a03ab8 Bug 30889: Unit tests - process
This patch adds corresponding unit tests for the 'process' side of this
patchset. We check that the Context for the job to run in as set from
the Job context recorded at enqueue time.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a0000de817)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 17:06:15 +00:00
8dcc54e8d7 Bug 30889: Unit tests
This patch adds a unit test for the 'enqueue' part of the bug. We check
that the mocked context (and interface) are recorded with the job
enqueue in the new 'context' field.

We do not yet test the 'process' end, where we then read the context out
and set the job Context from it.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit defcdd85a4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 17:06:01 +00:00
3d90579a05 Bug 30889: Fix atomic update permissions
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c1fcf3510e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 17:05:40 +00:00
671fbd4c15 Bug 30889: (follow-up) Record and use context in background_jobs
This patch records the current context to the background_jobs table at
enqueue time and then uses that record to set the context at process
time.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bde3a32277)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 17:05:26 +00:00
7d7f39b7d5 Bug 30889: (follow-up) Add context field to background_jobs
This patch adds a new 'context' field to the background_jobs table to
record the context in which the job was queued.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 72a6c8ba84)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 17:05:12 +00:00
f334243222 Bug 30889: Set interface to 'intranet'
Is that correct?

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>
(cherry picked from commit 44b74010b1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 17:04:58 +00:00
cbb3ee6242 Bug 30889: Set userenv for background jobs
We need to set the userenv when we process the jobs. It is useful for
stats (at least)

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>
(cherry picked from commit 0f2425a243)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 17:04:40 +00:00
1e8abd7359 Bug 31058: Fix import AutoUnsuspendHolds
This patch corrects missing import

To test:
1 - perl misc/cronjobs/holds/auto_unsuspend_holds.pl
2 - It dies
Undefined subroutine &main::AutoUnsuspendReserves called at misc/cronjobs/holds/auto_unsuspend_holds.pl line 38.
3 - Apply patch
4 - run again
5 - It succeeds!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6c315c164d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 17:01:36 +00:00
Katrin Fischer
29a627bdfc Bug 30939: Fix use statement for DelAuthority
Without this patch, the script won't delete any
unused authorities, but gives an error instead
and dies:

Undefined subroutine &main::DelAuthority called at ./misc/migration_tools/remove_unused_authorities.pl line 98.

To test:
- Run from koha-shell:
  ./misc/migration_tools/remove_unused_authorities.pl -t
- Verify several authorities are reported as unused
- ./misc/migration_tools/remove_unused_authorities.pl -c
- Verify the error message is shown when the first unused
  authority is found and the script stops
- Apply patch and rerun:
  ./misc/migration_tools/remove_unused_authorities.pl -t
- Verify the error is gone, the script finishes and auhorities
  are deleted

https://bugs.koha-community.org/show_bug.cgi?id=30936

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit df393b38b8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:59:25 +00:00
Petro Vashchuk
588377511b Bug 30775: Make 952w to have datepicker plugin by default
This field (Price effective from) is very similar to 952d,
but it doesn't have dateaccessioned.pl plugin by default,

Apart of worse usability of this it is also allows to enter wrong
date which will be converted in 0000-00-00 in DB and even lead to
crashes by code in other places.

So, adding this plugin not only improves usability (user can have
datepicker) but also adds date field validation.

Test plan:
1. Head over to MARC frameworks from your administration page,
check 952 subfield structure of your default framework structure.
2. dateaccessioned.pl is set as a plugin for 952d by default
but is missing from 952w.
3. Apply the patch and reset your koha, drop db and use reset_all alias.
4. Check frameworks structure again and ensure that datepicker plugin
is set by default for 952w.
5. Edit some item to ensure that datepicker works for that 952w.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b25dfb50a1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:52:58 +00:00
8a855c86f3 Bug 26486: Group edit buttons in reports toolbar
This patch modifies the reports interface to change the reports toolbar
in two ways:

1. The Edit, Duplicate, and Delete buttons are now combined into a
   button menu. My original idea was to have it be a split button, but
   the logic for handling various permissions made the template logic
   too convoluted.
2. The "Show SQL code" button is converted to a "Single toggle" button
   (https://getbootstrap.com/docs/3.3/javascript/#buttons-single-toggle).
   This type of button is specifically designed for this kind of
   interface element.

This patch includes indendation changes, so please diff accordingly.

To test, apply the patch and go to Reports -> Saved reports.

- Logged in as a user with Create and Delete report
  permissions:
  - View an SQL report. In the toolbar you should see an "Edit" button
    menu with three options: Edit, Duplicate, and Delete. Check that all
    work correctly, including a deletion JavaScript confirmation dialog.

- Logged in as a user with Create but not Delete report permissions, you
  should see an "Edit" button menu with two choices: Edit and Duplicate.

- Logged in as a user with Delete but not Create report permission (??)
  you should see only a standalone delete button.

- Logged in as a user with Execute report permission, run an SQL report.
  Test the "Show SQL code" button. The text should change to "Hide SQL
  code" and the button should be styled to look like its "pressed"
  state.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 22afd8b4e7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:50:00 +00:00
7f64635a66 Bug 31053: Add Context module to Koha::Encryption
Test plan:
perl -MKoha::Encryption -e'print Koha::Encryption->new->encrypt_hex("test");'

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 147f6e0293)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:42:41 +00:00
7222bd700a Bug 30327: DBRev 22.05.03.001
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:37:03 +00:00
d65cac0f8a Bug 30327: (follow-up) Fix inconsistencies in syspref names and supply defaults
This patch fetches the new sysprefs into variables, providing default title ascending if
they are not set to avoid an undefined concatenation warning

I also make the update idempotent and fix confusion of plural/singular names

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8757023b21)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:33:40 +00:00
9a73be67c5 Bug 30327: Fix tests
Corrected variable name on update to match everywhere else

Added a default value for limit in buildQuery and only append limit if it has content

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit daab31ab38)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:33:21 +00:00
488c1a71c9 Bug 30327: Add options for sorting components
This patch adds two new sysprefs:
 ComponentSortField
 ComponentSortOrder

These allow the user to choose how components should be sorted when displaying on the details page
of a record, and the corresponding search for all components

This also updates our search from simple_search_compat to search_compat to allow for sorting options

Note:
Some sorting under ES is unclear - this is a separate issue to be invesitgated
Our Zebra index does not offer 'record number' sorting, I will file a bug for that

To test:
 1 - Enable UseControlNumber (or not)
 2 - Add some components to a record by control number or title depending on above
 3 - Enable  ShowComponentRecords  syspref
 4 - View the record that has components
 5 - Note they are not sorted
 6 - Apply patch, updatedatabase
 7 - reload record
 8 - Note components are sorted by title ascending
 9 - Try different values for ComponentSortField and ComponentSortOrder
10 - Confirm sorting changes with system preferences
11 - Repeat test on staff and opac, with ES and Zebra search engines

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit de63c2abb1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:33:03 +00:00
84999e1938 Bug 30994: Typo: item was on loan. couldn't be returned.
This patch updates some language in the inventory template to make it
readable and consistent: Punctuation fixed, capitalization made more
consistent, language corrections ("check in" instead of "return").

To test you can try to apply the patch and trigger the various errors in
the inventory interface, but it's probably enough to visually confirm
the changes in the patch.

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>
(cherry picked from commit fde9f39ca5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:26:07 +00:00
629b0f5f64 Bug 30991: Fix remaining instances of [% ELSE %]0[% END %] in templates
The construct of [% ELSE %]0[% END %] breaks translations as it is
translated as [% ELSE %][% END %]. Note: No 0 in the ELSE statement.

This patchset either removes occurances of a lone 0 in template ELSE
statements, or splits it over multiple lines so the 0 is not removed in
the translated templates.

Test plan:
1. Install the en-NZ translation
2. Search the translated templates for '[% ELSE %][% END %]' and confirm
there are are instances of that
3. Apply patch
4. Update your en-NZ translation
5. Repeat step 2 and confirm there are no more instances of [% ELSE %][%
END %] in the translated templates

Note: I removed the [% ELSE %] statement from opac-bottom.inc as that
statement was empty in the en translation so it didn't look to be
needed.

Sponsored-by: Catalyst IT, New Zealand

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit efad62f91d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:24:21 +00:00
7cce32a6ae Bug 30936: (follow-up) Add markup comments
This patch adds comments to the template to highlight the markup
structure.

This patch should have no effect on the page's appearance or
functionality.

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>
(cherry picked from commit 04d43d4f21)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:20:26 +00:00
3c8918f8c7 Bug 30936: Reindent authority detail template
This patch updates the authority detail template so that indentation is
consistent.

To test, apply the patch and go to Authorities.

- Locate an authority record and view the detail page.
- Everything should look correct, with working numbered tabs.
- If the AuthDisplayHierarchy preference is enabled, you should see a
  collapsible tree of elements in the authority hierarchy.

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>
(cherry picked from commit 1da958f59b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:20:07 +00:00
61051078b8 Bug 30609: (follow-up) Add markup comments
This patch adds comments to the template to highlight the markup
structure.

This patch should have no effect on the page's appearance or
functionality.

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>
(cherry picked from commit 9b55a435d9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:12:15 +00:00
8480a3624a Bug 30609: Reindent serial claims template
This patch updates the serial claims template so that the indentation
is consistent. Tabs are replaced with spaces.

To test you must have at least one subscription with late issues.

- Apply the patch and go to Serials -> Claims and select the vendor
  responsible for your late issue.
- On the "Missing issues" page, confirm that everything looks correct.
- All functionality should be the same: Filters, table sorting, CSV
  export, and claim notification.

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>
(cherry picked from commit 455b3b4a93)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:12:00 +00:00
edee82be94 Bug 29055: Focus on keyword field when subscription biblio search window opens
This patch adds the "autofocus" attribute to the keyword field in the
popup window used to find a bibliographic record to use in a
subscription.

The same is also done for the vendor search popup.

To test, apply the patch and go to Serials -> New subscription.

- Click the "Search for vendor" link. When the "Serial subscription:
  search for vendor" window opens the cursor should automatically be in
  the vendor search field.
- Click the "Search for record" link. When the "Catalog search" window
  opens the cursor focus should automatically be in the keyword field.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 712ced4612)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:09:26 +00:00
17281b62ef Bug 22659: (follow-up) Add category to redirect
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

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>
(cherry picked from commit 347d9d7339)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:06:44 +00:00
44d44956e2 Bug 22659: Add save and continue button to additional-contents.tt
To test:
1. Apply patch and restart everything
2. Go to Tools > News and create some new additional content.
3. Notice a Save and continue button
4. Try saving and contining.
5. Make sure if you are using the CodeMirror editor that you are still in the CodeMirror editor
6. Try 2 - 5 again but with the wysiwyg editor, make sure when you save and continue you remain in the wysiwyg editor.
7. If you are saving and contining from News make sure you remain in News, when you are saving and contining from HTML customizations make sure you remain there.
8. Turn on the NewsLog system preference
9. With the NewsLog on make sure your content is being logged correctly when you sabe and continue.

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

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

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>
(cherry picked from commit e88ee0fc5e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:06:29 +00:00
962d372c8b Bug 30871: (Rmaint follow-up) fix forbidden pattern: tab char (line 50)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:01:53 +00:00
3c1ebde756 Bug 30871: Add notes in advanced cataloging editor
This is the same as preevious patch, but for advanced cataloging editor

To test:
1 - Enable EnableAdvancedCatalogingEditor
2 - Create a new record in advanced edtior
3 - Hover over leader6 and 008 type
4 - Confirm notes are useful

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9de92e07e6)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 15:59:36 +00:00
b18aeffc74 Bug 30871: Add/expand title text for LDR/06 and 008 Type of material
This patch simply adds title elements or clarifies existing title elements to indicate how default
values are chosen

To test:
1 - Create new record in default editor
2 - Open leader helper, hover over "6-Type of record" and the dropdown
3 - Confirm notes make sense
4 - Open 008 helper
5 - Hover over 'Type of Material' and dropdown
6 - Confirm notes make sense

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9912739231)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 15:59:22 +00:00
9f3b51216a Bug 29454: (follow-up) Cover more test cases
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 75fe055dcc)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 15:54:53 +00:00
c207d740cd Bug 29454: Add unit test for Koha::Template::Plugin::ItemTypes
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>
(cherry picked from commit 338ca787be)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 15:54:36 +00:00
f4595b7bbd Bug 29454: Use Koha Cache Memory Lite to stash itemtype descriptions for template plugin
Returns empty string if given item type is undefined or unknown

To test:
1 - Add 1000 items to a record, of varying item types
2 - Bring up the details page
3 - Note time to load
4 - Apply patch
5 - Reload page and compare to previous
6 - Confirm information is correct
7 - Confirm some performance benefit

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3df28469c5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 15:54:15 +00:00
Mark Tompsett
01bde643f2 Bug 20395: (follow-up) Change format to use price filter
See comment #1.

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit df3c578ae1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 15:50:32 +00:00
Pasi Kallinen
75c74c469d Bug 20395: Change paycollect to use Price formatter
Test plan:
1) Apply patch
2) Go to Home -> Patrons -> Patron details (for any patron)
3) Create manual invoice for the patron
4) Pay fines -> Pay -button
5) Check that the currency values look correct

6) Pay fines -> Pay amount -button
7) Check that the currency values look correct

8) Pay fines -> Pay selected -button
9) Check that the currency values look correct

10) Change the CurrencyFormat setting
11) Repeat 2-9

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c1784437b4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 15:50:12 +00:00
1ad034be21 Bug 30950: Remove timepicker.inc
No longer used since
  commit de2d8ba3e4
  Bug 30011: Update links to jQueryUI assets, remove datepicker references, etc.

We must remove it from our codebase.

Test plan:
  git grep timepicker.inc
Should not return occurrences outside of PO's

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 75bd5cfda1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 15:34:09 +00:00