koha-equinox.git
3 years agoBug 26162: Don't fall into an infinite loop
Jonathan Druart [Wed, 19 Aug 2020 05:19:09 +0000]
Bug 26162: Don't fall into an infinite loop

If something went wrong we do want to stop the script!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 6725: (follow-up) Make patron duplicate matching flexible
Jonathan Druart [Tue, 18 Aug 2020 16:29:04 +0000]
Bug 6725: (follow-up) Make patron duplicate matching flexible

oops...

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25906: Compiled CSS (late)
Jonathan Druart [Tue, 18 Aug 2020 15:43:29 +0000]
Bug 25906: Compiled CSS (late)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25945: Description of AuthoritySeparator is misleading
Caroline Cyr La Rose [Tue, 7 Jul 2020 20:01:58 +0000]
Bug 25945: Description of AuthoritySeparator is misleading

This patch changes the description of the AuthoritySeparator system preference

To test:
1. Apply patch
2. Go to Administration > Global system preferences > Cataloging and locate the
AuthoritySeparator preference
3. Read the description and make sure it makes sense and that there are no typos
or grammatical errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26086: Add 'cron' to log viewer interface options
Nick Clemens [Wed, 29 Jul 2020 13:49:03 +0000]
Bug 26086: Add 'cron' to log viewer interface options

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Bug 26086: (follow-up) Be consistent with space in cron job

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 6725: DBRev 20.06.00.025
Jonathan Druart [Tue, 18 Aug 2020 15:40:44 +0000]
Bug 6725: DBRev 20.06.00.025

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 6725: (QA follow-up) Slightly rephrase PatronDuplicateMatchingAddFields
Katrin Fischer [Sat, 15 Aug 2020 02:48:20 +0000]
Bug 6725: (QA follow-up) Slightly rephrase PatronDuplicateMatchingAddFields

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 6725: Make patron duplicate matching flexible
Jonathan Druart [Wed, 5 Aug 2020 10:20:08 +0000]
Bug 6725: Make patron duplicate matching flexible

This patch adds a new system preference PatronDuplicateMatchingAddFields
to list the patron's attributes to use for deduplication.
The default value is surname, firstname and dateofbirth to keep existing
behaviour.

Test plan:
0. Apply the patch and execute the update DB entry
1. Create a new patron with surname, firstname
2. Create another patron with the same surname, firstname values
=> Confirm you get the duplicate warning
3. Modify the syspref to edit the list of attributes used to dedup
4. Repeat 1 and 2 with different values and confirm that you get the
behaviours you expect

Note: This is only impacting the add patron form from the UI, not the
import patrons tool.

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 16748: Add the ability to define due date in batch checkout
Jonathan Druart [Tue, 4 Aug 2020 14:55:56 +0000]
Bug 16748: Add the ability to define due date in batch checkout

This patch allows the librarian to pick the due date when batch checkout

Test plan:
Batch checkout using a hard due date
=> Notice that the due date is taken into account
Batch checkout the same barcodes with a different due date, to trigger the confirmation step
=> Notice that the due date is taken into account for the renewals

Signed-off-by: Henry Bolshaw <bolshawh@parliament.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 20469: Add item status to staff article request form
Marcel de Rooy [Mon, 26 Mar 2018 11:20:53 +0000]
Bug 20469: Add item status to staff article request form

The template checks if an item is checked out, on hold (waiting or
transit), not for loan. (Note: This can be extended in the future
in a general include as we have at opac side.)

Test plan:
[1] Place an article request on an item on loan. Verify status on form.
[2] Place an article request on a waiting item. Check status again.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

[EDIT] Simplified on 2020-07-27
Removed Koha::Item->is_waiting_or_transit.
Use Koha::Item->itemtype to check notforloan on itemtype level.
Adjusted commit message accordingly.

Additional test:
[3] Place an article request on a not for loan item. Check status.

NOTE: Not for loan is informational too. It does not say that this item
is not available for an article request. Depends on local situation.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 20469: Remove effective parameter
Marcel de Rooy [Mon, 27 Jul 2020 13:34:21 +0000]
Bug 20469: Remove effective parameter

Test plan:
Run test Koha/Item.t again

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 20469: Add Koha::Item->itemtype
Marcel de Rooy [Mon, 27 Jul 2020 12:31:14 +0000]
Bug 20469: Add Koha::Item->itemtype

Also needed to add a missing rollback to preceding subtest.

Test plan:
Run t/db_dependent/Koha/Item.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 22393: (QA follow-up) Typos and Filters
Martin Renvoize [Fri, 10 Jul 2020 16:39:53 +0000]
Bug 22393: (QA follow-up) Typos and Filters

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 22393: (follow-up) Corrections for QA feedback
Martin Renvoize [Tue, 21 Apr 2020 14:54:45 +0000]
Bug 22393: (follow-up) Corrections for QA feedback

We correct the behviour of 'amount' being passed back to the template
and add a work around for the existance of deleted_items alongside a FK
to items in the accountlines table.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 22393: Remove last remaining use of C4::Accounts::manualinvoice
Martin Renvoize [Mon, 10 Feb 2020 14:55:13 +0000]
Bug 22393: Remove last remaining use of C4::Accounts::manualinvoice

This patch re-arranges the manualinvoice controller script to clarify
code flow, replaces the last call to C4::Accounts::manualinvoice with a
call to Koha::Accounts->add_debit wrapped in a try catch block and also
adds a check on passed barcodes when the invoice type is 'LOST' so it
can link the subsequently created accountline to the item and issue.

Test plan
1/ Add a manual invoice (without entering a barcode)
2/ Add a manual invoice with a valid barcode (Not a LOST type)
3/ Add a manual invoice with a valid, but old, barcode (Not a LOST type)
4/ Add a manual invoice with an invalid barcode, note that an error is
displayed
5/ Add a manual invoice with type 'LOST' and a valid barcode for a
checkout your user has had checked out
6/ Add a manual invoice with type 'LOST' and a valid barcode, but not
one that will match a checkout for your user. Note an error is displayed
7/ When errors are displayed, note the form contains data from the
previous submission so you can just correct the error rather than
re-enter all data.
8/ Signoff

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 24884: Remove 'New list' button in 'Public lists' tab if OpacAllowPublicListCreat...
Owen Leonard [Mon, 17 Aug 2020 16:57:54 +0000]
Bug 24884: Remove 'New list' button in 'Public lists' tab if OpacAllowPublicListCreation is disabled

