Commit graph

17076 commits

Author SHA1 Message Date
30acf1a988 Bug 26905: Purchase suggestion button hidden for users with suggestion permission but not acq permission
This patch adds a link to purchase suggestions from the header menu's
"More" submenu for users with suggestions management permission.

To test, apply the patch and log in to the staff interface as a user
with "suggestions_manage" permission.

- Click the "More" menu item in the header. You should see a link to
  "Suggestions" which takes you to the suggestions management page.

- Log in as a user without "suggestions_manage" permission. The link
  should not appear.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-12-09 11:23:43 +01:00
012229c5ea Bug 26946: Set maxlength for cash register name
The cash register names is limited to 24 characters at the database
level and so that restriction should also be reflected in the UI.

Test plan
1/ Add or Edit a cash register ( admin > accounts > cash registers )
2/ Note that you can enter a cash register name longer than 24
characters, but upon save the value is truncated.
3/ Apply patch
4/ Note you can not longer enter a cash register name longer than 24
characters.
5/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-12-09 11:23:43 +01:00
9b62806a97 Bug 27142: Don't interpolate batch_type variable
To test:
1 - Create a report like:
    SELECT * FROM borrowers LIMIT 50
2 - Run the report
3 - Attempt batch modification - it fails showing every row as an unfound cardnumber
4 - Apply patch
5 - Repeat
6 - Success!
7 - Edit report to:
    SELECT * FROM biblio LIMIT 50
8 - Repeat test
9 - Ensure batch modification and deletion work

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-12-09 11:08:20 +01:00
5cdae4c64b Bug 26336: Add hint before and remove select after staging with no items
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-12-04 15:40:58 +01:00
cee2e630b4 Bug 26336: Disable 'Item processing' dropdown if no item
If there is no item to process and they have been ignored during the
stage step, we should not let the user modify the dropdown value

Test plan:
0 - Check the count of import_items
    SELECT COUNT(*) FROM import_items;
1 - Import a marc file with items , process the items
2 - Check the count of import items, it has increased
3 - Stage the file again, do not process items
4 - Count of import_items has not increased
5 - Manage the stage batch
Confirm that you cannot modify the "Item processing" value

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-12-04 15:40:58 +01:00
c6263d078e Bug 27128: (bug 25728 follow-up) Don't prefill av's code
Bug 25728 patch "Don't prefill av's code" does not work.
Calling empty val() retruns the attribut.
Should be val('').

Test plan :
1) Without patch
2) Edit a record
3) Edit a subfield with AV
4) Enter a new value to create it
5) You see the modal popup, edit and save
6) Enter another new value to create it
7) You see the modal popup => value is prefilled
8) Re-do test plan with patch (+ clear JS cache) => value is empty

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-12-04 15:32:56 +01:00
61f1f02dd7 Bug 26665: (bug 20168 follow-up) Fix path to bootstrap js file
20168 moved it to /opac-tmpl/bootstrap/lib/bootstrap/js/bootstrap.bundle.min.js

It fixed the OAI-PMH view

Test plan:
Hit <OPACBaseURL>/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=marc21
and confirm that you can click "Metadata" and it opens

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-12-04 15:26:54 +01:00
44be943fed Bug 23475: Unset the storage if the values do not exist
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-30 11:14:58 +01:00
45400055e4 Bug 23475: Use localStorage to preserve simple search values
To test:
1 - Enable IntranetCatalogSearchPulldown
2 - Perform a search that brings you to a single title
3 - Note the search is not displayed on the details page
4 - Apply patch
5 - Repeat
6 - Note the search is retained on details page
7 - Try with different dropdown values and search terms
8 - Test search terms including accented characters etc

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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Bug 23475: (follow-up) Fix selectors and stray use statements

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-30 11:14:58 +01:00
adf0293c7b Bug 27108: Add 21.05 release team to teams.yaml
This patch update the docs/teams.yaml file to add the elected 21.05
release team and update the include to reflect the minor change of
structure.

Test plan.
1/ Apply the patch
2/ Update Koha.pm to state 20.11.00.000
3/ Update preferences to Version to 20.1100000
4/ Navigate to the about page
5/ Note that the 20.11 team is shown on the left and the new 21.05 team
is shown on the right.
6/ Pay particular attention to the 'Packaging manager' on the left and
'Packaging team' on the right. (We have not had a team of packaging
people before, so the template had to be updated to allow for an array
of packaging people).
7/ Signoff.

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

Bug 27108: (QA follow-up) Fix Agustin and Documentation manager

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-27 16:35:09 +01:00
68079c7274 Bug 25534: Add missing td in tfoot in pendingreserves
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-27 09:37:00 +01:00
92720f9b5e Bug 27026: (bug 24159 follow-up) Add a tooltip to explain the values of "Days mode"
There was a tooltip for values of the existing rules, but not the only
you were editing.

Now there is the same tooltip (title) on the option elements of the
dropdown list.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Bug 27026: Use meaningful descriptions

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-25 15:17:44 +01:00
443c004bc6 Bug 25942: Fix batch report operations for cardnumbers and biblionumbers
This patch moves the processing for these to a block and adds a comment
in place of whitespace and uses template directives to chomp newlines to improve readability

To test:
 1 - Create a report like:
    SELECT biblionumber FROM biblio
 2 - Run it
 3 - Try the various options from the 'Batch operations' button
    (You will need to define a marc modification template)
 4 - The operations don't find the biblios
 5 - Create a report like:
    SELECT cardnumber FROM borrowers
 6 - Run it
 7 - Test the batch operations
 8 - They fail
 9 - Apply patch
10 - Run each report again and test batch operations
11 - They work!

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Bug 25942: (follow-up) fix filters

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-25 14:38:18 +01:00
b341dc0732 Bug 26819: (QA follow-up) Fix branchtransfers.tt
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-25 14:38:12 +01:00
3abd32ff9a Bug 26819: (QA follow-up) authorized_value should be authorised_value
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-25 14:38:11 +01:00
7ec7884834 Bug 26819: Fix calls to AuthorisedValues.GetDescriptionByKohaField in course-details.tt
Test Plan:
1) In the staff interface go to course reserves.
2) Add a new course.
3) Add a reserve (Add reserves > add a valid barcode > submit).
4) Go to the list of courses and select the course you added the item to.
5) An error trace log is generated
6) Apply this patch
7) Reload the page
8) No errors!

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-25 14:38:11 +01:00
a59fe65054 Bug 27044: Mark the PayPal integration as deprecated on the user interface
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-24 21:27:59 +01:00
36a6ce301f Bug 7607: (follow-up) Address OPAC and limits
This patch adds the same function to the OPAC and adds support for limits

I adjust the class on staff side to match the one already existing on OPAC

On the OPAC when you click the back button the fields are not enabled - on the staff side they are,
I leave this problem for someone else to solve

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-20 14:23:48 +01:00
a508d3fcbe Bug 7607: (follow-up) Disable rather than remove inputs
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
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-11-20 14:23:48 +01:00
cc970464ec Bug 7607: Remove empty inputs when submitting search form
This patch surrounds the operator, index, and query fields on the advanced search
page wtih a 'search_set' class.

This allows us to process them as a group and confirm the query is populated before submitting
the other parts to the form

TO test:
1 - Go to advanced search
2 - Use search boxes to search like:
    Title: (leave blank)
    Author: clinton
    keyword: shuffle
3 - Perform search
4 - Note no results as you searched for title:clinton etc.
5 - apply patch
6 - refresh and repeat
7 - search is now correct
8 - Try vaeious searches with 'more options' and selecting different operators

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
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-11-20 14:23:48 +01:00
43b66ccfae Bug 26938: Compiled CSS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-20 08:16:02 +01:00
9dcb51a838 Bug 24083: (follow-up) Assign renewals remaining string to content
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-20 08:16:02 +01:00
9f8ae9498d Bug 26939: Add missing filters
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-18 15:09:14 +01:00
bf8ab09470 Bug 26846: Fix regressions - Preselect expected and late serials
This is a follow-up for bug 17674. Expected and late serials must be
checked by default.

Test plan:
Have some serial collection and notice that the checkboxes are checked
for expected and late serials
/serials/serials-collection.pl?subscriptionid=42

Signed-off-by: Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-18 09:34:51 +01:00
49658d43c3 Bug 26939: Use AV description in sales table display
Content should use the description rather than the code

Test plan
1/ Enable 'UseCashRegisters'
2/ Make some payments against a cash register
3/ Navigate to the cash register summary page via tools > cashup
registers > register name
4/ Note that the payment type you selected at payment time appears as
the code of the authorized value as aposed to the description.
5/ Apply patch
6/ Refresh page
7/ The payment type should now contain the description

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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-18 09:34:48 +01:00
258d475d5f Bug 26938: Prevent flash of unstyled sales table
On the registers page the table has come complex data structures
embedded to allow for all the functionality we bring into the datatable.

We should hide the table on page load and only display it at DataTables
init time once the weird content has been beautified by DataTables.

Test plan
1/ Enable 'UseCashRegisters' and 'EnablePointOfSale'
2/ Add a cash register and make some transactions against it.
3/ Navigate to the 'Register details' page
4/ Note that some 'funky' JSON strings appear in the table briefly
before it is restyled when DataTables loads.
5/ Apply the patch
6/ Rebuild the CSS from the SCSS files
7/ Reload the page (hard reload to get the CSS changes)
8/ Note that the table now only appears once the nice formatting that
DataTables adds is applied.

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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-18 09:34:48 +01:00
5c70587c08 Bug 26973: (bug 26119 follow-up) Restore patron's attributes during self-registration
The assumption on bug 26119 was wrong. We actually store patron's
attributes during self-registration if
PatronSelfRegistrationVerifyByEmail is not enabled.

Test plan:
Test the different combinations of PatronSelfRegistration and PatronSelfRegistrationVerifyByEmail
Confirm that the patron's attributes appears during self-registration if
PatronSelfRegistrationVerifyByEmail is not set.
Confirm that the patron's attributes are stored when they are displayed
on the self-registration form
Confirm that you can edit the patron's attributes in any cases (if they
are marked as editable at the OPAC)

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-11-17 11:51:28 +01:00
Agustin Moyano
7edb1a55bc Bug 26988: (follow-up) Change event to focus
Click event on select element if Firefox does not work as expected, so
this patch changes the event to focus for it to work seamlessly in both
browsers.

https://bugs.koha-community.org/show_bug.cgi?id=26899
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-13 14:20:11 +01:00
19a30acaec Bug 26988: (follow-up) Fix filter and encode api values and escape rendered values
This patch makes the QA tools happy and follows correct procedures for passing data to
and rendering data from the api

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-13 14:20:11 +01:00
4388d20fb1 Bug 26988: (follow-up) Adjust code to use api field names
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-13 14:20:11 +01:00
83d4713945 Bug 26988: Add API route to fetch hold pickup locations and use it in the holds table
To test:
1 - Place a number of holds on a record
2 - Have different pickup locations for the holds
3 - Have some libraries that are not pickup locations
4 - Load the holds tab for the record and note libraries not pickup locations are not in dropdowns
5 - Apply patch and restart all things
6 - Reload the holds table
7 - Click on a dropdown, note the spinner, should load successfully
8 - Confirm the dropdown matches the options before the patch
9 - Confirm updating the hold location works

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-13 14:20:11 +01:00
Andrew Isherwood
1dadf88233 Bug 22818: (QA follow-up) Respond to feedback
This commit addresses the requests from Jonathan in comment #188

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-12 16:58:44 +01:00
031ce22545 Bug 24083: Compiled CSS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 16:09:58 +01:00
Andrew Isherwood
887022e0d2 Bug 24083: (follow-up) Make requested changes
This commit makes the changes requested in comment #120

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 16:09:58 +01:00
98f0e5047d Bug 24083: Swap the column for "Unlimited" handling
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 16:09:58 +01:00
Andrew Isherwood
6e311a1be1 Bug 24083: (follow-up) Squashed follow ups
This squashed commit fixes:
-  a small error in the checkouts related JS

- GetRenewCount now returns 6 values when a call to it succeeds, a
failed call should also return the same number of values. This commit
adds these additional values.

- Some changes in issue.t had broken the tests for unseen renewals (the
unseen tests were using variables that had been moved out of the tests'
scope).

- Also now using Koha::CirculationRules::set_rules to set circ rules
rather than using SQL queries.

- Fixed expected number of return values from GetRenewCount

- Moved unseen tests in issue.t to the bottom of the file to remove the
risk of interference with other test circ rules.

- There was a real mess in C4/Circulation.pm due to a bad rebase back in
February. Frankly it's a wonder anything worked at all. This commit
fixes that problem and reinstates the correct patch for
C4/Circulation.pm

- Somehow I'd never noticed this before but the columns in smart-rules.tt
were misaligned when UnseenRenewals was turned off. This was due to the
display of a <td> not being conditional when it should have been. This
is now fixed.

- This commit also fixes items 1 & 2 descibed by Katrin in comment #74 ->
comment #76.

