Commit graph

39478 commits

Author SHA1 Message Date
38619de9db 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>
2020-08-18 17:39:48 +02:00
5a474e50e0 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>
2020-08-18 17:39:48 +02:00
b1235746d9 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>
2020-08-18 17:39:48 +02:00
b036710fea 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>
2020-08-18 17:39:48 +02:00
484061a44e 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>
2020-08-18 17:39:48 +02:00
0d19d9fa44 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>
2020-08-18 17:39:48 +02:00
168c8f2e31 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>
2020-08-18 17:39:48 +02:00
Lari Taskula
14d3a7dfe3 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>
2020-08-18 17:39:48 +02:00
Katrin Fischer
274075a63f 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>
2020-08-18 17:39:48 +02:00
David Roberts
66e70c9201 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>
2020-08-18 17:39:48 +02:00
f661ecd50f 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>
2020-08-18 17:39:48 +02:00
bf2ec138ff 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>
2020-08-18 17:39:48 +02:00
cbc3a37f8e 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>
2020-08-18 17:39:48 +02:00
ded8b7f63f Bug 25867: DBRev 20.06.00.024
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-18 17:39:48 +02:00
Katrin Fischer
7c0cf2c73e 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>
2020-08-18 15:48:37 +02:00
Katrin Fischer
cad0cbee6d 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>
2020-08-18 15:48:37 +02:00
0c67613f7b 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>
2020-08-18 15:45:49 +02:00
89721cb42b 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>
2020-08-18 15:45:49 +02:00
1c5c55c0e6 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>
2020-08-18 15:45:49 +02:00
95551b569f 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>
2020-08-18 15:45:49 +02:00
393ecb4a9c 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>
2020-08-18 15:45:49 +02:00
4fadb7ac19 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>
2020-08-18 15:45:49 +02:00
467e491a25 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>
2020-08-18 15:45:49 +02:00
9371685b97 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>
2020-08-18 15:45:49 +02:00
2de2b1330f 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>
2020-08-18 15:45:49 +02:00
c7174b204a 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>
2020-08-18 15:45:49 +02:00
41205adf34 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>
2020-08-18 15:45:49 +02:00
ff5f7c7874 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>
2020-08-18 15:45:49 +02:00
af8aa1ad7e 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>
2020-08-18 15:45:49 +02:00
8344ee7b4c 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>
2020-08-18 15:45:48 +02:00
807147fb7b 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>
2020-08-18 15:45:48 +02:00
c933e25b6f 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>
2020-08-18 15:45:48 +02:00
d3cf6f7f29 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>
2020-08-18 15:45:48 +02:00
4d0e22f97a 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>
2020-08-18 15:45:48 +02:00
f3c66c6d94 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>
2020-08-18 15:45:48 +02:00
3b1640e0ef 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>
2020-08-18 15:45:48 +02:00
eeb7ac6fc0 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>
2020-08-18 15:45:48 +02:00
43dc505a52 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>
2020-08-18 15:45:21 +02:00
2f3a886f7b 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>
2020-08-18 15:45:21 +02:00
fc22fb308b 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>
2020-08-18 14:47:44 +02:00
7a53c5f04c 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>
2020-08-18 14:47:44 +02:00
9509e834de 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>
2020-08-18 14:47:44 +02:00
a7e3c12e61 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>
2020-08-18 14:47:44 +02:00
d8f3e0ec0d 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>
2020-08-18 14:47:31 +02:00
4767112320 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>
2020-08-18 14:38:44 +02:00
5bca73080f 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>
2020-08-18 14:38:41 +02:00
6d7ff0d504 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>
2020-08-13 10:28:26 +02:00
c3b43d3156 Bug 16371: DBRev 20.06.00.023
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-13 10:15:34 +02:00
504228950f 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>
2020-08-13 10:15:34 +02:00
Emmi Takkinen
831296be7a 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>
2020-08-13 10:15:33 +02:00