This patch adds a check on the OpacAllowPublicListCreation system
preference to the OPAC lists template so that if public list creation is
disabled the "New list" button doesn't appear under the "Public lists"
tab.

To test, apply the patch and confirm that the virtualshelves preference
is enabled.

- With the OpacAllowPublicListCreation system preference enabled, go to
  the OPAC and view the lists page.
  - If you are logged in you should see a "New list" link under both the
    "Your lists" tab and the "Public lists" tab.
  - If you are not logged in you should see "Log in to create a new
    list" on both pages.
- View the page with OpacAllowPublicListCreation disabled.
  - If you are logged in you should see a "New list" link under only the
    "Your lists" tab.
  - If you are not logged in you should see the "Log in" link only under
    the "Your lists" tab.

Works perfectly!

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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25114: Remove duplicated logic from GetLoanLength()
Lari Taskula [Sat, 11 Apr 2020 19:48:48 +0000]
Bug 25114: Remove duplicated logic from GetLoanLength()

Remove duplicated logic for searching circulation rules.

This can be replaced with get_effective_rules().

To test:
1. prove t/db_dependent/Circulation/GetHardDueDate.t

Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25364: Undo change to 'None specified'
Katrin Fischer [Sat, 15 Aug 2020 18:53:25 +0000]
Bug 25364: Undo change to 'None specified'

As this has been a little controversial, this patch undoes
the change to "None specified / Prefer not to say" to be
"None specified" again as before this patch set.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25364: Add "Other" to the gender options in a patron record
David Roberts [Mon, 4 May 2020 02:29:14 +0000]
Bug 25364: Add "Other" to the gender options in a patron record

This patch adds "Other" as an option, and also changes the wording of
"None specified" slightly.

To test:

1) Apply the patch
2) Check that there is an "Other" radio button in the patron record, and
that the wording of "None specified" has changed to "None specified /
Prefer not to say".
3) Check that you can save changes to the gender of this patron record,
both on create and modify.
4) Check that these changes also work in the Opac Self-Registration
functionality.

Correct typos in previous commit

Signed-off-by: Devinim <kohadevinim@devinim.com.tr>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25654: Make the contact and non-patron guarantor sections separate on patron...
Owen Leonard [Fri, 26 Jun 2020 20:12:58 +0000]
Bug 25654: Make the contact and non-patron guarantor sections separate on patron entry form

This patch reverses what I think was an unintended change made by Bug
14570 in which the non-patron guarantor fields are shown for all patron
types (not just child patrons) and  grouped with the patron contact fields.

This patch creates a new "Non-patron guarantor" fieldset to show along
with "Patron guarantor" when adding or editing child patrons.

To test, apply the patch check that the  BorrowerUnwantedField system
preference does not contain contactname, contactfirstname,
or relationship.

 - Open an adult patron for editing. You should see no guarantor-related
   fields.
 - Open a child patron for editing. There should be two guarantor
   sections: "Patron guarantor" and "Non-patron guarantor."
   - Test that adding patron guarantors and non-patron guarantors works
     correctly.
   - Add "contactname|contactfirstname|relationship" to the
     BorrowerUnwantedField system preference.
   - Reload the child patron entry form. The non-patron guarantor
     section should now be hidden.

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

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25694: Add ability to delete a Marc Modification Template when viewing
Owen Leonard [Mon, 27 Jul 2020 14:39:22 +0000]
Bug 25694: Add ability to delete a Marc Modification Template when viewing

This patch adds a "delete template" button to the MARC modification
templates "Edit actions" view.

To test, apply the patch and go to Tools -> MARC modification templates.

 - On the main MARC modification templates page the toolbar should have
   only one button: "New template."
 - Click the "Edit actions" button for an existing template.
 - On the "Actions for..." view there should be three buttons, "New
   template," "New action," and "Delete template."
   - Test that the "Delete template" button works correctly.

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25832: Add DataTables to MARC subfield structure admin page for authorities
Owen Leonard [Tue, 23 Jun 2020 11:52:20 +0000]
Bug 25832: Add DataTables to MARC subfield structure admin page for authorities

This patch adds DataTables sorting and filtering to the table of
subfields shown on the Authority MARC subfield structure administration
page.

To test, apply the patch and go to Administration -> Authority types.

 - From the 'Actions' menu, select 'MARC structure.'
 - From the 'Actions' menu, select the 'Subfields' link for a tag
   with multiple subfields.
   - On the page showing all the subfields for the tag, confirm that
     the table is sorted by default by subfield and that sorting works
     correctly.
   - Confirm that the search form at the top of the table works.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25867: DBRev 20.06.00.024
Jonathan Druart [Tue, 18 Aug 2020 13:50:32 +0000]
Bug 25867: DBRev 20.06.00.024

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25867: Database update for changing existing frameworks
Katrin Fischer [Fri, 14 Aug 2020 13:17:01 +0000]
Bug 25867: Database update for changing existing frameworks

This updates the descriptions for 952$a und $b in all existing
frameworks, if the English description hasn't been changed since
installing Koha.

To test:
- Look at your item edit form or on the MARC tab
  for the descriptions shown for $a and $b for any framework
- Note the descriptons say '... location'
- Change one or more using the frameworks.
- Run the database update
- Verify only the unchanged ones have been updated

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25867: Label "Current location" as "Current library" and "Permanent location...
Katrin Fischer [Sat, 18 Jul 2020 01:43:02 +0000]
Bug 25867: Label "Current location" as "Current library" and "Permanent location" as "Home library"

There is some confusion between the different locations and
libraries appearing in the GUI.

holdingbranch is sometimes labeled as current location
homebranch is sometimes labeled as permanent location