- Fixed missing check for too_unseen in opac-user.tt, this test did used
to exist but got lost during sizeable rebase a few weeks ago :-(
- Added test for too_unseen to all AUTO_RENEWAL notice templates apart
from de-DE (as previously requested by Katrin)

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 16:09:58 +01:00
Andrew Isherwood
e429d90fb3 Bug 24083: (follow-up) Include SelfCheckInModule
As highlighted by Katrin, the selfcheckin module was not aware of this
work. This commits gives it awareness of the too_unseen renew error and
the "seen" argument that can be passed to AddRenewal

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 16:09:58 +01:00
Andrew Isherwood
bbfdc72303 Bug 24083: (follow-up) Respond to QA feedback
This patch implements changes requested by Katrin in QA feedback
(comment #38):

- Fix QA script failures
- Fix alter table column order mismatch
- Use new convention for JS strings
- Fix terminology

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 16:09:58 +01:00
Andrew Isherwood
8595e80b78 Bug 24083: Add support for unseen_renewals
This patch adds support for unseen renewals.

Here we retrofit knowledge of unseen renewals and add the display of unseen
renewal counts and warnings, in addition to adding the ability to
specify a renewal as being "unseen".

The functionality added here is goverened by the UnseenRenewals syspref.

Signed-off-by: Sally Healey <sally.Healey@cheshirewestandchester.gov.uk>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 16:09:58 +01:00
Andrew Isherwood
d67b2b5d46 Bug 24083: Add circ rules management
This patch adds the ability to set the "Unseen renewals allowed" value
in the circulation rules

Signed-off-by: Sally Healey <sally.Healey@cheshirewestandchester.gov.uk>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 16:09:58 +01:00
Andrew Isherwood
07bc356156 Bug 24083: Required atomic updates & DB update
This patch adds:

- An "UnseenRenewals" circulation syspref that enables/disables the
  functionality added in this bug

- Add unseen_renewals_allowed to circulation_rules

- A change to the issues & old_issues table schemas and corresponding
  database upgrades to add issues.unseen_renewals &
  old_issues.unseen_renewals

Signed-off-by: Sally Healey <sally.Healey@cheshirewestandchester.gov.uk>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 16:09:58 +01:00
Agustin Moyano
9f5596afd6 Bug 23019: (follow-up) Fix other things
This patch:
* Fixes table name change
* Adds schema file
* Changes api parameter name
* Fixes string escaping
* Fixes error handling

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 15:55:49 +01:00
Agustin Moyano
0001155429 Bug 23019: (follow-up) Fix usability issues
This patch place profile buttons in the bottom of the page, next to "Stage for import"

It removes the "Update profile" button, and changes "Add profile" to "Save profile". Save profile can be used to add and to update a profile.

It also adds feedback when a profile was saved or deleted.

Last, it also replaces input-batch-profile endpoint name for input_batch_profile, which is more aligned with other endpoint names.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 15:55:49 +01:00
Agustin Moyano
2bf1d0f1d2 Bug 23019: (QA follow-up) Fix typo Pre fill
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 15:55:49 +01:00
Agustin Moyano
8b3a108558 Bug 23019: Add profiles to stage-import-batch and magnage-import-batch pages
This patch adds the logic and the needed UI elements to be able to pre-load an import profile. It also displays which profile was used to stage an import in staged import manager.

To test:
1. Apply all patches
2. Updatedatabase
3. Go to Stage MARC records for Import tool in admin, and upload a file with MARC records.
CHECK => after uploading, there is a fieldset with the legend “Profile settings”
              => inside the fieldset there is a select labeled “Pre fill values with profile”. The only value it has is “Do not use profile”.

4. Change some settings, and set “profile 1” as profile name and click on “Add profile”
SUCCESS => The select now has the new profile selected

5. Change profile select to “Do not use profile”
SUCCESS => Default values are now displayed in the form

6. Reload the page and upload the file again
SUCCESS => the select still has the profile recently added

7. Select the profile, change some parameter in the form and set the profile name to “profile 2”, and click add profile
SUCCESS => there are two profiles now, and if you toggle between them, the parameter changes

8. Select profile 1, change one parameter and click on update profile
SUCCESS => if you toggle that profile with the other, the new parameter of the value is shown when you select profile 1

9. Select profile 2, change some parameter and click Add profile (leaving the name as profile 2)
SUCCESS => the page complains there is another profile with the same name, and asks if you want to replace it.

10. Click on accept
SUCCESS => profile 2 now has the new value in the parameter

11. Select profile 2 and change the name to profile 1
SUCCESS => the page complains there is another profile with that name, and asks if you want to replace it

12. Click on accept
SUCCESS => in profile select there is only one profile called profile 1 that has the values of profile 2

13. Select profile 1 and click remove profile
SUCCESS => there is no profile in profile select.

14. Create a profile and click on “Stage for import”
15. Go to Staged MARC management page
SUCCESS => Improt should have the name of the profile in profile column, and when you click on the file name, there should be the name of the profile in the details.

16. prove t/db_dependent/ImportBatch.t t/db_dependent/api/v1/import_batch_profiles.t
17. Sign off

Signed-off-by: Abbey Holt <aholt@dubuque.lib.ia.us>

Signed-off-by: Abbey Holt <aholt@dubuque.lib.ia.us>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 15:55:49 +01:00
6d36793174 Bug 20936: (QA follow-up) Use Branches template plugin
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 15:55:48 +01:00
Agustin Moyano
10e23507f5 Bug 20936: Add patron's hold history menu in OPAC
This patch adds patron's hold history in OPAC.

To test:
1. apply this patch
2. Find a patron, place several holds and cancel or fulfill them
3. Go to patron's opac
CHECK => There is no 'your holds history' option in menu
4. In admin preferences enable OPACHoldsHistory
5. Go back to patron's opac
SUCCESS => There is a 'your holds history' menu option
        => Holds history displays all holds
6. Change order, and list limit
SUCCESS => All controls work as expected
7. Sign off.

Signed-off-by: Todd <tgoatley@gmail.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 15:55:48 +01:00
Agustin Moyano
5bab8b0fec Bug 20936: Add OPACHoldsHistory syspref
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 15:55:48 +01:00
Katrin Fischer
046e32bccc Bug 22818: (QA follow-up) Add hint to new library ILL email setting
Copies the hints on the other email fields highlighting the existing
global pref.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 08:35:10 +01:00
Katrin Fischer
080ef802e2 Bug 22818: (QA follow-up) Add some punctuation and terminology fixes to pref descriptions
Just branch => library and some ending punctuation.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 08:35:10 +01:00
Andrew Isherwood
d193883868 Bug 22818: (follow-up) Respond to feedback
This commit implements the feedback from Katrin in comment #103 ->
comment #108:

- Fixed rebase issue mentioned in comment #103
- Fixed ILL notice display mentioned in comment #106
- Fixed bug with metadata display, though not the issue that was
mentioned in comment #107
- Fixed buttons display mentioned in comment #107, in addition to some
more buttons suffering the same issue

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 08:35:10 +01:00
Andrew Isherwood
afd13b6a9b Bug 22818: (follow-up) Respond to feedback
This commit fixes this bug, it was broken in a number of ways.

Fixes include:

- Added necessary config block in C4::Letters to enable the TT notice
syntax introduced in an earlier commit to work
- Changed template variables to refer to singular objects rather than
multiple e.g. borrowers -> borrower
- Fixed missing / misnamed variables

This commit also implements the additional syspref checks suggested by
Katrin in comment #87

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 08:35:10 +01:00
51d73f8393 Bug 22818: (QA follow-up) Template CASE correction
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-11-11 08:35:10 +01:00
Andrew Isherwood
1a7f09709a Bug 22818: Add generation and sending of notices
This patch adds the ability for ILL to send notices, both triggered by
staff and triggered by events.

Staff can trigger notices to patrons from the "Manage ILL request" screen:
- ILL request ready for pickup
- ILL request unavailable
- Place request with partners

The following notices to staff are triggered automatically:
- Request has been modified by patron
- Request has been cancelled by patron

Branches can now specify an "ILL email" address to which notices
intended to inform staff of changes to requests by patrons can be sent.

The sending of notices is controlled by a few new sysprefs:
- "ILLDefaultStaffEmail" - Fallback email address for staff ILL notices
to be sent to in the absence of a branch address
- "ILLSendStaffNotices" - To specify which staff notices should be sent
automatically when requests are manipulated by patrons

Patron notices are also controlled by the patron's messaging
preferences

Sponsored-by: PTFS Europe
Signed-off-by: Niamh Walker-Headon <Niamh.Walker-Headon@it-tallaght.ie>
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-11-11 08:35:10 +01:00
Andrew Isherwood
ef07ad1044 Bug 22818: Add support for ILL notices
Here we're just adding ILL notices to the existing "letters"
infrastructure so notices can be displayed and edited

Sponsored-by: PTFS Europe
Signed-off-by: Niamh Walker-Headon <Niamh.Walker-Headon@it-tallaght.ie>
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-11-11 08:35:10 +01:00
Andrew Isherwood
51895cd7fb Bug 22818: Add notices sysprefs and DB column
This patch adds two new sysprefs. 'ILLDefaultEmail', 'ILLSendStaffNotices' and a new column to the
branches table called 'branchillemail'. It also adds five ILL related
notices.

Here we are providing the ability for a branch to have a dedicated email
address for it's ILL staff, the idea being that any notices sent by ILL
to staff need to go to specific staff, rather than the general branch
email address. If no branch specific address is defined, the address
specified in the ILLDefaultEmail syspref is used.

We're also providing a syspref 'ILLSendStaffNotices' to allow the user to specify which
notices should be sent to staff upon certain events.

We are also providing patron messaging preferences for the two patron
bound notices

We are also providing five notices for various ILL related events.

Sponsored-by: PTFS Europe
Signed-off-by: Niamh Walker-Headon <Niamh.Walker-Headon@it-tallaght.ie>
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-11-11 08:35:10 +01:00
61a39b0dd5 Bug 23916: (QA follow-up) Adapt all the things to the new column and accessor names
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-10 15:00:14 +01:00
Andrew Isherwood
55ac67d95b Bug 23916: (follow-up) Fix terminology, use patron-title and make column consistent in issues and old_issues
This commit makes the changes suggested by Katrin in comment #50:

- Changed syspref from RecordIssuer to RecordStaffUserOnCheckout
- Changed terminology from "issue" to "check out" and variations
- Fixed name display to use patron-title.inc
- Made issuer column DEFAULT NULL consistently between issues and
old_issues and between the DB update and kohastructure.sql

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>
2020-11-10 15:00:14 +01:00
Andrew Isherwood
eb283d13fa Bug 23916: Record and display item issuer
This patch adds the recording and display of the item issuer. This
behaviour is governed by the RecordIssuer syspref, if disabled (the
default), no recording or display of issuer will take place.

Signed-off-by: Ben Veasey <B.T.Veasey@lboro.ac.uk>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>

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>
2020-11-10 15:00:14 +01:00
Andrew Isherwood
d01f78e2d5 Bug 23916: Add "RecordIssuer" syspref
This patch adds the "RecordIssuer" syspref, which is disabled by default

Signed-off-by: Ben Veasey <B.T.Veasey@lboro.ac.uk>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>

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>
2020-11-10 15:00:14 +01:00
4dfa570936 Bug 26697: Make account.inc consistent between staff and opac
Test plan - Regression
1/ Login to the OPAC as a user with various account charges and payments.
2/ Navigate to the 'Your charges' page.
3/ Compare the display of the table before and after applying the
patchset. They should match.

Test plan - Sync
1/ Compare koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc with
koha-tmpl/opac-tmpl/bootstrap/en/includes/accounts.inc.
2/ They files should match after the patch is applied.

Test plan - Translation
1) ./translate update fr-CA
2) Open fr-CA-opac-bootstrap.po and translated this part

msgid ""
"%s %s %sPayment %sWriteoff %sForgiven %sCredit %sLost item fee refund "
"%sRefund %s%s %s %s %s %sAccount creation fee %sAccount renewal fee
%sLost "
"item %sManual fee %sNew card %sFine %sLost item processing fee %sRental
fee "
"%sDaily rental fee %sRenewal of rental item %sRenewal of daily rental
item "
"%sHold fee %sHold waiting too long %s%s %s %s %s "

3) ./translate install fr-CA
4) Login to the OPAC as a patron with various charges
5) Check 'My charges' (in fr-CA) to confirm the translations have been
   picked up.

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-11-10 15:00:14 +01:00
960d282e3b Bug 24603: (QA follow-up) Add translation to OPAC
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-10 15:00:14 +01:00
Katrin Fischer
9bf00d3248 Bug 24603: (QA follow-up) Make the new credit type translatable and shorten description a bit
Adding the new offset type and credit type to the include so it can be translated.

Also suggest shortening the db description a bit.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-10 15:00:14 +01:00
9c709b871f Bug 24603: (follow-up) Update to double entry accounting
This patch updates the logic to create a cancellation accountline and
apply it to the charge line so we correction record the transaction in
terms of double entry accounting standards.

Test plan:
1. Go to a patron's accounting section
2. Create a manual invoice
3. In Transactions tab, you should see a 'Cancel charge' button. Click
   on it. It should now be marked as cancelled
4. A cancellation line should be associated with the original charge.
5. Create another manual invoice
6. Pay it (partially or fully)
7. Notice that the 'Cancel charge' button is not available
8. Void the payment
9. 'Cancel charge' button is available again. Click on it and verify
   that it still works
10. prove t/db_dependent/Koha/Account/Lines.t

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

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

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

Bug 24603: Fix number of unit tests

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-10 15:00:14 +01:00
Julian Maurice
8d2259b674 Bug 24603: Allow to cancel charges in patron accounting
There is already a button to void a payment. It should be possible to
cancel a charge too.

This patch adds a button in patron's accounting section (Transactions
tab) that allow to cancel charges.
Charges that have been fully or partially paid cannot be cancelled.

It also fixes Koha::Account::Line::is_credit by looking at
credit_type_code instead of amount (amount can be 0 for voided payments)

It also fixes the tests for Koha::Account::Line::void when database does
not contain the borrowernumber 51 (the default in
t::lib::Mocks::mock_userenv)

Test plan:
1. Go to a patron's accounting section
2. Create a manual invoice
3. In Transactions tab, you should see a 'Cancel charge' button. Click
   on it. It should now be marked as cancelled
4. Create another manual invoice
5. Pay it (partially or fully)
6. Notice that the 'Cancel charge' button is not available
7. Void the payment
8. 'Cancel charge' button is available again. Click on it and verify
   that it still works
9. prove t/db_dependent/Koha/Account/Lines.t

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>
2020-11-10 15:00:09 +01:00
ebb437349e Bug 26627: (QA follow-up) Remove barcode input by id
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:55:18 +01:00
Katrin Fischer
d1bc1015d9 Bug 14866: (QA follow-up) Add hint to system preferences
Adds a hint about the new configuration option to the existing
system preference sectoin.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:55:17 +01:00
Aleisha Amohia
1deb47e793 Bug 14866: Make high holds work with different item types
To test:
1) Apply patch, update database, restart services
2) Enable decreaseLoanHighHolds sysprefs if not already active
3) Go to circulation rules and set a value under 'Decrease loan holds
(day)' that is DIFFERENT from decreaseLoanHighHoldsDuration
4) Check out an item with holds and confirm that the value from the rule
is used instead of the system preference
5) Confirm tests pass before and after the patch
t/db_dependent/DecreaseLoanHighHolds.t

