Commit graph

44890 commits

Author SHA1 Message Date
e118479562 Bug 27631: (follow-up) Modify logo CSS to give better alignment
This patch modifies the CSS of the Koha logo and its container so that
it more closely matches the previous version and so that alignment is
handled better at various browser widths.

To test, apply the patch and build the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

Check various pages in the staff interface to confirm that the position
of the Koha logo is correct. Adjust your browser width to confirm that
the alignment adapts at narrow widths.

Test also on pages where the header search form can be expanded, e.g.
Patrons -> [+] to expand search options. Or Acquisitions -> Orders
search -> [+]. Confirm that logo alignment is correct on these pages
too.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 09:03:38 -10:00
d91bf6d613 Bug 27631: (follow-up) Some minor corrections
This patch makes some corrections to issues found during testing:

Some duplicate headings, a markup error in labeledMARCdetail.tt, a
change of the transfers heading from "Branch transfers" to "Item
transfers."

This patch also undoes the changes to the position of the toolbar on
several pages. I think those changes don't belong in this bug.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 09:03:38 -10:00
63fa2dd0c3 Bug 27631: (follow-up) circ/branchtransfers.tt
Changed file to have one <h1> tag showing that describes the page,
rather than the <h1> around the logo.

The hierarchy of other heading tags may be wrong, but this will be
dealt with in an additional bug.

To test:
1) Go to the Staff Client
2) Apply patch
3) Go to circ/branchtransfers and check that it has an obvious and
   descriptive heading
4) Ensure that the heading is <h1>

Sponsored-by: Catalyst IT

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 09:03:38 -10:00
1ce0ff54c2 Bug 27631: (follow-up) reports/guided_reports_start.tt
Changed file to have one <h1> tag showing that describes the page,
rather than the <h1> around the logo.

The hierarchy of other heading tags may be wrong, but this wil be dealt
with in an additional bug.

To test:
1) Go to the Staff Client
2) Apply patch
3) Go to reports/guided_reports_start and check that it has an obvious
   and descriptive heading
4) Ensure that the heading is <h1>

Sponsored-by: Catalyst IT

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 09:03:38 -10:00
0ff4531b88 Bug 27631: (follow-up) tools/marc_modification_templates.tt
Changed file to have one <h1> tag showing that describes the page,
rather than the <h1> around the logo.

The hierarchy of other heading tags may be wrong, but this will be
dealt with in an additional bug.

To test:
1) Go to the Staff Client
2) Apply patch
3) Go to tools/marc_modification_templates and check that it has an
   obvious and descriptive heading
4) Ensure that the heading is <h1>

Sponsored-by: Catalyst IT

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 09:03:38 -10:00
0c97d5a0a4 Bug 27631: (follow-up) course_reserves/course-details.tt
Changed file to have one <h1> tag showing that describes the page,
rather than the <h1> around the logo.

The hierarchy of other heading tags may be wrong, but this will be
dealt with in an additional bug.

To test:
1) Go to the Staff Client
2) Apply patch
3) Go to course_reserves/course-details and check that it has an obvious
   and descriptive heading
4) Ensure that the heading is <h1>

Sponsored-by: Catalyst IT

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 09:03:38 -10:00
9174029a8e Bug 27631: admin folder
Changed each of the pages in the admin folder to have one <h1> tag
showing that describes the page, rather than the <h1> describing the
logo.

The hierarchy of heading tags may be broken in many pages, but this
will be dealt with in an additional bug.

To test:
1) Go to the Staff Client
2) Apply patch
3) Go to each of the pages in the admin folder and check that they have
   an obvious and descriptive heading
4) Ensure that the heading in the page is <h1>

Sponsored-by: Catalyst IT

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 09:03:38 -10:00
b0c53fed36 Bug 27631: Hidden <h1> on intranet-main.tt
This patch visually hides a <h1> on intranet-main.tt so that the
heading is available to be read out by screenreaders in the summary of
headings on the page.

Test plan:

1) Ensure the <h1> "Koha home" heading on the staff client main/home
   page is hidden visually, but in the source code you can see it

Sponsored-by: Catalyst IT

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 09:03:38 -10:00
aba4ce142b Bug 27631: acqui folder
Changed each of the pages in the acqui folder to have one <h1> tag
showing that describes the page, rather than the <h1> describing the
logo.

