Victor Grousset [Thu, 22 Mar 2018 14:44:00 +0000 (15:44 +0100)]
Bug 20461: Serials: fix ignored params in subscription creation form
In subscription-add.pl, the two params aren't passed to
NewSubscription() but they are to ModSubscription()
== Test plan ==
1. Enable syspref "makePreviousSerialAvailable"
2. Create a minimal subscription with a value in the "Item type" and
"item type for older issues" fields.
3. Edit the subscription
4. You should see that the two fields are empty. This is the bug.
5. Apply this patch
6. Do step 2 and 3
7. You should see that the two fields have the right value
8. Express the joy of a successful and easy sign off.
(this is important, otherwise the sign off spell won't work!)
Signed-off-by: delaye <stephane.delaye@biblibre.com> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Katrin Fischer [Fri, 23 Feb 2018 13:29:48 +0000 (14:29 +0100)]
Bug 20067: Fix other checks for linked authorised value categories
The same pattern was used in other files, this patch fixes it.
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Katrin Fischer [Fri, 23 Feb 2018 13:20:17 +0000 (14:20 +0100)]
Bug 20067: Fix false display of authorised value for materials on staff detail page
Koha didn't check for a linked authorised value category for
Koha didn't check for a linked authorised value category for
items.materials correctly which led to displaying false information
on the detail page.
To test:
- before applying the patch:
- make sure sample data and configuration is loaded
- edit any item
- write 2 in the $3 materials specificed
- check the details page normal view - it will display 'restocking'
- apply patch
- check display, it should now show "2"
- link 952$3 (MARC21) to ORDER_CANCELLATION_REASON
- check display again, it should now show 'restocking'
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Tue, 2 Jan 2018 18:42:12 +0000 (15:42 -0300)]
Bug 18593: Move suggestions when bibliographic records are merged
When bibliographic records are merged, the suggestions.biblionumber
field should be replaced with the new record.
Ideally we should have kept an history of the merges, to know what was
the original record. Now we cannot fix the broken links.
Test plan:
1) Create a suggestion in OPAC
2) Accept the suggestion in staff
3) Add order from this suggestion
4) Go to cataloguing search and search for the record and another
5) Merge the suggestion record with the catalog record - catalog record wins (should be the more common case when a patron suggests something that already exists)
6) Verify that after merging, the new title displays in the acquisition record
7) Verify that the suggestion info no longer displays in basket
From Katrin's test plan:
8) Verify that the new title doesn't display in suggestions. The old title will still show as suggested (not updated)
=> This is the title from suggestions.title, I think it makes sense to show this one.
Maybe we should open a new bug report to improve the display of the suggestion, and link to the bibliographic record
Signed-off-by: Lucie Gay <lucie.gay@ens-paris-saclay.fr> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Julian Maurice [Mon, 12 Mar 2018 10:51:59 +0000 (11:51 +0100)]
Bug 11936: (QA follow-up) Consistent log message for item insert
Fix the same error in another place
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Magnus Enger [Thu, 22 Feb 2018 09:37:08 +0000 (10:37 +0100)]
Bug 11936: Consistent log message for item insert
If you use bulkmarcimport.pl to import records with items it looks
like the successfull insert of the record is reported multiple time,
but the second and subsequent "ok" is really related to importing
the item(s).
This patch changes the log message on successfully inserting an item
to match the log message given when inserting an item fails.
To test, the easy way:
- Look at lines 530 and 536 of bulkmarcimport.pl, and note that the
"op" in those two lines are different
- Apply the patch
- Look at lines 530 and 536 again, and note that the "op" is now
identical, and that this makes sense, since they are both related
to the same operation, specifically inserting an item
To test, the hard way
- Have some records with items
- Import the records with bulkmarcimport.pl, and make sure to specify
the -l option, to create a log of the actions taken
- Look at the log and verify it looks something like this:
id;operation;status
1;insert;ok
1;insert;ok
2;insert;ok
2;insert;ok
- Apply this patch and import some more records with items. The log
should now be similar to this:
id;operation;status
1;insert;ok
1;insertitem;ok
2;insert;ok
2;insertitem;ok
Signed-off-by: Maksim Sen <maksim.sen@inlibro.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Tue, 13 Mar 2018 10:15:31 +0000 (10:15 +0000)]
Bug 20383: Hide link to plugin management if plugins are not enabled
This patch adds a check in admin-home.pl to see whether plugins are
enabled. If plugins are disabled, the link to plugins management is
hidden even if the user has plugin management permission.
To test, view the administration home page with plugins enabled and
disabled via the enable_plugins flag in the Koha configuration file.
Also test using users with different plugins permissions:
- Plugins enabled
- CAN_user_plugins = 1
-> Plugins link appears
- CAN_user_plugins = 0
-> Plugins link hidden
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Mon, 12 Mar 2018 12:56:08 +0000 (12:56 +0000)]
Bug 20372: Correct toolbar markup on some pages
Differences in markup around some toolbars has the potential to create
CSS styling problems. This patch changes the markup to be consistent
with other instances of <div id="toolbar"></div>
On each of these pages the toolbar should look correct.
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> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Maksim Sen [Mon, 12 Mar 2018 20:15:30 +0000 (16:15 -0400)]
Bug 20376: Make select/unselect all ignore disabled checkboxes on batch record deletion
Test Plan:
0.1 - find at least one biblionumber that has at least one item checked out
0.2 - find at least one biblionumber that has zero items checked out.
1 - Go into the module "Tools > Batch record deletion"
2 - in "List of biblionumbers or authority ids (one per line)" put the values you found in step 0.1 and 0.2
3 - click continue
4 - biblionumbers with at least one item checked out should not be clickable.
5 - biblionumbers with zero items checked out should be clickable.
6 - click "Select all" and "Clear all", both buttons should change the "checked" status of the enabled AND disabled biblionumber checkboxes.
7 - apply patch
8 - click "Select all" and "Clear all", both buttons should change the "checked" status of ONLY the enabled biblionumber checkboxes.
Signed-off-by: JM Broust <jean-manuel.broust@univ-lyon2.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Mark Tompsett [Tue, 31 Oct 2017 02:28:58 +0000 (02:28 +0000)]
Bug 19547: Deal with --create-db missing debian.cnf issue
Followed test plan. Patch functions as described and both commands execute. Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Mark Tompsett [Mon, 30 Oct 2017 21:59:43 +0000 (17:59 -0400)]
Bug 19547: MariaDB install has no debian.cnf
This attempts to handle issues arising when running
koha-create on a system that never had MySQL installed.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Mark Tompsett [Fri, 9 Mar 2018 11:54:16 +0000 (11:54 +0000)]
Bug 18570: (QA follow-up) Improved POD
This tweaks the perldoc for SendQueuedMessages and adds
some for _get_unsent_messages.
TEST PLAN
---------
perldoc C4::Letters
-- look at _add_attachments (ugly), _get_unsent_messages (non-existent),
SendQueuedMessages (no reference to borrowernumber or letter_code).
apply patch
perldoc C4::Letters
-- confirm that SendQueuedMessages and _get_unsent_messages
have reasonable POD information.
-- notice how _add_attachments' POD is now readable
run koha qa test tools
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Mark Tompsett [Thu, 8 Mar 2018 00:15:33 +0000 (00:15 +0000)]
Bug 18570: Send Password Reset Emails immediately
Run through the password reset process, and your server
should send the message immediate, not waiting for the
cronjob.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Mark Tompsett [Thu, 8 Mar 2018 00:13:09 +0000 (00:13 +0000)]
Bug 18570: Prove that the letter code parameter tweaks work
Run the following commands:
kshell
prove -v t/db_dependent/Letters.t
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Mark Tompsett [Wed, 7 Mar 2018 23:59:54 +0000 (23:59 +0000)]
Bug 18570: Tests to prove if email send was attempted
kshell
prove -v t/db_dependent/Passwordrecovery.t
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Marcel de Rooy [Fri, 16 Mar 2018 08:02:36 +0000 (09:02 +0100)]
Bug 20430: (See also bug 19436) Button display depends on wrong server count
This is a QA follow-up of bug 19436, submitted separately for ease of
backporting it. (The bug was not raised by 19436.)
Obviously, the number of authority servers not biblio servers should
be the key factor for showing or hiding the button for new authority
records via Z39.50/SRU.
Trivial fix.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
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> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
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> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
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>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Victor Grousset [Fri, 5 Jan 2018 14:03:38 +0000 (15:03 +0100)]
Bug 19953: Record page: acquisition details: add column for invoice
Test plan:
1. create a vendor with minimal info
2. create a basket with minimal info
3. add a item to the basket
4. close the basket
5. receive a shipment
6. on the "receipt summary" click on "receive" for the wanted item (it
should be the only one)
7. items → receive? → tick this checkbox
8. save
9. click on "finish receiving"
10. go to the record → Acquisition details
11. apply this patch
12. refresh the page
13. you should see the new column
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
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>
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 [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 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>
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>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt
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>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt
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>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/admin/transport-cost-matrix.tt
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>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt
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>
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>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline.tt
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>
Nick Clemens [Fri, 6 Apr 2018 15:40:56 +0000 (15:40 +0000)]
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>
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>
Jonathan Druart [Fri, 16 Feb 2018 15:23:26 +0000 (12:23 -0300)]
Bug 20229: Explicitly list the SQL modes we support
In our installation procedure we ask the administrator to edit the
MySQL|MariaDB configuration file to specify the SQL modes we support
(see bug 17258 comment 6 and 7 for more information).
We are on the way to catch and fix all these issues and support these
stricter modes (as they highlight problem in our codebase/DB structure)
but in the meanwhile it may be good to remove this step and revert the
changes when we are ready.
TODO:
- Remove that for dev installations (to let developers catch these bugs)
- Edit the wiki page to remove this step
Test plan:
0. Do not apply this patch
1. Edit your MySQL|MariaDB config and add:
sql-mode = "ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
to the [mysqld] section (or edit it)
2. Restart your DBMS
3. Try to make the app explode (watch the logs)
(tips: you should get "'koha_kohadev.me.id' isn't in GROUP BY" when
editing an order)
4. Apply the patch, restart_all, restart your DBMS
5. Try to recreate the failure
=> You should no longer see the error in the logs
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Mark Tompsett [Tue, 30 Jan 2018 22:35:39 +0000 (22:35 +0000)]
Bug 20083: Follow up - use same logic in opac-showmarc
It was correctly pointed out that opac-showmarc would leak
the same way as catalogue/showmarc.pl, and so this patch
moves the authentication step up to the top where it
should be so as to prevent inappropriate data leaks.
TEST PLAN
---------
1) Set your OpacPublic system preference to Disabled
2) Open your OPAC and login
3) Find a biblio with items
4) Go to the opac details, particularly MARC view.
5) Copy the "view plain" shortcut link.
6) log out.
7) Paste the link into the address bar.
-- the information will leak!
8) apply the patch
9) restart_all
10) Refresh the OPAC link
-- log in screen will appear.
11) run koha qa test tools
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Andreas Roussos [Fri, 26 Jan 2018 01:12:47 +0000 (14:12 +1300)]
Bug 20083 - Information disclosure when (mis)using the MARC Preview feature
The MARC Preview feature in the Staff client (catalogue/showmarc.pl) does not
check whether a user is logged in or not. As a consequence, it can be used to
obtain information that would normally be available to logged-in users only.
For example, you can view any bibliographic record by passing a value to the
'id' argument, but you can also view records as they were imported (normally
done via the 'Staged MARC management' tool).
All three 17.11 installations currently listed at
https://wiki.koha-community.org/wiki/Koha_Demo_Installations
are affected by this issue, as demonstrated by the URLs below:
It should be noted that this only applies to XSLT-enabled installations.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Colin Campbell [Mon, 19 Mar 2018 10:45:26 +0000 (10:45 +0000)]
Bug 20446 Revert to using syspref for item creation
Using a per-basket setting is nonsensical when baskets
are created automatically by quote processing a few lines before
this attempts to read it. cron job aborts with a runtime error
leaving basket for quote half-created.
This reverts to the previous code using the global setting.
(Basket itself will have been set to the global setting
by default)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
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> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
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> 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> 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: 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>
Conflicts:
t/db_dependent/api/v1/holds.t
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
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> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
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>
Conflicts:
admin/aqplan.pl
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
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> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Sun, 18 Feb 2018 18:10:30 +0000 (15:10 -0300)]
Bug 20148: Prevent adding same user multiple times to an order
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
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>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Marcel de Rooy [Thu, 12 Oct 2017 11:13:41 +0000 (13:13 +0200)]
Bug 19452: [17.11.x] 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: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Tue, 16 Jan 2018 13:25:00 +0000 (10:25 -0300)]
Bug 19978: Fix ITEMTYPECAT behaviour
ITEMTYPECAT permits to group and hide item types at the OPAC (see bug
10937 for a complete description).
Since commit 091d6c513bcbee224ff06477e79be48cea7fe825
Bug 17843: Replace C4::Koha::getitemtypeinfo with Koha::ItemTypes
the code assume that they are item types. Before it just assigned undef
to the description.
Test plan:
Create ITEMTYPECAT authorised values
Assign an item type to this authorised value group
Search for a item using this item type at the OPAC
Without this patch applied you get:
Can't call method "translated_description" on an undefined value at
/home/vagrant/kohaclone/opac/opac-search.pl line 231.
With this patch applied the search result is displayed.
Make sure the original feature still works.
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>
Mark Tompsett [Thu, 26 Oct 2017 01:28:10 +0000 (21:28 -0400)]
Bug 19530: Added commentary for last test when prove -v
Before patch, prove -v had no comment for the last test.
After patch, it says something in line with second last test.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Wed, 25 Oct 2017 18:24:18 +0000 (14:24 -0400)]
Bug 19530: Prevent multiple transfers from existing for one item
We have found multiple open branch transfers for a given item. While I'm not sure how it is happening at this point, it seems that it would make sense to cancel any existing branch transfers when initiating a new one.
Test Plan:
1) prove t/db_dependent/Circulation/transfers.t
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>
Marcel de Rooy [Fri, 15 Dec 2017 09:49:44 +0000 (10:49 +0100)]
Bug 4319: (QA follow-up) Use ReservableItems in all scripts
[1] Call CountItemsIssued or hasItemswaitingOrInTransit when needed only.
[2] Add this logic to ISBD and MARC detail too, since they also use
this include.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Confirming that Place hold now comes up if you have a waiting item and
circulation rule == If any unavailable.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Fri, 15 Dec 2017 09:09:29 +0000 (10:09 +0100)]
Bug 4319: (QA follow-up) Consistency in IsAvailableForItemLevelRequest
[1] For consistency going back to IsItemOnHoldAndFound in this sub.
This call is used in the on_shelf_holds == 2 case too.
The routine will be refactored quite soon.
Adding the else branch for on_shelf_holds == 0 for more clarity.
[2] Removing the test for found==F in reserves. In Koha F is only used
when the hold is filled and moved to oldreserves.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Alex Arnaud [Tue, 3 Oct 2017 14:50:36 +0000 (14:50 +0000)]
Bug 4319: [OPAC] Allow holds on waiting/transit items
Test plan:
- Checkout an item
- Place hold on this item,
- Return the item
- Make sure the hold is waiting (found W) and AllowOnShelfHolds is
not to 'Allow'
- Check that the button "Place hold" appears in opac detail page of
the biblio
- do the samewith items/reserves in transit
Changes on C4::Reserves::IsAvailableForItemLevelRequest
Make sure this tests pass:
- t/db_dependent/Reserves.t
- t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Wed, 20 Dec 2017 16:17:50 +0000 (13:17 -0300)]
Bug 19671: Map itemtypes to hash for correct display in issues_stats.pl
To test:
1 - Run the circulation wizard with itemtypes as columns, shelving
locations as rows - display on screen
2 - Note all itemtype values are blank
3 - Switch rows/columns - same issue
4 - Apply patch
5 - Re-run reports
6 - Itemtypes should display 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>
Owen Leonard [Mon, 5 Feb 2018 15:30:48 +0000 (15:30 +0000)]
Bug 20135: Prevent staff client language choose pop-up from appearing off-screen
This patch fixes a bug which was introduced by Bug 19851 ("Improve
responsive layout handling of staff client menu bar."). The changes in
that patch did not take into account the effects it would have on the
language menus in the footer.
This patch adds some additional classes to some menus and adds some CSS
for those classes so that menus are correctly aligned left or right
based on their position on the screen.
To test, apply the patch and clear your cache if necessary. You should
have multiple translations installed and enabled, at least one of which
should have more than one "sub-language" (e.g. en-GB and en-US).
In the staff client, test the appearance of various drop-down menus with
the browser width above and below 800 pixels wide:
- Search and More menus in the header
- User/Library menu in the header
- Language selection in the footer
- Language selection in the header
In all cases, menus should look correct and should not be aligned in
such a way that they disappear off the left or right sides of the
screen.
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>
Having a Template Toolkit statements inside the javascript
translation function _() prevents it from being picked for
translation.
The only example of such is the course reserve delete prompt.
Move the TT statement outside the string.
Test plan:
1) Update and install language xx-YY. Check that the msgids
"Are you sure you want to delete this course? There is %s attached item."
and
"Are you sure you want to delete this course? There are %s attached items."
do not exist in the xx-YY-staff-prog.po
2) Check the translated file
intranet-tmpl/prog/fi-FI/modules/course_reserves/course-details.tt
It should have two prompt texts above in English
3) Install patch
4) Update the language. Check that the msgids show up in
xx-YY-staff-prog.po, translate them, and install the language.
5) Repeat 2, the prompts should now show up in the correct language.
6) Enable UsecourseReserves
7) Go to Home -> Course reserves
8) Create a new course, and add reserves to it
9) See the course details. Click on Delete course, the prompt
should be correctly translated
10) Remove all but one of the reserves from the course
11) Repeat 9
To see if there are other such TT statements:
rgrep -E '\b_\("[^"]*\[%' koha-tmpl/
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>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 20054: Remove attribute "text/css" for <style> element in OPAC
Conformance rules for HTML5 is generating warnings for <style> element
with type="text/css" attribute when the OPAC page is checked
with W3C Validator.
Test plan
=========
1/ Click the "Tag cloud" link on the OPAC. Paste the URL to your OPAC
page (if it is hosted) to W3C Validator and watch the warning about
type attribute "text/css".
2/ Apply patch and re-submit the page to the Validator. The warning
will be gone.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: maksim <maksim@inlibro.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Conflicts:
koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/help.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt
Signed-off-by: Nick Clemens <nick@bywatersolutions.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> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
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.
Signed-off-by: Charlotte Cordwell <charlotte.cordwell123@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
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> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
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> Signed-off-by: Nick Clemens <nick@bywatersolutions.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> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
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>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/admin/didyoumean.tt
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
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>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
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>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
== 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> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
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: Nick Clemens <nick@bywatersolutions.com>
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> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
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> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
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> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
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> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
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> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Marcel de Rooy [Fri, 2 Feb 2018 10:32:49 +0000 (11:32 +0100)]
Bug 20126: (follow-up bug 10455) Restore MARC field length calculation in ModBiblioMarc
Trivial fix. Problem raised by bug 10455.
Test plan:
[1] Create or edit biblio record.
[2] Save and check leader field lengths in MARC view.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
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>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline.tt
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>