Sponsored-by: Catalyst IT

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
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>
2020-11-06 15:55:17 +01:00
1008e21d43 Bug 23091: Add template handling for new messages
This patch adds handling for the display of the two new messages added
by this patchset in the returns screen.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:55:17 +01:00
7a07e11128 Bug 23091: Add handling for new lostreturn rules
This patch adds handing for the new values available for the lostreturn
policy settings.

* undef - Do nothing, leave fees and fines as they were at the point of
  lose.
* refund - Refund the lost item fee only
* charge - Refund the lost item fee and charge a fresh overdue fine
  dated for a return on the date the item is 'found'
* restore - Refund the lost item fee and restore the original overdue
  fine (dated for a 'return' on the date the item was 'lost'

Test plan
1/ apply patch
2/ updatedatabase, restart_all
3/ verify finesmode and CalculateFinesOnReturn and WhenLostChargeReplacementFee are on
4/ verify WhenLostForgiveFine is set to "Forgive"
5/ verify circ rules include fines
6/ set Default lost item fee refund on return policy to "Refund lost item charge"
7/ create 4 overdue checkouts that will incur fines
8/ run fines.pl
9/ confirm 4 items checked out with accruing fines
10/ confirm all 4 items have a replacement price

Item 1
11/ mark the first item lost
12/ verify that fine is gone and lost fee has been charged
13/ check item in
14/ verify that lost fee is gone and overdue charge has not returned

Item 2
15/ set Default lost item fee refund on return policy to "Refund lost item charge and charge new overdue fine"
16/ mark second item lost
17/ verify that fine is gone and lost fee has been charged
18/ check item in
19/ verify that lost fee is gone and a new overdue charge has been made

Item 3
20/ set Default lost item fee refund on return policy to "Refund lost item charge and restore overdue fine"
21/ mark third item lost
22/ verify that fine is gone and lost fee has been charged
23/ check item in
24/ verify that lost fee is gone and the old overdue charge has been restored

Item 4
25/ set Default lost item fee refund on return policy to "Leave lost item charge"
26/ mark fourth item lost
27/ verify that fine is gone and lost fee has been charged
28/ check item in
29/ verify that lost fee remains and the overdue charge is still gone

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:55:17 +01:00
Nicolas Legrand
f806ae6277 Bug 24412: (follow-up) prevent js injection
Some js variables are not properly escaped and can be executed if
containing javascript.

1. have some waiting reserve attached to a desk
2. change this desk name to : <script>alert("❤");</script>
3. go to user's checkout page (circulation.pl) and click on the
Hold(s) tab
4. you should see some popup with a ❤ in it.
5. apply patch and refresh page
6. now you should see the desk name printed properly in the page:
<script>alert("❤");</script>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:55:17 +01:00
Nicolas Legrand
ef83574374 Bug 24412: (follow-up) bad desk printing
forgot to update two pages when I wrote Hold->desk to replace
Desks.GetName.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:55:17 +01:00
Nicolas Legrand
22029a296b Bug 24412: (follow-up) qa-tools
fix obvious problems:

    1. qa -c 8 -v 2
    2. should be green

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:55:17 +01:00
Nicolas Legrand
47b32572d4 Bug 24412: Attach waiting reserve to desk
When an item is checked in and marked 'Waiting' or already 'Waiting'
and there is a desk attached to the session, the item is marked
waiting at the current desk of the current library.

The information is displayed on the OPAC and on the intranet. The
patron can then know at which desk he can retrieve his document.

Desk Management (Bug 13881) is now useful.

Test plan :

1. apply Bug 24201
2. $KOHA_PATH/installer/data/mysql/updatedatabase.pl
3. Check out some document to someone
4. make another one reserve this document
5. check in the document
6. you can see the document is attach to the current library
7. create some desks and attach one to your session (see Bug 13881 and
Bug 24201)
8. cancel the preceding reserve and redo steps 3 to 5
9. you should see the document is waiting at the current library and
current desk on:
  a. the intranet document request page
  b. the intranet borrower holds tab
  c. the item list where the document is listed on the bibliographic
    details
  d. the borrower's OPAC holds tab.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Bug 24412: (follow-up) QA

Following Josef Moravec QA comments :

- rewrite Koha::Hold->desk according to Object Oriented Koha
Guidelines and use it to fetch desk name in various templates
- remove unused Desks.GetName
- Check for columns existence in db update

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Bug 24412: (follow-up) QA: useless change

Maybe it was a relic of something usefull... anyway
not anymore.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Bug 24412: (follow-up) Fix POD

Koha::Desk and not Koha::Library...

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:55:17 +01:00
b7dd0d62dd Bug 24665: (QA follow-up) Fix selection default
This patch updates the html_helper for the cash register selection block
to remove the 'empty option' such that it can be correclty set for each
select case and updates all existing cases where we used the process
block previously to include the relevant blank option '-- Select an
option --', '-- None --', 'Library default' and finally the new '-- All
--' options introduced with this bug.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:55:17 +01:00
e5162d9135 Bug 24665: Add support for filtering by cash register
This patch makes it possible to filter on cash register
on the cash register statistics page.

To test:
- Activate UseCashRegisters
- Create a cash register or more to use
- Create some manual fees and fines
- Pay some of them off
- Go to Tools > Cash register statistics
- Test if the new filter for cash registers works as it should

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-11-06 15:55:17 +01:00
47731f187f Bug 24786: (QA follow-up) Reset beenSubmitted on validation failure
When the form submision fails due to validation errors we need to also
reset the preventFormDoubleSubmit state to allow for a second submission
with corrected form fields.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:40:00 +01:00
f7030fc0e1 Bug 24786: (QA follow-up) Do not use 'hidden' attribute
The hidden attribute for loading an element hidden is known to have
issues and inconsistencies accross browsers.

This patch instead updates the relevent input options to use an inline
style of 'display: none' to hide the elements on page load and then
.show, .hide for subsquent changes linked to the library branch picker
change.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:40:00 +01:00
3865e38ebb Bug 24786: (QA follow-up) Handle no defined registers
This patch hides the register selection option from the login page if no
registers have yet been defined on the system.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:40:00 +01:00
858c8943b7 Bug 24786: (QA follow-up) Remove trailing space in classes
The trailing space after branch in the class attribute for the register
select options cause issues in the 'hasClass' javascript selector

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:40:00 +01:00
27c6399fb0 Bug 24786: (QA follow-up) String fix
This patch updates 'Branch default' to 'Library default' on the login
page to match the coding terminology guidelines.

We also update the table heading on the cash registers management page
to match the terminology above for clarity.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:40:00 +01:00
d5e3f431e7 Bug 24786: (QA follow-up) Add validation to paycollect
This patch adds conditional validation to the cash register field on
paycollect such that if 'CASH' is selected as the payment type and cash
registers are enabled, then a cash register will be required.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:40:00 +01:00
66444caeeb Bug 24786: (QA follow-up) Make QA script happy with html_helpers
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:40:00 +01:00
c153adac09 Bug 24786: Add validation to point of sale
The Point of Sale page relied upon serverside validation prior to this
patch; As such with the introduction of the ability to select '--None--'
at the session register level (to require the librarian to pick their
register for every transaction) we could result in a server error page.

This patch introduced clientside validation to add checks for both the
'collected' and 'registerid' form fields.

Test plan:
1/ Select a branch with cash registers available
2/ Select the '--None--' option for the session cash register
3/ Navigate to the point of sale page
4/ Attempt to make a sale without having picked your cash register
5/ Note that the submission was prevented and the fiedl is highlighted
as required in red.
6/ Signoff

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:40:00 +01:00
8ece86e769 Bug 24786: Default to 'branch default' on auth.
If no branch is selected (i.e. 'My library') then we should default to
'branch default' if one is defined for the users library at login.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:40:00 +01:00
1bc723b33c Bug 24786: (follow-up) Cache the register_name in the session
This leads to one DB hit less per page load in the staff client when
cash registers are enabled.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:40:00 +01:00
114e851f8f Bug 24786: Update borroaccount to use session register
This patch adds handling to allow for the use of the session cash
register by default if it has been set, otherwise it defaults to '--
None --' and requires the end user to select the register to proceed
with the refund or payout action.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:40:00 +01:00
24804aa4c6 Bug 24786: Update paycollect to use session register
This patch adds handling to allow for the use of the session cash
register by default if it has been set, otherwise it defaults to '--
None --' and requires the end user to select the register to proceed
with the payment.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:39:59 +01:00
086927c976 Bug 24786: Update point of sale to use session register
This patch adds handling to allow for the use of the session cash
register by default if it has been set, otherwise it defaults to '--
None --' and requires the end user to select the register to proceed
with the sale.

Test plan
1/ Enable cash registers via the 'UseCashRegisters' system preference
2/ Enable point of sale via the 'EnablePointOfSale' system preference
3/ Navigate to the point of sale page
4/ Note that if you are logged in at a branch with no cash registers yet
defined, then an alert should appear
5/ Note that when you are logged in at a branch with cash regsiters
defined, but without a cash register associated with your session then
the cash 'Cash register' select box is populated with '-- None --' and
you are required to select a register prior to submission
6/ Note that upon selection, the '-- None --' option is disabled
7/ Note that when you have a register associated with your session then
the 'Cash register' select box is pre-populated with that register.
8/ Signoff

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:39:59 +01:00
30b23c5f1d Bug 24786: Allow selection of cash register at login
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:39:59 +01:00
5b1934312b Bug 24786: Allow setting a register for the session
This patch adds the ability to set a register for the current session
from the 'set library' page.

Upon entering the page, the current selection will be displayed.
Changing the branch will trigger the register select list to update to
display only those registers associated with the updated branch and will
automatically select either 'no register' or the 'branch default'
register.  The user can then override that selection to choose a
different register for the session.

Test plan
1/ Enable cash registers with the 'UseCashRegisters' system preference
2/ Select the 'Set library' option from the top right menu
3/ Note that you can now select a cash register from the subsequent page
4/ Change the branch and note that the cash register selection is
updated to reflect the change
5/ Note that the 'branch default' register is auto-selected upon branch
selection if one has been defined, otherwise '-- None --' is selected
6/ You can then alter the selection before submitting the form
7/ Once submitted note that you are returned to the page you were on
prior to attempting to change the library and register
8/ Note the present of the register name next to the library name at the
top of the screen.
9/ Signoff

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:39:59 +01:00
d5d736909c Bug 26727: (follow-up) More markup corrections
This patch makes more markup changes to the templates previously
modified in order to try to arrive at some agreeable solutions.

- In the value_builder EXAMPLE template, the <p> is unnecessary and is
  removed. Also removed is the script "type" attribute and obsolete
  CDATA markers.
- In the article request template an unnecessary <p> is removed.
- In the merge patrons template the submit button is now in a <fieldset
  class="action"> as is consistent with other forms.
- In the MARC modifications template I've added <div>s around each
  "line" in the form to add the line break, along with some CSS to add
  margins.
- The submit button is now inside a <fieldset class="action"> and the
  "Cancel" link now has the "cancel" class.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 09:40:27 +01:00
Katrin Fischer
bbf0d21284 Bug 26727: Fix <p/> appearing in the templates
The self-closing p is not valid in HTML5:

Error: Self-closing syntax (/>) used on a non-void HTML element.
Ignoring the slash and treating as a start tag.

To test:

1)
- Activate Article requests
- Search for a record to place an article request on in staff
- Look up the patron
- Verify the article request form looks ok
2)
- Search for a list of patrons
- Check 2 patrons and merge them using the button above the list
- Verify the distance between the button and the table looks ok
3)
- Create a new MARC modification template
- Create a new action
- Verify the distances between the first and second line of form
  elements looks ok
4)
- Place a hold in staff
- Click on the Suspend link in the holds table (not below)
- Verify the modal looks ok

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 09:40:27 +01:00
c1af56eb54 Bug 14708: The patron set as the anonymous patron should not be deletable.
Right now it's possible to delete the anonymous patron at any time. When this happens the system will break just as if anonymouspatron was unset but patrons still have an "always anonymize" privacy setting.

This issue occurs more frequently than one would expect.

We should make it so that the patron set in AnonymousPatron is not deletable.

Test Plan:
1) Apply this patch
2) Set a patron to by AnonymousPatron
3) Attempt to delete that patron from the members toolbar
4) Note the error message!

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

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 09:40:25 +01:00
0efa25c86a Bug 25334: MTT is itiva not talkingtech
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-05 15:24:20 +01:00
d31403133d Bug 25334: (QA follow-up) Update overduerules.tt
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-05 15:24:20 +01:00
6dad46e0ec Bug 25334: (QA follow-up) Update opac messaging
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-05 15:24:20 +01:00
946edb595b Bug 25334: Add generic 'phone' message transport type
As bug 25333 changed the 'phone' transport type to 'talkingtech', we can
now re-add 'phone' as a transport type again, and allow it to behave and
support the same notices as the email transport type.

Test Plan;
1) Apply this patch
2) Run updatedatabase
3) Restart all the things!
4) Disable TalkingTechItivaPhoneNotificationi if enabled
5) Enable new PhoneNotification system preference
6) Go to a patron's messaging preferences, not you can select the
   'phone' option for all the same notices as the 'email' option
7) Enable the phone option for all the message types
8) Browser to the Notices and slips editor
9) Add a phone notice version for each notice you wish to test
10) Test some notices ( CHECKIN, CHECKOUT, etc )
11) Notices should show in the patron's messages as 'phone' notices

