Commit Graph

15566 Commits

Author SHA1 Message Date
Jonathan Druart 4a2fcd6604 Bug 26973: [20.05.x] (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: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ac5a9f2694)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-11-18 09:25:56 +13:00
Owen Leonard f7a46d6d80 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>
(cherry picked from commit d5d736909c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 45c29bbccf)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-11-17 18:37:04 +13:00
Katrin Fischer b7653e20a8 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>
(cherry picked from commit bbf0d21284)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5643d54329)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-11-17 18:36:53 +13:00
Phil Ringnalda 3447a782c2 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>
(cherry picked from commit 16e5a9d8dc)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5436293590)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-11-17 18:03:38 +13:00
Martin Renvoize 1fee97d513 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>
(cherry picked from commit 759ff45199)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit acd96409ea)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-11-17 17:12:45 +13:00
David Cook fc31bc6cee 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>
(cherry picked from commit fd35df346f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7f4b2f2099)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-11-17 17:10:03 +13:00
Emmi Takkinen 5ffa2a41f1 Bug 26429: Show correct expiration date at the request.pl
Bug 25789 changed holds tables expriration input class as "datepickerto".
This results to past expiration date to be displayed as tomorrows date.
Class "futuredate" should have been used instead.

To test:

1. Have waiting hold with expiration date in past (e.g 24.9)
2. Observe that waiting reserves table displays correct expiration date
3. At the request.pl page expiration date is however displayed as 26.9
=> Apply patch
4. Confirm that expiration date at the request.pl is now 24.9

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 497435fa84)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-11-17 16:53:32 +13:00
Aleisha Amohia 5add311155 Bug 25242: Compile CSS
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-11-05 13:29:15 +13:00
Martin Renvoize 241c22d337 Bug 25242: Improve column wrapping for holdingst
This patch attempts to improve the column wrapping for the holdingst
datatable and sets the tabel to fixed width to prevent overlapping
with other content on high zoom levels/low width screen sizes.

Test plan
1/ Build the OPAC CSS from the updated SCSS
2/ Navigate to an item with holdings visible in the OPAC
3/ 'Play' with various window sizes and zoom levels.
4/ The table should not overlap with right navigation content
5/ Signoff

NOTE: This is an alternative patch to those pushed and reverted that
attempted to provide a global fix to overlap issues. This patch
specifically targets just the holdings table in the opac detail view.

Signed-off-by: Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se>
Signed-off-by: Alexis Ripetti <alexis.ripetti@inLibro.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6e5142e61b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0c6c443d79)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-11-05 13:25:52 +13:00
Owen Leonard 868319a463 Bug 26497: "Hide all columns" throws Javascript error on aqplan.pl
This patch updates the JavaScript for checking and unchecking checkboxes
on the Acquisitions planning page so that it doesn't require the
checkboxes plugin.

To test, apply the patch and go to Administration -> Budgets -> Budget
details -> Planning.

On the planning page, test the "Show all columns" and "Hide all columns"
checkboxes. They should work correctly to show and hide the correct
columns.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 870369ae57)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-11-05 13:22:03 +13:00
Aleisha Amohia 607c0fda4f Bug 26592: [19.11] (rmaint follow-up) Fix JS error when using patron autocomplete searchbar 2020-10-28 09:14:49 +13:00
Aleisha Amohia ae0c2352b9 Merge branch 'new/security-release-19.11.11' into 19.11.x 2020-10-27 17:54:20 +13:00
Jonathan Druart e3c0b076d3 Bug 26592: [19.11] Prevent XSS vulnerabilities when circ/ysearch.pl is used
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit ca9c9225987814c1606f5241dfa1da3e267b177e)
2020-10-27 17:50:26 +13:00
Jonathan Druart 8b4c1d28fb Bug 26562: [19.11.x] Removes 'searches' from localStorage on logout
A user recently logged in will inherit the "searches" item stored in localStorage.

