Marcel de Rooy [Mon, 29 Jan 2018 09:32:28 +0000 (10:32 +0100)]
Bug 20097: Use same regex in marc2dcxml and opac-export
This regex allows: dc, oaidc, srwdc, and rdfdc.
Test plan:
[1] Check https://[yourserver]/cgi-bin/koha/opac-export.pl?bib=[some_biblionumber]&op=export&format=dc
[2] Check https://[yourserver]/cgi-bin/koha/opac-export.pl?bib=[some_biblionumber]&op=export&format=oaidc
[3] Check https://[yourserver]/cgi-bin/koha/opac-export.pl?bib=[some_biblionumber]&op=export&format=nodc. This one should trigger a not-supported message.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Lari Taskula [Fri, 9 Mar 2018 13:49:27 +0000 (15:49 +0200)]
Bug 20367: Avoid resetting userid when BorrowerUnwantedField contains userid
To test:
1. In staff client, set your username to firstname
2. Add userid to BorrowerUnwantedField system preference
3. Go to your patron modification screen (memberentry.pl) and click Save
4. Observe you get kicked out into login screen, saying:
Error: You do not have permission to access this page.
Log in as a different user
5. Apply patch and restart plack
6. Set your username back to firstname
7. Repeat step 3
8. Observe you were not kicked out and your userid stays the same
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jose Martin [Wed, 7 Mar 2018 12:21:39 +0000 (15:21 +0300)]
Bug 20348: SIP2 patron identification fails to use userid
Replaces "or" with "||" in variable assignment
second attempt to retrieve borrower was not being executed due
to changed precedence
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Fridolin Somers [Tue, 6 Mar 2018 11:26:19 +0000 (12:26 +0100)]
Bug 20341: Show authorized value description for withdrawn like damaged and lost
Actually catalog detail page shows for damaged and lost items the authorized value description if exists.
We must do the same for withdrawn information.
Test plan :
1) Set for items a subfield linked to items.withdrawn and using the authorized value category 'WITHDRAWN'
2) Edit the authorized value category to add value '2' and description 'Eaten by dog'
3) Edit an item to set this withdrawn value
4) Go to staff interface and look at items in record detail page /cgi-bin/koh/catalogue/detail.pl :
=> Without patch you see 'Withdrawn' and with patch you see 'Eaten by dog'
5) Go to OPAc and look at items in record detail page /cgi-bin/koha/opac-detail.pl :
=> Without patch you see 'Withdrawn' and with patch you see 'Eaten by dog'
Signed-off-by: delaye <stephane.delaye@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Josef Moravec [Mon, 5 Feb 2018 08:25:03 +0000 (08:25 +0000)]
Bug 19908: Do not use .optional in password match validation function
Test plan:
0) Aplly only first patch
1) You will be able to submit a from on member-password.pl even if the
passwords don't match
2) Apply this patch -> you can't be able to submit the form if the
paswords don't match, but you'll be able to submit the form when
password fields are blank
Signed-off-by: Roch D'Amour <roch.damour@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Josef Moravec [Wed, 3 Jan 2018 10:56:37 +0000 (10:56 +0000)]
Bug 19908: Password fields in edit/add patron form should respect BorrowerMandatoryField preference
Test plan:
0) Do not apply the patch, note the password field is always required
1) Apply the patch
2) Try to add and edit patron with and without "password" in BorrowerMandatoryField, it should always respect this setting
3) Use "Change password" button in patron toolbar, the password field
should be never required here - when leaved blank, the password is
unchanged
4) Play with minPasswordLength and RequireStrongPassword preferences,
to ensure they work as expected
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Josef Moravec [Fri, 9 Mar 2018 06:58:34 +0000 (06:58 +0000)]
Bug 12812: (Follow-up) Fix use of C4::Circulation
Fixes this error:
Undefined subroutine &main::MarkIssueReturned called at
misc/cronjobs/longoverdue.pl line 316.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
The longoverdue.pl option --mark-returned doesn't work unless the
--charge option is used as well.
Test Plan:
1) Run long overdue with --mark-returned and not --charge,
note your items are marked lost but not returned
2) Apply this patch
3) Repeat step 1, the items should now get returned!
Tested with (for example):
misc/cronjobs/longoverdue.pl --lost 10=1 --mark-returned --verbose
--confirm
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Tue, 27 Feb 2018 18:54:38 +0000 (15:54 -0300)]
Bug 20303: Do not explode when receiving an order if authorisedby not set
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 19546: Run starman from the instance's home dir
This patch makes koha-plack jump into the instance's home directory to
run.
It is required because Perl 5.18 introduced a breaking change that
makes perl die if @INC includes directories for which the user doesn't
have read permission, and need to be traversed when querying for a lib.
This is the case of '.', which is introduced automatically into @INC
until Perl 5.26 (which removes the 'feature').
The Mojolicious::Plugins lib prefixes the plugin names with
'Mojolicious::Plugin' so it first looks (for example) for
Mojolicious::Plugin::Koha::REST::Plugin::Pagination (Pagination is just
the first one on the list). When it looks for it at '.' it dies (because
of Perl's behaviour) so it doesn't query for the right namespace (the
following to try).
I only reproduced it in koha-testing-docker. To test, you just need to
try this patched koha-plack and make sure it doesn't break due to this
permissions issue.
To test:
- In your koha-testing-docker clone, run:
$ docker-compose up -p test
- Open a shell inside the container (on a separate terminal):
$ docker exec -it test_koha_1 bash
- From within the /root directory, restart plack:
$ cd /root
$ koha-plack --restart kohadev
=> FAIL: Logs show plack is broken due to permissions problems trying to
find Mojolicious::Plugin::Koha::REST::Plugin::Pagination
- Use the patched script from this patch:
$ /kohadevbox/koha/debian/scripts/koha-plack --restart kohadev
=> SUCCESS: Plack runs fine, no error in the logs
- Sign off :-D
Note: people who has environments in which the problems is reproducible,
please test this version of koha-plack and stamp your sign-off,
PLEASE.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Josef Moravec [Fri, 2 Mar 2018 10:13:00 +0000 (10:13 +0000)]
Bug 20323: Fix batch patron modification tool
Test plan:
1) Go to Tools -> Batch patrons modification
2) Select some patrons and try to change any field
--> without patch - it exploads with log:
Can't call method "category" on unblessed reference at /home/vagrant/kohaclone/tools/modborrowers.pl
--> with patch - the modification is properly made
Signed-off-by: Roch D'Amour <roch.damour@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 20167: Make changing a hold pass the itemnumber to ModReserve
If you have an item-level hold, changing an attribute (like priority,
pickup location or suspended until date) makes the hold a biblio-level
hold, because ModReserve is not passed the current itemnumber.
This patch uses the hold's itemnumber and passes it to the ModReserve
call.
To test:
- Run the regression tests from the previous patch:
$ kshell
k$ prove t/db_dependent/api/v1/holds.t
=> FAIL: Tests fail
- Apply this patch
- Run the tests:
$ kshell
k$ prove t/db_dependent/api/v1/holds.t
=> SUCCESS: Tests pass!
- Sign off :-D
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Marcel de Rooy [Mon, 5 Mar 2018 10:30:15 +0000 (11:30 +0100)]
Bug 17717: (QA follow-up) Fix typo chdir
This test does obviously not achieve the desired result:
[ "chdir" != "no" ]
Trivial fix.
Adding the same quotes around starting_dir (just as for Bug 19546).
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 17717: Make cronjobs using koha-foreach use --chdir
In order to patch production sites we need to adjust the shipped
cronjobs so they are called with the --chdir option switch.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 17717: Add a --chdir option switch for koha-foreach
Until Perl 5.26, the current directory is added to @INC when running a
Perl script [1]. Having the current directory in @INC means it can be
tried to be traversed when performing a lib lookup. Since version 5.18,
Perl dies when it finds an unreadable directory (permissions) in @INC
that needs to be traversed. This behaviour won't change because Perl
devs consider it an enhancement to security. [2]
Because of this, we need to make sure our scripts are ran **from** a
directory in which they have read permissions.
Ths patch adds a --chdir option switch to the **koha-foreach** wrapper
script, that makes the inner shells/scripts to be ran within the Koha
instance's user home directory.
The change is trivial and should be QAed easily. I tested this on a prod
server:
- Create a /tmp/test.pl file containing:
use Modern::Perl;
use Cwd;
my $dir = getcwd;
warn $dir;
1;
A) then create a cronjob entry to run it using koha-foreach:
(in /etc/cron.d/test):
1/* * * * * root koha-foreach perl /tmp/test.pl
- Once I noticed the cronjob ran, I used mutt to read the emails in the
root user.
=> FAIL:
...
Subject: Cron <root@koha> koha-foreach --enabled perl /tmp/test.pl
"/root"
"/root"
"/root"
"/root"
"/root"
...
B) I then used the patched koha-foreach with different results:
=> SUCCESS:
...
Subject: Cron <root@koha> /root/koha-foreach --chdir --enabled perl /tmp/test.pl
C) master's koha-foreach seems to work just the same... I think it is
because of my previous attempt to fix this by using sudo in koha-shell.
So I think environmental conditions affect the behaviour (which shell is
configured for cron, sudo configuration, etc).
====
In conclusion, I think we should go ahead with this patch as it will solve
peoples issues, and it is a right solution (option #5 on the list) to
this Perl behaviour change. It doesn't cover other commands, but
followup patches could do.
I avoided /tmp as it is writable by any user... so it is an easy path
for both exploiting by replacing some lib, and also because the
existence of an unreadable dir that the interpreter could try to
traverse (unreadable /tmp/Authen or /tmp/Koha will trigger the same
error, and I assume people know what they are putting on the instance's
dir, at least it will be easier to track).
A followup patch takes care of making the cronjobs use --chdir when
calling koha-foreach
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Wed, 28 Feb 2018 15:57:25 +0000 (12:57 -0300)]
Bug 20251: (bug 19280 follow-up) FIX SIP checkout
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Tue, 27 Feb 2018 18:30:18 +0000 (15:30 -0300)]
Bug 20286: Fix filter for BakerTaylor* prefs
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Mon, 26 Feb 2018 13:48:18 +0000 (10:48 -0300)]
Bug 20286: Correctly escape URI characters in OPAC RSS template
Bug 19568 use the TT filter url whereas it must have escaped the URI
characters with the uri filter.
Test plan:
Subscribe to an OPAC search
=> Without this patch you will get an empty page
=> With this patch applied you will see result list.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 19610: Make koha-common.logrotate use copytruncate
This patch makes logrotate use the **copytruncate** directive, removing
the need to stop the Zebra and Plack servers on log rotation.
To test:
- Run:
$ misc4dev/cp_debian_files.pl
- Edit the new /etc/logrotate.d/koha-common file changing 'weekly' for
'hourly'. This is to ease testing.
- Run:
$ sudo ls -l /var/log/koha/kohadev
- Open a second terminal on your kohadevbox. On it...
- Run:
$ sudo logrotate /etc/logrotate.d/koha-common
- Run:
$ sudo ls -l /var/log/koha/kohadev
=> SUCCESS: Files got rotated! (i.e. files ending in .1 are created, the
sizes make sense (.1 have contents, the ones without numbering
probably zeroed <- it will depend on what's happening with
your devbox in between).
- Play with your Koha, do some searches too:
=> SUCCESS: You have access to your Koha, searches work. i.e.:
- Apache handled the log rotation operation
- Plack handled the log rotation operation
- Zebra handled the log rotation operation
- Sign off :-D!
Sponsored-by: Orex Digital Signed-off-by: Hugo Agud hagud@orex.es Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 20234: Update service description in koha-common.init
The service description is very old and outdated. This patch fixes this.
Sponsored-by: Orex Digital Signed-off-by: Hugo Agud hagud@orex.es Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 20234: Make maintenance scripts use koha-zebra instead of koha-*-zebra
This patch makes all maintenance scripts use **koha-zebra** instead of
the old **koha-*-zebra** scripts.
To test:
- Run:
$ perl misc4dev/cp_debian_files.pl
$ sudo service koha-common stop
=> SUCCESS: No errors and the Zebra-related sevices are stopped
$ sudo service koha-common start
=> SUCCESS: No errors and the Zebra-related services are started
$ sudo service koha-common restart
=> SUCCESS: No erros and Zebra-related services are running
$ sudo koha-create --create-db test
=> SUCCESS: Instance created and zebra running for it
$ sudo koha-disable test
=> SUCCESS: No errors and Zebra is stopped for instance test
$ sudo koha-zebra --start test
$ sudo koha-remove test
=> SUCCESS: No errors, instance removed, no Zebra running for test
- Sign off :-D
Sponsored-by: Orex Digital Signed-off-by: Hugo Agud hagud@orex.es Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Fri, 16 Feb 2018 12:31:39 +0000 (12:31 +0000)]
Bug 20218: Fix matching of uri in tracklinks
The current code matches using a regex, this breaks when the url
contains special characters. We swtich it to equality check
To test:
1 - Enable TrackClicks (either track or anonymous)
2 - Find the URL of a biblio in the OPAC
3 - Paste this into the 856$u of another record
(or use any url containing a '?' or other characters)
4 - View the record in the opac
5 - Click the URL
6 - 404 Error!
7 - Apply patch
8 - Try again
9 - Success!
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>
Pasi Kallinen [Tue, 27 Feb 2018 10:59:56 +0000 (12:59 +0200)]
Bug 20302: Allow translating Delete button in Patron batch mod tool
There is an untranslatable Delete-button in the patron batch modification
tool. Allow translating it.
Test plan:
1) Go to Home -> Tools -> Batch patron modification, put a patron's
card number in the box, and click on Continue
2) At the bottom of the screen there is an drop-down entry for
Attribute, click on the "New" at the nd of that line
3) There should now be another Attribute -line, with "Delete" -link
at the end of that line
4) Apply patch, install a language
5) Repeat 1-3 in that language, the Delete-link should be shown in
the correct language, if the msgid "Delete" was translated
in xx-YY-staff-prog.po
Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pasi Kallinen [Tue, 27 Feb 2018 07:10:17 +0000 (09:10 +0200)]
Bug 20301: Allow translating "View" in manage MARC import
When looking at the table showing the staged MARC records, the "View"
text in the Diff-column is not translatable. Make it so.
Test plan:
1) Go to Home -> Tools -> Stage MARC records for import
2) Select eg. t/db_dependent/www/data/marc21record.mrc and upload the file
3) Click on Stage for import
-> Manage staged records
-> Import this batch into the catalog
4) Wait for zebra to reindex, or trigger it yourself by
running rebuild_zebra.pl -a -b -r
5) Go to Home -> Tools -> Stage MARC records for import
6) Select the same file as in part 2 and upload the file
7) Change the Record matching rule to ISBN (020$a)
8) Click on Stage for import
-> Manage staged records
9) In the table below, there should now be a line showing
the staged MARC record matches biblio
10) Note the "View"-text in the "Diff"-column
11) Apply patch
12) Install a language, view the same batch in the
Manage staged MARC records -page in that language
13) The "View" should show up correctly, and if the
msgid "View" was translated in the xx-YY-staff-prog.po,
should show up in the correct language
Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pasi Kallinen [Tue, 6 Feb 2018 10:19:17 +0000 (12:19 +0200)]
Bug 20141: Untranslatable string in transport cost matrix
Make the "Disable" checkboxes in transport cost matrix translatable
Test plan:
1) Go to Home -> Administration -> Transport cost matrix
2) Click on any cell
3) Note the "Disable" checkbox text
4) Install patch, add a language, translate the text, etc
5) Repeat 1-3, the "Disable" text should now be translated
Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pasi Kallinen [Mon, 5 Feb 2018 12:45:25 +0000 (14:45 +0200)]
Bug 20139: Improve MARC mapping translatable strings
- Allow translating one error message
- Use string formatting with placeholders instead of concatenation
Test plan:
1) Go to Home -> Administration -> Koha to MARC Mapping
2) Click on the "Add" button to add a new mapping
3) Note the popup text looks correct
4) Enter something invalid
5) Note the error message
6) Click on any of the "Remove" buttons to remove a mapping
7) Note the popup text looks correct
8) Update, translate the new msgid's, and install a language
9) Repeat 1-7, note how the message are in the correct
language
Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pasi Kallinen [Mon, 26 Feb 2018 10:08:27 +0000 (12:08 +0200)]
Bug 20296: Untranslatable "All" in patrons table filter
There's an untranslatable "All" in the "Show X entries" filter
when browsing the patrons.
Test plan:
1) Home --> Patrons --> Browse by last name.
2) In the table filtering toolbar, there's a dropdown with
"Show [20] entries" and the last in the dropdown is "All".
3) Update and install a language, check that msgid "All" is
translated and isn't fuzzy.
4) Check the "All" in the dropdown, it is not translated.
5) Install patch, repeat 1-3, and check the "All" in the dropdown,
it should now be translated.
Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Mark Tompsett [Wed, 14 Feb 2018 20:19:01 +0000 (20:19 +0000)]
Bug 20201: Silence warnings triggered by admin/aqplan.pl
TEST PLAN
---------
0) back up DB
1) Run the following commands on a kohadevbox:
reset_all
git bz apply 20185
echo | sudo tee /var/log/koha/kohadev/plack-error.log
restart_all
2) Navigate in a staff client:
Home -> Administration -> Budgets -> Edit -> Planning by libraries
-- could be any of the planning, but by libraries is nicely visible
on screen.
3) Run the following commands:
cat /var/log/koha/kohadev/plack-error.log
-- several warnings.
4) Run the following commands:
git bz apply 20201
echo | sudo tee /var/log/koha/kohadev/plack-error.log
restart_all
5) repeat step 2 and refresh the staff client page.
-- this time warnings related to aqplan.pl are not there.
6) run koha qa test tools
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Tue, 20 Feb 2018 21:42:13 +0000 (21:42 +0000)]
Bug 20290: Fix capitalization of "Routling List"
This fixes some strings to be properly capitalized.
To test:
- Create a new routing list, check title and breadcrumbs
- View the routing list tab in the patron account in staff,
check title and breadcrumbs
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Tue, 16 Jan 2018 13:28:36 +0000 (14:28 +0100)]
Bug 19979: Fix get_facets_info test in Search.t
The test should remove the holdingbranch key in the expected results when
there is only one branch.
See the logic in C4::Koha.
Test plan:
[1] Run Search.t on a database with multiple branches.
[2] Run Search.t on a database with one branch. Without this patch the test
would fail: Failed test '_get_facets_info returns the correct data'.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pasi Kallinen [Tue, 6 Feb 2018 11:01:36 +0000 (13:01 +0200)]
Bug 20142: Allow translating offline circ message
Allow translating the notification saying you cannot change branch or
logout while offline.
Test plan:
1) Enable AllowOfflineCirculation
2) Go to Home -> Circulation -> Built-in offline circulation interface
3) Try to change your branch. Note the notification message
4) Apply patch, install language, translate the notification
5) Repeat 2 and 3 in that language. The message should be translated
Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pasi Kallinen [Tue, 6 Feb 2018 12:17:45 +0000 (14:17 +0200)]
Bug 20147: Allow translating prompt in label edit batch
Fix one untranslatable prompt in the label batch edit.
Test plan:
1) Go to Home -> Tools -> Label creator
2) Click on New -> Label batch
3) Add items to the batch
4) Select any of the items
5) Click on "Remove selected items"
6) Note the popup text
7) Apply patch, update a language, translate the msgid
"Are you sure you want to remove label number(s): %s from this batch?"
8) Repeat 1-6. The popup text should now be translated.
Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Fri, 23 Feb 2018 09:33:49 +0000 (10:33 +0100)]
Bug 13287: (QA follow-up) Final polishing
Cosmetic changes.
And: adding a confirm flag (see earlier comment too). Without this flag but
with having a filled pref, the script would purge when you do not pass any
parameter. This might not be appreciated.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Mark Tompsett [Wed, 24 Feb 2016 00:29:36 +0000 (19:29 -0500)]
Bug 13287: (QA follow-up) Add db revision
Added missing upgrade SQL system preference.
Corrected system preference screen message
Fixes on purge_suggestions.pl
- perlcritic friendlier
- address $PERL5LIB comment by using $PROGRAM_NAME (comment #10)
- used STDERR (comment #10)
- perltidy
TEST PLAN
---------
$ ./installer/data/mysql/updatedatabase.pl
-- should run upgrade and generate new systempreference in table
$ ./misc/cronjobs/purge_suggestions.pl --help
-- should give help with a real path used instead of $PERL5LIB.
$ ./misc/cronjobs/purge_suggestions.pl -days -1
-- should give error message as expected
$ ./misc/cronjobs/purge_suggestions.pl -days 0
-- should give error message as expected
Go to OPAC system preferences tab and check the
PurgeSuggestionsOlderThan system preference
-- message should be as expected (see comment #9)
run koha qa test tools
-- all should pass
Signed-off-by: Marc Veron <veron@veron.ch> Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended: Moved new pref from OPAC to Acquisitions preferences.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 13287: Add a system preference to define the number of days used in purge_suggestions.pl
The system preferences value is used whenever purge_suggestions.pl is called without the 'days' parameter.
This patch uses the preference description suggested by comment #9.
This version should now be cleanly applicable.
I Apply the patch
II Run updatedatabase.pl
a) Run purge_suggestions.pl without the days parameter
- validate that there is an error message
b) Run purge_suggestions.pl with the days parameter
- validate that there is no error message
c) Insert a number of days in the system variable PurgeSuggestionsOlderThan
d) Run purge_suggestions.pl without the days parameter
- validate that there is no error message
Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Tested per plan, all tests pass.
Signed-off-by: Marc Veron <veron@veron.ch> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pasi Kallinen [Tue, 6 Feb 2018 08:11:27 +0000 (10:11 +0200)]
Bug 20140: Allow translating more of OAI sets
Allow translating two strings in the OAI set config:
"setDescription" and "Remove"
Test plan:
1) Go to Home -> Administrator -> OAI sets config -> Add a new OAI set
2) Click on "New set"
3) Click on "Add description"
4) Note the "setDescription:" and "Remove" -texts
5) Install patch, update language, translate the new strings
6) Redo 1-4, note how the strings in part 4 are now translated
Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> Signed-off-by: Roch D'Amour <roch.damour@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Test plan:
1. Verify that there is no remaining references to this script
Signed-off-by: Roch D'Amour <roch.damour@inlibro.com> Signed-off-by: Maksim Sen <maksim@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=20255
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Thu, 1 Feb 2018 06:42:13 +0000 (07:42 +0100)]
Bug 20082: Correct description of Vietnamese language and add German translation
Fixes the language description of Vietnamese according to the
bug report and adds the German translation for the language
name.
To test:
- Run the database update
- Verify that the new descriptions Tiếng Việt shows
in advanced search language pull down
- Install German translations
- Verify that the German translation 'Vietnamesisch'
shows in the pull down when German is selected.
Signed-off-by: Roch D'Amour <roch.damour@inlibro.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Mon, 26 Feb 2018 08:59:03 +0000 (09:59 +0100)]
Bug 20075: Adjust installer files for de-DE up to pl-PL
We are replacing the values -5 or 8 here by 1 for the hidden field in
auth_subfield_structure.
Note that 1 is mainly used in MARC21 and -5 in UNIMARC.
Since it is a boolean, I choose here for keeping 0 and 1.
The value 8 was only used for field 942 in MARC21 files.
The value -5 was replaced in
en/marcflavour/unimarc/mandatory/authorities_normal_unimarc.sql
it-IT/marcflavour/unimarc/necessari/authority_framework.sql
pl-PL/marcflavour/unimarc/mandatory/authorities_normal_unimarc.sql
NOTE: The french unimarc files
fr-FR/marcflavour/unimarc_complet/Obligatoire/autorite_default.sql
fr-FR/marcflavour/unimarc_complet/Obligatoire/autorites_norme_unimarc.sql
fr-FR/marcflavour/unimarc_lecture_pub/Obligatoire/autorites_norme_unimarc.sql
seem to display all fields, since hidden is 0 everywhere.
Test plan:
Test a new install in one of the languages.
Or run the sql script on an empty database.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Tue, 23 Jan 2018 14:59:06 +0000 (15:59 +0100)]
Bug 20074: (follow-up) Remove another remainder of biblio hidden logic
Script authorities.pl still contains a module 2 calculation on the hidden
attribute, although it is used as a boolean.
Since -5 mod 2 == 1, it does no harm, but we better remove it.
Test plan:
Edit and save an authority. Verify that everything still works as expected.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Tue, 23 Jan 2018 14:21:27 +0000 (15:21 +0100)]
Bug 20074: Database revision to convert hidden to -5
The hidden value is used as a boolean in authority frameworks (in contrast
with biblio framework).
It is consistent to apply the same value (-5) to all non-zero values.
Test plan:
Check if you a have 0, 1 and 8 value in hidden somewhere.
Run the dbrev.
Verify that 1 and 8 are converted to -5.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Tue, 23 Jan 2018 14:16:35 +0000 (15:16 +0100)]
Bug 20074: Fix hidden value in auth_subfields_structure
The template included an else branch where a value not equal to 0 or -5
was interpreted as 0 (Show all).
This effectively converted hidden values 1 and 8 to 0.
This patch removes that else branch.
Test plan:
Toggle a authority field between Hide all and Show all. Check what happens.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
For each field, trigger the plugin by clicking the plugin link. Test
JavaScript-driven functionality in each plugin window and confirm that
your selections are correctly saved to the editor.
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Edit: Fix for QA, add KOHA_VERSION variables to js includes
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Tue, 5 Dec 2017 17:17:15 +0000 (17:17 +0000)]
Bug 19754: Move template JavaScript to the footer: Acquisitions, part 2
This patch modifies some staff client acquisitions templates so that
JavaScript is included in the footer instead of the header.
To test, apply the patch and test the JavaScript-driven features of the
modified templates: All button controls, DataTables functionality, tabs,
etc.
- Acquisitions -> Invoices
- Datepickers
- Search for invoices
- Datatable
- Acquisitions -> Late orders
- Datepickers, datatables, selection controls (when searching by
vendor)
- Acquisitions -> Vendor -> Basket -> Add to basket -> From an existing
record -> Search
- Datatables, View MARC modal
- Acquisitions -> Vendor -> Basket -> Add to basket -> From a new
(empty) record
- Form validation, inactive fund control, add users to notify on
receiving.
- Acquisitions -> Vendor -> Basket -> Add to basket -> From a
subscription -> Search
- Datatables, show only renewed, show/hide search form
- Acquisitions -> Vendor -> Basket -> Add to basket -> From a suggestion
- Datatables, "Show" controls
- Acquisitions
- "Ordered" link in table of funds
- Datatables
- Acquisitions -> Vendor -> Receive shipment -> Invoice -> Receive
- Datepickers, item add form plugins (test with AcqCreateItem set to
'receiving an order.'
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Josef Moravec [Mon, 19 Feb 2018 22:43:32 +0000 (22:43 +0000)]
Bug 12001: (QA follow-up) Fix showing links to items on boraccount page
Test plan:
Go to the Fines -> Account page of a patron with fees linked to items
--> without patch there is no link to related item
--> with patch the link is presented in description column
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Test plan:
Try to print patron account summary
--> without patch it explodes
--> with patch it works, and if there is a fee related to item, the title should be printed out
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Josef Moravec [Mon, 19 Feb 2018 20:49:02 +0000 (20:49 +0000)]
Bug 12001: (QA follow-up) Fix printinvoice page
Test plan:
Try to print a fee
--> without patch it explodes
--> with patch it works and the date is formatted according to
system wide date format setting
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Sun, 7 Jan 2018 16:41:07 +0000 (13:41 -0300)]
Bug 12001: Format DEBT correctly
Before this patchset, DEBT was formatted in the module, now it should be
done template-side.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Fri, 5 Jan 2018 21:00:24 +0000 (18:00 -0300)]
Bug 12001: Prove that result are the same \o/
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Fri, 5 Jan 2018 20:25:41 +0000 (17:25 -0300)]
Bug 12001: Move GetMemberAccountBalance to Koha::Account->non_issues_charges
As said previously, GetMemberAccountBalance returns ( the balance, the
non issues charges, the other charges)
The other charges are the balance - the non issues charges.
In this patch we remove the subroutine from C4::Members and use the
new Koha::Account->non_issues_charges subroutine instead
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Fri, 5 Jan 2018 20:46:51 +0000 (17:46 -0300)]
Bug 12001: Add tests
Yes, we need tests to make sure we understand what is going on in this
subroutine.
The different combination of HoldsInNoissuesCharge,
RentalsInNoissuesCharge and ManInvInNoissuesCharge are tested here with
the subroutine we are going to remove (GetMemberAccountBalance).
In one of the next patches the new methods will be used to make sure we
are not modifying the calculated values (except the formatting).
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Fri, 5 Jan 2018 19:18:37 +0000 (16:18 -0300)]
Bug 12001: Move GetMemberAccountRecords to the Koha namespace
The GetMemberAccountRecords may be a perf killer, it retrieves all the
account lines of a patron and then the related item and biblio
information.
Most of the time we only want to know how much the patron owns to the
library (sum of amountoutstanding). We already have this information in
Koha::Patron->account->balance.
This patch replaces the occurrences of this subroutine by fetching only
the information we need, either the balance, the detail, or both.
It removes the formatting done in the module, to use the TT plugin
'Price' instead.
There is a very weird and error-prone behavior/feature in
GetMemberAccountBalance (FIXME): as the accountlines.accounttype is a
varchar(5), the value of the authorised value used for the
ManInvInNoissuesCharge pref (category MANUAL_INV) is truncated to the 5
first characters. That could lead to unexpected behaviors.
On the way, this patchset also replace the GetMemberAccountBalance
subroutine, which returns the balance, the non issues charges and the
other charges. We only need to have the balance and the non issues
charges to calcul the third one.
Test plan:
Add several fees for a patron and play with HoldsInNoissuesCharge,
RentalsInNoissuesCharge and ManInvInNoissuesCharge.
The information (biblio and item info, as well as the account line) must
be correctly displayed on the different screens: 'Fines' module, fine
slips, circulation module
Note that this patchset could introduce regression on price formatting,
but will be easy to fix using the TT plugin.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Wed, 21 Feb 2018 17:40:06 +0000 (17:40 +0000)]
Bug 20240: Remove space before : when searching for a vendor in serials (Vendor name :)
This patch removes the space before the colon in the "vendor" label in
the vendor search pop-up window.
To test, apply the patch and go to Serials -> New subscription.
- Click the "Search for a vendor" link next to the vendor form field.
- In the pop-up window, confirm that there is no space before the colon
in the "vendor" label.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Wed, 21 Feb 2018 17:59:49 +0000 (17:59 +0000)]
Bug 20239: Fix spelling on authority linker plugin
This patch corrects the capitalization of the "Choose" link in the
pop-up window for selecting an authority record to link to a MARC field.
This patch also converts the link, and the "Edit authority" link, to
Bootstrap buttons.
To test:
- Create a new record
- Go to the 100 field
- Click on plugin link behind $a
- Look for an existing authoriy in your system
- In the table of search results, confirm that the "Choose" and "Edit
authority" links look correct and work correctly.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Mirko Tietgen [Fri, 23 Feb 2018 12:36:02 +0000 (13:36 +0100)]
Bug 20061: koha-common is not pulling libsearch-elasticsearch-perl / d/control
update debian/control. this file is auto generated. no testing required.
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Mirko Tietgen [Fri, 23 Feb 2018 12:10:51 +0000 (13:10 +0100)]
Bug 20061: koha-common is not pulling libsearch-elasticsearch-perl
Adds Search::Elasticsearch to Perldependencies.pm
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Charles Farmer [Mon, 19 Feb 2018 20:00:33 +0000 (15:00 -0500)]
Bug 20249: (bug 18789 follow-up) "Patron has no outstanding fines" now appears alongside fines
Test plan:
1) Choose two patrons from your database, one who has fines, and the other who does not
2) Visit their 'Fines' page, and click on the 'Pay fines' tab
2.1) If they don't have any fines, you'll only see a blank row
2.2) If they do have fines, the payment form will appear, but the text "... no outstanding fines" will also appear
3) Apply patch
4) Visit once again the 'Pay fines' tab of your patrons
4.1) Now, "... no outstanding fines" will appear for the right situation
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pongtawat C [Sun, 9 Jul 2017 16:34:17 +0000 (23:34 +0700)]
Bug 18913: Allow symbolic link in /etc/koha/sites
This patch makes the koha-* scripts follow symbolic links when querying for
Koha instances. Without it, it is not possible to define instances outside the
/etc/koha/sites directory,
To test:
- Create a symlink in /etc/koha/sites:
$ sudo ln -s /tmp /etc/koha/sites/test
- Test the original is_instance function:
$ . /usr/share/koha/bin/koha-functions.sh
$ is_instance test && echo success || echo failure
=> FAIL: symlinks are not considered instance names (i.e. failure is printed)
- Apply this patch
- Update the koha-functions.sh file:
$ perl misc4dev/cp_debian_files.pl
- Test is_instance again:
$ . /usr/share/koha/bin/koha-functions.sh
$ is_instance test && echo success || echo failure
=> SUCCESS: symlinks are considered instance names (i.e. success is printed)
- Sign off :-D
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>
Jonathan Druart [Wed, 11 Oct 2017 22:06:17 +0000 (19:06 -0300)]
Bug 19290: Browse selected bibliographic records - Staff interface
This patch adds the same feature as bug 10858 for the OPAC interface:
after a search, librarians will be able to browse selected results.
The results can be selected from several pages.
By extension it is possible to add results from several pages to a list
or the cart.
When at least one result is selected, a new "Browse selected records" button
becomes usable and change the behaviour of the existing browser.
The whole feature can be turned off with the pref BrowseResultSelection.
Test plan:
- Launch a search (on the staff interface)
- Check some biblios
- Go on another page
- Check some biblios
- Come back to a page you already check results and confirm that they are
still checked
- Click on the "Browse selected records" button
- Check that you are able to browse results you had checked.
You can also:
- add them to the cart
- add them to a list
QA note: the browsers at the OPAC and the one at the staff interface are completely different
That's why the code is not mimicking what has been done on bug 10858.
The behaviour must stay the same anyway.
This patch fixes two errors that slipped in the patchset.
To test:
- Create a dummy branch for testing:
$ cd kohaclone
$ git fetch
$ git checkout v17.11.00 -b dummy
- Reset your working DB
$ reset_all (y)
- Set your branch to current master
$ git reset --hard origin/master
- Update the DB
$ updatedatabase
- Update the schema files
$ kshell
k$ misc/devel/update_dbix_class_files.pl \
--db_name koha_kohadev \
--db_user koha_kohadev \
--db_passwd password
k$ exit
$ git diff
=> FAIL: There are discrepancies on upgrades
- Reset to v17.11.00 revision and DB:
$ git reset --hard v17.11.00
$ reset_all (y)
- Set your branch to current master
$ git reset --hard origin/master
- Apply this patch
- Update the DB
$ updatedatabase
- Update the schema files
$ kshell
k$ misc/devel/update_dbix_class_files.pl \
--db_name koha_kohadev \
--db_user koha_kohadev \
--db_passwd password
k$ exit
$ git diff
=> SUCCESS: No discrepancies!
- Reset to HEAD to get rid of the schema changes
$ git reset --hard HEAD
- Regenerate the schema files on top of this patch
$ dbic ; cd /home/vagrant/kohaclone
$ git diff
=> SUCCESS: No discrepancies!
- Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Thu, 18 Jan 2018 18:29:10 +0000 (18:29 +0000)]
Bug 20037: Switch single-column templates to Bootstrap grid: Serials
This patch updates several single-column Serials module templates to
use the Bootstrap grid. In addition to grid changes, some templates have
been modified to include the footer with the correct popup parameter.
- serials\acqui-search.tt - Go to Serials -> New subscription. Click
"Search for a vendor."
Owen Leonard [Tue, 16 Jan 2018 15:03:29 +0000 (15:03 +0000)]
Bug 19981: Switch single-column templates to Bootstrap grid: Course reserves
This patch updates three single-column course reserves templates to use
the Bootstrap grid:
- course-reserves.tt - The main Course Reserves page
- course-details.tt - The detail view of an individual course
- course.tt - Editing a course
- add_items-step1.tt - Adding items to a course, step 1 (scan barcode)
- add_items-step2.tt - Adding items to a course, step 2
- invalid-course.tt - The error page shown if you try to view
course_reserves/course-details.pl directly without passing a course id
in the URL
- Also changed in this template: Error message has been wrapped in the
standard "dialog alert" <div>.
Each of these pages should look correct, with a single centered column
with wide margins on either side. At lower browser widths the margins
should disappear.
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>
Owen Leonard [Thu, 11 Jan 2018 18:16:39 +0000 (18:16 +0000)]
Bug 19954: Update popup window templates to use Bootstrap grid: Patrons
This patch updates two patron-related templates to use the
Bootstrap grid instead of the YUI grid.
This patch also corrects an unrelated error in update-child.tt where
some JS variable declarations required by members-menu.js were
missing.
To test you must have more than one adult-type patron category defined.
- Locate and view a child-type patron record.
- From the "More" menu in the toolbar, choose "Update child to adult
patron."
- The popup window which appears should look correct and work
correctly.
- The table of patron categories should be sortable.
- Add a new patron and enter the first and last names of an existing
patron.
- When Koha asks to confirm a possible duplicate record, click the
"View existing record" link. The popup which is triggered should
look correct.
Signed-off-by: Zoe Bennett <zoebennett1308@gmail.com> 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>
Owen Leonard [Tue, 9 Jan 2018 19:11:12 +0000 (19:11 +0000)]
Bug 19939: Move cataloging Z39.50 results actions into menu
This patch modifies the template which displays cataloging Z39.50
search results so that the "MARC," "Card," and "Import" links are moved
out of separate table cells and into one menu.
The old menu which would appear when any table cell is clicked has been
removed, and code added to display the same Bootstrap menu if a table
cell is clicked.
To test, apply the patch and go to Cataloging -> New from Z39.50/SRU.
- Perform a Z39.50 search which will return more than one result.
- Confirm that clicking the "Actions" button triggers a drop-down menu.
- Confirm that the links in the menu trigger actions for the correct
bibliographic record.
- Confirm that clicking any other table cell in the table of results
will trigger the display of the same menu.
- Confirm that this menu works correctly for the correct record.
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>
Nick Clemens [Wed, 3 Jan 2018 01:40:13 +0000 (01:40 +0000)]
Bug 19837: Add error feedback for duplicated or unfound cardnumbers
To test:
1 - Enter some patrons on a list
2 - 'Enter multiple cardnumbers'
3 - Make sure to add some that are already in list, some that don't
exist, and some new patrons
4 - Verify results are as expected with warnings
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>
Owen Leonard [Fri, 15 Dec 2017 17:26:12 +0000 (17:26 +0000)]
Bug 19837: Add multiple patrons to a list by barcode
This patch adds the interface change and basic functionality for an
option to add multiple patrons to a patron list by scanning barcodes.
To test, apply the patch and go to Tools -> Patron lists.
- Create a patron list if necessary, and got to the "Add patrons"
screen.
- Test the process for adding patrons using the "Patron search" text
input.
- Test the process for adding patrons using the "Enter multiple card
numbers" option.
This should really have some error-handling added to it: Onscreen
messages when a non-existing patron card number is submitted or when a
patron already exists on the list.
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>
Owen Leonard [Fri, 8 Dec 2017 19:09:05 +0000 (19:09 +0000)]
Bug 19785: Move template JavaScript to the footer: Authorities, part 1
This patch modifies even more staff client authorities templates so
that JavaScript is included in the footer instead of the header.
To test, apply the patch and test the JavaScript-driven features of the
modified templates: All button controls, DataTables functionality, tabs,
etc.
- Authorities
- New from Z39.50
-> Search
-> Results
- New from Z39.50
- Deletion confirmation
- Merge records -> Merge
- Tabs
- Tag selection
-> Authority detail
- Tabs
- Deletion confirmation
- New from Z39.50
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>
Nick Clemens [Wed, 19 Jul 2017 13:10:41 +0000 (13:10 +0000)]
Bug 17672: Add damaged_on to items and deleteditems tables
This patchset adds a 'damaged_on' column to store the date an item is
marked damaged, analogous to withdrawn_on and itemlost_on
To test:
1 - Apply patch
2 - Mark an item damaged via moredetail.pl (Items tab on left in
details)
3 - Note the damaged on date apears below
4 - Unmark the item, the date is removed
5 - Go to the edit items screen (from top bar 'Edit->edit items')
6 - Mark item damaged - check db or moredetails.pl to see damaged_on
date
7 - Unmark item damaged - confirm date is removed
8 - prove t/db_dependent/Items.t
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Charles Farmer <charles.farmer@inLibro.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, 7 Feb 2018 07:45:20 +0000 (09:45 +0200)]
Bug 20148: Prevent adding same user multiple times to acq basket
When adding a user to manage acquisitions basket, it is possible
to add the same user multiple times. Prevent that.
Test plan:
1) Go to Home -> Acquisitions -> [bookseller] -> [basket]
2) On the "Add user" in the Managed by-part, and try adding
the same user multiple times.
3) Apply patch
4) Repeat 1 and 2. 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: Roch D'Amour <roch.damour@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 [Fri, 16 Feb 2018 14:33:12 +0000 (14:33 +0000)]
Bug 20222: Make bread crumb for cleanborrowers.pl match the link text in tools-home.pl
This patch revises the breadcrumbs in the template for batch patron
deletion / anonymization so that they match the text used in the tools
menu and on Tools home.
To test, apply the patch and go through a batch patron anonymization
process. At each step the breadcrumbs should read "Batch patron
deletion/anonymization" instead of "clean patron records."
Signed-off-by: Roch D'Amour <roch.damour@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Thu, 12 Oct 2017 11:13:41 +0000 (13:13 +0200)]
Bug 19452: Remove the truncate option
The truncate option is not really useful. Its result is probably not what
most users of this script expect or need.
It truncates both tables borrower_message_preferences and
borrower_message_transport_preferences. This (unfortunately) includes
deleting messaging preferences for patron categories. After that, adding
preferences again will not add categories again, but only borrower
preferences which are all disabled.
Furthermore, we do not need to disable the foreign key check. Neither
do we actually need to truncate, deleting records seems sufficient.
Also deleting transport preferences is not needed, since it will be
done by a cascade from messaging preferences. Note that the subsequent
call of SetMessagingPreferencesFromDefaults will already delete the
records.
This makes it possible to remove the truncate option altogether.
Test plan:
[1] Select a patron category (say ST) and change days_in_advance to x.
[2] Select a ST patron and set days_advance to y in his msg prefs.
[3] Run borrowers-force-messaging-defaults.pl -doit
[4] Verify that the patron has been reset to the default prefs (incl.
value x in days_in_advance).
[5] Verify that the patron category prefs are still intact.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>