Signed-off-by: Christopher Zorn <Christofer.Zorn@ajaxlibrary.ca>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-05 15:24:20 +01:00
f11659c48b Bug 26148: OpenLibrary "Preview" link target is unclear to patrons
This patch makes changes to the display of the Open Library "read" links
in the OPAC search results and detail page. The link is now grouped with
other details about the record ("Publisher," "Location(s)," etc. On the
detail page, the "Preview" link will no longer appear under the cover
image.

The label is changed to "Found in Open Library," and the link now opens
the Open Library reader in a new window.

The patch also changes the Open Library button image links so that they
use https and makes it so that the "Found in Open Library" information
is hidden until the availability information has loaded.

To test, apply the patch and enable the OpenLibrarySearch system
preference.

 - Perform a search in the OPAC which will return results found in Open
   Library, e.g. "poetry" in the sample data.
 - Confirm that the "Read now" images from Open Library appear on some
   search results.
 - View the detail page for one of these titles.
 - Confirm that the "Read now" button appears in the same format on the
   detail page.

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>
2020-11-05 15:24:20 +01:00
2b298ece04 Bug 26172: Compiled CSS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-05 15:24:20 +01:00
Katrin Fischer
ff5c4f151f Bug 26172: (QA follow-up) Add missing filter
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-05 15:24:20 +01:00
eaabed085f Bug 26172: (follow-up) Add print option
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-05 15:24:20 +01:00
d12c1f6a25 Bug 26172: (follow-up) Summary by payment_type
This patch alters the modal so that the totals are broken down by
payment type's available on the system.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-05 15:24:20 +01:00
88b5b5d00a Bug 26172: Add cashup summary view modal
This patch adds a cashup summary modal to the register details page.

Test plan
1/ Enable Cash Registers and Point of Sale
2/ Enable some debit_types as 'Sale items'
3/ Perform a series of transactions
4/ Perform a 'Cashup' on the register
5/ Note the new '(Summary)' link next to the last cashup on the register
page.
6/ Click the link and confirm the modal contains the pertinent
information

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-05 15:24:20 +01:00
a10db1347d Bug 26908: (follow-up) Alter template check
This alters the template check to use the presence of the plugins
arrayref rather than requiring a second call to check for
plugins_enabled.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-05 15:24:20 +01:00
e700fb8f4e Bug 23823: (QA follow-up) Fix filter in link
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 17:32:35 +01:00
Ivan Masár
fbeb3d547f Bug 23823: (follow-up) minor visual fix
Do not allow a line break between the bookmark icon and syspref name.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 17:32:35 +01:00
Katrin Fischer
6884665d55 Bug 23823: (follow-up) Get rid of some tabs in favor of spaces
In the paragraph touched by this patch, there were some
whitespace issues. This patch does some tab to space
replacement and reindentation to make the code more readable.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Ivan Masár <helix84@centrum.sk>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 17:32:35 +01:00
Ivan Masár
43e6557a2a Bug 23823: Allow system preferences to be bookmarked
Test plan:
1) Log in to Staff UI with superlibrarian permissions
2) Go to System Preferences /cgi-bin/koha/admin/preferences.pl
3) Next to each preference, there should now be a bookmark icon
4) The bookmark icon links to a search for the exact preference name
5) The link can be bookmarked for quick reference to the specific
preference

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 17:32:35 +01:00
62bf6ed986 Bug 26729: Add focus class to vendor name field in vendor add form
This patch adds the "focus" class to the vendor name field in the form
for adding or editing a vendor in acquisitions.

To test, apply the patch and go to Acquisitions -> New vendor.

On page load the cursor focus should automatically be on the vendor name
field. The same should true when editing an existing vendor.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 17:32:35 +01:00
2b1da2aa0c Bug 26804: (QA follow-up) add modal-lg class and intent markup correctly
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 17:32:35 +01:00
8ce23ea0e9 Bug 26804: Add modal content preview
This patch turns the 'News' column into a preview button. That preview button displays a modal with content of that rows news item.

To test:
1. Apply patch
2. Add some HTML to a News Item. I am using a bunch of lorem ipsum HTML and this image set to 1000px. '<img src="https://koha-community.org/files/2013/09/cropped-kohabanner3.jpg" width="1000" />'.
3. Make sure and have some content with a lot of width and some content with a lot of height.
4. Test the Preview content button
5. Make sure you can scroll through long modals and across modals that are wide
6. Try at different screen sizes and with different combonations of News items

Signed-off-by: Kelly  <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-11-04 17:32:35 +01:00
ece8a0c35c Bug 26886: Compiled CSS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 17:32:35 +01:00
4888028486 Bug 26886: Correct style of alert-error class in the OPAC
This patch makes a minor change to the OPAC SCSS so that instances of
"alert-error" classes are styled the same as messages with the Bootstrap
4 "alert-warning" class. This change is simpler than making multiple
changes to scripts and templates.

To test, apply the patch and try to view a single news item in the OPAC
which doesn't exist:

/cgi-bin/koha/opac-main.pl?news_id=XXX

- You should see a warning message with a pale yellow background, "This
  news item does not exist."
- Submit a suggestion, and then submit another suggestion with the
  same title.
  - You should see a warning message, "The suggestion has not been
  added. A suggestion with this title already exists."

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 14:49:14 +01:00
0b565d1c7a Bug 26736: Compare values of reports log entries
This patch adds the ability to compare the log entries for reports
in the system log. The user can select two entries in the log search
results and view a diff of the two versions.

To test, apply the patch and check that the  ReportsLog system
preference is enabled. If it isn't, enable it and make some changes to
saved SQL reports so that you have log entries to test with.

This is a trivial patch that simply adds "REPORTS" type log entries to
the list of modules which can be selected for comparison. The full test
plan is basically the same as that for Bug 26207:

- Perform a search for log entries in the "Reports" module.
- In the results, each entry for a report update should have a
  "Compare" checkbox."
- Check one of the checkboxes.
- The table should now be filtered by the report title. This
  facilitates meaningful selections for comparison.
- You should see a message displayed onscreen, "Showing results
  for...[report name]"
- The "Check none" link in the toolbar above the table should now be
  enabled.
- If youy click the "Compare selected" link in the toolbar at this
  stage you should get a message, "You must select two entries to
  compare."
- If you uncheck the checkbox the table should return to an unfiltered
  state.
- Check two checkboxes.
- The "Compare selected" link in the toolbar should now be enabled.
- Next to each of the checkboxes you checked should be a "View
  comparison" link.
- Clicking either of the "View comparison" links or the "Compare
  selected" link should trigger a modal with the diff view of the two
  reports log entries.
- Try to select a third checkbox. You should get a message, "You can
  select a maximum of two checkboxes." The box should remain unchecked.
- Test that unchecking both checkboxes manually clears the table filter.
- Test that the "Check none" link works to uncheck checked boxes and
  clear the table filter.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 13:16:21 +01:00
6ba108f4eb Bug 26439: (QA follow-up) Correct MSG instances in cart.js
To test, add some items to the cart in the staff interface and open the
cart window. Test the "Selected items" links (Remove, add to list,
etc.) without checking any checkboxes. You should get an alert, "No item
was selected."

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:34 +01:00
ceee890899 Bug 26439: Move cart-related strings out of js_includes.inc and into basket.js
This patch moves strings defined for translation in js_includes.inc
into basket.js for translation using the new double-underscore
i81n function.

To test, apply the patch and perform a catalog search in the staff
client.

- Click the Cart link in the header menu. A pop-up should appear saying
  "Your cart is currently empty."
- On the search results page, click the "Add to cart" link next to any
  search result. The text should change to "In your cart."
- Click the "Remove" link. The text should change to "Add to cart."
- Check the box next to a title in the search results and click the "Add
  to cart" button in the search results toolbar. A message should
  appear, "1 item(s) added to your cart."
- Click the "Add to cart" button again. You should see the message "No
  item was added to your cart (already in your cart)!"
- Uncheck all check boxes on the search results page and click "Add to
  cart." You should see "No item was selected."
- Add more items to your cart so that it contains more than one item.
- Click the "Cart" link to open it.
- Click the "Empty and close" button. You should be asked to confirm,
  "Are you sure you want to empty your cart?"

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/basket.js for
  translation, e.g.:

  msgid "Your cart is currently 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 strings should
  appear.

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>
2020-11-04 12:59:34 +01:00
Katrin Fischer
a8e5d9ab9f Bug 19351: Add items.copynumber to the checkouts table
This adds the items.copynumber to the checkouts table in the
patron account in the staff interface.

To test:
- Apply patch
- Check out some items with and without copy number in the item
  to any patron
- In the checkouts table on the Checkouts and Details tabs:
- Verify that a new column shows 'copy no' shows after 'call no'
- Verify the information displays correctly
- Verify that the column configuration settings for the new column works

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:34 +01:00
Katrin Fischer
973e1b1d5d Bug 15780: Add inventory number to checkout list on summary print
This will add the inventory number to the list of checkouts that
can be printed using the 'Print summary' feature from the patron
account in staff.

To test:
- Apply patch
- Make sure you have some items with and without inventory number set
- Check them out to any patron
- Go to Print > Print summary
- Verify the inventory number column is showing up and the numbers
  show with their items.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:34 +01:00
Katrin Fischer
d1f412bd76 Bug 21882: Show price information in acqusitions tab on staff detail page
This adds a new 'Price' column to the acqusition details tab.

To test:
- Apply patch
- Add one or more orders for a record.
- Before closing the basket: go to the detail page in the catalog
- Verify that the price estimated/budgetet price now shows in a new column
- Add actual cost to the basket or close the basket and receive the item
- Verify the column now shows the updated actual cost
- Verfy the tooltip on the table heading works
- Verify the column configuration for the new column works as well

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:34 +01:00
3ef31a0b77 Bug 26572: (QA follow-up) Escape strings in autocomplete
This patch updates the construction of the autocomplete dropdown so that
values are escaped.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:34 +01:00
38507b041b Bug 26572: Add autocomplete to librarian field in log viewer
This patch adds patron autocomplete to the librarian field in the log
viewer search form.

Also changed: Some HTML markup errors in the template have been
corrected: Labels with invalid corresponding ids or with no valid id.

To test, apply the patch and go to Tools -> Log Viewer.

Type a name or cardnumber into the "Librarian" form field. This should
trigger an autocomplete dropdown.

Select a patron and confirm that the field is populated with the correct
borrowernumber.

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>
2020-11-04 12:59:34 +01:00
Katrin Fischer
ee028855c2 Bug 15329: Add new column for budget to the late orders table
The table currently displays the fund, but as late orders can be
from a past budget with the same fund names, this can be confusing.
So adding the budget in addition to the fund will be helpful.

To test:
- Add a basket and an order, close the basket
- Go to the late oder page
- Make sure your order shows up there
- Apply the patch
- Reload the late orders page
- Verify a new column budget shows in the table
- Verify the table configuration settings work for the new column
- Run t/db_dependent/Koha/Acquisition/Fund.t

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>
2020-11-04 12:59:34 +01:00
Katrin Fischer
42ab7b80d4 Bug 15141: Add MARC21 770/772 Supplement (parent) to OPAC and staff detail pages
Adds the 2 corresponding linking fields to the staff and OPAC detail pages:

770 - Supplement/Special Issue Entry (R)
https://www.loc.gov/marc/bibliographic/bd770.html

772 - Supplement Parent Entry (R)
https://www.loc.gov/marc/bibliographic/bd772.html

To test:
- Catalog records with 770/772 in Koha, examples can be found in the LOC
  documentation.
  - When UseControlNumber is set to Use and $w is added, a link will be built using $w
  - If there is no $w or UseControlNumber is Don't use, a link will be build using the title
- Verify that they display nicely in the OPAC and staff detail pages

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:34 +01:00
043f3f0fd0 Bug 24834: (follow-up) Improve breadcrumb
This patch updates the breadcrumb navigation to be consistent for View,
Edit and Run with the report name (and id in brackets) appropraitely
placed in the breadcrumb with a link back to the view and the 'Action'
clearly listed as the final part of the breadcrumb path.

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-11-04 12:59:34 +01:00
f2876ef4d4 Bug 24834: (QA follow-up) Add missing filter
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-11-04 12:59:34 +01:00
Katrin Fischer
f0b3bbb327 Bug 24834: (follow-up) Add report id to page titles
See test plan of previous patch!

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:34 +01:00
Katrin Fischer
7f2e2a4dbd Bug 24834: Display report number on editing or running a report
The only place the report ID was shown when editing or running a
report was in the URL. With this patch, we also show it in the
heading, the breadcrumbs and the page title.

To test:
- Create a new SQL report.
- Save the report.
- Edit the report.
- Verify that the report id now shows in the breadcrumbs and page title.
- Run your report.
- Verify the report id shows in the page heading, title and breadcrumbs.

Signed-off-by: Michael A <madamyk@ckls.org>
Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:34 +01:00
Katrin Fischer
3bfc54d44a Bug 26680: Acq - Wrap (rcvd) in a span and change text to received
The new span with the class order-received will allow to have
individual styling on the term to make it stand out more in the
list of order lines of a basket. The text change will ease translation.

To test:
- In acquisitions:
- Create a new basket
- Add at least 2 order lines
- Close the basket
- Receive a new shipment and one of your order lines
- Go back to your basket
- One line should now show "(rcvd)"
- Apply patch
- Reload the basket page
- Verify the text has changed and element now has a class in the
  HTML source

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:34 +01:00
Katrin Fischer
a27c22bffc Bug 26718: Rename "reading history" to "checkout history"
This changes all occurences of reading history to the more
accurate term 'checokut history' as it was correctly pointed out
that 'reading' doesn't apply to all kind of items available
at the library (audio books, games, etc.)

To test:
- Verify that the term reding history has been replaced by checkout
  history in:
  - System preferences
  - OPAC tab "your checkout history"
  - OPAC tab "your privacy" (switch OpacPrivacy pref first)
  - Staff permission for patron batch anonymization

Signed-off-by: Barbara Johnson  <barbara.johnson@bedfordtx.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:33 +01:00
018720aa5e Bug 12533: (follow-up) Add CSS to preview display of authority MARC
This patch adds the same CSS used by authorities/detail.tt to the
modal preview of the authority record shown in the authorities search
result popup.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:33 +01:00
66289610fa Bug 12533: Improve authority search result display
This patch implements a few changes in the way authority records are
displayed in search results.

- In most cases heading type is now displayed as a separate column in
  the table of search results.