The patch fixes these occurences in various files:
- Item search form, results and export options
- MARC frameworks for en, fr-Fr, nb-NO, and pl-PL
- Holds awaiting pickup report
- Item display on order receive screen (create items on receive)
- OPAC system preference: OPACResultsLibrary
- Staff and OPAC detail pages
- Lost items report
- Rotating collections

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26065: Move translatable strings out of marc_modification_templates.tt and into...
Owen Leonard [Sat, 25 Jul 2020 15:10:24 +0000]
Bug 26065: Move translatable strings out of marc_modification_templates.tt and into marc_modification_templates.js

This patch removes the <script> block in the MARC modification
templates template in which strings are defined for translation
purposes.

Strings are now in place in the JavaScript file and wrapped in the new
__() function.

To test, apply the patch and clear your browser cache if necessary.

- Perform some actions which will trigger translated strings, for
  example:
  - Create a new template
  - Add an action to the template and then delete it.
    - The confirmation should appear correctly
  - Add an action. Select "Copy" as the operation and click "Add action"
    without filling in any fields.
    - You should see a message, "Both subfield values should be filled
      or empty"

TESTING TRANSLATABILITY

- Update a translation, e.g. fr-FR:

> cd misc/translator
> perl translate update fr-FR

- Open the corresponding .po file for JavaScript strings, e.g.
  misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from
  koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js for
  translation, e.g.:

  msgid "Both subfield values should be filled or empty."
  msgstr ""

