Commit graph

822 commits

Author SHA1 Message Date
Aleisha Amohia
96883e69b5
Bug 4461: (follow-up) Creating sample notice and other fixes
- filters
- capitalisation
- atomic update

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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-06 11:16:38 +01:00
e065b86abd
Bug 25020: Preserve time part when batch extending due dates
When selecting a new hard due date, we should keep the time part of the
original checkouts.

Test plan:
1 - Checkout an item specifying a date due
2 - Checkout an item without specifying a date due
3 - Use Tools->Batch extend due date
4 - Select a hard due date
5 - On the confirmation screen you should see that the time part has
been kept
6 - Confirm
7 - Make sure the correct values hava been inserted in DB
8 - Try now using the other option, give a number of days
9 - Repeat 4-7

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-03 14:29:00 +01:00
Katrin Fischer
563784bcf5
Bug 9422: Don't allow access to 'Upload patron images' when patronimages syspref is off
In addition to checking the patron image upload permission, this
adds a check for the patronimages system preference to the tools
home page and sidebar.

To test:
- Check that the patron image upload tool only displays when
  - system preference patronimages is set to 'Allow'
    and user is either
  - superlibrarian or
  - has bath_upload_patron_images permission
- Save URL of patron image uploader page
- Turn off patronimages
- Verify you get redirected to the home page of Koha when trying
  to access the page

Note: this redirect is already used by the stock rotation feature.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-03 14:26:32 +01:00
481bc59de5
Bug 23473: (follow-up) check if overwrite_passwords is set
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-27 12:23:00 +00:00
6464ada6c6
Bug 23473: Allow overwrite of passwords during import
To test:
 1 - Have some patrons in your system
 2 - Export some of their info via reports
    SELECT cardnumber, userid, surname, firstname, password, branchcode, categorycode
 3 - Edit the file from above, changing all the password lines
 4 - Import the file with overwrite
 5 - Confirm passwords have not changed (run the report again and confirm the hashes are the same)
 6 - Apply patch
 7 - Restart all the things
 8 - Check the new box on import screen to overwrite passwrods
 9 - Import file again
10 - Confirm passwords have changed
11 - Signin using new password to verify the hash is the password as supplied
12 - Repeat via commandline import supplying --overwrite_passwords option
13 - Verify works as expected
14 - Prove -v t/db_dependent/Koha/Patrons/Import.t

Sponsored-by: ByWater Solutions
Signed-off-by: Ron Marion <ron.marion@goddard.edu>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-27 12:21:59 +00:00
21c9b685bf
Bug 20415: Remove UseKohaPlugins system preference
Owen Leonard 2018-03-16 10:47:47 UTC :
<<
I don't think the system preference adds any security. There are already multiple permissions required for working with plugins:

- Configure plugins
- Manage plugins ( install / uninstall )
- Use report plugins
- Use tool plugins

And even with those permissions your server must be configured to allow the use of plugins.
>>

Test plan :
1) Install kitchen sink plugin https://github.com/bywatersolutions/koha-plugin-kitchen-sink
2) Run misc/devel/install_plugins.pl
3) Set config enable_plugins=1
4) Check all parts of the plugin are working
5) Set config enable_plugins=0
6) Check all parts of the plugin are disabled

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-26 11:42:02 +00:00
e87908078f
Bug 24878: Add auth check for copy-holidays
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-26 11:35:11 +00:00
d2b2c61ff9
Bug 24878: Add authentication checks to the calendar tool
There is a security hole in 2 scripts that are used by the UI to edit
holidays.

To test:
1) Go to Tools -> Calendar, for Centerville
   Check no holiday for 30/4/2020
2) To add a new holiday without login execute
   a curl command with necessary parameters
3) Reload page from 1), verify the new holiday
   edit and delete the holiday