To recreate:
Log in with user A, do some searches
Note that the "searches" item is filled in with the search queries
Logout and log in with user B
Note that the "searches" item is still there

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-10-27 17:43:11 +13:00
Nick Clemens 5d5a298054 Bug 26224: Prevent double submit of header check in form
To test:
 1 - Browse to Home
 1 - In the header bar select the 'Check in' tab
 2 - Type a barcode into the box
 3 - Hit Enter as many as times as you can
 4 - Check the statistics table:
    SELECT * FROM statistics WHERE itemnumber={itemnumber} AND DATE(datetime)=CURDATE();
 5 - Note you have multiple lines for the same item at the same time
 6 - Apply patch
 7 - Reload the page
 8 - Type the barcode
 9 - Press Enter even more fast and more furiously
10 - Check the statistics table
11 - Only one entry, huzzah!

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 51d3010b71)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-10-27 16:59:40 +13:00
Jonathan Druart 20150ad3eb Bug 10921: Prevent an order from a closed basket to be edited
We don't allow editing of orders that are part of a closed basket, but
we don't enforce the rule in the controller file.

This patch use output_and_exit to stop the script and display an error
to the end user.

Test plan:
Create a basket, add an order
On the basket view you see the "Modify" link, open it in a separate tab
=> You can edit the basket
Keep this tab open, get back to the other one and close the basket
Reload the tab with the order edition form
=> You cannot longer edit the basket

QA: Do we need a check in addorder.pl as well?

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

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0310e973a4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit deffb12491)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-10-20 14:04:57 +13:00
Fridolin Somers d99bbe4777 Bug 26049: Replace li with span class results_summary in UNIMARC intranet XSLT
In all XSLT for record display, fields are created with <span class="results_summary> except in UNIMARC intranet where there is just <li>.

This allows a better CSS customisation and closer code in files for OPAC and intranet.

Actually li gets diplayed with a dot at each line, we don't want this.

Test plan :
1) For each modified file run 'xsltproc file.xsl' and see there is no
   error
2) Use default XSLT in all system preferences
3) Perform a search and check display with and without patch
4) Click on a record to see details and check display with and without patch

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9db369fb58)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 03e585ad5f)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-10-20 14:01:26 +13:00
Jonathan Druart 856cb2d1b7 Bug 20783: Add missing url filters
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
2020-10-12 23:24:16 +00:00
Jonathan Druart cd52f4439b Bug 20783: Similar changes for OPAC
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
2020-10-12 23:24:15 +00:00
Jonathan Druart 524fe12e44 Bug 20783: Use iframe to embed Youtube videos
WWW::YouTube::Download is broken and not reliable.
Other alternative was to use HTML::Video::Embed but not updated since
years.

The best alternative seems to follow youtube advise and use an iframe
https://developers.google.com/youtube/iframe_api_reference

Test plan:
Put youtube video in 856$u (using different url formats, youtu.be,
youtube.com/embed, etc.)
Enable HTML5MediaEnabled and HTML5MediaYouTube and confirm that the
youtube videos are correctly embeded.

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

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

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
2020-10-12 23:24:14 +00:00
Lucas Gass 7fcd8934c8 Bug 26511: [19.11.x] Remove PatronSelfRegistrationConfirmEmail from opac.pref
Test plan:
1. In 19.11 search for PatronSelfRegistrationConfirmEmail and you'll see the sys pref
2. Apply patch
3. System pref should be gone

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-09-24 15:46:35 +12:00
Nick Clemens a5e1b47998 Bug 26388: Do not show 'Renew all' or 'Renew selected' if no renewable items
Additionally, only include renewable items in 'Renew all'

To test:
1 - Check out some items to a patron, ideally:
    Some not renewable because set for auto renewal
    Some not renewable because of holds
    Some renewable
 2 - Confirm 'Renew selected' and 'Renew all' show on the opac
 3 - Click 'Renew all'
 4 - You get errors about the non-renewable items?
 5 - Check in all renewable items
 6 - Confirm you still see renew buttons
 7 - Apply patch
 8 - Refresh and you shoudl not see renew buttons
 9 - Check out a renewable item
10 - Click 'Renew all'
11 - Renewable item is renewed with no error
12 - Try again with 'Renew selected'
13 - Confirm it works as expected

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
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>
(cherry picked from commit 763cc4eb2e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6347ad75c8)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-09-15 23:53:54 +12:00
Martin Renvoize 42a99cf83d Bug 26041: Enable keyboard navigation without 'ctrl'
This patch enables keyboard navigation using the arrow keys without the
need to hold the control key for the jQuery UI datepicker.