The hierarchy of heading tags may be broken in many pages, but this
will be dealt with in an additional bug.

To test:
1) Go to the Staff Client
2) Apply patch
3) Go to each of the pages in the acqui folder and check that they have
   an obvious and descriptive heading
4) Ensure that the heading in the page is <h1>

Sponsored-by: Catalyst IT

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 09:03:38 -10:00
b034e0e41e Bug 27631: cataloguing folder
Changed each of the pages in the cataloguing folder to have one <h1>
tag showing that describes the page, rather than the <h1> describing the
logo.

The hierarchy of heading tags may be broken in many pages, but this will
be dealt with in an additional bug.

To test:
1) Go to the Staff Client
2) Apply patch
3) Go to each of the pages in the cataloguing folder and check that they
   have an obvious and descriptive heading
4) Ensure that the heading in the page is <h1>

Sponsored-by: Catalyst IT

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 09:03:38 -10:00
44a8e0bd6e Bug 27631: reports and serials folders
Changed each of the pages in the reports and serials folders to
have one <h1> tag showing that describes the page, rather than the <h1>
describing the logo.

The hierarchy of heading tags may be broken in many pages, but this
will be dealt with in an additional bug.

To test:
1) Go to the Staff Client
2) Apply patch
3) Go to each of the pages in the reports and serials folders and
   check that they have an obvious and descriptive heading
4) Ensure that the heading in the page is <h1>

Sponsored-by: Catalyst IT

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 09:03:38 -10:00
275875c3b9 Bug 27631: tools and virtualshelves folders
Changed each of the pages in the tools and virtualshelves folders to
have one <h1> tag showing that describes the page, rather than the <h1>
describing the logo.

The hierarchy of heading tags may be broken in many pages, but this
will be dealt with in an additional bug.

To test:
1) Go to the Staff Client
2) Apply patch
3) Go to each of the pages in the tools and virtualshelves folders and
   check that they have an obvious and descriptive heading
4) Ensure that the heading in the page is <h1>

Sponsored-by: Catalyst IT

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 09:03:38 -10:00
9944756dfa Bug 27631: catalogue and tags folders
Changed each of the pages in the catalogue and tags folders to have one
<h1> tag showing that describes the page, rather than the <h1>
describing the logo.

The hierarchy of heading tags may be broken in many pages, but this
will be dealt with in an additional bug.

To test:
1) Go to the Staff Client
2) Apply patch
3) Go to each of the pages in the catalogue and tags folders and check
   that they have an obvious and descriptive heading
4) Ensure that the heading in the page is <h1>

Sponsored-by: Catalyst IT

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 09:03:38 -10:00
925fb810fe Bug 27631: offline_circ, patroncards, plugins, pos, reserve, rotating_collections folders
Changed each of the pages in the offline_circ, patroncards, plugins,
pos, reserve, rotating_collections folders to have one <h1> tag showing
that describes the page, rather than the <h1> describing the logo.

The hierarchy of heading tags may be broken in many pages, but this
will be dealt with in an additional bug.

To test:
1) Go to the Staff Client
2) Apply patch
3) Go to each of the pages in the offline_circ, patroncards, plugins,
   pos, reserve, rotating_collections folders and check that they have
   an obvious and descriptive heading
4) Ensure that the heading in the page is <h1>

Sponsored-by: Catalyst IT

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 09:03:38 -10:00
96501a941b Bug 27631: installer and onboarding folders
Changed each of the pages in the installer and onboarding folders to
have one <h1> tag showing that describes the page, rather than the <h1>
describing the logo.

The hierarchy of heading tags may be broken in many pages, but this
will be dealt with in an additional bug.

To test:
1) Go to the Staff Client
2) Apply patch
3) Ensure that the page source shows logo inside <div> and not inside
   <h1>
4) Go to each of the pages in the installer and onboarding folders and
   check that they have an obvious and descriptive heading
5) Ensure that the heading in the page is <h1>

Sponsored-by: Catalyst IT

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 09:03:37 -10:00
cc2e34468a Bug 27631: authorities, clubs, common, course_reserves folders
Changed each of the pages in the authorities, clubs, common,
course_reserves folders to have one <h1> tag showing that describes
the page, rather than the <h1> describing the logo.