4) Apply the patch
5) Do 2) again, this time you get a lengthy output,
   with the magic words:

   <title>Koha &rsaquo;
       Log in to Koha
   </title>

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-26 11:35:00 +00:00
7e1be8d385
Bug 20443: Use search_with_library_limits for attribute types
Dealt with that previously in the module during the rebase.
It conflicted with bug 23281.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-23 13:49:22 +00:00
e37bfe3e4b
Bug 20443: Remove extended_attributes_code_value_arrayref AND C4::Members::Attributes
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-23 13:49:22 +00:00
37e634bb5b
Bug 20443: Remove C4::Members::AttributeTypes
We do no longer need this package, we can use
Koha::Patron::Attribute::Types directly instead.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-23 13:44:41 +00:00
f1d210019b
Bug 20443: Move C4::Members::AttributeTypes::GetAttributeTypes to Koha::Patron::Attribute::Types
We can then now start to move methods from C4::Members::AttributeTypes
as well.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-23 13:44:35 +00:00
ccfc6572f7
Bug 20443: Remove UpdateBorrowerAttribute and SetBorrowerAttributes
This patch replace Koha::Patron->get_extended_attributes with
->extended_attributes
It's now a getter a setter method.

It permits to replace UpdateBorrowerAttribute and use
create_related from DBIx::Class

Notes:
* We face the same variable names difference than in a previous patch
(value vs attribute)

Bug 20443: Remove SetBorrowerAttributes

squash  + RM get_extended_attributes

 RM get_extended_attributes

SQUASH Bug 20443: Remove UpdateBorrowerAttribute and SetBorrowerAttribute

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-23 13:44:16 +00:00
a1e3a79913
Bug 20443: Remove DeleteBorrowerAttribute
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-23 13:44:12 +00:00
9707167a48
Bug 20443: Move GetBorrowerAttributes to Koha::Patron->extended_attributes
The GetBorrowerAttributes subroutine return the attributes for a given
patron.

Using get_extended_attributes we can acchieve it easily. The problematic
here is to restore the method's name (value vs attribute,
value_description vs description of the authorised value, as well as
display_checkout that should not be a method of Attribute, but
Attribute::Type instead)

value_description was used when the attribute types were attached to an
authorised value category. To avoid the necessary test in template and
controller there is now a $attribute->description method that will
display either the attribute's value OR the value of the authorised
value when needed. We should certainly use this one from few other
places.

Notes:
* This patch rename Koha::Patron->attributes with Koha::Patron->get_extended_attributes.
It will be renamed with Koha::Patron->extended_attributes in ones of the next
patches when it will become a setter as well.
* GetBorrowerAttributes did not care about the library limits, we still
do not
* The opac_only flag was not used outside of test, we drop it off.
* To maintain the existing behavior we add a default order-by clause to
the search method [code, attribute]
* From C4::Letters::_parseletter we always display the staff description
of the AV, There is now a FIXME to warn about it
* FIXMEs are not regressions, existing behaviors must be kept
* TODO add a new check to bug 21010 to search for inconsistencies in
patron's attributes attached to non-existent authorised values
* One test has been updated in Modifications.t, order_by is now
by default set to ['code', 'attribute']

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-23 13:39:25 +00:00
9b9b641ac8
Bug 23463: Replace a new occurrence of ModItem
This new script have been pushed just before 23463.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-23 10:37:29 +00:00
de9ce93cf2
Bug 23463: Fix safe_return return value in deletion tools
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-23 09:26:33 +00:00
cc6f25fec4
Bug 23463: (follow-up) Remove DelItemCheck and ItemSafeToDelete
Wrong replacement in additem.pl

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-23 09:26:33 +00:00
a3687711b0
Bug 23463: Remove DelItemCheck and ItemSafeToDelete
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-23 09:26:31 +00:00
bbb504c86f
Bug 23463: Replace ModItem with Koha::Item->store
Starting to replace the ModItem calls with Koha::Item->store

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-23 09:26:30 +00:00
cb8895a5fd
Bug 24846: Update items.onloan with the new due date
Signed-off-by: Donna Bachowski <donna@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-19 08:56:38 +00:00
c7084c4c27
Bug 24846: Add new tool to batch extend due dates
With events sometimes leading to unforeseen branch closures (think Coronavirus as
an example), it would be helpful to have a tool that would allow librarians to
update due dates in bulk based on branch and current due date of the material.

It allows to select checkouts given the following parameters:
 * libraries
 * patron's categories
 * range of the due date

You can set a hard due date, or define a number of days to extend the
due date.

Test plan:
Check some items out
Use the new tool to extend the due dates
Test the different filters to make sure they all work