- Edit the "msgstr" string however you want (it's just for testing).
- Install the updated translation:

> perl translate install fr-FR

- Switch to your newly translated language in the staff client and
  repeat the test plan above. The translated string should appear.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25778: Fix var scope in koha-plack for PERL5LIB and KOHA_HOME
David Cook [Fri, 14 Aug 2020 01:49:40 +0000]
Bug 25778: Fix var scope in koha-plack for PERL5LIB and KOHA_HOME

Currently, if a koha-plack is given multiple instances, it will create
duplicate $KOHA_HOME/installer and $KOHA_HOME/installer/lib entries
in PERL5LIB as these changes are done at the global rather than local level.

This issue can only be seen in non-dev Koha, since dev Koha installs
rewrite PERL5LIB.

This patch localizes PERL5LIB to each instance.

To test dev installs:
0. cp debian/scripts/koha-plack /usr/sbin/koha-plack
1. koha-plack --restart kohadev
2. Note that nothing breaks

To test non-dev installs:
0. Don't replace /usr/sbin/koha-plack yet
1. Create multiple non-dev installs with plack enabled and running
2. Set up one of these non-dev installs so you can use the web
UI (that is beyong the scope of this test plan)
3. koha-plack --restart test1 test2 test3
4. For test3, go to /cgi-bin/koha/about.pl
5. Note that there are duplicate /usr/share/koha/installer
and /usr/share/koha/lib/installer entries in PERL5LIB
6. cp debian/scripts/koha-plack /usr/sbin/koha-plack
7. koha-plack --restart test1 test2 test3
8. For test3, go to /cgi-bin/koha/about.pl
9. Note that there are no duplicates entries in PERL5LIB

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26194: (follow-up) Default to current branch
Martin Renvoize [Wed, 12 Aug 2020 15:07:05 +0000]
Bug 26194: (follow-up) Default to current branch

When adding a new register, it would be helpful to default to the
current logged in branch.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26194: Add link to cash register management from message about missing registers
Owen Leonard [Tue, 11 Aug 2020 19:33:41 +0000]
Bug 26194: Add link to cash register management from message about missing registers

In places where the interface warns the user about missing cash
registers we should provide users with permission a direct link to the
cash register management page.

To test, apply the patch and enable the UseCashRegisters and
EnablePointOfSale preferences.

If necessary, go to Administration -> Cash registers and remove any cash
registers for your library.

 - Log in to the staff interface as a user with "manage_cash_registers"
   permission.
 - Locate a patron who has outstanding fines.
 - Under Accounting -> Make a payment, click the "Pay" button next to a
   fine.
 - The page should show the message about missing cash registers with a
   button which take you directly to the "Add new cash register" form.
 - Perform the same check by selecting the checkbox next to a fine and
   clicking the "Pay amount" button and the "Pay selected" button.
 - Test the message shown at:
   - Tools -> Cashup registers.
   - Point of sale -> Register details
   - Point of sale -> Library details
 - Perform the same tests when logged in as a user without permission to
   manage cash registers. The messages shown in the previous steps
   should omit the button linking to cash register management.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26149: Remove jquery.checkboxes plugin from problem reports page
Owen Leonard [Wed, 5 Aug 2020 16:35:37 +0000]
Bug 26149: Remove jquery.checkboxes plugin from problem reports page

This patch removes the inclusion of the jquery.checkboxes plugin from
the problem reports template in the staff interface.

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

 - Submit a few OPAC problem reports if necessary
 - Go to Tools -> OPAC problem reports
 - Test that the "Select all" and "Clear all" controls at the top of the
   table work correctly.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26159: Remove the use of jquery.checkboxes plugin from batch record delete page
Owen Leonard [Thu, 6 Aug 2020 11:42:33 +0000]
Bug 26159: Remove the use of jquery.checkboxes plugin from batch record delete page

This patch removes the use of the jquery.checkboxes plugin from the
batch delete records page.

To test, apply the patch and go to Tools ->  Batch record deletion.

 - Submit a batch of biblionumbers which includes one or more
   checked-out items, one or more on-hold items, and one or more records
   with no items.
 - On the confirmation page, test the selection links at the top of the
   results table. Each one should work correctly.
 - Submit a batch of authority record ids which includes some records
   which are in use and some which aren't.
 - On the confirmation page, test the selection links at the top of the
   results table. Each one should work correctly.

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26201: Remove the use of jquery.checkboxes plugin from batch extend due dates...
Owen Leonard [Thu, 13 Aug 2020 12:34:19 +0000]
Bug 26201: Remove the use of jquery.checkboxes plugin from batch extend due dates page

This patch removes the use of the jquery.checkboxes plugin from the
batch extend due dates page.

Unrelated change: Removed 'enctype="multipart/form-data"' from the form
because there is no file upload.

To test, apply the patch and go to Tools -> Batch extend due dates.

 - Submit the form with parameters which will return a set of multiple
   checkouts.
 - On the results page, test the "Select all" and "Clear all" links to
   confirm that they work correctly.

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26202: Remove the use of jquery.checkboxes plugin from batch record modification...
Owen Leonard [Thu, 13 Aug 2020 13:19:19 +0000]
Bug 26202: Remove the use of jquery.checkboxes plugin from batch record modification page

This patch removes the use of the jquery.checkboxes plugin from the
batch record modification page.

To test, apply the patch and go to Tools -> Batch record modification

 - Submit a batch of biblionumbers for modification.
 - On the results page, test the "Select all" and "Clear all" links to
   confirm that they work correctly.

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26204: Remove the use of jquery.checkboxes plugin from staff interface lists
Owen Leonard [Thu, 13 Aug 2020 13:54:54 +0000]
Bug 26204: Remove the use of jquery.checkboxes plugin from staff interface lists

This patch removes the use of the jquery.checkboxes plugin from the
staff interface lists page.

To test, apply the patch, go to Lists, and view the contents of a
list with multiple titles on it.

Check that the "Select all" and "Clear all" links work correctly.

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26212: Remove the use of jquery.checkboxes plugin from pending offline circulations
Owen Leonard [Fri, 14 Aug 2020 13:39:17 +0000]
Bug 26212: Remove the use of jquery.checkboxes plugin from pending offline circulations

This patch removes the use of the jquery.checkboxes plugin from the
pending offline circulations page, replacing it with in-page JS.

Unrelated: The JS-based creation of the "select all" and "clear all"
controls has been replaced with HTML links. Labels are added to the
results table to make checkbox selection easier.

To test, apply the patch and go to Circulation.

- Upload an offline circulation file (.koc) with multiple transactions.
  If you don't want to generate this file using the desktop application
  or Firefox add-on you can create a text file like this (tab
  separated):

  Version=1.0    Generator=koct-firefox    GeneratorVersion=0.1
  2020-08-14 13:24:21    issue    0109132    33000000093476

- Go to Pending offline circulation actions. You should see the list of
  transactions you uploaded.
- Test that the "Check all" and "Uncheck all" controls work correctly.

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26214: Remove the use of jquery.checkboxes plugin on late orders page
Owen Leonard [Fri, 14 Aug 2020 14:47:40 +0000]
Bug 26214: Remove the use of jquery.checkboxes plugin on late orders page

This patch replaces the use of the jquery.checkboxes plugin on late
orders page in acquisitions.

Unrelated changes: The "Check all" and "Uncheck all" links are moved out
of the table header so that it matches similar interfaces. Sorting is
now disabled on the checkboxes column and the table is sorted by default
on the "Order line" column.

To test, apply the patch and go to Acquisitions -> Late orders.

 - On the initial view, there should be no "Check all" or "Uncheck all"
   links.
 - Select a vendor in the left-hand sidebar form.
 - When the filtered table is redisplayed the "Check all" and "Uncheck
   all" links should now be visible.
 - Test that the links work correctly.
 - Confirm that the checkboxes column cannot be sorted and that the
   table is sorted by default by order line number.

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26215: Remove the use of jquery.checkboxes plugin from Z39.50 search pages
Owen Leonard [Fri, 14 Aug 2020 15:18:37 +0000]
Bug 26215: Remove the use of jquery.checkboxes plugin from Z39.50 search pages

This patch removes the use of the jquery.checkboxes plugin from three
Z39.50 search templates: Acquisitions, Authorities, and Cataloging.

To test, apply the patch and test the controls for selecting and
deselecting Z39.50 search targets on the following pages:

 - In Acquisitions: Locate a vendor and add to basket -> From an
   external source.
 - In Authorities: Click "New authority" -> "New from Z39.50/SRU."
 - In Cataloging: Click "New from Z39.50/SRU."

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26216: Remove the use of jquery.checkboxes plugin from catalog search results
Owen Leonard [Fri, 14 Aug 2020 17:28:22 +0000]
Bug 26216: Remove the use of jquery.checkboxes plugin from catalog search results

This patch removes the use of jquery.checkboxes plugin from the
staff interface catalog search results page.

To test, apply the patch and perform a catalog search in the staff
interface which will return results.

On the search results page test the "Select all" and "Clear all" links
at the top of the results. They should work correctly.

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26213: Remove the use of jquery.checkboxes plugin when adding orders from MARC...
Owen Leonard [Fri, 14 Aug 2020 14:18:00 +0000]
Bug 26213: Remove the use of jquery.checkboxes plugin when adding orders from MARC file

This patch removes the use of the jquery.checkboxes plugin from the page
for adding orders to a basket from a staged MARC file.

This patch fixes an unreported bug wherein the "select all" and "clear
all" controls affected not only MARC record checkboxes but also the
"show inactive funds" checkboxes.

To test, apply the patch and go to Acquisitions.

- Go to Vendor -> Add to basket -> From a staged file.
- Select a staged file with multiple records.
- Test the "Select all" and "Clear all" links at the top of the "Select
  to import" tab. They should work correctly to select and deselect
  checkboxes corresponding to staged MARC records.

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 23632: Remove C4::Logs::GetLogs
Jonathan Druart [Thu, 6 Aug 2020 09:28:53 +0000]
Bug 23632: Remove C4::Logs::GetLogs

Koha::ActionLogs->search must be used instead.
There is no call to this subroutine in our code, it should be removed.

Test plan:
Make sure the 3 test files still return green and that there is no more
occurrences of GetLogs in the codebase.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 23695: (follow-up) Add exceptions for missing branch parameters
Nick Clemens [Fri, 14 Aug 2020 12:57:25 +0000]
Bug 23695: (follow-up) Add exceptions for missing branch parameters

JD: amended patch
Remove QA issues:
 FAIL   t/db_dependent/Circulation.t
   FAIL   valid
                "my" variable $doreturn masks earlier declaration in same scope
                "my" variable $messages masks earlier declaration in same scope

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 23695: (QA follow-up) Fix Copy/Paste
Martin Renvoize [Thu, 13 Aug 2020 13:40:52 +0000]
Bug 23695: (QA follow-up) Fix Copy/Paste

The value remained as 'tobranchcd' and needed to be updated to
'frombranchcd' to allow reservered transfers to be correctly set.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 23695: (follow-up) Adjust for addition of transfer trigger
Nick Clemens [Mon, 23 Mar 2020 12:46:26 +0000]
Bug 23695: (follow-up) Adjust for addition of transfer trigger

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 23695: Alter transferbook to take a hash of params and specify from_branch
Nick [Mon, 30 Sep 2019 10:37:03 +0000]
Bug 23695: Alter transferbook to take a hash of params and specify from_branch

To test:
 1 - Go to Circulation->Transfer
 2 - Find an item from your branch and create a transfer to branch B
 3 - Note you can specify the origin and default is 'Item's holding library'
 4 - Confirm the item is marked as held at your current branch and is being transferred to B
 5 - Find an item from a third branch, branch C
 6 - Transfer that item to branch B from branch D
 7 - Confirm the item is held at branch D and is being transferred to B
 8 - prove -v t/db_dependent/Circulation.t
 9 - prove -v t/db_dependent/Koha/Items.t
10 - prove -v t/db_dependent/RotatingCollections.t

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 23695: Set holding branch to transferring branch when manually initiating a transfer
Nick [Mon, 30 Sep 2019 10:37:03 +0000]
Bug 23695: Set holding branch to transferring branch when manually initiating a transfer

To test:
 1 - Go to Circulation->Transfer
 2 - Note your signed in branch
 3 - Find an item from your branch and create a transfer to branch B
 4 - Confirm the item is marked as held at your current branch and is being transferred to B
 5 - Find an item from a third branch, branch C
 6 - Transfer that item to brnach B
 7 - Confirm the item is held at your current branch and is being transferred to B
 8 - prove -v t/db_dependent/Circulation.t
 9 - prove -v t/db_dependent/Koha/Items.t
10 - prove -v t/db_dependent/RotatingCollections.t

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25751: Add ORDERED in dropdown list of suggestion's statuses
Jonathan Druart [Tue, 16 Jun 2020 13:44:40 +0000]
Bug 25751: Add ORDERED in dropdown list of suggestion's statuses

The status "ORDERED" is missing from the pull down list of
status values when editing a suggestion, so the first
option is selected "No status".

This leads to data loss when editing a suggestion in the
status "ORDERED". Worse: the status can't be reset to
"ORDERED" and so no AVAILABLE notice can be sent to the patron.

Test plan:
- Create a suggestion, accept it, create a new order from this suggestion.
- Verify status is "ORDERED"
- Edit the suggestion
=> Without this patch the dropdown list does not have
   "Ordered", and if you save you lost the status
=> With this patch applied the dropdown list has "Ordered"
   preselected. You can save and preserve the status.

Signed-off-by: Holly Cooper <hc@interleaf.ie>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25872: Fix scoping of $limits
Nick Clemens [Thu, 13 Aug 2020 12:56:33 +0000]
Bug 25872: Fix scoping of $limits

The code in build_query_compat contained a 'my' in the assigning of limits for the search in a conditional

This meant the limits were being set correctly during the conditional, but we blanked when passed to the rest
of the code. The effect was that the searches worked, however, the template params to repeat the search were
incomplete.

Removing the my ensures the same limits are applied during search and on re-sorting

To test:
1 - Enable Elasticsearch
2 - On OPAC perform advanced search, selecting only an itype, ccode, or LOC limit
3 - Attempt to sort results
4 - You are returned to Advanced search
5 - Apply patch
6 - Repeat
7 - It sorts!

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25872: Unit tests
Nick Clemens [Thu, 13 Aug 2020 12:55:21 +0000]
Bug 25872: Unit tests

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26119: Enable patron's attribute edition when PatronSelfRegistrationVerifyByEmail
Jonathan Druart [Mon, 3 Aug 2020 11:09:54 +0000]
Bug 26119: Enable patron's attribute edition when PatronSelfRegistrationVerifyByEmail

There is no good reason remove the ability to edit patron's attributes
if PatronSelfRegistrationVerifyByEmail is set.

We cannot have them in the self-registration form (because we don't
store patron's attributes during self-ref), but we can have them when
a patron show/edit their information.

Test plan:
0. Enable PatronSelfRegistrationVerifyByEmail and create patron's
attributes that can be edited at the OPAC
1. Create a new patron using the self-reg feature
=> You don't have the ability to fill in the patron's attribute
2. Edit your personal details (OPAC)
=> Without this patch you still don't see the patron's attribute that
can be edited at the OPAC
=> With this patch applied you can!
3. Notice the wording change on the "Modify patron attribute type" form
and confirm it makes sense

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26127: local_referer should not compare with OPACBaseURL case insensitive
Jonathan Druart [Mon, 3 Aug 2020 13:07:24 +0000]
Bug 26127: local_referer should not compare with OPACBaseURL case insensitive

In our test data we have OPACBaseURL that is filled with http://kohadev.myDNSname.org:8080,
but the CGI referer in local_referer is lowercase
We should compare it without case sensitivity

Test plan:
- Use koha-testing-docker
- Notice the value of OPACBaseURL
=> http://kohadev.myDNSname.org:8080
- Use the "reports a problem" feature at the OPAC
- Notice that the "Problem found on page" is correctly filled with the
referer

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26182: Clarify wording on CanMarkHoldsToPullAsLost and UpdateItemWhenLostFromHoldList
Andrew Fuerste-Henry [Thu, 13 Aug 2020 13:13:55 +0000]
Bug 26182: Clarify wording on CanMarkHoldsToPullAsLost and UpdateItemWhenLostFromHoldList

To test:
- apply patch, restart
- search sysprefs for CanMarkHoldsToPullAsLost
- confirm both sysprefs come up in search and syspref descriptions refer to each other

Signed-off-by: Holly Cooper <holly.teresa.cooper@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26228: Update gulpfile to work with Node.js v12
Tomas Cohen Arazi [Mon, 17 Aug 2020 15:12:55 +0000]
Bug 26228: Update gulpfile to work with Node.js v12

This patch makes the gulpfile work with gulp v4 on Node v12. To test it,
make sure your dev env has Node.js v12.

It also replaces the use of 'gulp-util' (deprecated) by 'minimist' as
recommended on their site.

On both KTD and KohaDevBox edit your sources.list so the node line
points to 'node_12.x' instead of 'node_8.x'.

Once that's done:
1. On your clone run:
   $ yarn install
   $ npm install -E
2. Build the CSS:
   $ yarn build
   $ yarn build --view opac
=> SUCCESS: Things build correctly
3. Sign off :-D

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26078: (follow-up) Use a boolean rather than changing returnbranch
Nick Clemens [Fri, 14 Aug 2020 11:30:12 +0000]
Bug 26078: (follow-up) Use a boolean rather than changing returnbranch

Bug 26078: (follow-up) used validTransfer instead of checking WrongTransfer message

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26078: Prevent generating a new transfer from return policy when resolving a...
Nick Clemens [Thu, 30 Jul 2020 16:59:14 +0000]
Bug 26078: Prevent generating a new transfer from return policy when resolving a transfer

To test:
- Have 2+ branches
- Set your default return policy to Item returns to issuing library
- Find an item with holding branch of Branch A
- Set your library to Branch B
- Check item in
- Koha generates a transfer to Branch A. In doing so, it sets the item holding branch to Branch B
- Set your library to Branch A
- Check item in
- Koha generate a transfer to Branch B. In doing so, it sets the item holding branch to Branch A
- Set you library to Branch A
- Check the item in
 . . . Repeat indefinitely.
 Apply patch
 Repeat
 No more loop

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26090: Fix "item types" report
Jonathan Druart [Thu, 30 Jul 2020 12:16:09 +0000]
Bug 26090: Fix "item types" report

This report was broken with SQL strict mode, but also without.

DBD::mysql::st execute failed: 'koha_kohadev.itemtypes.itemtype' isn't
in GROUP BY [for Statement "

and, if no library was selected:

DBD::mysql::st execute failed: Unknown column 'biblioitems.itemtype' in
'field list' [for Statement "

This patch does the minimum to make it usable, but it would need more
love.

Test plan:
To test you will need to try the 4 combinaisons:
 item-level_itypes = item or biblio
 With or without a library selected in the dropdown list

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 16371: (follow-up) DB changes
Jonathan Druart [Thu, 13 Aug 2020 08:28:24 +0000]
Bug 16371: (follow-up) DB changes

We need to keep "opac" is the pref was set before the upgrade

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 16371: DBRev 20.06.00.023
Jonathan Druart [Thu, 13 Aug 2020 08:00:23 +0000]
Bug 16371: DBRev 20.06.00.023

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 16371: Fix inconsistencies with timestamp
Jonathan Druart [Thu, 13 Aug 2020 07:57:27 +0000]
Bug 16371: Fix inconsistencies with timestamp

The timestamp value needs to be updated for each quote returned by
get_daily_quote (even when there is a match)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 16371: Combine get_daily_quote and get_daily_quote_for_interface
Emmi Takkinen [Fri, 31 Jul 2020 06:47:56 +0000]
Bug 16371: Combine get_daily_quote and get_daily_quote_for_interface

This patch combines get_daily_quote and get_daily_quote_for_interface
methods and moves them from Koha::Quote to Koha::Quotes. Also removes
some unused code and adjusts datetime parsing.

To test apply this patch and confirm 'QuoteOfTheDay' syspref still
works as expected (quote is shown in correct mainpage(s)).

Also prove t/db_dependent/Koha/Quotes.t

Sponsored-by: Koha-Suomi Oy

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 16371: Remove GetDailyQuote tests from Koha.t
Emmi Takkinen [Wed, 12 Aug 2020 06:16:43 +0000]
Bug 16371: Remove GetDailyQuote tests from Koha.t

Tests in Koha.t failed due GetDailyQuote tests. This patch
removes these tests since we test quotes in Quotes.t instead.

To test prove t/db_dependent/Koha.t

Sponsored-by: Koha-Suomi Oy

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 16371: Rewrite get_daily_quote
Emmi Takkinen [Tue, 7 Jul 2020 12:45:17 +0000]
Bug 16371: Rewrite get_daily_quote

An updated test plan:
1. Apply the patch(es).
2. Run the database update (updatedatabase on koha-testing-docker).
3. Check that the 'QuoteOfTheDay' system preference options
   work as expected:
   - OPAC: QOTD only appears in the OAPC
   - Staff interface: QOTD only appears in the staff interface
   - Both (Select all): QOTD appears in the staff interface and OPAC
4. Run the tests and make sure they pass:
   prove t/db_dependent/Koha/Quotes.t
5. Sign off!

Sponsored-by: Koha-Suomi Oy

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>

3 years agoBug 16371: Add database updates
Emmi Takkinen [Fri, 10 Jul 2020 07:20:56 +0000]
Bug 16371: Add database updates

Sponsored-by: Koha-Suomi Oy

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>

3 years agoBug 16371: Fix QA issues, change terminology
Emmi Takkinen [Thu, 9 Jul 2020 08:55:03 +0000]
Bug 16371: Fix QA issues, change terminology

Sponsored-by: Koha-Suomi Oy

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>

3 years agoBug 16371: Fix tests
Emmi Takkinen [Mon, 27 Apr 2020 05:55:38 +0000]
Bug 16371: Fix tests

Tests failed due ids already existing in 'quotes' table.
This patch removes hardcoded ids from tests.

Sponsored-by: Koha-Suomi Oy

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

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>

3 years agoBug 16371: Use multi-select on syspref
Emmi Takkinen [Tue, 14 Apr 2020 09:51:50 +0000]
Bug 16371: Use multi-select on syspref

This patch replaces textbox with multi-select dropdown on
syspref 'QuoteOfTheDay' and changes tests to match this change.

To test:
1. Check 'OPAC', 'staff client' or both on 'QuoteOfTheDay'.
2. Make sure that quote is displayed on (both) mainpage(s).

Prove t/db_dependent/Koha/Quotes.t

Sponsored-by: Koha-Suomi Oy

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

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>

3 years agoBug 16371: Quote of the Day (QOTD) - Display in different interfaces
Olli-Antti Kivilahti [Mon, 25 Apr 2016 08:22:04 +0000]
Bug 16371: Quote of the Day (QOTD) - Display in different interfaces

Set 'QuoteOfTheDay'-syspref to 'opac intranet' to allow displaying news in the
opac and the staff client.

Add 'commandline' to allow news in the commandline (where applicable)

Accepts all values accepted by the C4::Context->interface()

Test plan:
1. Set 'QuoteOfTheDay' syspref as 'intranet' or 'opac' or both
2. Check that quote is visible on both mainpages

Prove t/db_dependent/Koha/Quotes.t

Sponsored-by: Koha-Suomi Oy

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

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>

3 years agoBug 16371: Add needed Koha::Exception
Emmi Takkinen [Tue, 7 Apr 2020 08:53:17 +0000]
Bug 16371: Add needed Koha::Exception

Add Koha::Exception needed in this bug.

Sponsored-by: Koha-Suomi Oy

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

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>

3 years agoBug 16371: Rename test file
Emmi Takkinen [Mon, 20 Apr 2020 12:20:18 +0000]
Bug 16371: Rename test file

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

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>

3 years agoBug 16371: Move GetDailyQuote to get_daily_quote
Emmi Takkinen [Fri, 17 Apr 2020 08:28:55 +0000]
Bug 16371: Move GetDailyQuote to get_daily_quote

This patch moves subroutine 'GetDailyQuote' to new
Koha::Quote object and adjusts tests.

To test:
1. Set 'QuoteOfTheDay' as 'enable'
2. Check that quote is displayed on OPAC mainpage

Prove t/db_dependent/Koha/GetDailyQuote.t

Sponsored-by: Koha-Suomi Oy

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

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>

3 years agoBug 16371: Add Koha::Quote[s] classes
Emmi Takkinen [Fri, 17 Apr 2020 07:57:27 +0000]
Bug 16371: Add Koha::Quote[s] classes

Sponsored-by: Koha-Suomi Oy

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

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>

3 years agoBug 25348: (QA follow-up) Silence irrelevant warnings
Tomas Cohen Arazi [Tue, 11 Aug 2020 15:41:57 +0000]
Bug 25348: (QA follow-up) Silence irrelevant warnings

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25348: Add support for circulation status 12 ( lost )
Kyle M Hall [Fri, 1 May 2020 16:24:44 +0000]
Bug 25348: Add support for circulation status 12 ( lost )

We should support the SIP2 "circulation status" value 12, "lost".

Test Plan:
1) Apply this patch
2) prove t/db_dependent/SIP/Transaction.t

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25347: Add support for circulation status 11 ( claimed returned )
Kyle M Hall [Fri, 1 May 2020 16:16:48 +0000]
Bug 25347: Add support for circulation status 11 ( claimed returned )

Now that we have return claims in Koha, we should support the SIP2
"circulation status" value 11, "claimed returned".

Test Plan:
1) Apply this patch
2) prove t/db_dependent/SIP/Transaction.t

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25344: Add support for circulation status 10 ( item in transit )
Kyle M Hall [Fri, 1 May 2020 16:04:37 +0000]
Bug 25344: Add support for circulation status 10 ( item in transit )