Test plan
1/ Navigate to an item in the opac and attempt to place a hold
2/ On the resultant screen, use keyboard navigation to trigger the 'Show
more options' dropdown.
3/ Focus on one of the date inputs using keyboard navigation.
4/ Use 'ctrl + arrow' keys to navigate the datepicker.
5/ Note that prior to the patch using 'bare' arrow keys does not trigger
anything
6/ Apply the patch and confirm that the datepicker can now be naviated
using the arrow keys without holding the ctrl key.
7/ Confirm that using the ctrl key combinations continue to work as
expected too.
8/ Signoff

Signed-off-by: Brandon J <brandon.jimenez@inLibro.com>

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit be92f7e79c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 09b5ffe121)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-09-15 23:50:21 +12:00
Nick Clemens 8c20104bf3 Bug 26236: Fix translating interface from DB term to readable term
When viewing the logs we try to swith the db values like 'cron' to friendly terms like
'Cron job'

The values we use for building the selectors on the page ar eupper case, but DB values are lower case

If we simply force upper case in the comparison we can ensure we always match correctly

To test:
1 - Enable some 'Logs' setting in System preferences
2 - Perform some action in koha that will log
    Run a cronjob
    Change a syspref
    etc.
3 - Browse to Tools-> Log viewer
4 - Click 'Submit' to see all logs
5 - Note the 'Interface' column contains lower case DB values
6 - Apply patch
7 - Reload the page
8 - Values in interface are now Camel cased and more friendly

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1733944b34)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c08642687d)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-09-15 23:46:16 +12:00
Katrin Fischer a16860fef1 Bug 26313: (follow-up) Fix OPAC and "Show volumes" links
Elasticsearch requires the booleans in search requests to
be uppercase. This fixes the "Show analytics" link in
OPAC (same as first patch for intranet) and the "Show volume"
link.

To test both patches:

Set UseControlNumber = Use

1) "Show analytics"
- Turn SearchEngine to Elasticsearch and make sure it works
- Pick any serial record in your database, make sure 001 is set
- Go to new > new child record
- Fill in 245 and save
- For both staff and OPAC:
  - Click on the "In" link, it should bring you to the parent record
  - Click on "Show analytics", it should show your analytical record
- Switch to "Zebra" - verify links still work.

2) "Show volumes"
- Turn SearchEngine to Elasticsearch again
- Pick any serial record in your database, make sure 001 is set
- Set LDR, pos. 19 = a - Set
- Note 001 value
- Find another record and edit it
- Set LDR, pos. 19 = a or b, LDR 7 not a or b (m will work)
- Set 773$ title of set record $w 001 of set record
- For both staff and OPAC:
  - Click on the "In: link, it should bring up your set record
  - Click on the "Show volumes" link, it should bring up the volume

- Switch to "Zebra" - verify all links still work.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7a8b7ba2f4)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-09-15 23:40:37 +12:00
Nick Clemens e33d8f4dc7 Bug 26313: "Show analytics" link must use uppercase for booleans
In elasticsearch we only treat AND and OR as boolean operators if
they are capitalized

To test:
- Turn SearchEngine to Elasticsearch and make sure it works
- Pick any serial record in your database, make sure 001 is set
- Go to new > new child record
- Fill in 245 and save
- Click on the "In" link, it should bring you to the parent record
- Click on "Show analytics" => there will be no result
- Apply patch
- restart and reload
- Try again
- It works!
- Switch SearchEngine syspref to 'Zebra'
- Test again
- It still works!

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4755e8ef5c)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-09-15 23:40:26 +12:00
David Cook 8ca23ac289 Bug 26362: Show correct libraries in overdues report
Currently the overdues report does the following display:
Patron library = home branch
Home library = holding branch
Holding library = patron branch

This patch corrects the display of libraries in the overdues report.

To test:

0) Do not apply patch
1) Go to http://localhost:8081/cgi-bin/koha/circ/circulation.pl?borrowernumber=51
2) Go to http://localhost:8081/cgi-bin/koha/circ/set-library.pl
3) Choose "Troy"
4) http://localhost:8081/cgi-bin/koha/circ/circulation.pl?borrowernumber=51
5) Checkout "39999000004571" with due date of "09/01/2019 23:59"