The hierarchy of heading tags may be broken in many pages, but this
will be dealt with in an additional bug.

To test:
1) Go to the Staff Client
2) Apply patch
3) Go to each of the pages in the authorities, clubs, common,
   course_reserves folders and check that they have an obvious and
   descriptive heading
4) Ensure that the heading in the page is <h1>

Sponsored-by: Catalyst IT

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 09:03:37 -10:00
26e38d4990 Bug 27631: labels and members folders
Changed each of the pages in the labels and members folders to have one
<h1> tag showing that describes the page, rather than the <h1>
describing the logo.

The hierarchy of heading tags may be broken in many pages, but this
will be dealt with in an additional bug.

To test:
1) Go to the Staff Client
2) Apply patch
3) Go to each of the pages in the labels and members folders and check
   that they have an obvious and descriptive heading
4) Ensure that the heading in the page is <h1>

Sponsored-by: Catalyst IT

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 09:03:37 -10:00
2ed6902783 Bug 27631: circ folder
Changed each of the pages in the circ folder to have one <h1> tag
showing that describes the page, rather than the <h1> describing the
logo.

The hierarchy of heading tags may be broken in many pages, but this
will be dealt with in an additional bug.

To test:
1) Go to the Staff Client
2) Apply patch
3) Go to each of the pages in the circ folder and check that they have
   an obvious and descriptive heading
4) Ensure that the heading in the page is <h1>

Sponsored-by: Catalyst IT

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 09:03:37 -10:00
ca602f75c8 Bug 27631: Changed <h1> around logo to <div>
To test:
1) Look at Staff Client and the logo
2) Apply patch
3) Check Koha logo moves to the middle of the page when zooming in
4) Ensure page source shows logo inside <div> and not <h1>

Sponsored-by: Catalyst IT

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 09:03:37 -10:00
Matthias Meusburger
d21157b35c Bug 25815: SIP Checkout: add more information on why the patron is blocked.
Currently, on SIP checkout, Koha only returns "Patron Blocked" when there is
a problem with the patron.

This patch adds more specific informations, with the following messages:

 - "Patron expired"
 - "Patron debarred"
 - "Patron has fines" (see system preference "noissuescharge")
 - "Patron blocked" (see system preference "OverduesBlockCirc")

Test plan:

 - Try to do a SIP checkout with a patron that is in one of the above situations.
 - Check that the displayed message matches the patron's situation.

Signed-off-by: Sonia <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-19 21:25:51 -10:00
5e90c0cbb3 Bug 30223: Move book cover image upload JS to a separate file
This patch moves most of the JavaScript from upload-images.tt into a
separate file, upload-images.js. Functionality should be unchanged.

To test, apply the patch and go to Tools  -> Upload local cover image.

Test all the things:
 - Drag-and-drop upload
 - Click-to-browse upload;
 - Deleting existing images
 - Uploading a zip file

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-19 21:25:51 -10:00
42612370cc Bug 30509: Fix configuration of Notices accordion widget
The jQueryUI upgrade broke the Accordion on the notices edit page. I'm
not sure why, but defining a "header" option in the accordion
configuration fixes it.

To test, apply the patch and test the notices edit page both with and
without TranslateNotices and multiple languages installed. In both cases
the different sections (Email, Print, SMS) should open and close
correctly.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-19 21:25:51 -10:00
844ed1d534 Bug 30540: Fix perl critic complaint of leading zeros
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-19 21:25:51 -10:00
2562727648 Bug 30540: eval on set_time_zone
This patch adds an eval around the call to set_time_zone so that we
don't crash on invalid local dates and instead just keep the passed
floating timezone.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-19 21:25:51 -10:00
5bf08e4d49 Bug 30540: Unit test
This patch adds tests for checking the output_pref method against
a timezone and datetime that would cause an Invalid local time failure

To test:
1. Apply this patch
2. Run:
   $ kshell
   k$ prove t/DateUtils.t
=> FAIL: The feature is not implemented, tests fail to complete

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-19 21:25:51 -10:00
aa8e9fe5c5 Bug 29483: Further improve performance of script
This patch adds a few tests to cover more cases, and to highlight current functionality.