We should support the SIP2 "circulation status" value 10, "in transit
between library locations"

Test Plan:
1) Apply this patch
2) prove t/db_dependent/SIP/Transaction.t

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26114: ILL should mark status=RET only if a return happened
Tomas Cohen Arazi [Fri, 31 Jul 2020 14:14:20 +0000]
Bug 26114: ILL should mark status=RET only if a return happened

The original code assumed every codepath should be trated as a
successful check-in. Such is not the case and the regression tests
verify that the code acknowledges this.

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Illrequests.t
=> FAIL: Tests fail
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26114: Regression tests
Tomas Cohen Arazi [Fri, 31 Jul 2020 14:14:09 +0000]
Bug 26114: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26132: (QA follow-up) Make tests more robust
Tomas Cohen Arazi [Wed, 12 Aug 2020 17:44:52 +0000]
Bug 26132: (QA follow-up) Make tests more robust

Tests fail is SearchEngine is set to Elasticsearch. This patch makes
tests build 'real' biblios.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26132: (follow-up) Count all checkouts if no limits needed
Nick Clemens [Tue, 4 Aug 2020 19:01:30 +0000]
Bug 26132: (follow-up) Count all checkouts if no limits needed

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26132: Tidy _check_max_qty
Jonathan Druart [Tue, 4 Aug 2020 10:22:06 +0000]
Bug 26132: Tidy _check_max_qty