Note the facts:
Patron library = Centerville
Home library = Fairview
Holding library = Troy

6) Go to http://localhost:8081/cgi-bin/koha/circ/overdue.pl
7) Change "Columns" visibility to show Holding and Home libraries
8) Note that the libraries are incorrect:

Patron library appears to be: Fairview
Home library appears to be: Troy
Holding library appears to be: Centerville

9) Apply the patch
10) koha-plack --restart kohadev
11) Go to http://localhost:8081/cgi-bin/koha/circ/overdue.pl
12) Change "Columns" visibility to show Holding and Home libraries
13) Note that the libraries are correct:

Patron library appears to be: Centerville
Home library appears to be: Fairview
Holding library appears to be: Troy

Signed-off-by: Emmi Takkinen <emmi.takkinen@outlook.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b729886216)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b10162f3a2)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-09-15 23:33:35 +12:00
Tomas Cohen Arazi 4eb56562a5 Bug 25584: Fix minor styling issue
This patch makes the button present some space between the icon and the
text.

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

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 81fd27153a)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-09-09 22:14:43 +12:00
Tomas Cohen Arazi 7a265915ae Bug 25584: Refresh checkouts table when a return claim is added
This patch triggers a checkouts table refresh when a return claim is
added. I also noticed the same when a return claim is deleted so it is
now also refreshed.

To test:
1. Set the ClaimReturnedLostValue to some valid value (2)
2. Check something out for a patron, and choose to display all checkouts
=> SUCCES: There's the checkouts table, showing the checkout
3. Click on the 'Claim returned' button and confirm
=> SUCCESS: There's no 'Claim returned' button anymore
=> ERROR: The checkout row doesn't display anything about the claim
4. Go to the 'Claims' tab, delete resolve and delete the claim
5. Go to the Checkouts tab
=> ERROR: It doesn't reflect the changes either
6. Apply this patch and start over
=> SUCCESS: Once the claim returned is added, the checkouts table is
refreshed and the information updated
=> SUCCESS: On the Claims tab, if you delete the claim and go to the
Checkouts tab, you are presented the button again.
7. Sign off :-D

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

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit def41d6231)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-09-09 22:14:33 +12:00
Jonathan Druart 1dae354017 Bug 26324: Fix spelling resizable vs resizeable in Dopop
The correct spelling of the parameter is resizable
https://developer.mozilla.org/fr/docs/Web/API/Window/open

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1475ea89e5)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-09-09 22:12:40 +12:00
Jonathan Druart e489ca4429 Bug 26069: Pass correct URL to twitter
We don't provide the url of the detail page so the twitter JS code
retrieve the current location, with the search terms.

Test plan:
Do a search
Click on a result
Click on the twitter button and confirm that the link only contain
biblionumber=x in the parameter

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5fd8774c68)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 48b10b3cf5)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-09-09 22:09:56 +12:00
Katrin Fischer ec02cab4ca Bug 25958: (QA follow-up) Add some punctuation to new DefaultLongOverdueSkipLostStatuses
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d99651efd0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bd56e23748)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-09-09 21:47:49 +12:00
Kyle M Hall 2c122a7344 Bug 25958: Allow LongOverdue cron to exclude specified lost values
When lost items are not marked as returned, they are still subject to
the long overdue cron, so an item that has already been marked Lost may
automatically roll to Long Overdue. In some cases, a library may not
want that lost value to change. This becomes especially important with
the introduction of Claims Returned, which uses a variety of lost.

Test Plan:
1) Set up a long overdue item that would be moved to lost by longoverdue.pl
2) Run the cronjob with the new --skip-lost-value option
3) Note the item is not altered
4) Include that value in the new system preference DefaultLongOverdueSkipLostStatuses
5) Run the cronjob *without* the new option
6) Note the item is not altered
7) Run the cronjob again with the new command line option, but set it to
a different value so the item will be affected
8) Note the item is altered as it would have been before this patch was
applied

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

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 48edb29471)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 411619f209)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-09-09 21:47:33 +12:00
Kyle M Hall 38446b2311 Bug 21539: addorderiso2709.pl forces librarian to select a ccode and notforloan code when using MarcItemFieldsToOrder
There is no reason that MarcItemFieldsToOrder should force librarians
to select a ccode and notforloan value for each item.
They are both optional fields.
As with location, the first value should be an empty 'none' option.