- The heading itself is now linked rather than a separate "details"
  link.

In the authority search results for MARC editor plugins the heading link
triggers a modal with the authority details instead of linking to a
separate page.

To test, apply the patch and go to Authorities.

- Perform an authority search which will return results.
- In the search results headings should be linked to the
  corresponding detail page.
- There should be a separate column for heading type.
- Go to Cataloging and create a new record using a framework which has
  a field linked to an authority type (e.g. 100a -> PERSO_NAME ).
- Perform a search which will return results.
- In the search results, clicking a heading link should trigger a
  modal window with the authority details.
- Test multiple entries in the results and confirm that each
  time the correct data is loaded into the modal window.
- Test the same process for a field which is linked to the
  unimarc_field_210c.pl plugin.
- Go to Tools -> Batch record modification and submit multiple
  authority record numbers.
- In the results list the heading should be linked correctly to the
  corresponding detail page. Heading type is not present in this
  view.
- Perform the same test with batch record deletion.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

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

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:33 +01:00
b5dc71be2e Bug 25941: (follow-up) Add markup comments
This patch adds comments to the template to highlight the markup
structure.

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

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:33 +01:00
f010b8fd16 Bug 25941: Reindent Upload local cover image page
This patch reindents the "Upload local cover image" template to make
indentation consistent. Some lines have been split up. Some markup
inconsistencies have been corrected.

To test, apply the patch and enable the LocalCoverImages system
preference.

- Go to Tools -> Upload local cover image.
- Test uploading single images or ZIP files of images.
- Confirm that everything works as expected.

Use your preferred method for checking the differences between files
while ignoring whitespace. I use diff with the  "-w" flag, but I'm not
some kind of diff deity. The only changes you see should be split lines.

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>
2020-11-04 12:59:33 +01:00
579608808c Bug 22399: Improve responsive behavior of the basic marc editor
This patch makes markup and style changes to the basic MARC editor in
order to improve the page's handling of smaller browser widths. It adds
flexbox styling to elements of the form to help accomplish this.

To test, apply the patch and load a record for editing in the basic MARC
editor.

- Adjust your browser width and confirm that the form adjusts well
  to various widths.
- Test that the markup changes haven't broken the JavaScript-driven
  features in the editor:
  - Clone tags
  - Delete tags
  - Expand and collapse tags
  - Clone subfields
  - Delete subfields
  - Re-order subfields
  - Cataloging plugins:
    - Focus-driven plugins like on tag 000
    - Popup plugins like 008 or authority-linked tags
    - Select2-styled dropdowns (e.g. 942$c Item type).
- Test the add/edit items form to confirm that it is still styled as it
  was before.

Edit: The Select2 plugin JavaScript file now accepts a variable to set
the "width" configuration option. It still defaults to "element."

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

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:33 +01:00
b1e2693ce5 Bug 26763: Use standard information style for multi-hold message
This patch modifies the markup of the message which is displayed when
the patron tries to place a hold on a title they already have a hold on.
Now the message is styled consistently with other similar messages.

To test, apply the patch and follow the steps used to test Bug 19718:

- In Administration -> Circulation and fine rules, set a rule to allow
  multiple holds on a title.
- Log in to the OPAC as a user covered by the above rule and locate
  a bibliographic record on which multiple holds can be placed.
- Place a hold on the record.
- Return to the record details for that title and place another hold.
- You should see a correctly-styled message about having at least one
  other hold on the record.

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>
2020-11-04 12:59:33 +01:00
dcbc856b60 Bug 19482: (follow-up) Fix update, add tests, restore closing </td>
To test:
1 - View the mappings page, confirm table is correctly structured
2 - prove -v t/db_dependent/Koha/SearchEngine/Elasticsearch/ExportConfig.t t/db_dependent/Koha/SearchEngine/Elasticsearch/Reset.t t/db_dependent/Koha/SearchField.t
3 - Confirm update statement works and table is ordered correctly

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:33 +01:00
dbe8c14bbf Bug 19482: (follow-up) Don't set readonly as a variable, use conditionals
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:33 +01:00
37a7a1bb50 Bug 19482: (follow-up) Add missing filters and boolean switch to schema
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:33 +01:00
52be44f406 Bug 19482: (follow-up) Fix select and adjust export of new field
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:33 +01:00
975e06bd7c Bug 19482: Add support for defining 'mandatory' mappings
To test:
1 - Apply patch
2 - ./installer/data/mysql/updatedatabase.pl
3 - Reset ES mapping: Administration->Search engine configuration , button at bottom of page
4 - 'issues' and 'title' mapping under 'search fields' should be mandatory and not editable
5 - On 'Bibliographic records' tab you should not be able to delete the single entry for issues
6 - You should be able to delete 'title' mappings, however, at the final one you should be stopped by javascript
7 - Bonus: force remove the last mapping from the page using developer tools - attempt to save and should be warned of missing mandatory mapping

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:33 +01:00
Lisette Scheer
4e3bcc9a25 Bug 25834: Relabel "Search to add" to "Add guarantor" on patron form.
The "search to add" label on the button for adding guarantors is a bit
hard to translate and is inaccessable. This patch updated the button
label to "Add guarantor" to fix these issues.

To test:
1. Go to patrons
2. Add a new child patron
3. Observe the button with "search to add"
4. Save the patron
5. Edit the patron and observe the "search to add" button.
6. Apply patch.
7. Add a new patron
8. Observe new text on button.
9. Edit a child patron
10. Observe new text on button
11. Sign off

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>
2020-11-04 12:59:33 +01:00
617a012a4c Bug 23979: Remove final dot
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:33 +01:00
291df4e092 Bug 23979: Move locked message to patron info section
To test:
1 - Set failed login attempts to some number
2 - Attempt enough logins with a patront o lock them, or:
    UPDATE borrowers SET login_attempts = 500 WHERE borrowernumber=5;
3 - Attempt to checkout to borrower, no notice of lock
4 - View patron details tab, see the locked message
5 - Apply patch
6 - Note the message is now in patron info and visible on all tabs for the member

Signed-off-by: George Williams <george@nekls.org>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:33 +01:00
Matthias Meusburger
93c6610073 Bug 20888: (follow-up) revert unecessary change on jquery selector
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:33 +01:00
Matthias Meusburger
cb4df3b29a Bug 20888: (follow-up) 'is not' operator behaves as 'not like'
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:33 +01:00
Matthias Meusburger
781b5a4118 Bug 20888: Allow use of boolean operator 'not' in item search
Test plan:

 - Apply the patch
 - Check that you have a 'is not' option in the third box in item search
 - Check that you can exclude items from the search results with this 'is not' option
 - Check that you can still combine parameters with 'and' and 'or'
 - Check that the exclusion works for custom fields (see Administration > Item search fields)
 - Check that the exclusion works for custom fields linked to authorised values

Signed-off-by: Amandine Zocca <azocca@ville-montauban.fr>

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:33 +01:00
d80763c371 Bug 26825: Add span for publication date in OPAC
This patch modifies the XSL templates for OPAC results and OPAC details
so that the parts of the publisher details are wrapped separate <span>s:
Publisher place, name, and date.

To test, apply the patch "restart_all" if necessary.

You can add this to the OPACUserCSS system preference to better see the
change:

.publisher_place { color: red; }
.publisher_name { color: green; }
.publisher_date { color: orange; }

- Peform a search in the OPAC
- In the search results, confirm that the publisher plac, name, and date
  are wrapped in separate <span>s, either by confirming the custom
  colors or by inspecting the source.
- View the details for one of the results. Confirm that the same change
  has been made to the detail page.

Signed-off-by: B Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:33 +01:00
Katrin Fischer
d23c58e908 Bug 16696: Rename 'Publisher' to 'Publication details' on detail and result lists
To test:
1) Do a catalog search in staff client
2) Confirm 'Publisher' says 'Publication details' for each result in search
3) Click on a record to go to the detail page
4) Confirm 'Publisher' says 'Publication details'
5) Click the Items tab on the left
6) Confirm 'Publisher' says 'Publication details'
7) Do a search in the OPAC
8) Confirm 'Publisher' says 'Published' for each result in search
9) Click on a record to go to the detail page and switch to the items tab
10) Confirm 'Publisher' says 'Publication details' on top of the page

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>
2020-11-04 12:59:33 +01:00
bd0674ac10 Bug 26844: Add warning to disabled logs on log viewer
To test:
1 - Go to Admin->System preferences->Logs tab
2 - Make sure some logs are disabled
3 - Go to Tools->Log viewer
4 - Note you can select logs that are disabled
5 - Apply patch
6 - Reload page
7 - Note disabled logs have a warning icon and hover text

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:33 +01:00
e7c134e27e Bug 26687: Add a Font Awesome icon for superlibrarian patrons
Bug 26534 adds a shield Font Awesome icon to help identify staff
patrons. I propose to add an icon when patron is a superlibrarian.

Patch adds 'is-superlibrarian' class that may be used for more CSS
tuning.

Test plan:
1) Compare display between a patron A beeing superlibarian and a patron
   B having only staff interface access
2) Patron B has only shield icon
3) Patron A has shield icon and bolt icon
4) Check a patron without permissions has no shield icon

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:33 +01:00
e91b565055 Bug 26817: Change checkouts table footer colspan based on ExportCircHistory
This patch makes a minor change to the include file which generates the
checkouts table footer. It now includes some logic checking for the
ExportCircHistory system preference, adjusting the colspan accordingly.

To test, apply the patch and enable the ExportCircHistory system
preference.

- Check out to a patron who has checkouts. In the table of checkouts
  there should be an "Export" column. The footer at the bottom of the
  table should span the width of the table.
- Disable the ExportCircHistory preference.
- View the checkout page again and confirm that table footer still looks
  correct.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:33 +01:00
0833724afe Bug 26032: (follow-up) show 'is new' filter only if items.new_status is used
Also adds a class 'item-new-status' to this filter to be able to hidde
even if items.new_status used.

Addition to test plan:
1) Apply on a database without Koha to MARC mapping on items.new_status
2) Check you dont see the 'is new' filter in items search form
3) Apply on a database with Koha to MARC mapping on items.new_status
4) Check you see class 'form-field item-new-status'

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:32 +01:00
8a874de3f4 Bug 26032: Add 'is new' filter in items search
In items search, add a filter on value of items.new_status with a Ignore/Yes/No.
Yes meaning != 0, No meaning = 0, with considering that NULL value is like 0.

This patch adds 'isnull' option to filter, this may be reused on other
fields.

Test plan :
1) Define an item subfield on items.new_status with authorised values YES_NO (0 or 1)
2) Edit an item A to set new_status=1
3) Edit an item B to set new_status=0
4) Perform an item search with 'is new' = 'ignore' => you get all items
5) Perform an item search with 'is new' = 'yes' => you get item A
6) Perform an item search with 'is new' = 'no' => you get all items but A

Signed-off-by: Emmi Takkinen <emmi.takkinen@outlook.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:32 +01:00
Katrin Fischer
80bf7abb5c Bug 25333: (QA follow-up) Change phone to itiva on overduerules.tt
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:32 +01:00
e0b41a7c5a Bug 25333: (QA follow-up) Update opac messaging for new transport name
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:32 +01:00
ebbee18822 Bug 25333: Change message transport type for Talking Tech from "phone" to "itiva"
From its inception, phone notices via Talking Tech have not behaved like
other notices. Instead of reading notices generated by Koha, the Talking
Tech scripts largely generate their own notices.

We would like to pave the way to having "generic" phone notices that can
be processed by plugins to support arbitrary telephony vendors ( we will
be targeting Twilio initially ).

To that end, it seems sensible to begin by changing the messaage
transport type for Talking Tech from 'phone' to 'itiva' to
highlight its specificity and difference from standard message
transports.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Restart all the things!
4) Test Talking Tech outbound script
5) Note no changes in functionality

Signed-off-by: Christopher Zorn <Christofer.Zorn@ajaxlibrary.ca>

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

JD amended patch: remove uneeded indentation change in sample_notices_message_transports.sql

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:32 +01:00
301528d6df Bug 25469: Typo: Item does not belongs to your library
This patch makes corrections to two strings in the batch delete template
to correct a typo. Before:

t("Item does not belongs to your library")

...after,

t("Item does not belong to your library")

To test, apply the patch and inspect the template to confirm that the
string is correct.

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>
2020-11-04 12:59:32 +01:00
Katrin Fischer
4cf9a59b40 Bug 24012: (QA follow-up) Use standard patterns
- Removes the scss change in favor of adding the space to the
  HTML as is the usual pattern when using Font Awesome icons
- Removes the span with the inline style to make things appear as
  black by default (no danger here in it being locked?)

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:32 +01:00
a1c5c5b060 Bug 24012: Budget 'Locked" text colour changed and lock icon added
Test plan:
1. Go to Administration
2. Click on Budgets
3. Add a new bdget and check the 'Lock budget' box
4. Click on the 'Inactive budgets' tab
5. Note that 'Locked' is displayed in green
6. Apply patch
7. Compile the sass files (setup detailed here:https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface ) by running:
yarn build

8. Refresh the page and notice the 'Locked' text is now red, and there
is a lock icon to the left of the text. There is a space between the
lock icon and the 'Locked' text.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:32 +01:00
8ccc73353c Bug 25897: (QA follow-up) Add filters
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:32 +01:00
Katrin Fischer
b72de01813 Bug 25897: Use cn_sort for sorting callnumbers in inventory table
Instead of using the machine sortable form of the callnumber from
cn_sort the table was only sorting on the callnumber. This tries
to fix it using the same technique as for sorting the differently
formatted dates.

To test:
- If your database has items with suitably cataloged items, use
  these. Otherwise you could use the examples from the bug report:

- Catalog items with the following barcodes:
   B 29 V55 1998
   B29 .C55 2008
   B29 .L24 1983
   B29 .L264 1998
   B29 .P666 2004
  Make sure the LOC is selected in $2 as source of classification
  This makes sure the sortable form of the callnumber is calculated
  correctly.