This is only a perltidy of _check_max_qty to remove some space
inconsistencies, like:
  if( $max_checkouts_allowed eq '' ){ return;}
  if ( $checkout_count - $onsite_checkout_count >= $max_checkouts_allowed ) {

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26132: Don't prefetch if not needed
Jonathan Druart [Tue, 4 Aug 2020 10:21:26 +0000]
Bug 26132: Don't prefetch if not needed

We only need to prefetch items if CircControl is set to ItemHomeLibrary

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26132: Remove raw SQL query for patron_maxissueqty
Jonathan Druart [Tue, 4 Aug 2020 10:12:56 +0000]
Bug 26132: Remove raw SQL query for patron_maxissueqty

Same as before but for patron_maxissueqty

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26132: Remove raw sql query
Jonathan Druart [Tue, 4 Aug 2020 10:05:53 +0000]
Bug 26132: Remove raw sql query

Making use of Koha::Checkouts make the code much more readable here.
It fixes 2 flaws:
 * $type was not quote escaped
 * the effective itemtype was not used which could lead to wrong
 calculation (for instance item-level_itypes is set but the item does
 not have the itype defined)

However there is something to note, we are going to make things a bit
less effective as we are now fetching the items to get their effective
itemtype (vs a SUM done at DB level)

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26132: TooMany refactoring
Jonathan Druart [Mon, 3 Aug 2020 16:25:10 +0000]
Bug 26132: TooMany refactoring

The different calls to _check_max_qty can be improved to highlight what
is really changing between each of them.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 21946: DBIC schema changes
Jonathan Druart [Thu, 13 Aug 2020 08:14:49 +0000]
Bug 21946: DBIC schema changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 21946: DBRev 20.06.00.022
Jonathan Druart [Thu, 13 Aug 2020 08:00:23 +0000]
Bug 21946: DBRev 20.06.00.022

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 21946: Restore defined vs ""
Jonathan Druart [Tue, 4 Aug 2020 08:39:24 +0000]
Bug 21946: Restore defined vs ""

The tests still pass. Was the original change really useful?

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 21946: (follow-up) Restore join to biblioitems
Nick Clemens [Mon, 3 Aug 2020 12:27:15 +0000]
Bug 21946: (follow-up) Restore join to biblioitems

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 21946: (follow-up) Add a hint
Nick Clemens [Wed, 29 Jul 2020 12:08:22 +0000]
Bug 21946: (follow-up) Add a hint

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 21946: (follow-up) Add optgroup label in circ rules
Owen Leonard [Tue, 28 Jul 2020 13:17:54 +0000]
Bug 21946: (follow-up) Add optgroup label in circ rules

This patch adds a label to the optgroup showing child itemtypes in the
circulation and fine rules interface.

The parent itemtype description is the optgroup label, and then the
parent itemtype is repeated as an <option> with the additional label
"All"

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 21946: Add test for parent method
Nick Clemens [Fri, 17 Jul 2020 15:18:09 +0000]
Bug 21946: Add test for parent method

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 21946: Update unit tests to pass under ES
Nick Clemens [Wed, 8 Jan 2020 12:30:41 +0000]
Bug 21946: Update unit tests to pass under ES

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 21946: Display parent-child relationship on smart-rules.pl
Nick Clemens [Tue, 9 Apr 2019 20:00:16 +0000]
Bug 21946: Display parent-child relationship on smart-rules.pl

To test:
 1 - Set some itemtypes to have a parent
 2 - Browse to Administration -> Circulation and fines rules
 3 - Note new description of parent/child relationships at top of page
 4 - Note that itemtype dropdown for circ rules shows child types under parents
 5 - Set a rule for a child type
 6 - Note it displays as Parent->Child
 7 - Have three child types under a parent
 8 - Set the parent 'Current checkouts allowed' to 3
 9 - Set the children 'Current checkouts allowed' to:
     type1 = 2
     type2 = 1
     type3 = 1
10 - Create some items of the type above
11 - Note you can checkout 2 of type 1, and not 3
12 - Note you can checkout 1 of type 2, but not 2
13 - Note that you now cannot checkout any of type3
14 - Note you cannot checkout any of the parent type
15 - Return one of the other items and note you can now checkout an item of type3
16 - Return another item and note you can checkout an item of the parent type
17 - Return all
18 - Set the parent type to 1
19 - Now note you can only checkout 1 of any of the children
20 - Set the parent to 0
21 - Note you cannot checkout any of the child types

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 21946: Update Administration->Item types to allow for defining parent types
Nick Clemens [Tue, 2 Apr 2019 14:47:16 +0000]
Bug 21946: Update Administration->Item types to allow for defining parent types

To test:
1 - Browse to Administration -> Item types
2 - Not a new colum for prent type
3 - Edit an existing type and not you can select any type (except the current) as a parent
4 - Select one
5 - Edit the type you selected as parent
6 - Note it cannot have a parent defined
7 - Edit a new type, note you can select a parent

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 21946: Update C4::Circulation->TooMany to check parent itemtypes
Nick Clemens [Wed, 1 May 2019 09:57:50 +0000]
Bug 21946: Update C4::Circulation->TooMany to check parent itemtypes

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

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

JD amended patch: tidy the subtest

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 21946: Database updates
Nick Clemens [Wed, 13 Mar 2019 00:36:48 +0000]
Bug 21946: Database updates

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26179: Add Timothy Alexis Vass to contributors
Jonathan Druart [Thu, 13 Aug 2020 06:09:10 +0000]
Bug 26179: Add Timothy Alexis Vass to contributors

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 5428: Add searchid to the "Return to the record" button (batch del)
Jonathan Druart [Wed, 12 Aug 2020 12:03:00 +0000]
Bug 5428: Add searchid to the "Return to the record" button (batch del)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 5428: (QA follow-up) Add searchid for deleting items in a batch and editing in...
Nick Clemens [Fri, 7 Aug 2020 00:43:29 +0000]
Bug 5428: (QA follow-up) Add searchid for deleting items in a batch and editing in batch

To test:
0 - Perform a search in the staff client
1 - Click a title to go to the details page for a record
2 - Click the 'Edit' button and select 'Edit items in a batch'
3 - Note the searchid is in the url
4 - Make a change and hit 'Save'
5 - Note the 'Return the the record' link at the top, and the button on the bottom include searchid in URL
6 - Click one and note the brwoser is stil there
7 - Click 'Edit' and select 'Delete items in a batch'
8 - Delete one item
9 - Click return to record
10 - Browser is there
11 - Click 'Delete items in a batch again
12 - Select all and check 'Delete records if no items remain'
13 - Delete them
14 - Note you have a link to 'Go back to the results'

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 5428: Jump back to the search result after deleting a record
Jonathan Druart [Tue, 4 Aug 2020 12:36:38 +0000]
Bug 5428: Jump back to the search result after deleting a record

This patch adds the ability to jump back to the search result after a
record has been deleted.
Also it keeps the "browser" when all items are deleted from a
bibliographic record

Test plan:
- Start a new search
- Select a record with items
- Delete all the items
=> You still see the browser
- Delete the record
=> You are back to the adv search form but we new link "Go back to the
results" is present at the top of the page

Limitation: As we delete the record we do not longer know the offset,
we are back to the first page of the result list

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 20154: Stay in the open tab when editing authority record
Owen Leonard [Mon, 13 Jul 2020 20:09:17 +0000]
Bug 20154: Stay in the open tab when editing authority record

This patch adds some JavaScript to the authority record detail page in
the staff interface so that clicking "Edit" will take you to the
authority edit page while keeping the same tab open.

To test, apply the patch and locate an authority record in your catalog.

 - Click any of the numbered tabs besides tab 0.
 - Choose "Edit record" from the "Edit" dropdown menu.
 - When the authorities edit page loads the same tab should be
   preselected.

Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>