Test Plan:
1) Set up MarcItemFieldsToOrder, do *not* set mappings for ccode and notforloan
2) Add an order record to a basket that uses MarcItemFieldsToOrder
3) Note you must choose a ccode and nfl value
4) Apply this patch
5) Reload the page
6) Note you no longer have to select values for ccode and notforloan

Signed-off-by: Daniel Gaghan <daniel.gaghan@pueblolibrary.org>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0c79b7d93b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5f6b557599)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-09-09 21:34:12 +12:00
Lucas Gass 25fe729b41 Bug 25791: Remove win.print()
Test plan:
1) Turn on system preference SelfCheckReceiptPrompt
2) Check out item via /cgi-bin/koha/sco/sco-main.pl
3) Click "Finish"
4) Click 'Print receipt and end session'
5) Notice two print dialog boxes right on top of each other
6) Apply patch
7) Repeat steps 1 - 4
8) Should only get a single print dialog.
9) Test in FF/Chrome and make sure behavior is consistent

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 59b67c3b37)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-09-09 21:27:31 +12:00
Jonathan Druart 2a48a23c42 Bug 26233: (bug 25553 follow-up) Make date columns sortable on the edit items table
We were missing to pass the title-string to datatables.

Test plan:
Retest bug 26233, with appropriate dates

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

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit df5c9d0725)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-09-09 21:04:59 +12:00
Owen Leonard 760faa0a7a Bug 26213: Remove the use of jquery.checkboxes plugin when adding orders from MARC file
This patch removes the use of the jquery.checkboxes plugin from the page
for adding orders to a basket from a staged MARC file.

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

To test, apply the patch and go to Acquisitions.

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

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 8344ee7b4c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f681964591)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-09-09 20:56:26 +12:00
Jonathan Druart edb729421f Bug 25751: Add ORDERED in dropdown list of suggestion's statuses
The status "ORDERED" is missing from the pull down list of
status values when editing a suggestion, so the first
option is selected "No status".

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

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

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit eeb7ac6fc0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c320dfa3be)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-09-09 16:52:18 +12:00
Jonathan Druart 104fba4bb0 Bug 26119: Enable patron's attribute edition when PatronSelfRegistrationVerifyByEmail
There is no good reason remove the ability to edit patron's attributes
if PatronSelfRegistrationVerifyByEmail is set.

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

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

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit fc22fb308b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ae54212e7d)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-09-09 16:32:25 +12:00
Lucas Gass 9b3addb185 Bug 26361: switch TableSettings to ColumnSettings
Test Plan:
-Be on 20.05.x
-Go to returns.tt
-See the error Uncaught SyntaxError: expected expression, got keyword 'var'.
-Apply patch
-Reload returns.tt, no error

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

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2b6b7cb265)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-08-19 15:46:08 +12:00
Jonathan Druart fba279050a Bug 25005: (bug 22868 follow-up) Fix suggestions pending on main page
There is a "Suggestions pending approval" link on the main page that is
displayed if there are new suggestions and the logged in user has the
permission to manage them.

On bug bug 22868 the permission changed from
acquisition.suggestions_manage to suggestions.suggestions_manage

But in the template, one occurrence has not been replaced correctly
(certainly because it was already wrong actually).

Test plan:
Create a suggestion at the OPAC
Create a patron with the suggestions permission
Use this patron to login at the staff interface
=> Without this patch the link does not appear on the main page
=> With this patch applied the link appears

Signed-off-by: David Roberts <david@koha-ptfs.co.uk>

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-09-03 16:12:39 +12:00
Nick Clemens 90fdf1fa07 Bug 26136: Prevent double submit on checkin-form
To test:
 1 - Browse to Circulation->Check-in
 2 - Type a barcode into the Check in box
 3 - Hit Enter as many as times as you can
 4 - Check the statistics table:
    SELECT * FROM statistics WHERE itemnumber={itemnumber} AND DATE(datetime)=CURDATE();
 5 - Note you have multiple lines for the same item at the same time
 6 - Apply patch
 7 - Reload the page
 8 - Type the barcode
 9 - Press Enter even more fast and more furiously