- Go to inventory
- Search for your items
- Before patch, they should sort on callnumber as above, after the
  patch the correct sort order should be:
   B29 .C55 2008
   B29 .L24 1983
   B29 .L264 1998
   B29 .P666 2004
   B 29 V55 1998

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:32 +01:00
8ba1d7a22b Bug 26664: (QA follow-up) Add filters
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:32 +01:00
Katrin Fischer
9adafd6404 Bug 26664: Fix sorting for date last seen in inventory tool
This adds the standard datatable sorting for dates to the inventory
table as described here:
https://wiki.koha-community.org/wiki/DataTables_HowTo#Sorting_dates_regardless_of_date_format_preference

To test:
- Go to the inventory tool
- Search for a big sample list of items with different date last seen
- Sort the table now by "date last seen" by clicking on the table header cell
- Try different settings of the DateFormat system preferences
- Verify sorting is incorrect (alphabetic, not by date)
- Apply patch
- Repeat testing and very all is sorting correctly now

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:32 +01:00
Katrin Fischer
d80421ce85 Bug 11460: Remove MARC21 default mapping from itemcallnumber system preference
The mapping in the itemcallnumber system preference is only valid
for MARC21 libraries using DDC classification, but not for libraries
using UNIMARC or other classification.

This patch suggests to remove the default mapping and start new installations
with an empty value.

To test:
- On an emtpy database
- Apply patch
- Run the web installer, selecting either MARC21 or UNIMARC
- Verify that the itemcallnumber system preference is empty
- Verify the description now also include examples for UNIMARC

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:32 +01:00
d34b54ab69 Bug 26738: (QA follow-up) Add missing filter
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:32 +01:00
cd742a15dd Bug 26738: (bug 24819 follow-up) Fix manager selection
Bug 23590 added a new feature to select the manager of a suggestion.
One month later bug 24819 added the ability to pick the suggester.

This second patchset broke the manager selection.

This patch simplifies the way the suggester is selected, using the
generic way and mimicking what is done for the manager.

Test plan:
- create a new purchase suggestion from within acquisitions (suggestion.pl?op=add)
- click "select manager," search for user, click Select
- see that the user you just selected shows under "Created by,"
- see that "Managed by" still says "You"
- modify the suggester
- save your suggestion
=> Everything is saved correctly

QA will test the permission alert:
Edit suggestion.tt and remove "&permissions=suggestions.suggestions_manage"
Edit the suggestion, select a manager, pick a patron in the list who
does not have sufficient permissions, save
=> you get the alert

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:32 +01:00
fa3829b120 Bug 26806: Remove 1 remaining occurrence of jquery.checkboxes.min.js
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-03 10:57:35 +01:00
b3b87dc7d9 Bug 26806: Remove the jquery.checkboxes plugin from the staff client
This patch removes the jquery.checkboxes plugin from the staff client.

It also removes some leftover instances of the "checkboxed" class which
was used in some cases to enable the checkbox plugin on selected
elements.

To test, apply the patch and check that the jquery.checkboxes plugin no
longer exists in /intranet-tmpl/lib/jquery/plugins.

To test changes to the templates, confirm that "Check all" and "Check
none" links still work on these pages:

- The tags review page. See the test plan for Bug 26120.
- The inventory page. See the test plan for Bug 26150.
- The list contents page. See the test plan for Bug 26204.

The other modified templates contained the "checkboxed" class but it
served no purpose:

- Serials -> Serials collection
- Labels -> Edit label batch
- Patron cards -> Edit card batch

If you search the Koha codebase for instances of "checkboxed" the only
results should be from the OPAC (if Bug 26805 hasn't been applied) and
in Z39.50 templates where the class is still used by JavaScript.

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>
2020-11-03 10:57:35 +01:00
93176f9e61 Bug 26800: Remove the use of jquery.checkboxes plugin from checkout page
This patch removes inclusion of the jquery.checkboxes plugin from the
patron checkout page (circulation.tt). The plugin is unused.

To test, apply the patch and check out to a patron with checkouts.

- Open the checkouts tab and click "Show checkouts" if necessary.
- In the table of checkouts, confirm that the "select all" and "none"
  links in the "Renew" and "Check in" column headers work correctly.

Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-03 10:57:35 +01:00
689f1f9b1f Bug 26799: Remove the use of jquery.checkboxes plugin from patron payment page
This patch removes the use of the jquery.checkboxes plugin from the
patron payment screen (members/pay.tt).

To test, apply the patch and locate a patron with unpaid fines.

- View the "Accounting" page for that patron.
- In the table of outstanding fines, test the "Select all" and "Clear
  all" links work correctly to check the checkboxes corresponding to
  each fine.
- Confirm that the "Select all" action enables the "Pay selected" and
  "Write off selected" buttons.
- Confirm that the "Clear all" action disables the "Pay selected" and
  "Write off selected" buttons.

Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-03 10:57:35 +01:00
296189dc6c Bug 26798: Remove the use of jquery.checkboxes plugin from patron detail page
This patch removes inclusion of the jquery.checkboxes plugin from the
patron detail page (moremember.tt). The plugin is unused.

To test, apply the patch and locate a patron with checkouts.

- View the details for that patron.
- Open the checkouts tab and click "Show checkouts" if necessary.
- In the table of checkouts, confirm that the "select all" and "none"
  links in the "Renew" and "Check in" column headers work correctly.

Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-03 10:57:35 +01:00
919ea33639 Bug 26795: Remove the use of jquery.checkboxes plugin from ILL pages
This patch removes the inclusion of the jquery.checkboxes plugin from
two staff interface ILL pages where the plugin is unused.

To test you need at least one patron with some ILL requests.

- Apply the patch and locate a patron with ILL requests.
- Click the "ILL requests history" tab.
- Confirm that the table of requests has no checkboxes.
- Choose "Ill requests" from the "More" menu in the header.
- Confirm that the table of requests has no checkboxes.

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>
2020-11-03 10:57:35 +01:00
bc1152bf3c Bug 26769: Remove the use of jquery.checkboxes plugin from staff interface search history
This patch modifies the staff interface search history page to eliminate
theuse of the jquery.checkboxes plugin.

To test you should have some search history items for bibliographic and
authority records, both from today and from days previous.

Apply the patch and click the logged-in-user link in the staff client
header. Choose "Search history."

On the search history page, test the "Select all" and "Clear selection"
links corresponding to all four tables:

- Catalog: Current session
- Catalog: Previous sessions
- Authority: Current session
- Authority: Previous sessions

In all cases the links should work correctly, affecting only the
corresponding tables. Confirm that the "Select all" action enables the
corresponding "Delete" link for each table.

Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-03 10:57:35 +01:00
72842e85dd Bug 26768: Remove the use of jquery.checkboxes plugin from library transfer limits page
This patch modifies the library transfer limits page to eliminate the
use of the jquery.checkboxes plugin.

To test, apply the patch and go to Administration -> Library transfer
limits.

- Test the "For all collection codes" links, "Select all" and "Clear
  all." Each should affect all checkboxes on all tabs.
- Click various tabs and confirm that the "select all" and "clear all"
  links within that tab work correctly, affecting only the checkboxes in
  that tab.

Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-03 10:57:35 +01:00
231f99e3e1 Bug 26767: Remove the use of jquery.checkboxes plugin from duplicate orders template
This patch removes the use of the jquery.checkboxes plugin from the
duplicate orders template in acquisitions.

To test, apply the patch and go to Acquisitions -> Vendor -> Basket.

- Click "Add to basket."
- Click "From existing orders (copy)."
- Perform a search which will return some orders.
- Test the "Select all" and "Clear all" links. Confirm that they work
  correctly.

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>
2020-11-03 10:57:35 +01:00
8220aa14f9 Bug 26805: Remove remaining instances of jquery.checkboxes plugin from the OPAC
This patch removes the use of the jquery.checkboxes plugin from the 5
templates in the OPAC which still use it. The plugin itself is removed.

To test, apply the patch and test the "Select all" and "Clear all" links
work to select and deselect checkboxes on the following pages:

- The catalog search results page: The controls should also enable
  and disable the "Select titles to..." menu.
- The list contents page:  The controls should also enable
  and disable the "Select titles to..." links.
- The suggestions page: The controls should also enable
  and disable the "Select suggestions to..." link.
- The search history page: The controls should affect only the
  corresponding table ("Current" or "Previous") and should enable and
  disable the "Select searches to..." link.

This patch also modifies the template for grouped search results, as
enabled by the OpacGroupResults system preference, but I don't know how
to test it.

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>
2020-11-03 10:57:35 +01:00
ff52478d09 Bug 26694: Set focus for cursor to search input box on guarantor_search.pl
This patch adds the "focus" class to the patron search field so that
cursor focus is set when the page loads.

To test, apply the patch and view an adult patron record in the staff
client.

- Click the "Add guaratee" button in the patron toolbar.
- On the following "Add patron" page, click the "Search to add" button
  in the "Patron guarantor" section.
- A popup window should appear, and the focus should automatically be on
  the first form field.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-03 10:57:35 +01:00
7ea60c0bd9 Bug 26695: Add modal "shown" event to set cursor focus
This patch attaches a focus() call to the login modal's "shown.bs.modal"
event so that the cursor focus is set to the username field when the
login modal is displayed.

To test, apply the patch and confirm that your OPAC uses the regular
login process--not casAuthentication or GoogleOpenIDConnect.

Click the "Log in to your account" link in the header. A the login form
should appear in a modal dialog, and the focus should be on the username
field.

The same should be true if you trigger the modal from other
locations, for instance: "Log in to add tags" on the bibliographic
detail page or the tag cloud page.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-03 10:57:35 +01:00
74aba6abb5 Bug 26712: Set focus for cursor to basket name input box on basketheader.pl
This patch adds the "focus" class to the basket name field in the form
for creating a new basket in acquisitions.

To test, apply the patch and go to Acquisitions -> Vendor -> New basket.

 - Upon page load the cursor should be focused on the basket name field.
 - The same should be true if you edit an existing basket.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-03 10:57:35 +01:00
b08444d31c Bug 26753: Set focus for cursor to password field on Overdrive login popup on OPAC
This patch modifies the OverDrive login process so that clicking the
"Log in to your OverDrive account" link automatically puts the focus on
the password field when the modal displays.

Unrelated change: A redundant "document.ready" function has been
removed.

To test you must have OverDrive credentials set in system preferences.

 - Log in to the OPAC.
 - On the "Your summary" page, open the "OverDrive account" tab.
 - Click the "Log in to your OverDrive account" link.
 - A modal dialog should appear, and the cursor focus should
   automatically be on the password field.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-03 10:57:35 +01:00
7815e37258 Bug 26826: Set focus for cursor to name input box when creating a new list
This patch adds the "focus" class to the list name input field so that
it automatically has focus when the page loads.

To test, apply the patch and open the lists page in the staff client.

- Click "New list."
- When the list creation page loads the "Name" field should have focus.

Signed-off-by: B Johnson <barbara.johnson@bedfordtx.gov>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-03 10:57:35 +01:00
27735ed40d Bug 26828: Set focus for cursor to current password field when updating in the OPAC
This patch adds the "focus" class to the first field in the
OPAC's password update form so that the field automatically receives
focus upon page load.

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

- Log in to the OPAC
- Open the "Change your password" page
- The cursor should automatically be in the "Current password" field
  when the page loads.

Signed-off-by: B Johnson <barbara.johnson@bedfordtx.gov>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-03 10:57:35 +01:00
b127f862ee Bug 26830: Set focus for cursor to name input box when creating a new list in the OPAC
This patch adds the "focus" class to the list name input box in order to
automatically set focus on the field.

To test, apply the patch and log in to the OPAC.

- Go to Lists -> New list.
- The cursor focus should automatically be on the "list name" field.

Signed-off-by: B Johnson <barbara.johnson@bedfordtx.gov>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-03 10:57:35 +01:00
42060794fc Bug 26880: Add explanatory text to add course reserve pages
To test:
- go to course reserve add item and batch add items pages
- batch add has a little bit of explanation, add has none
- apply patch, restart, reload pages
- both pages have more text explaining how they work!

"Checking the box next to the field label will enable changes to that field. Leave boxes unchecked to make no change.<br>
Any items with existing course reserves will have their on reserve values updated."

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

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-11-03 10:57:35 +01:00
9be2c3639b Bug 26881: Remove period on limit to available items on opac
To test:
1- do a search on the opac
2- on the results page, it says "Limit to currently available items."
3- apply patch, restart, reload
4- period is gone

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

Signed-off-by: Barbara Johnson  <barbara.johnson@bedfordtx.gov>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-03 10:57:35 +01:00
d0a42b7ed5 Bug 26889: Remove extra space from "Damaged :" in item search
This patch adds the chomp shorthand [%- -%] to the BLOCK for showing
labels in the item search template. This collapses the whitespace around
the label, eliminating the unwanted space around the ":"

To test, apply the patch and go to the item search page in the staff
interface. There should be no space before the colon in the "Damaged"
label.

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>
2020-11-03 10:57:35 +01:00
Katrin Fischer
adfed0a945 Bug 26696: Fix colspan in payment table when credit exists
The colspan was adjusted for the total due when a new column
was added to the table, but the 2 lines for credits were missed.

To test:
- Go to any patron account
- Create a manual invoice
- Create a credit
- Go to the 'Make a payment' tab
- Veriy that the total lines at the bottom of the table are
  slightly off
- Apply the patch
- Verify that the total lines in the table now display correctly

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-03 10:57:35 +01:00
cd83a9b6bc Bug 26398: Restore translations for credit/debit type dropdown
1) run ./translate update xx-XX
2) Translate this big chunk in your xx-XX-staff-prog.po or make sure it's translated

msgid ""
"%s %s %sPayment %sWriteoff %sForgiven %sCredit %sLost item fee refund "
"%sRefund %s%s %s %s %s %sAccount creation fee %sAccount renewal fee %sLost "
"item %sManual fee %sNew card %sFine %sLost item processing fee %sRental fee "
"%sDaily rental fee %sRenewal of rental item %sRenewal of daily rental item "
"%sHold fee %sHold waiting too long %sPayout %s%s %s %s %s "

(tip: I search the po file for "Forgiven", there are only two occurrences)

