Jonathan Druart [Wed, 5 Apr 2017 20:04:36 +0000 (17:04 -0300)]
Bug 18403: Use patron-title.inc when hidepatronname is used [SPECIFIC for issuehistory]
On this page we do not have the patron object sent to the template,
let's pass it!
Test plan:
Go on the checkout history of a bibliographic record
(catalogue/issuehistory.pl)
You should not see patron's information that are not part of your group
if you
are not allowed to see them.
Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Wed, 5 Apr 2017 19:43:41 +0000 (16:43 -0300)]
Bug 18403: Use patron-title.inc when hidepatronname is used
There is already a HidePatronName syspref to hide patron's information
on bibliographic
record detail pages and the hold list.
Test plan:
With the HidePatronName enabled, make sure the patron's information are
hidden from
the catalogue and hold list pages. If the logged in user is not allowed
to see the
patron's info, no link and no cardnumber will be displayed
With he HidePatronName disabled, make sure the patron's information are
displayed
if the logged in user is allowed to see the patron's info.
Technical note:
This patch improves the existing patron-title.inc include file to
display patron's
information. Using it everywhere patron's details are displayed will
permit to
homogenise the way they are displayed. The file takes now a patron
object (what
should be, in the future, the only way to use it), that way we can call
the new
method on it to know if patron's information can be shown by the logged
in used.
NOTE: I am not sure this syspref makes sense anymore. Should not we
remove it?
Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Wed, 5 Apr 2017 17:11:02 +0000 (14:11 -0300)]
Bug 18403: Only display libraries from group in dropdown lists
From where patrons it's about patrons, we do not want to display the libraries
from all the system, but only the ones from the group.
Test plan:
- See the overdues (circ/overdue.pl) and make sure you can only see overdues from
patrons part of your group (do not forget to test the CSV export).
- Search for patrons, the 'library' filters (headers and left side) should only
display libraries from your group
- Search for article request by patron's library: only the libraries from your
group should be displayed
Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Wed, 5 Apr 2017 16:19:42 +0000 (13:19 -0300)]
Bug 18403: Adapt patron search
This patch modifies the patron search code to limit the libraries to the
ones
the logged in user is allowed to access
Test plan:
Search for patrons
You should not see patrons you are not allowed to see.
Technical note:
I am really glad to have refactored all the patron searches before
having to
write this patch. It tooks me ~40 l to acchieve this job and affect all
patron searches.
Thanks refactoring!
Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Tue, 4 Apr 2017 21:48:45 +0000 (18:48 -0300)]
Bug 18403: Add sub output_and_exit_if_error - unknown_patron & cannot_see_patron_infos
Test plan:
Login with a patron that is not allowed to see patron's information for patrons
outside of his group. Try to access patron's information from scripts of the patron
module (members/*) and circ/circulation.pl.
You should be able to access patron's information of patrons outside of your group
and get "You are not allowed to see the information of this patron."
If you try and access a patron page with a borrowernumber that does not exist, you
should get "This patron does not exist"
Technical note:
A new C4::Output subroutine is created in this patch: "output_and_exit_if_error"
Executed at the beginning of the script it will permit not to copy/paste all the
different checks to know if the logged in user is authorised to see patron's information.
The design here can be discussed, but I did not find an alternative with as less changes.
On the way I refactor what we did with 'unknowuser' previously: it will now work with all
patron pages, not only the few that used it.
Note that the 'or die "Not logged in";' part should not be needed, but... who trusts
C4::Auth?
I think it could be used as a safeguard later. I am willing to sed and remove them
if required.
Changes in discharge.pl are mainly indentation changes.
With this patch we should now have a $patron variable that refer to the patron we
want to access. That will be very useful to remove plenty of code in members/* and
only pass this variable to the template (instead of 1 variable per patron's attribute).
Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Test plan:
Login with a patron that only have the 'edit_borrowers' permission.
You should be able to access patron's information of patrons inside of your group.
Technical note:
Before this patchset the borrowers permission module contains only 1 permission 'edit_borrowers'.
That meant
borrowers => 1
and
borrowers => '*'
had the same behavior.
Moreover, now that we have 2 permissions, 'CAN_user_borrowers' is set when all
permissions of 'borrowers' are set.
We need to update the different occurrences of these tests.
Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Thu, 6 Apr 2017 19:10:18 +0000 (16:10 -0300)]
Bug 18403: Add new method Koha::Patron->can_see_patron_info
Technical note:
This is the method that will be called on the logged_in_user variable sent to
the template. Moreover we will check that the logged in user can access patron'
information when access to members/* and some circulation scripts will be done.
Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Tue, 4 Apr 2017 19:43:58 +0000 (16:43 -0300)]
Bug 18403: Send logged_in_user to template from C4::Auth
Technical note:
To ease future changes we are passing a logged_in_user variable to templates.
It contains the Koha::Patron object representing the logged in patron.
This will be very useful for this patch and even after (for instance we will be
able to replace easily loggedinusername and loggedinusernumber).
Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Thu, 6 Apr 2017 19:10:02 +0000 (16:10 -0300)]
Bug 18403: Add new method Koha::Library::Group->has_child
This is more a follow-up for bug 15707. It could be moved on its own bug report
if necessary.
IMPORTANT NOTE: At the moment the feature only works for 1 level depth, see
bug 15707 comment 166+ for the discussion
It means that if we have:
root_group
+ groupA
+ groupA1
+ groupA1_library2
+ groupA_library1
+ groupA2
+ groupB
+ groupB_library1
groupA1_library2 is not considered a child of groupA1.
Note that this can change.
Test plan:
prove t/db_dependent/LibraryGroups.t
should return green
Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Tue, 4 Apr 2017 19:01:41 +0000 (16:01 -0300)]
Bug 18403: Hide patron information if not part of the logged in user library group
This patchset adds a new feature that will allow libraries inside a
single Koha installation to restrict access to information of patrons
that
The group of libraries feature is introduced by bug 15707, see this bug for more
information.
Let's imagine that 2 groups G1 and G2 are defined and that they include 2 libraries
each G1a, G1b and G2c, G2d: logged in users attached to G1a will only see patron's
information from G1a and G1b.
To add more flexibility, a new user permission named 'view_borrower_infos_from_any_libraries'
will drive this behavior. If set, the patron will be able to see patron's information
of any libraries.
If the restriction is set, the logged in user will not be able to search, show, edit,
delete patron's information of patrons attached to groups of libraries outside his
own group.
In situations we need to refer to a patron, for holds and checkouts for instance,
and his information cannot be viewed, a text "A patron from library G1A" will be
displayed.
Considered unecessary or outside the scope of this bug report:
* The report module is not affected by this feature for obvious reasons
* The firstname and surname of guarantors, basket (acq) managers, patrons linked
to orders are still displayed.
* Log viewer: Can only be staff
* patron list: you cannot add patrons from another group of librairies, but can
see/delete from list (too much rewrite, or we can test for patron one by one?).
* "Patron card creator" tool is not impacted by this feature.
* Upload patron images is not impacted by this patch, should it be?
* Tools:
- Upload patrons
- Clean borrowers tool (This can can done easily updating Koha::Patrons->search
with Koha::Patrons->search_limited in search_upcoming_membership_expires and
search_patrons_to_anonymise but we will need to move GetBorrowersToExpunge to
Koha::Patrons first)
We can discuss these different points but will be other bug reports not to add
more complexity to this first patchset.
Test plan:
You will find a test plan in the following commit messages.
Start by creating different group of libraries and patrons with and without the
new permission. Open different browser sessions to ease the tests.
Note that all patches have to be applied to test the different test plans.
Technical notes:
For QAers (and others) a techical note will be added to the commit messages of this
patchset. I would recommend you to read them one by one to understand the different
steps of this development.
+ Special attention should be payed to the REST api changes
+ Should we restrict the logged in user to libraries from his group when
he wants to set his library (Home › Circulation › Set library)?
Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Wed, 22 Jun 2016 17:10:23 +0000 (17:10 +0000)]
Bug 16735: Migrate library search groups into the new hierarchical groups
Test Plan:
1) Apply this patch set
2) Note your existing search groups have been ported over to the new
__SEARCH_GROUPS__ group if you had any
3) Create the group __SEARCH_GROUPS__ if one does not already exist
4) Add some first level subgroups to this group, add libraries to those groups
5) Search the library group searching in the intranet and opac
6) Note you get the same results as pre-patch
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Thu, 23 Jun 2016 13:24:54 +0000 (13:24 +0000)]
Bug 16735: Clean up sample data
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Thu, 23 Jun 2016 11:44:15 +0000 (11:44 +0000)]
Bug 16735: Remove tables no longer needed
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Wed, 22 Jun 2016 18:28:03 +0000 (18:28 +0000)]
Bug 16735: Remove modules no longer needed
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Fri, 5 Feb 2016 06:53:20 +0000 (06:53 +0000)]
Bug 15707: Unit Tests
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Sun, 31 Jan 2016 11:22:51 +0000 (11:22 +0000)]
Bug 15707: Add library groups editor
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Sun, 31 Jan 2016 11:22:19 +0000 (11:22 +0000)]
Bug 15707: Add Koha::Library::Group(s) modules
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Sun, 31 Jan 2016 11:21:00 +0000 (11:21 +0000)]
Bug 15707: Update DB
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Liz Rea [Wed, 13 Dec 2017 02:14:58 +0000 (15:14 +1300)]
Bug 19801: Display messages on user details page as well as on check out page
To test:
Look up a borrower, add a message (internal or opac)
Click the Details tab for that borrower
Messages should be displayed above the user information [is this the right place? it could go below]
adding messages on this page should make them immediately available
deleting messages on this page should delete them immediately and bring you back to the detail page.
Basically, make sure messages work from both the Check out and detail pages and that there are no typos.
Messages should work the same as they always have from the Check Out page.
sponsored-by: Catalyst IT Signed-off-by: Simon Pouchol <simon.pouchol@biblibre.com> Signed-off-by: Marjorie Vila <marjorie.barry-vila@collecto.ca> Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Bug 19801 - Fixes for QA
- Fixes indentation
- changes messages to patron_messages (even though it's not like that on the circulation page.)
Signed-off-by: Marjorie Vila <marjorie.barry-vila@collecto.ca> Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Owen Leonard [Thu, 4 Jan 2018 14:16:42 +0000 (14:16 +0000)]
Bug 10032: (follow-up) Move title attribute to button container
This patch modifies the "Close basket" button markup so that the title
attribute on a disabled button is added to the button wrapper <div>
instead of the <a> tag. This allows the title attribute tooltip to
appear when the cursor is hovered over the button.
To test, follow the original patch's test plan and confirm that when the
"Close basket" button is disabled, hovering the mouse over the button
triggers the title attribute tooltip.
Signed-off-by: Charlotte Cordwell <charlotte.cordwell123@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Jon Knight [Tue, 12 Dec 2017 17:50:36 +0000 (17:50 +0000)]
Bug 10032: Improve GUI when uncertain price prevents closing the basket
Added disabled "Close this basket" button when uncertain
prices are present.
Note that whilst this has a "title" attribute, there is no tooltip
shown because JQueryUI disabled buttons don't get DOM events.
Owen Leonard [Wed, 7 Feb 2018 17:42:09 +0000 (17:42 +0000)]
Bug 20156: Display a markup for the current language in header menu
This patch replaces Glyphicon markup with Font Awesome markup so that a
check mark appears next to the currently-selected language in the staff
client header's language menu.
Also changed in this patch: Some classes have been removed because they
are not used in staff client CSS.
To test you must have multiple languages installed and enabled in the
staff client.
- Set the StaffLangSelectorMode system preference to "top" or "both top
and footer"
- Confirm that the currently-select language in the langauge menu has a
check mark next to it.
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Bug 20134: Remove /api/v1/app.pl from the generated URLs
This patch removes the /api/v1/app.pl prefix from generated baseUrl.
It has the consequence of hardcoding / as the base path for the API.
This is ok because we don't currently support mounting Koha pieces in
different than hardcoded paths (/cgi-bin/koha?), but certainly worth
mentioning because this will need to depend on a syspref or config entry
when someone chages this behviour.
To test:
- On master, point your browser to:
http://kohadev.mydnsname.org:8080/api/v1/
=> FAIL: basePath looks like /api/v1/app.pl/api/v1
- Apply this patch
- Restart memcached and plack:
$ restart_all
or
$ sudo systemctl restart memcached && sudo systemctl restart
koha-common
- Reload http://kohadev.mydnsname.org:8080/api/v1/
=> SUCCESS: basePath is /api/v1
- Sign off :-D
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Kyle M Hall [Thu, 22 Dec 2016 15:42:30 +0000 (15:42 +0000)]
Bug 12904: Apache configuration
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Victor Grousset [Wed, 10 Jan 2018 15:07:36 +0000 (16:07 +0100)]
Bug 19928: Acquisitions' CSV exports now honors syspref "delimiter"
Bonus fixes:
- Basketgroup: there was an unnecessary space.
" RRP tax excluded" replaced by "RRP tax excluded"
- Late orders:
- leading spaces before every line
- surrounding spaces for [% orders.size %]
Other changes:
- quoted "Total orders in late" to no worry about additional spaces
- Late orders: additional spaces which shouldn't be a problem because
all the fields are enclosed by quotes.
Test plan:
1. Set syspref "delimiter" to "#'s"
2. Change the language e.g. FR-fr
3. Create a vendor with minimal info
4. Create a basket with two items
5. Go to the basket. URL should be
/cgi-bin/koha/acqui/basket.pl?basketno=XXXXX
6. Close this basket
7. "Export as CSV"
8. You should see that the file contains commas "," This is the bug.
Leave the file open for future comparison to ensure that there are
no regressions.
9. Create a basket group with two baskets
(tick the close this basket group check box)
10. Go to the "Closed" tab to see your basket group
11. "Export as CSV"
12. You should see that the file contains commas "," This is the bug.
Leave the file open for future comparison to ensure that there are
no regressions.
13. Go to /cgi-bin/koha/acqui/lateorders.pl
14. Tick two orders. Of the same vendor, otherwise Koha won't let you tick
orders of different vendors.
15. "Export as CSV"
16. You should see that the file contains commas "," This is the bug.
Leave the file open for future comparison to ensure that there are
no regressions.
17. Apply this patch
18. Translation stuff
1. cd misc/translator
2. perl translate update YOUR_LANG
3. manually edit the po file, remove the fuzzy tags.
And translate the string. You can just copy the original and
replace some parts by gibberish.
4. perl translate install YOUR_LANG
19. Re-export the same CSVs and compare with the original version to check that
- delimiter syspref is honored
- the headers are translatable
- there is no whitespace regression (additional newlines or spaces)
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pasi Kallinen [Fri, 2 Feb 2018 07:45:42 +0000 (09:45 +0200)]
Bug 20124: Make "Save configuration" translatable on "did you mean?" config
When saving the "Did you mean?" setting, a popup with the
message "Successfully saved configuration" is shown, but
it cannot be translated. Make it translatable.
Test plan:
1) Go to Home -> Administration -> Did you mean?
2) Change the settings, click on "Save configuration"
3) Popup with "Successfully saved configuration"
4) Apply patch, update po-files, etc.
5) Check that the msgid "Successfully saved configuration"
is in fi-FI-staff-prog.po, and translate the message
6) install the fi-FI language
7) Change your UI language to finnish
8) Repeat 1, 2, 3. You should now see the same popup
message translated.
Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> Signed-off-by: Roch D'Amour <roch.damour@inlibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pasi Kallinen [Wed, 31 Jan 2018 09:11:56 +0000 (11:11 +0200)]
Bug 20110: Adding same user multiple times to same budget
In javascript, using indexOf to test if a number exists in an array
of strings doesn't work, and makes it possible to add the same user
multiple times into the same budget fund.
Make borrowernumber into string and compare that instead.
Test plan:
1) Go to Home -> Administration -> Budgets -> Funds -> Add Fund
2) Add a user to the fund
3) Try to add the same user again to the same fund. No error.
4) Apply patch
5) Do 1, 2, and 3 again. You should now get an error message
saying the user is already in the list.
Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pasi Kallinen [Wed, 31 Jan 2018 06:51:30 +0000 (08:51 +0200)]
Bug 20109: Make "Remove" translatable when adding a fund
When a user has been added to the fund, the link to "Remove" that user
is not translatable.
Test plan:
1) Install language xx-YY
2) Go to Home -> Administration -> Budgets -> Funds -> Add Fund
3) Add a user to the fund
4) Notice how the "Remove" link after the user's name is not translated
5) Apply patch
6) Look in xx-YY-staff-prog.po, and if needed, translate the msgid
"Remove"
7) Update and reinstall the language
8) Do 2 and 3 again. The "Remove" link should now be translated.
Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> Signed-off-by: Owen Leonard <oleonard@myacpl.org>
https://bugs.koha-community.org/show_bug.cgi?id=10209
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
== Test plan ==
1. Have a lost item
2. Go to staff:/cgi-bin/koha/tools/inventory.pl
3. Tick "Optional filters" → "items.itemlost" →
"name of Authorized values for the lost state"
4. Tick "Export to CSV file"
5. Submit
6. Open the CSV
7. Check that the lost item is in the list
8. You should observe that the "Lost status" column is empty for all items
This is the problem
9. Apply this patch
10. Click submit to re-export the CSV
11. Open the CSV
12. Check that the lost item is in the list
13. You should observe that the "Lost status" column now filled with the
expected values.
14. Smile because it works! :D
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Maksim Sen <maksim@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Mon, 22 Jan 2018 15:48:42 +0000 (15:48 +0000)]
Bug 20062: Remove support for Internet Explorer 7 in the staff client
This patch removes JavaScript files which were added to support Internet
Explorer 7. Templates which included the files have been modified
accordingly.
To test, apply the patch and clear your browser cache if necessary.
Perform a catalog search in the staff client and click through to view
one of the search results. The search results navigation menu in the
left-hand sidebar should work correctly.
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Mon, 22 Jan 2018 12:04:33 +0000 (13:04 +0100)]
Bug 20060: Resolve uninitialized warn from Koha::Template::Plugin::Branches
The warn comes from undefined C4::Context->userenv->{branch}.
Can be triggered by calling mainpage.pl when being logged out in staff.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jenny Way [Thu, 18 Jan 2018 02:04:47 +0000 (02:04 +0000)]
Bug 20017: use Modern::Perl in Tools perl scripts
Test plan:
Check that the following files don't contain use strict; use warnings;
and have use Modern::Perl instead.
background-job-progress.pl
batchMod.pl
copy-holidays.pl
exceptionHolidays.pl
holidays.pl
import_borrowers.pl
koha-news.pl
letter.pl
manage-marc-import.pl
newHolidays.pl
overduerules.pl
quotes-upload.pl
quotes.pl
quotes/quotes-upload_ajax.pl
quotes/quotes_ajax.pl
scheduler.pl
stage-marc-import.pl
upload-cover-image.pl
Also the credits have been added to newHolidays.pl
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
https://bugs.koha-community.org/show_bug.cgi?id=20016 Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jenny Way [Thu, 18 Jan 2018 00:56:42 +0000 (00:56 +0000)]
Bug 20015: use Modern::Perl in Serials perl script
Test plan:
Check that use strict; use warnings; doesn't exist in the following
files and use Modern::Perl; is written instead.
acqui-search-result.pl
acqui-search.pl
checkexpiration.pl
reorder_members.pl
routing-preview.pl
routing.pl
serials-collection.pl
serials-edit.pl
subscription-add.pl
subscription-bib-search.pl
subscription-renew.pl
viewalerts.pl
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jenny Way [Thu, 18 Jan 2018 00:40:57 +0000 (00:40 +0000)]
Bug 20013: use Modern::Perl in Reserve perl script
Test plan:
Check the following files that use strict; use warnings; doesn't exist
and use Modern::Perl; is written instead.
modrequest.pl
modrequest_suspendall.pl
placerequest.pl
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>
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Test Plan:
Check the following files have been updated from
use strict;
use warnings;
to
use Modern::Perl;
400.pl
401.pl
402.pl
403.pl
404.pl
500.pl
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Zoe Bennett [Wed, 17 Jan 2018 04:01:01 +0000 (04:01 +0000)]
Bug 19989: Use Koha::Patron::Modifications->delete instead of loop
Test:
1) Make a change to the user in the OPAC
2) In the staff client make sure this is the only request
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>
Mark Tompsett [Tue, 30 Jan 2018 18:22:42 +0000 (18:22 +0000)]
Bug 12932: Check the Perl version even if all modules installed
The description in comment #0 is quite true, because the
scope of the $checkmodule variable is local to just the
module checking. If we change the scope, we can include the
perl check as part of the new scope, and thus properly set
its value.
As Debian Jessie, Stretch and Ubuntu Xenial all have good
versions of Perl by default, the easiest way to test this
is to:
- make sure to have some optional modules not installed.
- change the system preference 'Version' to one just under
the current version in your SQL client.
- modify the version check line to 5.030000
- restart_all and try going to the staff client.
-- This should not inform you that your perl version is bad.
- git reset hard back to origin/master
- apply the patch
- modify the version check line to 5.030000
- change the system preference 'Version' to one just under
the current version in your SQL client.
- restart_all and try going to the staff client.
-- This should trigger the patch, and you should
be informed your perl version is bad.
- git reset hard back to origin/master
- apply the patch
- run koha qa test tools
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>
Pasi Kallinen [Thu, 25 Jan 2018 11:04:09 +0000 (13:04 +0200)]
Bug 11827: Make "Cancel Rating" translatable in jQuery rating plugin
- Make the "Cancel rating" text translatable (and change
capitalization to conform to Koha coding guidelines)
- Improve the two other messages to use formatted strings
instead of concatenation.
- Use the exact same text for the "your rating" text, so it
only appears once in the po-file.
Test plan:
1. See that the "Cancel rating" -text doesn't appear in
po/xx-YY-opac-bootstrap.po
2. Note how there's two versions of the your rating -text
("your rating: %s, " and "your rating:") in the po-file
3. Apply patch
4. Update the xx-YY translation
5. Check the po-file. It should now contain the "Cancel rating"
and a single "your rating: %s, "
6. Translate those texts, and update & install the language.
7. Go to the OPAC detail page of a biblio, and check the
rating texts.
8. Hovering over the rating minus -sign should show the translated
"Cancel rating"
9. Check that the text after the stars is correct with and without
your rating
Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Thu, 18 Jan 2018 14:40:15 +0000 (15:40 +0100)]
Bug 20031: CGI param in list context warn in guided_reports.pl
Resolve warn:
CGI::param called in list context from package CGI::Compile::ROOT::usr_share_koha_shadowclone_reports_guided_reports_2epl line 794, this can lead to vulnerabilities. [NOTE: line number from older Koha version.]
Test plan:
Looking at this change should convince you already. Another look at this
routine in C4/Output.pm would be bonus.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Julian Maurice [Fri, 1 Dec 2017 15:51:16 +0000 (15:51 +0000)]
Bug 19730: (follow-up bug 17196) Use biblio_metadata.timestamp in export_records.pl
Since bug 17196, biblioitems.timestamp is not always updated after a
change in the MARC record.
Filtering should be based on biblio_metadata.timestamp instead.
REVISED TEST PLAN
-----------------
0. Do not apply patch
1. Find a biblio record, remember the biblionumber for step 3
2. Edit the record, modify a field (e.g. 003, 015$q) that is
not mapped to a DB column, so biblio_metadata.timestamp will
be modified but not biblioitems.timestamp
3. In MySQL with the koha database selected:
> select timestamp from biblio where biblionumber=###;
> select timestamp from biblio_metadata where biblionumber=###;
-- you'll need to change the ###'s based on the biblionumber
you remembered in step 1.
-- the two timestamps will differ.
-- Remember the timestamp of biblio_metadata for step 4.
4. Run this command:
$ sudo koha-shell -c bash kohadev
$ export DATE="YYYY-MM-DD HH:mm:SS"
-- use the timestamp remembered in step 3.
5. Run this command:
$ ./misc/export_records.pl --date="$DATE"
$ ls -la koha.mrc
-- the file should be 0 bytes.
6. Run this command:
$ exit
$ git bz apply 19730
$ restart_all
$ sudo koha-shell -c bash kohadev
$ export DATE="YYYY-MM-DD HH:mm:SS"
-- use the timestamp remembered in step 3.
7. Run this command:
$ ./misc/export_records.pl --date="$DATE"
$ ls -la koha.mrc
-- the file should be a lot more than 0 bytes.
8. Run this command:
$ /home/vagrant/qa-test-tools/koha-qa.pl -v 2 -c 1
-- this should pass.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Fri, 2 Feb 2018 11:06:00 +0000 (12:06 +0100)]
Bug 20126: Add simple test for ModBiblioMarc
Just to confirm that we see record length and base address in a record
that has been passed through ModBiblioMarc.
Test plan:
Run the test.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Wed, 31 Jan 2018 12:52:46 +0000 (13:52 +0100)]
Bug 18198: (QA follow-up) Add tests for GetMarcNotes
As requested by the RM, this patch adds a separate unit test
for GetMarcNotes. We test MARC21 and UNIMARC. The NotesBlacklist pref
is tested and also handling URLs in 5XX$u for MARC21.
Test plan:
Run t/Biblio/GetMarcNotes.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Thu, 2 Mar 2017 11:59:37 +0000 (12:59 +0100)]
Bug 18198: MARC21: Further improve handling of 5XX$u in GetMarcNotes
Bug 14306 only handled field 555 in MARC21 as an URI. But a lot of other
5XX fields have a $u subfield for URIs; actually $u is not used in any
other way. This patch generalizes the change made for 555 and extends
it to all 5XX $u.
Test plan:
[1] Run t/Biblio.t
[2] Run t/db_dependent/Biblio.t
[3] Edit a MARC21 record. Add a URL into 505u, 520u, 555u.
[4] Check presentation on opac-detail (tab Title notes)
[5] Check presentation on catalogue/detail (tab Descriptions)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Fri, 19 Jan 2018 19:41:35 +0000 (19:41 +0000)]
Bug 20051: Invalid markup in staff client's header.inc
This patch corrects markup errors in header.inc which introduced by
Bug 19851. For id attributes on <span>s have been replaced with classes,
eliminating an HTML validator error about duplicate ids.
Minor unrelated change: Updated an element's id with a more descriptive
name.
Test plan the same as Bug 19851's:
- Log in to the staff client and confirm that the appearance of the
menu bar at the top of the screen looks correct at various browser
widths.
- Confirm that the logged-in user menu label and help link expand and
collapse according to browser width.
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Fix for QA: Corrected ID reference in circ/offline.tt
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Tue, 5 Dec 2017 15:23:45 +0000 (10:23 -0500)]
Bug 19750: Overdues without a fine rule add warnings to log
When running fines.pl, any overdue items that have no corresponding circulation rule will generate the following warning:
Use of uninitialized value $amount in numeric gt (>) at /usr/share/koha/bin/cronjobs/fines.pl line 133.
Test Plan:
1) Create a single circ rule
2) Backdate a checkout so it is overdue
3) Delete the circ rule
4) Run fines.pl, note the warning
5) Apply this patch
6) Run fines.pl, note the warning is gone
Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>