The script only allows renewal if all outstanding holds can be filled by available items.
This means we can return as soon as we have determined that not all holds can be filled.

I add FIXME and some explanatory comments - I will file a follow-up bug for those, but
I feel we can accept these improvements to the performance and deal with the issues
of how it 'should' work versus how it does work on another report.

To test:
1 - prove -v t/db_dependent/Circulation.t

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-19 21:25:51 -10:00
68c92b49d1 Bug 29483: Check ItemsAnyAvailableAndNotRestricted once per patron
ItemsAnyAvailableAndNotRestricted can take a long time and create nested loops.
We can check it once per patron, however, this requires us to flip the loops.
Since an item can only be used once, we now add a check to see if this item has already
been assigned to a borrower.

To test:
1 - Find or create a biblio with 100 items
2 - Place ten 'Next available' holds on a biblio
3 - Set preference 'AllowRenewalIfOtherItemsAvailable' to 'Allow'
    Set circ rules 'On shelf holds allowed' to 'If any unavailable'
4 - Checkout one of the items to a patron, backdated to be overdue
5 - Note a long loading time for the patron's checkouts
6 - Apply patch, restart_all
7 - Patron loads much faster

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-19 21:25:51 -10:00
4113f765b6 Bug 29483: Unit tests
This patch updates the AllowRenewalIfOtherItemsAvailable tests to
remove deletion of all data, and create specific circ rules for this
test. It adjust several other tests that were relying on the rules from
this test, so thy too create their opwn specific rules.

Additionally, we add tests to cover the case of mutliple items on the record,
and some items cannot fill some reserves.

What is uncovered here is that the same patron is checked twice, so two holds can
be filled, but they only satisfy a single patron

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-19 21:25:51 -10:00
9dcfa320f5 Bug 29602: (follow-up) fix duplicate, missing or mismatching <span>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-19 21:25:51 -10:00
e7a5158885 Bug 29602: (follow-up) fix crash: SET KohaSpan => USE KohaSpan
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-19 21:25:51 -10:00
9b919ed124 Bug 29602: (follow-up) Fix TT tags broken due to missing %
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-19 21:25:51 -10:00
6e7153a572 Bug 29602: (follow-up) Surround strings with span tag
To be nicer with translators.

Update the PO files for whichever languages will show how this is useful.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-19 21:25:51 -10:00
e08629b68b Bug 29602: Surround strings with span tag
To be nicer with translators.

Update the PO files for whichever languages will show how this is
useful.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-19 21:25:51 -10:00
cddcba9edb Bug 30435: Remove unused MACLES cataloging plugin
This patch removes the files associated with the MACLES cataloging
plugin. The feature is unmaintained.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-19 21:25:51 -10:00
c48ec95cbf Bug 30518: Correct DateTime maths for needs_advancing
The needs_advancing method prior to this patch used basic DateTime
arithmatic, adding a DateTime::Duration in Days to the Arrival date of
the item and then comparing that to today. This, however, can cause bugs
when the arrival + duration date coincides with a DST boundary and as
such may result in an invalid local date.  See
https://metacpan.org/pod/DateTime#Making-Things-Simple for further
details.

This patch updates the code to use the DST safe delta_days method to
count the days between arrival and now instead and then compares this
integer to the defined duration of the stage.

To test:
1. Re-run the unit tests, they should now pass.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-19 21:25:50 -10:00
ae557cfa91 Bug 30518: Unit test
This patch adds tests for checking the needs_advancing method against
a timezone and datetime that would cause an Invalid local time failure

To test:
1. Apply this patch
2. Run:
   $ kshell
   k$ prove t/db_dependent/StockRotationItems.t
=> FAIL: The feature is not implemented, tests fail to complete

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-19 21:25:50 -10:00
Aleisha Amohia
c3642d51a1 Bug 30488: Fix error when placing recall via OPAC
This error occurs due to how UpdateStats is called in Koha/Recalls.pm

To test:
1) Enable the UseRecalls system preference and set some random values in
the recalls circulation and fines rules.
2) Find or create an item. Check this item out to Patron A.
3) Log in to the OPAC as Patron B.
4) Find the item you checked out to Patron A. Click the button to place
a recall.
5) Fill out whatever details you like. Click the Submit button. This
should trigger the error.
6) Apply the patch and refresh the page.
7) Confirm the recall has now been requested successfully.