3) run ./translate install xx-XX
4) In your staff interface in your other language, go to a patron's account > Accounting > Create manual Credit
5) Check that the values in the credit drop down are in English
6) Apply patch
7) redo steps 1-4 (careful, the string to be translated changes)
8) Do a hard refresh (Ctrl+F5) (I guess you'd have to restart plack if you have it)
9) Values in the credit drop down are translated

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-11-03 10:57:35 +01:00
165a1bcef8 Bug 26592: (follow-up) fix typo
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-02 15:39:38 +01:00
9c2f9a021a Bug 26592: Prevent XSS vulnerabilities when circ/ysearch.pl is used
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-02 15:39:38 +01:00
Lisette Scheer
48b1e28015 Bug 26724: Improve link text for downloading the CSV file on patron import page.
On tools > Patron Import there is a a link labelled "here" on the right
side that should be more descriptive. This patch updates the link.

To test:
1. Go to tools
2. Under patrons select "Import Patrons"
3. On the right side of the screen, observe the "here" link in the
second list item.
4. Apply patch.
5. Reload page
6. Observe the updated link text.
7. Sign off

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>
2020-11-02 11:03:11 +01:00
8a23d32281 Bug 13701: Remove hardcoded "two weeks" text from list share confirmation
Test plan:
1. Enable the OpacAllowSharingPrivateLists system preference
2. Create a private list and add items to it
3. In the OPAC click on the private list name and select 'Share list'
4. Input an email address and observe the text: "You will receive an
email notification if someone accepts your share within two weeks."
5. Apply patch
6. Restart services
7. Repeat step 3 & 4 and observe the text now displays: "You will receive
an email notification if someone accepts your share before it expires."

Sponsored-By: Catalyst IT

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-02 11:03:09 +01:00
Lisette Scheer
daca3478f4 Bug 26723: Improve link text on OverDriveAuthName system preference
The OverDriveAuthName system preference contains a link labeled "here"
to a seperate administration page that should be labeled better. This
patch renames the link.

To test:
1. Go to administration
2. Search the system preferences for OverDriveAuthName
3. Obeserve the "here" link in the preference.
4. Apply the patch.
5. Repeat steps 1-2.
6. Observe the new link text.
7. Sign off.

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>
2020-11-02 11:03:09 +01:00
190f7155f1 Bug 26816: Chomp whitespace around i18n strings
This patch adds the chomp shorthand [%- -%] to the output of i18n.inc to
prevent extra spaces from being inserted.

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

In the items column, the availability information should not have
unwanted spaces:

3 items, 3 available:

...instead of

3 items , 3 available:

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-02 11:03:09 +01:00
d2af19dd31 Bug 26833: Logged in library doesn't show with suggestions count
This patch corrects the template variables used by the suggestions
counts shown on the staff interface home page and the acquisitions home
page. They should use [% Branches.GetLoggedInBranchname %]

To test you should have some suggestions from multiple libraries.

- Log in to the staff interface.
- On the home page you should see "Suggestions pending approval,"
  followed by the name of your logged-in library and the count of
  suggestions for your library.
- Go to the acquisitions page.
- In the "Pending suggestions" section you should see the same
  information: Your logged-in library name, suggestion count, and the
  count of suggestions at all libraries.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-02 11:03:09 +01:00
7bbf4f7b5f Bug 17515: Order Z3950 server by rank and preserve ordering
Previously we put all the servers into an object with keys of the server id

This patch converts it to an array of objects to preserve order, and adjusts code to use the array index
where necessary and store the server id within the array

To test:
1 - Add some new Z3950 servers, they don't need to be valid
    FIRST
    SECOND
    THIRD
    FOURTH
2 - Adjust the ranking so FOURTH:1 THIRD:2 SECOND:3 FIRST:4
3 - Enable and launch the advanced editor
4 - Click 'Advanced' under search on the left
5 - Note the list displays in the order you entered the servers
6 - Apply patch
7 - Reload
8 - Order is correct
9 - With valid servers, confirm that searching still works and servers can be checked or unchecked to include/remove from results

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

Signed-off-by: B Johnson <barbara.johnson@bedfordtx.gov>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-02 11:03:09 +01:00
e1a5fc85a6 Bug 22806: (QA follow-up)
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-02 11:03:08 +01:00
dc71c1ee48 Bug 26758: Correct OPAC ILL requests page markup
This patch makes some corrections to the OPAC ILL page which should have
been included in the upgrade to Bootstrap 4.

To test you must have Interlibrary loan configured and enabled in the
OPAC. Enter some text in the ILLModuleCopyrightClearance system
preference.

- Log in to the OPAC and go to the "your interlibrary loan requests"
  page.
- If you have only one ILL backend set up you should see a "Create a new
  request" button which is styled correctly.
  - This patch makes corrections to the menu which displays if you have
    more than one ILL backend set up, so it would be ideal to be able to
    test it.
- Upon clickng the "new request" button (or selecting a backend from the
  new request menu) you should be prompted to choose Yes or No in
  response to the ILLModuleCopyrightClearance text. The buttons should
  be styled green and red, respectively.
- On the new request entry page the "Add new field" and "Create" buttons
  should be styled in the "secondary" grey style.

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>
2020-11-02 11:03:08 +01:00
36342731ed Bug 26706: Compiled CSS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-02 11:03:08 +01:00
6d361af642 Bug 26706: Fix btn-default styling for better contrast
This patch makes some updates to the OPAC's CSS in order to make
Bootstrap button styles more consistent. Some CSS has been simplified
and some has been made more specific.

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

View a variety of pages in the OPAC to confirm that button styles look
good. For example:

 - Advanced search.
 - Catalog search results.
 - Bibligraphic details (including sidebar menu links and menus).
   - Subscription details, brief and full
 - "Your summary" page, various tabs.
 - Lists

The more pages tested the better! Be sure to test the hover and active
states of buttons as well.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-02 10:10:04 +01:00
ddc3459ba5 Bug 26808: Improve tab key access to circulation confirmation dialog
This patch modifies the checkout template so that the checkout
confirmation message can receive focus, improving tab access to the form
buttons in the dialog.

A "-1" value "tabindex" attribute makes the dialog focusable, and a
"focus" class automatically triggers focus. The focus and tabindex are
only set when the template logic says that the alert will require
confirmation.

To test, apply the patch and open a patron's account for checkout.

- Submit a barcode for checkout which will trigger a confirmation
  dialog. For instance:
  - A barcode they already have checked out
  - A barcode which is checked out to another patron
- When the page reloads you should see an alert-style dialog, "Please
  confirm checkout." The browser should show a focus outline around the
  dialog.
- Hitting the tab key should move the focus to the first focusable
  element inside the dialog. If there is a link in the text, this may be
  the first element. If not the confirmation button should be the next
  tabbable element.

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>
2020-11-02 09:00:08 +01:00
6da94551f1 Bug 26726: (QA follow-up) Add line break and 'the' for readability
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:16:14 +01:00
Tal Rogoff
c85b3ee07f Bug 26726: changed the text of the "here" link on the transport cost matrix administration page
test plan:
1.Set the UseTransportCostMatrix system to disabled
2.Go to Administration>Transport cost matrix
3.Blue box at top of the page contains link labelled "here"
4.Apply patch
5.Refresh page
6.Link should now be labelled "UseTransportCostMatrix"

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:16:14 +01:00
Hayley Mapley
ed789b0b57 Bug 26809: Removes full stops from admin-home.tt
To be consistent with the formatting of the Tools module this patch removes
full stops from administration descriptions.

To test:
1) Go to Administration module and note inconsistent use of full stops
2) Apply the patch
3) Go to Administration module and note absence of full stops on
descriptions

Sponsored-by: Catalyst IT

Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:16:14 +01:00
cf12049ca1 Bug 26450: (QA follow-up) Replace tabs with spaces
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:16:14 +01:00
Andreas Roussos
17f307285f Bug 26450: fix typo in plugin template
The UNIMARC field 105 plugin template contains some dropdown menu
options with unnecessary capitalisation: "w - Religious text".

This patch fixes that.

Test plan: apply the patch, and confirm that the dropdown menu
options appear in all lowercase.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:16:14 +01:00
17723b5423 Bug 26725: (QA follow-up) Add line break and 'the' for readability
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:16:14 +01:00
Tal Rogoff
46b371a057 Bug 26725: link text changed to just system preference name. "system preference" put in sentence case.
Signed-off-by: David Nind <david@davidnind.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:16:14 +01:00
Tal Rogoff
b3a51fbc55 Bug 26725: changed the text of the "here" link on the patron attributes administration page
test plan:
1. set ExtendedPatronAttributes system preferences to "Don't enable"
2. go to Administration > Patron attribute types
3. the link text of "here" is displayed in the blue box at the top of
the page
4. apply the patch
5. refresh the page
6. notice the link text has changed to "ExtendedPatronAttributes System
Preference"

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:16:14 +01:00
Phil Ringnalda
16e5a9d8dc Bug 26606: Correctly URI-encode query string in URL loaded after deleting an authority record
If you search for "this & that" and delete one of the results, after
it is deleted the search in the reloaded page is for "this " rather
than for "this & that". The template uses the url filter, which is
for filtering an entire URI where :, &, #, etc. should be left alone,
rather than the uri filter which is for filtering a URI component
where they should be encoded.

To test:
1) Go to Authorities > New authority > New from Z39.50/SRU
2) Search for the Author (corporate) this & that collective
3) Actions > Import, Save
4) From the detail for that authority, Edit > Edit as new (duplicate)
5) Edit the 110 field, add 2 at the end and Save
6) Search authorities for this & that
7) For one of the ones you created, Actions > Delete, confirm
8) The page that reloads should have a search for this & that, not
just for this

Signed-off-by: Didier Gautheron <didier.gautheron@biblibre.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:16:14 +01:00
5deb11623e Bug 26782: Compiled CSS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:16:14 +01:00
240fdfdb63 Bug 26782: Add new class for indicating default sort without sortability
This patch adds to the globally-included CSS a class which can be added
to tables when they are configured using DataTables options that set a
default sort but don't allow the user to reorder columns.

The new class shows a grey rather than blue sorting indicator and sets
the cursort to the default pointer rather than the link "hand."

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

Go to Administration -> Circulation and fine rules

In the table of circulation rules, confirm that the first two columns,
"Patron category" and "Item type" have a grey sorting icon in the
header cell indicating ascencing sort. Hovering the cursor over these
cells should show a default arrow cursor rather than the link cursor.

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>
2020-10-26 00:14:42 +01:00
54dcce1413 Bug 26766: Correct selection of title during OPAC note confirmation
This patch modifies the JavaScript in opac-user.tt which executes when
the user submits a checkout note. The script tries to grab the
checkout's title from an earlier cell in the table row so that it can
display it in the confirmation message.

Before start ratings were enabled on this page, the title of each
checked-out item was the only HTML inside this table cell, so it was
necessary only to grab the HTML contents of the <td>. Now that star
ratings might be displayed as well we must make the selection more
specific.

To test, apply the patch and enable both the  OpacStarRatings and
AllowCheckoutNotes preferences.

 - Log in to the OPAC as a user with checkouts.
 - On the "Your summary" page, fill out and submit the "Note" field for
   one of your checkouts.
 - In the confirmation message, confirm that the correct title
   information is displayed as a link to the bibliographic detail page.

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>
2020-10-26 00:14:42 +01:00
d10d24e42a Bug 26762: Modify template logic in opac-reserves.tt to avoid error
This patch makes a change to the OPAC hold template to prevent certain
cases where the output is invalid.

To reproduce, perform a search in the OPAC which will return some titles
which can be placed on hold and some which cannot.

 - Select all results (some holdable, some not)
 - Click the "Place hold" link
 - On the "Confirm holds" page the layout will be broken after the
   first instance of the message "There are no items that can be placed
   on hold."

To test, apply the patch and repeat the process above. After the patch
has been applied the "confirm holds" page should look correct.
Validating the HTML source should return no errors.

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>
2020-10-26 00:14:42 +01:00
2dab6ab316 Bug 26756: Fix quotes showing behind some system preference descriptions
This patch adds matching quotes to two OPAC preference descriptions
which were missing them.

To test, apply the patch and go to Administration -> System preferences.

- Open the "OPAC" tab.
- Check the descriptions of these preferences:
  - AllowPatronToSetCheckoutsVisibilityForGuarantor
  - AllowPatronToSetFinesVisibilityForGuarantor

There should be no trailing quotation mark.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:42 +01:00
599a6cb92e Bug 26619: Cart - The "Print" button is only translated when you are in "More details" mode
This patch adds the "Print" string to datatables.js so that it can be
picked up for translation.

To test, apply the patch and add some items to the cart in the OPAC.

- Open the cart. You should see a button labeled "Print."
- The print button should work correctly.

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,
  misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from
  koha-tmpl/opac-tmpl/bootstrap/js/datatables.js for translation:

  msgid "Print"
  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 OPAC and
  repeat the test plan above. The translated strings should appear.

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>
2020-10-26 00:14:42 +01:00
ebe08fb745 Bug 25353: Correct eslint errors in additems.js
This patch makes minor changes to additem.js to correct errors
highlighted by eslint:

- Consistent indentation
- Notation of global and exported variables and functions
- Consistent use of the "var" declaration for all new variables
- Remove variables from function calls which aren't used

To test, apply the patch and use your preferred eslint-enabled tool to
check for errors. There should be none.

If you don't have eslint integrated in your development environment you
could use the online ESLint demo at https://eslint.org/demo.

The demo isn't configured to assume a browser environment with jQuery
present, so you'll have to modify the top line after pasting the
contents of additem.js:

/* global $ alert window __ */

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:42 +01:00
Katrin Fischer
70c64fad46 Bug 26526: Relabel checkout note column in OPAC
When checkout notes are active, there is currently a new
column labelled 'Note' in the checkouts table in OPAC.
When a note is added, this is sent to the library. For
the user it's not clear from the label, that these notes
are not personal, but for reporting to the library.
The new label "Report a problem" aims to make this clearer.