Note: What about holidays?

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-19 08:56:38 +00:00
Aleisha Amohia
f0c031670e
Bug 18127: Add batch modified records to an existing list
To test:
1) Start by having no (zero) lists
2) Go to Tools -> Batch record modification
3) Go through the batch record modification process, confirm everything
works as normal and there is a link to do a new batch record
modification at the end
4) In another tab, go to Lists and create a new list
5) Go back to the first tab and start a new batch modification process
6) At the end of the process, there should be a new option to add
modified records to an existing list
7) Select a list from the dropdown and confirm you are able to save your
modified records to the list as expected
8) Start a new batch modification process, this time for authorities
records
9) At the end confirm there is no option to add modified records to a
list, because authorities cannot be added to lists

Sponsored-by: Catalyst IT
Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-10 15:20:18 +00:00
a28e1928d3
Bug 21746: Remove NO_LIBRARY_SET
NO_LIBRARY_SET was used when the DB user was logged in. Since bug 20489
it's not longer possible. We could remove the code.

One occurrence left in C4::InstallAuth as there is no (real) logged in user yet.

Test plan:
* Install Koha to make sure NO_LIBRARY_SET is not needed during the
install process
* Login into Koha
* Make sure the your library's name is displayed correctly in the header
* Set another library
* Confirm that the library's name is updated

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No problem during install, nor changing library.
Fixed (pre-existing) tab in circ/branchtransfers.pl
No errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-02 10:20:42 +00:00
7d8b96803f
Bug 24545: Fix license statements
Bug 9978 should have fixed them all, but some were missing.
We want all the license statements part of Koha to be identical, and
using the GPLv3 statement.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-24 13:31:26 +00:00
Aleisha Amohia
c42097685d
Bug 14647: (follow-up) Changes to script
This patch adds the necessary changes to the script so that the filename
extensions works for exporting authorities.

To test:
1) Attempt to export with all filetypes for biblios and authorities
2) Confirm the extension for the exported file (after clicking the
    Export button) is correct for each one

Sponsored-by: Catalyst IT
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-20 08:59:31 +00:00
6d55462f1b
Bug 24051: Remove "search( %condition ) is deprecated" warning from batchMod.pl
Test plan:
Go to Home › Tools › Batch item modification
Insert barcodes and continue
=> Without this patch you will get warning in the log
=> With this patch applied you warning does no longer appear
Confirm that the number of holds is correct

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-19 11:29:25 +00:00
82716a0172
Bug 23084: Replace grep {^$var$} with grep {$_ eq $var}
We certainly faced 3 similar bugs due to this syntax: bug 23006, bug
22941 and bug 17526.

To prevent other issues related to this syntax this patch suggests to
replace them all in one go.

Test plan:
Confirm that the 2 syntaxes are similar
Eyeball the patch and confirm that there is no typo!

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-17 10:44:45 +00:00
David Roberts
0cdd62600b
Bug 20847: Add more fields to the Batch Patron Modification tool
This patch adds streetnumber, address, address2, phone and mobile to the
Batch Patron Modify form, also moves Primary email to a more logical
place on the page

To test:

1) Install patch
2) Open Batch Patron Modification tool, and input a borrowernumber to
edit
3) Add some data into the streetnumber, address, address2, phone and
mobile fields and click Save
4) These fields in the user record should now contain your data
5) Test that running the tool again with the option to delete the data
clears the fields correctly
6) Repeat steps 1-5 with a file of user borrowernumbers

Signed-off-by: Daniel J <daniel.jones@cheshiresharedservices.gov.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-29 09:07:33 +00:00
12b8c3ac1e
Bug 23856: Split author and ISBN/ISSN out of citation in staged MARC record management
This patch modifies the way data is passed to the staged MARC record
management template, splitting author, ISBN, and ISSN out of the
"citation" variable and passing them separately.

The DataTables configuration for the staged MARC record management page
is modified so that those now-separate variables are conditionally
displayed.

Unrelated minor change: Added a class to the MARC preview modal so that
it displays wider.

To test, apply the patch and view the "Staged MARC management" page for
both batches of bibliographic records and batches of authority records.

In each case the title or authority heading should be displayed as a
link while author, ISBN, and ISSN (if any) should not.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-29 09:06:59 +00:00
David Roberts
417e76d7e0
Bug 19793: Add a field for email in batch patron modification
This adds the email field to the patron batch modification tool.

To test:

1) Install patch
2) Open Batch Patron Modification tool, and input a borrowernumber to edit
3) Add some data (e.g. test@foobar.com) into the Email address field, and click Save
4) The Primary Email address in the user record should now contain your email address
5) Test that running the tool again with the option to delete the data clears the field correctly
6) Repeat steps 1-5 with a file of user borrowernumbers