Sponsored-by: Catalyst IT

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-19 21:25:50 -10:00
5a637617e4
Bug 30410: (follow-up) Instantiate object in unit test
This patch updates the unit test for the BackgroundJob->_derived_class()
private method to instantiate a proper object to work on instead of
calling the type_to_class_mapping method directly as non-object method.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2022-04-19 08:33:02 +01:00
c2f2153780
Bug 30135: (follow-up) Rename accessor in failing test
We renamed the LSQ seqment accessor from 'collection_code' to
'sequenece_code' to more clearly reflect the EDI segment name instead of
the Koha field we had mapped it to. (Especially as that mapping is not
optionally to ccode or location).

However, I forgot to update the corresponding test. This patch does that
update.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2022-04-14 11:43:43 +01:00
dd91077f91
Bug 29810: Fix patron embed definitions
Due to a race and a bad rebase, the patrons embeds added on bug 30063
didn't get copied to the parameters secition, thus breaking embedding.

To test:
1. In master, open the patron search page and the inspector
2. Perform a search
=> FAIL: No results
=> FAIL: There's an error 500 in the API response, mentioning embedding
is not allowed
3. Apply this patch
4. Restart all
6. Repeat 2
=> SUCCESS: Results are back!
=> SUCCESS: No more API errors
7. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2022-04-14 11:42:01 +01:00
412d4f4864 Bug 30410: (QA follow-up) Only fetch plugins mapping once
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:40 +02:00
826a2d4e70 Bug 30410: (QA follow-up) Pluralise new methods, fix minor issues with language
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:40 +02:00
ebae23153d Bug 30410: Add a way for plugins to expose tasks they implement
This patch implements a mechanism for plugins to tell Koha they
implement background jobs, by returning a mapping

```
    task => class
```

* _task_ is a string that will be used when queueing new tasks, to let
  the workers know which class to instantiate to launch the job (a.k.a.
  process).

* _class_ is a string for a class name.

For this to  work, plugins need to include the 'namespace' attribute in
their metadata. If they don't, they will be skipped when listing the
valid _background jobs_.

After this, high-level methods for letting plugins (easily) enqueue
their tasks will be provided.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Plugins/BackgroundJob.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:40 +02:00
211044ad1a Bug 30410: Unit tests
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:40 +02:00
51192f9895 Bug 27783: DBRev 21.12.00.033
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:40 +02:00
015c114a6a Bug 27783: DBIC update
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:40 +02:00
631d350086 Bug 27783: (follow-up) Rename options
Why require `job_`.. it's easiery to just use 'queue' and we have 'job'
from the context of the script we're calling.  This also inproves
consistency between the debian commands and the script params.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:40 +02:00
c859066ee5 Bug 27783: (QA follow-up) Make dbrev executable
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:40 +02:00
f1fef6527c Bug 27783: Add queue handling in packaging tools
This patch adds queue name handling in is_worker_running and a handy
method to centralize process name handling for queue-specific workers.

To test:
1. Apply this patch
2. Run:
   $ source debian/scripts/koha-functions.sh
   $ get_worker_name kohadev
   kohadev-koha-worker
=> SUCCESS: Default queue means no queue name included
   $ get_worker_name kohadev default
   kohadev-koha-worker
=> SUCCESS: Default queue means no queue name included
   $ get_worker_name kohadev long_tasks
   kohadev-koha-worker-long_tasks
=> SUCCESS: Queue name appended to the name
4. Run:
   $ perl misc4dev/cp_debian_files.pl \
              --koha_dir /kohadevbox/koha \
              --gitify /kohadevbox/gitify \
              --instance kohadev
5. Run:
   $ koha-worker --start --queue oleonard kohadev
=> SUCCESS: Starts!
6. Check:
   $ ps waux | grep oleonard
=> SUCCESS: It is running
7. Play with --stop, --restart, --status and different queue names,
   including 'default' and without the --queue param as well.
=> SUCCESS: All as expected!
8. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:40 +02:00
db4baee498 Bug 27783: (QA follow-up) Make dbrev idempotent
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:40 +02:00