To test:
- Turn on AllowCheckoutNotes system preference
- Check out some items to your account
- Go to the OPAC
- Look at the list of checkouts
- Apply patch
- Reload the page and check the checkouts table again
- Verify the heading has changed from "Notes" to "Report a problem"
- Hover over the heading with your cursor to see some more info

Bonus: Patch adds an id "checkout-notes" to the header cell, that
will make it easier for libraries to change text or style if needed.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:42 +01:00
0321667678 Bug 26749: Correct dropdown markup in OPAC cart
This patch corrects the markup of the "Download" dropdown menu in the
OPAc cart. It was not updated during the upgrade to Bootstrap 4.

To test, apply the patch and perform a catalog search in the OPAC.

- Add some titles to the cart.
- Open the cart and test the "Download" menu button.
- The menu should display correctly, and the menu items should work to
  download the correct files.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:41 +01:00
8c99099e8c Bug 26719: Replace MSG_NO_RECORD_SELECTED with translatable string
This patch cleans up some loose ends left by Bug 25351, replacing
instances where the undefined variable MSG_NO_RECORD_SELECTED is used.

To test, apply the patch and perform a catalog search in the OPAC.

- On the search results page, without checking any checkboxes, use the
  "Select titles to..." menu to try to add to cart and add to a list. In
  each case you should get a "No item was selected" message.
- View a list which contains one or more titles. Click the "Remove
  from list" link. You should get a "No item was selected" link.

Other instances have been corrected even though they will only be
triggered if something has broken. For instance, toolbar items in the
cart window which are disabled shouldn't register the click that might
trigger the error. And selecting an item for an item-level hold
shouldn't ever give a warning because at least one radio button should
always be selected.

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>
2020-10-26 00:14:41 +01:00
7a2cb71c79 Bug 26678: Remove incorrect include file from table of transfers
This patch removes a mistakenly-added include file from the transfer
template which was resulting in a menu being shown in the wrong place.

To test, apply the patch and go to Circulation -> Transfer.

- Submit an item for transfer.
- In the table of transferred items you should see the title of the
  item linked to the bibliographic details page.

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>
2020-10-26 00:14:41 +01:00
60af6edbb1 Bug 26810: Restore OpacCustomSearch news display
To test:
1 - Define a new opac news entry for OpacCustomSearch
2 - Browse opac, notice the standard search bar is displayed
3 - Apply patch
4 - Note new search bar displays on refresh

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:41 +01:00
a96de8283b Bug 26747: Show 'Always available' if title always available in overdrive
To test:
1 - Have a developer account for overdrive, or library credentials
    https://developer.overdrive.com/
2 - Enter info into 'Overdrive' sysprefs and enable overdrive
3 - Search for 'house' in the opac
4 - Click the overdrive link
5 - Note some titles in the collection show 999999 copies available
6 - Apply patch
7 - Note they now say 'Always available'

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:41 +01:00
e3183de77b Bug 25596: Identify overpayment refunds for translation
This patch ensures we can uniquely identify automatic overpayment refund
credits from the accountlines by introducing a new account credit type
and adding appropriate translations for the new code.

Test plan
1/ You'll need an overpayment refund to start...
1a/ Issue yourself and item and set the date due early enough
to create an overdue fine for at least 2 days worth of overdue fines
1b/ Run the fines.pl script to add the fines
1c/ As a patron, pay off the accruing fine
1d/ Return the item ensuring you backdate it at least a day
1e/ Check that there is an 'Overpayment refund' credit on the patrons
account.
2/ Check that the overpayment string is translatable (i.e. it appears in
the accounts include file)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:41 +01:00
a71596fb39 Bug 26627: Print and confirming a hold can cause an infinite loop
Test plan:
1) Place a hold for pickup at library A
2) Confirm the hold and print slip
3) Checkin the item again
4) Confirm the hold and print slip
5) The modal returns, do it again
6) Apply this patch
7) Reload the page
8) Repeat steps 1-3
9) No loop!

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:41 +01:00
Katrin Fischer
b3be51d4ef Bug 26686: Fix sorting of "updated on" and "time created" on notices tab
In the patron's account in the staff interface there is a tab
'Notices' that shows all notices sent out to a patron. The
updated on column would not sort at all, but there was also some
markup missing for the time created column.

To test:
- Make sure you have a patron account with some notices, ideally
  with different times and dates
- Verify that the updated on column doesn't sort at all
- Apply patch
- Verify both date columns now sort correctly for different
  DateFormat settings

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:41 +01:00
Julian Maurice
e5753d3cff Bug 26666: (QA follow-up) Add 'USE raw' in template
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:41 +01:00
Katrin Fischer
b9d6b92ac1 Bug 26666: Fix line breaks in addresses displayed with AddressFormat French or German
When Addressformat is set to French or German the addresses on the Details
tab will display <br /> in plain text. This is because a TT variable is used
for adding line breaks that is either set to <br /> or "". Then this variable is
escaped with the html filter... so we see the HTML tag uninterpreted.
Switching to $raw for this specific case.

To test:
- Go to any patron account,
- Fill in the various address fields
- Switch the AddressFormat system preference to different settings
- Verify the false display for French and German on the Details tab and
  in the brief info on the left side in the patron account
- Apply patch
- Repeat testing
- All AddressFormats should now display correctly

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:41 +01:00
Katrin Fischer
974c93f908 Bug 6819: Hide individual cancel order links when order line has been received
This is to prevent mistakes - a received order should not be
cancelled, but 'undo receive' needs to be done first for things
to turn out correctly.

To test:
- Create a basket with at least 2 orders
- Close basket
- Receive one of your orders at least
- Go back to the basket
- Reopen basket
- The cancel links should only show on the "not received" orders

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:41 +01:00
3edbe7d7dc Bug 26445: Fix "back to result" link of the search result browser
Not sure what was the expected behaviour, I am suggesting the following
one:
If you are browsing and you click "back to result", you will be
redirected to the page where the record appear on the search result
list.

Say you search for "something" that returns 10 page (20 results per
page)
Click on first result first page
Click back to result
=> You see the first page with the first result at the top

Click on second page, 3rd result
Click back to result
=> You see the second page with the biblio you clicked at the 3rd
position

Click on second page, 3rd result
Click next/previous
Click back to result
=> You see the page where you last result were.

I think the existing expected behaviour was to have the result you
clicked at the first position of the result page, but I am not sure it
really makes sense.

Hope this makes sense however!

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-10-26 00:14:41 +01:00
615d97d345 Bug 21811: Add JS confirmation when receiving - at least 1 item to receive
When receiving, the "receive items" form should not be submitted if no
items are going to be received

Test plan:
Create an order, close the basket, receive some items
On the "receive items" form, do not select item (if items are created
when placing the order) and submit the form
=> You must get a JS alert that prevent the form to be submitted
Select at least one item, submit again
=> Now it's submitted

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:41 +01:00
70570debf3 Bug 26752: Convert OPAC list download modal to dropdown
This patch modifies the OPAC list page so that download options are
shown in a dropdown menu instead of a modal dialog. This solves a bug
introduced by the Bootstrap 4 upgrade and makes it consistent with the
cart interface.

To test, apply the patch and view the contents of a list in the OPAC
which has multiple items on it.

 - In the toolbar at the top of the list contents table the "Download"
   button should now be a dropdown menu.
 - Selecting any of the download options should trigger a download
   prompt.
 - Test with and without some CSV profiles which have been
   configured for use in the OPAC

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:04:18 +01:00
0a60c96930 Bug 26735: Overdrive login modal broken in the OPAC
This patch makes corrections to the markup for the Overdrive login modal
in the OPAC. It hadn't been updated during the upgrade to Bootstrap 4.

To test, apply the patch and enable the system
preferences required for Overdrive integration.

- Log in to the OPAC.
- On the "Your summary" page open the "OverDrive Account" tab.
- Click the "Log in to your OverDrive account" link.
- The modal should appear and look correct.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-22 10:23:55 +02:00
759ff45199 Bug 25549: Add error reporting to plugins-home
This patch adds handling for the newly introduced 'errors' option in
GetPlugins and reports erroroneos plugins to the user.

To test:
1 - Enable plugins in the koha-conf
2 - Install the kitchen sink plugin
3 - Your staff client should be orange now :-)
4 - The plugin should display as installed in the table at
    tools/plugins.
5 - edit the plugin module
    /var/lib/koha/kohadev/plugins/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm
6 - Add a line to break compilation, like:
    this won't compile
7 - Restart all
8 - Your Koha is not broken, but is no longer orange (The plugin is not
    loading).
9 - The plugin should display as unable to load in the table at
    tools/plugins.

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

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-22 10:04:30 +02:00
fd35df346f Bug 26496: Add op field to Budget Planning
Without this patch, it's impossible to save a budget plan.

With this patch, it is possible to save a budget plan.

Test:
1. Apply patch
2. Modify a budget (e.g. http://localhost:8081/cgi-bin/koha/admin/aqbudgetperiods.pl?op=add_form&budget_period_id=1)
3. Unlock the budget if necessary by unticking "Lock budget" and click "Save"
4. Go to a budget (e.g. http://localhost:8081/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=1)
5. Click "Planning" and "Plan by libraries"
6. Click "Auto-fill row" on the first line
7. Click "Save"
8. Note that results are saved and shown on the newly loaded page

To verify this patch is necessary, do the test plan without applying the patch.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-22 09:46:43 +02:00
b9b02000eb Bug 23376: If a single item is returned we cannot count
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-20 17:47:50 +02:00
6d22c12a92 Bug 26534: Compiled CSS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-15 12:56:31 +02:00
819a33a7a4 Bug 18170: Use GetDescriptionByKohaField
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-15 12:56:31 +02:00
Katrin Fischer
4c1218af64 Bug 18170: Show damaged status in table of checkins
This copies the display of the damaged status from the holds and
checkouts pages in staff.

To test:
- Apply patch
- Check out some items, some damaged, others not
- Verify the damaged status is displayed below the due date
  in the table of checkouts
- Check the items in from the checkin page
- Verify the damaged status displays in the table of checkins

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-15 12:56:31 +02:00
Katrin Fischer
b5bcc51170 Bug 25460: (QA follow-up) Remove stray quote from system preference description
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-15 12:56:31 +02:00
Katrin Fischer
ebbdfe3c11 Bug 25460: (QA follow-up) Readd ending punctuation to sys pref description
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-15 12:56:31 +02:00
ac1a8adba2 Bug 25460: Update OAI sets when adding/editing/deleting item records
Also adds syspref to optionally choose to embed item information in record when adding/editing bibliographic and item records.

Test plan:
1. Enable OAI-PMH and OAI-PMH:AutoUpdateSets sysprefs
2. Create a biblio record with 1 item with CCODE of NFIC
3. In Administration > OAI Sets configuration create a set and define
the mapping:
Field: 952, Subfield: 8, Operator: is equal to,  Value: FIC

4. Run the build_oai_sets.pl script:
 cd misc/migration_tools
 sudo koha-shell <instancename>
 ./build_oai_sets.pl -i

5. Check what items are in the OAI set:
sudo koha-mysql <instancename>
select * from oai_sets_biblios;

6. Observe your bib from step 2 is not in the set
7. [ITEM EDIT] Edit the item to have CCODE of FIC repeat step 5 and observe biblio is still not in OAI set
8. [ITEM ADD] Add a new item with CCODE of FIC and repeat step 5 and observe biblio
still not in OAI set
9. [ITEM DELETE] Delete one of your 2 items and repeat step 5 and observe biblio still
not in OAI set

10. Apply patch, update database and restart plack (instruction below on
the latter 2 actions):

cd installer/data/mysql
sudo koha-shell <instancename>
./updatedatabase.pl
sudo koha-plack --restart <instancename>

11. Enable new syspref OAI-PMH:AutoUpdateSetsEmbedItemData
12. [ITEM ADD] Repeat step 8 and observe biblio is now in the OAI set
13. [ITEM EDIT] Edit both items to have a CCODE of NFIC and repeat step 5 and
observe bib now not in set
14. [ITEM EDIT] Edit one of the items to have CCODE of FIC and repeat step 5
and observe bib now in set
15. [ITEM DELETE] Delete all items off bib and repeat step 5 and observe bib
no longer in set

Sponsored-By: Catalyst IT

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>
2020-10-15 12:56:30 +02:00
3e2b6b9299 Bug 26534: Use IF ELSE directly on h5 opening tag
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>
2020-10-15 12:56:30 +02:00
c1f0aa1e59 Bug 26534: Replace 'grade' by 'is-patron' and 'patron-type'
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>
2020-10-15 12:56:30 +02:00
eea2699fd2 Bug 26534: (follow-up) Only center when using patronimages
I felt the change to always center the user title worked well when
patronimages was enabled, but not so well when it was not (it looked
strange without a background for non-staff users).

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>
2020-10-15 12:56:30 +02:00
b5307bb6cb Bug 26534: (QA follow-up) Fix CSS declaration
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>
2020-10-15 12:56:30 +02:00
26c717fcd4 Bug 26534: Add Font Awesome icon only for staff patrons
In patron pages it would help to see an icon indicating that this is a staff patron (having permission to access staff interface).
This may avoid wrong patron deletion or permission mistakes.
I propose the shield Font Awesome icon and a grey background

Patch also shows patron name and cardnumber aligned center instead of right.
Patch adds to 'patroninfo' div a class 'staffgrade' or 'normalgrade' to
allow more styling depending on patron beeing staff or not.

Test plan:
Compare display between a patron having staff interface access and one without permissions.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
2020-10-15 12:56:30 +02:00
Katrin Fischer
46197752aa Bug 26643: (QA follow-up) Fix typo in message
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-15 12:56:30 +02:00
bbd86d7a30 Bug 26643: Notify librarian of completed transfers
It came to light that it's not clear to all users that a checkin results
in the completion of a transfer if one exists for the item being checked
in.  This patch adds such a notification to the error messages loop to
highlight that the item has been recieved from it's sending brnach.

To test
1/ Setup a transfer from branch A to branch B
2/ Check the item in at branch B
3/ Note that a new message appears in the 'Check in message' alert box
saying "Item recieved from branch A"
4/ Signoff

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-10-15 12:56:30 +02:00