Sponsored-by: PTFS Europe
Signed-off-by: Sal <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-21 11:37:15 +00:00
eaee34f47a
Bug 24018: Remove die "Not logged in"
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-20 14:03:49 +00:00
eb4a843ace
Bug 24423: Add biblionumber to modify items link
To test:
- Find/create a bib with at least one item
- From detail.pl, use the checkboxes in the holdings table to select one or more items
- click the "Modify Selected Items" link just above the holdings table to take your item(s) to batch modification
- Change something and click save
- Observe that the Return to the Record link points to a url without a biblionumber: "/cgi-bin/koha/catalogue/detail.pl?biblionumber="
- Apply patch
- Repeat
- The link now works!

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

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

Bug 24423: Fix for deletion - cleanup accidental debug inclusiopm

To test:
Repeat prior test plan with 'Delete selected'

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-20 14:03:49 +00:00
909caec446
Bug 10352: Get add operations too
When an add for biblio or item is recorded there is no space in the info field

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-10 08:37:19 +00:00
3d99d21a2f
Bug 10352: Use a new object_type parameter instead of the module's name
To dissociate a search on biblio and item, we pass a new "object_type"
parameter to viewlog.pl. If equals 'biblio' we will assume that "object"
contains a biblionumber

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-10 08:36:37 +00:00
602d9c836b
Bug 10352: Display the correct modification logs for bibliographic records
The 'Modification log" link in the cataloguing module returns confusing
results. The 'object' parameter is the biblionumber, but the all log
from itemnumber=biblionumber will be displayed as well.
Since bug 11473 we have the action_logs.info column that is prefixed by
'item ' or 'biblio ' to disociated an item modification from a biblio
modif.
This patch suggests a quick and dirty approach, use this column to make
sure we are searching for the correct logs.
/!\ As bug 11473 did not update the existing rows, we will no longer display
the logs created prior to this change.

Test plan:
Make sure you have at least 2 bibliographic records with some items
Make sure you have the biblionumbers of those records that match
existing itemnumbers
Edit them (no matter what you change)
Go to the bibliographic detail page (staff) and click "Modification log"
You should see the correct changes.

Signed-off-by: hc <hc@interleaf.ie>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-10 08:30:10 +00:00
Alex Arnaud
ae5728020a
Bug 21959: allow only i and g regex modifiers
Signed-off-by: Mathilde Formery <mathilde.formery@ville-nimes.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-08 14:36:05 +00:00
Alex Arnaud
6fb8b680c0
Bug 21959: Batch item modification - ability to apply regular expression on text fields
Test plan:
  - go to Tools > Batch item modification,
  - select items to modify,
  - for one or some text fields, check the second checkbox (Use regular
    expression) and type your regex,
  - check the regex has been applied.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Mathilde Formery <mathilde.formery@ville-nimes.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-08 14:35:50 +00:00
f8030195f7
Bug 23800: (QA follow-up) Remove useless line
The lines with my @barcodes makes no sense anymore.

Test plan:
Test with a barcode file.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-12-13 15:28:05 +00:00
8da531afc3
Bug 23800: (QA follow-up) Fix item case, reduce code
The solution for items does not work, since it compares barcodes.
Instead of a grep in a map, we could do simpler.

Test plan:
Try barcode file, order not by itemnumber. Toggle with case. Add wrong code.
Try same via barcode list text area.
Try an itemnumber file, reorder again. Add wrong number.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-12-13 15:27:51 +00:00
73870efdb7
Bug 23800: Does not order items by barcode in batch item modification
They must be displayed in the same order they have been scanned (or they
appear in the file)

This is an alternative patch. Same behavior for barcodes or itemnumbers,
as well as if a file has been used or items scanned.
Code is duplicated, but refactoring is out of the scope.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-12-13 15:27:26 +00:00
5d94cbefdc
Bug 23987: "return to cataloguing" if the record is deleted from bachMod-del
If a bibliographic record is deleted after having deleted all their items in a batch,
we should not display a "return to the record" button but "return to cataloguing" instead