10 - Check the statistics table
11 - Only one entry, huzzah!

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 44f54aac60)
(cherry picked from commit 9d85636bf0)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-09-02 10:25:44 +12:00
Aleisha Amohia b98ca4bf46 Merge branch 'new/security-release-19.11.09' into 19.11.x
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-08-19 07:11:07 +12:00
Martin Renvoize 813a45767d Bug 23634: Prevent non-superlibrarians from editing superlibarian emails
This patchset prevents a non-superlibrarian user from editing a
superlibrarians email address via memberentry.  This is to prevent a
privilege escalation vulnerability whereby a user could update a
superlibrarians contact details to match their own and then request a
password reset via the OPAC.

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

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-08-25 15:34:25 +12:00
Jonathan Druart 1c1c97d7ca Bug 26012: Correctly format "paid for" info on the item details view
The string is built controller side, which does not let the template
format the info nicely.
We want to display patron's info using patron-title.inc and the date
with the KohaDates plugin

Test plan:
- Make sure there is a replacement cost in the item
- check it out
- Mark it lost
- Pay the lost item fee
- Go to the detail page and look on the items tab for the item
- It will show an entry with "Paid for?" label
The patron's info and date must be correctly formatted

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ed4fc58894)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f16934384e)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-08-17 22:11:27 +12:00
Jonathan Druart 9b21b01670 Bug 26165: Fix duplication of large saved reports
If the combined character length of a saved report's
title, notes and SQL is too long then pressing the
'duplicate' button will lead to an error:

"Request-URI Too Long
The requested URL's length exceeds the capacity limit
for this server."

Test plan:
1. Create a simple SQL report and add a lot of text
   into the notes field (the combined URL lenth must be
   >8225 characters)
2. Save the report
3. Press the duplicate the report from the saved reports page

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 50cbaa3262)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-08-17 22:01:00 +12:00
David Roberts e57aa461fe Bug 25336: Show checkouts/fines to guarantor is in the wrong section of the patron file
This patch moves the "Show checkouts to guarantor" and "Show fines to
guarantor" data to display under the Contact information block

To test:

1) Enable the AllowStaffToSetCheckoutsVisibilityForGuarantor and AllowStaffToSetFinesVisibilityForGuarantor system preferences to Allow
2) View a patron record.
3) The "Show checkouts to guarantor" and "Show fines to guarantor" field
will be on the right hand side of the screen under the Library use
block.
4) Apply patch
5) Check that this data has now moved to the Contact information block
on the left hand side of the patron record.

Works for me!

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3abc4fb858)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2478ba03f0)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-08-17 11:28:43 +12:00
Jonathan Druart b24d51eccd Bug 26098: Fix JS error on the fund list view when no fund displayed
TypeError: this.data(...) is undefined
in jquery.treetable.js

Test plan:
Go to the fund list view
Select a filter that will return no result
=> With this patch applied there is no JS error in the console

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 052d5d5568)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-08-17 10:26:29 +12:00
Owen Leonard 22809514f5 Bug 25762: Typo in linkitem.tt
This patch corrects the same typo in two different templates:

&rsquo; -> &rsaquo;

If you want to test beyond examining the patch, apply the patch
and go to Tools -> Rotating collections.

- Add an item to a rotating collection.
- In the browser's title bar (or the tab title if the title bar isn't
  shown) the separator between the rotating collection name and "Add or
  remove items" should be ">" instead of "`"
- Enable the EasyAnalyticalRecords system preference.
- View the detail page for a bibliographic record.
- From the "Edit" menu, choose "Link to host record"
- Check the title bar as you did previously.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 19f9bc0528)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a8a7d8667e)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-08-17 09:31:03 +12:00
Jonathan Druart 0133ea5848 Bug 26111: Add "Serials" (SER) to the reports dictionnary
It's missing in the template

Test plan:
Go go Home › Reports › Guided reports wizard › Dictionary
At step 2, notice that with this patch you have "Serials" in the
dropdown list (instead of an empty entry)

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b0eee4d2e1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3c6155b669)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-08-17 08:52:37 +12:00