Test plan:
1 - Have/make a bib with items
2 - On details page select Edit->Delete items in a batch
3 - Select all items and check "Delete record if no items remain"
4 - Delete the things
5 - On confirmation screen you have a count of items/bibs deleted
=> Without the patch there is a 'Return to record' button that leads to nowhere
=> With this patch there is a "Return to cataloging module" button
6 - Repeat using the "Delete selected items" link on top of the items table
=> Without the patch there is a 'Return to where you were' button that leads to nowhere
=> With this patch there is a "Return to cataloging module" button

Note that there is a link AND a button, coming from
  commit 928c0af2b6
  Bug 15824 - 'Done' button is unclear on batch item modification and deletion
I do not think it makes sense to have both.

Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-12-09 14:31:13 +00:00
Bin Wen
e0a9cbd8a4
Bug 23762: Editing is_html status of email template fails under multi-languages
To test:
1.Enable multi-languages
2.Set the preference 'TranslateNotices' on  'Allow'
3.Go to: tools==>Notices & slips==>Edit (one notice)
4.Click on the "Email" in the Default, uncheck the checkbox for 'HTML Messages'.
5.Save
6.Reopen the notice, nothing changed.
7.Apply the patch
8.Repeat the steps 4 and 5
9.Success.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-11-03 07:34:52 +00:00
237b86006b
Bug 22996: Move barcode separators to a preference
This patch makes batchMod.pl and inventory.pl pick the barcode
separators from a new pref BarcodeSeparators (instead of hardcoding
these separators differently).
A few other code locations may be potential candidates for such a change
too.

Test plan:
Test inventory with a few variations of BarcodeSeparators.
Test Batch item modification similarly.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-09-10 09:34:34 +01:00
109334102f
Bug 14570: Make it possible to add multiple guarantors to a record
This patch adds the ability to set an unlimited number of guarantors
for a given patron. As before, each guarantor may be linked to another
Koha patron, and all the behavior that applies to a given guarantor
remains the same.

Test Plan:
 1) Apply this patch
 2) Run updatedatabase.pl
 3) Find some patrons with guarantors, verify the still have their guarantor
 4) Test adding and removing guarantors on a patron record, both Koha users and not
 5) Verify the "Add child" button works
 6) Verify NoIssuesChargeGuarantees still works
 7) Verify tools/cleanborrowers.pl will not delete a guarantor
 8) Verify the guarantors are displayed on moremember.pl
 9) Verify the guarantor is removed by members/update-child.pl
10) Verify the guarantor is removed by misc/cronjobs/j2a.pl
11) Verify import patrons converts guarantor_id, relationship, contactfirstname,
  and contactsurname into a guarantor
12) prove t/Patron.t
13) prove t/db_dependent/Circulation.t
14) prove t/db_dependent/Circulation/NoIssuesChargeGuarantees.t
15) prove t/db_dependent/Items.t
16) prove t/db_dependent/Koha/Patrons.t
17) prove t/db_dependent/Members.t
18) prove t/db_dependent/Patron/Relationships.t

Signed-off-by: Kim Peine <kmpeine@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-08-20 16:04:48 +01:00
Aleisha Amohia
2071fa4aca
Bug 22799: Avoiding batch item modification case sensitivity when entering barcodes
Note: this fixes the bug that is present right now where batch item
modification barcode matching is case sensitive, but if Koha barcodes
ever do become case sensitive, this patch will need to be removed.

To test:
1) Make/use an item with a barcode with letters in it. For testing
purposes, I'll be using an item with the barcode 'abcde'.
2) Go to Tools -> Batch item modification and enter this barcode in the
barcode list text input field, but change the case of one or some
letters. (i.e. enter the barcode in the field as 'abCDE')
3) Click Continue
4) Notice that the next page shows an error 'the following barcodes were
not found', but the item still shows underneath (was correctly fetched from database).
5) Create a text file and put the changed-case barcode in it (i.e. put
the barcode 'abCDE' in the text file)
6) Go back to batch item modification and upload the
text file as a barcode file
7) Notice same error as in Step 4
8) Apply patch and refresh page
9) Run through steps 1 to 6. There should no longer be an error and the
barcodes should be found as expected.

Sponsored-by: South Taranaki District Council
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Donna Bachowski <donna@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-08-16 11:44:10 +01:00
5c2daf28a5
Bug 13552: (follow-up) Add debar option to batch patron modification
As per test feedback I've changed wording from debarrment to restriction

Added insertion into the borrower_debarments table and removal from
borrower_debarments table (and borrowers.debarred and
borrowers.debarredcomment) when either 'Restriction
expiration' or 'Restriction comment' are ticket to be disabled/deleted.

Test plan (please follow this instead of following test plan in the
first patch):

1. Go to Tools > Batch patron modification

2. Input the cardnumbers of several (undebarred/unrestricted) patrons
and submit

3. Notice there is no input for setting Restriction expiration date or
Restriction comment

Also notice in the list of matching borrowers at the top of the page
there is no display of the 'Restriction expiration' or 'Restriction
comment' values for the patron

4. Apply patch

5. Restart memcached and plack

6. Refresh the page notice 'Restriction expiration' (a date picker
input) and 'Restriction comment'are now input options

Also notice in the table at the top of the page 'Restriction
expiration' and 'Restriction comment' are shown on the far right of the table (you may need
to scroll to see this)

7. Pick a date in the 'Restriction expired' datepicker and write in text into
the 'Restriction comment' field and submit

8. Notice in the next loaded page the selected patrons have the
'Restriction expiration' and 'Restriction comment' values you entered

9. Query the borrower_debarments database table and check that the new
debarments are added to this table

10. Go back to the Batch patron modification page and re-input the same
cardnumbers

11. Write text into the 'Restriction comment' field and don't pick a
'Restriction expiration' value and submit

12. Notice in the next loaded page the selected patrons have the
'Restriction expiration' value of 9999-12-31 and 'Restriction comment'
value you just entered

13. Query the borrowers table and notice the borrowers.debarred value
for the modified patrons is '9999-12-31' and the
borrower.debarredcomment is what you inputted in step 11

14. Query the borrower_debarments table and notice the expiration value
is NULL and the comment value is set to what you entered in step 11

Also note the addition of the new debarment has not removed the existing
debarment on the patrons

15. Click on the cardnumber link of one of the patrons and notice the red
text on their patron account page informing you they are restricted
until the date you set

16. In the Koha home directory enter Koha shell:
sudo koha-shell <instancename>

17. Run: prove xt

18. All tests should pass

19. Repeat step 10 and tick the checkbox beside the 'Restriction
expiration' field and submit

20. In the next loaded screen notice the 'Restricted expiration'and
'Restricted comment' are empty

Check the borrower_debarments table and notice all restrictions for the
patron are removed.

Check the borrowers table and notice the debarred and debarredcomment
fields are empty for the patrons

21. Repeat steps 10 and 11 to make a new restriction

22. Repeat step 19 and this time check the 'Restriction comment' field
and submit and observe that also clears the restriction in the next
loaded page, in the borrower_debarments and borrowers table

23. Sign off

Sponsored-By: Brimbank Library, Australia
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-08-13 11:49:43 +01:00
c6775396c5
Bug 13552: Add debar option to batch patron modification
Test plan:
1. Go to Tools > Batch patron modification

2. Input the cardnumbers of several (undebarred/unrestricted) patrons and submit

3. Notice there is no input for setting a debarred until (restriction
expiration) date or debar comment

Also notice in the list of matching borrowers at the top of the page
there is no display of the debarred or debarredcomment values for the
patron

4. Apply patch

5. Restart memcached and plack

6. Refresh the page notice 'Debarred till' (a date picker input) and
'Debarred comment' are now input options

Also notice in the table at the top of the page  'Debarred till' and
'Debarred comment' are shown on the far right of the table (you may need
to scroll to see this)

7. Pick a date in the 'Debarred till' datepicker and write in text into
the 'Debarred comment' field and submit

8. Notice in the next loaded page the selected patrons have the
'Debarred till' and 'Debarred comment' values you entered

9. Click on the cardnumber link of one of the patrons and notice the red
text on their patron account page informing you they are restricted
until the date you set

10. In the Koha home directory enter Koha shell:
sudo koha-shell <instancename>

11. Run: prove xt

12. Confirm all tests pass

13. Sign off

Sponsored-By: Brimbank Library, Australia
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-08-13 11:49:32 +01:00
Ere Maijala
a1a05db1b6
Bug 11529: Add templates for biblio title display. Unify display.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-08-05 15:03:19 +01:00
Ere Maijala
ee44dce285
Bug 11529: Clean up subtitle usage
Unify and clean up subtitle usage so that it's always used as a simple array and not the old hash structure.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-08-05 15:03:18 +01:00