Jonathan Druart [Tue, 14 May 2013 13:11:11 +0000 (15:11 +0200)]
Bug 10856: Improve the previous and next items on the shelf browser
The next and previous links should completely refresh the shelf.
For example:
[<] [1] [2] [3] [4] [5] [6] [>]
Before this patch, the next and previous links were the same as the 1
and 6.
With this patch, after clicking on next, we will get:
[<] [7] [8] [9] [10] [11] [12] [13] [>]
This patch adds a new AJAX script to get the shelf browser block.
Test plan:
- On a detail biblio page, click on a "Browse shelf" link.
- Play with the next and previous links.
- Deactivate Javascript (using NoScript for example) and check that you
get the same behavior (but the page is reloaded).
- Launch the unit tests: prove t/db_dependent/ShelfBrowser.t
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
David Cook [Tue, 7 May 2013 07:06:33 +0000 (17:06 +1000)]
Bug 10096 - Add a Z39.50 interface for authority searching
This patch introduces a new Z39.50 interface for searching Z39.50
compliant databases for MARC authority records.
These databases aren't as common as their bibliographic equivalents,
but they're out there and very useful. I have included info at the
bottom of this messsage for sample authority databases you can try.
To test this patch:
1) Set up Z39.50 client targets for authority databases. (I've included
information at the bottom of this message for LibrariesAustralia's
test server for authorities as well as instructions on how to use
your Koha's z39.50 authority server as well. The Library of Congress
also has authority databases available (unsure if these are test or
prod), and you might have access to others through OCLC or RLIN. OCLC
provides login credentials for their test databases.
2) Go to the Authorities module
3) Click on the new "Z39.50 search button"
4) Select your authority search targets from the list.
5) Do a search for an authority you would like using either the "Raw"
input box or the more specific input boxes for names, subjects, subject
sub divisions, or titles. (I like searching Name (personal): Eric on
the LibrariesAustralia test DB.)
6) You should see a table listing the server, heading, authority type,
and two other columns (MARC and a nameless column). "Authority type"
is the type of authority it will become when imported in to Koha. In
the Eric example, "PERSO_NAME".
7) Click on "MARC" next to the results of interest to review the MARC
authority record.
8) When you're satisfied with a record, click on "Import".
9) The pop-up window will close and your original Koha window will
change to the "Adding authority Personal Name" screen (in the Eric
example).
10) All the relevant fields should be filled out for the record. Review
them and make any changes as necessary. (N.B. The 001 will be cleared
when saved, so if you have a use for the imported control number, move
it to the 010, 016, or 035 as appropriate. If you have a default value
for the 003, this will also likely be overwritten. Move it if necessary.
The 005 will also be updated when saved, so do not worry about that.)
11) When you're satisfied, click save.
12) Presto! You've imported your first authority record via Z39.50!
--
Here is the info for the LibrariesAustralia test Z39.50 authority
database:
The U.S.A. Library of Congress also provides Z39.50 access to its Name
and Subject Authorities (http://www.loc.gov/z3950/lcserver.html).
Name Authority:
Z39.50 server: Library of Congress Name Authority File
Hostname: lx2.loc.gov
Port: 210
Database: NAF
Syntax: MARC21/USMARC
Encoding: utf8
Subject Authority:
Z39.50 server: Library of Congress Subject Authority File
Hostname: lx2.loc.gov
Port: 210
Database: SAF
Syntax: MARC21/USMARC
Encoding: utf8
(N.B. Both of these databases also include title authorities.)
-
For testing purposes, you can also set up a Z39.50 client target,
which points at your own Koha instance's Z39.50 authority server.
To find the hostname, go to /etc/koha-conf.xml and find the value for
the <listen id="authorityserver"> element. Depending on your
configuration, this could be something like the following:
unix:/zebra/koha/var/run/zebradb/authoritysocket
(N.B. You might be using a different scheme than unix sockets...)
To find the database, scroll down to the bottom of koha-conf.xml until
you reach the <config> element. Within this, look for the value of the
element <authorityserver>. It should probably be "authorities".
To set up this Z39.50 client target in Koha...
Z39.50 server: my koha authorities
Hostname: unix:/zebra/koha/var/run/zebradb/authoritysocket
Port:
Database: authorities
Userid:
Password:
Syntax: MARC21/USMARC (or whichever flavour you need)
Encoding: utf8
Signed-off-by: Mason James <mtj@kohaaloha.com>
Bug 10096 [FOLLOW-UP] - Add a z39.50 interface for authority searching
This patch adds the "recordtype" column to the "z3950servers" table.
The value in this column (biblio or authority) then controls whether
the z3950 server shows up in a bibliographic search (through the
Acq and Cataloguing modules) or in an authority search (through
the Authorities module).
I also edited the z3950 management console to show this value
and allow users to edit it. The default value is "biblio", since
the vast majority of z3950 targets will be bibliographic. However,
there is an option to add/edit a z3950 target as a source of
authority records.
Test Plan:
1) Apply both patches
2) Run updatedatabase.pl (after setting your KOHA_CONF and PERL5
environmental variables)
3) Use the test plan from the 1st patch
N.B. Make sure that your Z39.50 client target has a Record Type
of Authority, otherwise it won't display when you're doing a
Z3950 search for authorities.
Signed-off-by: Mason James <mtj@kohaaloha.com>
Bug 10096 [FOLLOW-UP] - fix tabs/whitespace errors to pass QA
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 9735: Unit tests for get_template_and_user (cookies handling)
Galen found a case where the cookies array was not built flat. I add a
unit test for that (check the cookie array is flat) and also test the
cookies output of get_template_and_user so we are sure the &language=
parameter is correctly handled.
Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
- Tests in t/db_dependent/Auth.t pass
- Tested in intranet, OPAC logged in, OPAC logged out
* Adding a valid language code to the URL switches the language
as expected
* Adding an invalid language code causes no change
The current implementation didn't build the cookie array correctly,
yielding login problems in some scenarios.
Sponsored-by: Universidad Nacional de Córdoba Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 9735 - Let the language be selected through URL parameters
Passing language=<valid_language_code> as a parameter in any Koha's URL
can be used to set the desired language.
This patch touches
- C4::Templates
- C4::Auth
Adds a new method getlanguagecookie that does exactly that, for use in
get_template_and_user.
Also modifies getlanguage so it checks (a) if there's a 'language'
parameter in the CGI object and (b) checks if its valid and enabled for
the desired interface.
To test:
* Without the patch
- access any koha page
- add ?language=code to the end of the URL (change code for a valid language code
it needs to be installed using perl translate install code, and enabled either for
the staff or opac interface, depending where are you testing)
- Nothing happens with the language parameter
* With the patch
- access any koha page
- add ?language=code (the same as before) and hit enter
- the language should be changed to the one you chose
- if you browse through some links, you will see
koha 'remembers' the language you passed as a parameter
(i.e. the language cookie has been updated).
Sponsored-by: Universidad Nacional de Córdoba Signed-off-by: Brendan <brendan@bywatersolutions.com> Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Works very well. No errors. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
More comments on last patch.
Owen Leonard [Wed, 31 Jul 2013 19:36:12 +0000 (15:36 -0400)]
Bug 10668 - Improve suggestion detail page
This patch makes several improvements to the suggestions template:
- Improved breadcrumbs and page title.
- Fixed a JavaScript error which appeared when viewing or editing a
suggestion.
- Added an 'Edit' and a 'Delete' button to the suggestion detail page.
- Corrected capitalization.
To test:
- Perform various operations with suggestions management and
confirm that page titles and breadcrumbs are correct.
- View the detail page for an individual suggestion and confirm that
the edit and delete buttons work correctly.
- Confirm that there are no JavaScript errors when viewing or editing a
suggestion, in particular when changing Acquisition information
(quantity, currency, price).
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests, nice improvement.
Srdjan [Mon, 26 Aug 2013 05:01:20 +0000 (17:01 +1200)]
bug 9611: use checkpw_hash() instead of md5 hash for SIP2 logins
Test:
* SIP: Have an old user and create a new user
- use either tenet sip test or
C4/SIP/interactive_patron_check_password.pl to check old
userid/password
- do the same for the new user
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described
Test
1) using perl C4/SIP/interactive_patron_check_password.pl
can check current (short) and new (long) passwords
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Srdjan [Fri, 23 Aug 2013 08:02:53 +0000 (20:02 +1200)]
bug 9611: use hash_password() and checkpw_* for LDAP logins instead of md5 hash
Test:
* LDAP:
- Turn on LDAP auth in koha-config.xml. Set "update" in your server config to 1
- Change user's password on LDAP
- Login to Koha using LDAP - Koha password should be updated, to check
- Turn off LDAP auth in koha-config.xml
- You should be ble to log in with the new password
I do not have a LDAP facility, so I cheated. I ran
perl -e 'use C4::Auth_with_ldap; C4::Auth_with_ldap::_do_changepassword("srdjan", 1000022259, "srdjan");'
and was able to change the password.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described.
Test
1) change <useldapserver> to 1
2) copy/paste sample <ldapserver> config from perldoc C4/Auth_with_ldap
3) using sample script was able to change password,
use (userid, borrowernumber, newpass) as arguments
4) checked with OPAC and in database
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Srdjan [Mon, 26 Aug 2013 05:05:07 +0000 (17:05 +1200)]
bug 9611: (follow-up) remove md5_base64 from imports - not used
RM note: Digest::MD5 is used in C4::ImportExportFramework as part
of an unnecessary reimplementation of functionality supplied by
File::Temp. See bug 10991 for a proposal to remove it.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Srikanth Dhondi [Wed, 13 Feb 2013 01:40:02 +0000 (14:40 +1300)]
Bug 9611: Change the password hashing algorithm from MD5 to Bcrypt
What this patch aims to accomplish?
* All new passwords are stored as Bcrypt-hashes
* For password verification:
- If the user was created before this patch was applied then use
MD5 to hash the entered password <-- backwards compatibility
- If the user was created after this patch was applied then use
Bcrypt to hash the entered password
* Any password change made via the staff interface or the OPAC will
be automatically Bcrypt-hashed; this applies to old users whose
passwords were stored as MD5 hashes previously
Test plan:
1) Add new users and check whether their passwords are stored as
Bcrypt hashes or not.
2) To test that authentication works for both old as well as new
users:
a) Login as an existing user whose password is stored as a
MD5 hash
b) Login as an existing user whose password is stored as a
Bcrypt hash
3) In the staff interface, change the password of an existing user
whose password is stored as an MD5 hash
a) Check the new password is stored as a Bcrypt-hash in the database
b) Try to login with the new password
4) In the OPAC, verify that
a) Old user with old pass can change password, new format
b) New user with new pass can change password
c) Old and new user with self-updated pass can login
Whitespace cleanup was contributed by Bernardo Gonzalez Kriegel.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Mason James <mtj@kohaaloha.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Mon, 30 Sep 2013 12:14:15 +0000 (14:14 +0200)]
Bug 10419: (follow-up) patrons with fines should not be deleted
Test plan:
- add a fine for a patron
- verify the script does not delete this patron.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works, script do not delete a patron with fines.
No koha-qa errors with all patches applied
Test
1) Added a fine to a patron
2) run script
3) reports condition
Trying to delete patron 5... Failed to delete patron 5: patron has 10.00 in fines
4) Patron is not deleted
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Tested various combinations of options:
./delete_patrons.pl
Gives a helpful message about the use of the script.
./delete_patrons.pl -h
Outputs useful information about the use of the script
and its various options.
./delete_patrons.pl --category_code ST --library CPL
Gives the correct results in numbers and deletion was done
properly.
Also tested:
--expired_before
--not_borrowed_since
-v
Testing various conditions where a delete should not occur:
- Patron has checkouts
Patron is not in list of patrons to delete (x patrons to delete)
- Patron has fines
Patron is still in list of patrons to delete (x patrons to delete)
Checked deleted patrons had been moved to deletedborrowers.
Notes about possible enhancements:
- only print the success message 'x patrons deleted' when confirm
flag was set
- patrons with current checkouts are silently excluded from the number
of patrons to be deleted. Printing the number with current checkouts
might be helpful.
Changes made:
Fixed a small error in the documentation: expired_date is expired_before.
Galen Charlton [Tue, 6 Aug 2013 15:38:24 +0000 (15:38 +0000)]
Bug 10419: (follow-up) functional improvements
[1] Patron deletion now happens atomically; if one part
of the process fails, the record isn't left in a
partially deleted state.
[2] The routine for handling lists properly during patron
deletion is now invoked.
[3] The script now prints an indication if it's run
without --confirm; otherwise, one might think that
patron records were actually being deleted.
[4] --verbose now actually does something.
Without --verbose, the script will print the dry-run
warning (if applicable), the number of patrons to be
deleted, and error messages.
With --verbose, the script will also print a line with
the borrowernumber of each patron to be deleted.
To test:
[1] Run the script with and without --verbose and compare
the, well, verbosity.
[2] Run the script without --confirm and note that the script
prints a message saying that it's running in dry-run mode.
[3] Use the script to try to delete one or more patrons that have
loans. Confirm that error messages are printed reporting
foreign constraints preventing the deletion. Also confirm that
no new rows are added to deletedborrowers for those patrons that
could not be completely deleted.
[4] Use the script to delete a patron that has a public list. Verify
that after the deletion, the public list still exists but now
has a null owner.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Galen Charlton [Tue, 6 Aug 2013 15:05:26 +0000 (15:05 +0000)]
Bug 10419: (follow-up) tidy names of command-line switches
[1] Use --library instead of --branchcode to be consistent
with other scripts and user-facing Koha terminology.
[2] Use --not_borrowed_since instead of --not_borrowered_since;
no need to expose typos in the API to the user.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Fri, 7 Jun 2013 13:51:43 +0000 (15:51 +0200)]
Bug 10419: (followup) - tidy up cronjob for deleting patrons
This followup adds:
- execute flag (+x) for the cronjob script.
- replaces --dry-run with --confirm (according with existing scripts).
- changes output text (remove 'first person' style).
- updates the doc and simplifies the dates parameters.
- changes flags PrintError and RaiseError for the dbh in order to catch
something if an error occurs...
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
See the perldoc misc/cronjobs/delete_patrons.pl.
Use the -v flag for a verbose mode.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Jonathan Druart [Fri, 20 Sep 2013 15:38:49 +0000 (17:38 +0200)]
Bug 10927: remove disused C4::Utils module
Bug 10925 removes the last call to C4::Utils.
The module becomes useless and can be deleted.
Verify that t/db_dependent/Context.t still successfully passes.
git grep hashdump
git grep maxwidth
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, no subs from the module are used anywhere
Jonathan Druart [Thu, 29 Aug 2013 15:49:39 +0000 (17:49 +0200)]
Bug 10806: make the staff benchmark script check authentication failure.
Currently, if you launch the script
misc/load_testing/benchmark_staff.pl, it always displays
"Authentication successful" or continue to execute the script even if
nothing is done.
This patch checks if the url is right and if the authentication is
correctly done.
Test plan:
Suppose that a correct login/pwd is koha/koha
1/
perl misc/load_testing/benchmark_staff.pl --steps=1
--url=http://admin.koha.local/cgi-bin/koha/
--password="koha" --user="koha"
should produce:
Authentication successful
...
Step 1
...
2/
perl misc/load_testing/benchmark_staff.pl --steps=1
--url=http://admin.koha.local/cgi-bin/koha/
--password="KOHA" --user="KOHA"
should produce:
Authentication failure: bad login/password
3/
perl misc/load_testing/benchmark_staff.pl --steps=1
--url=http://admin.kobe.local/cgi-bin/koha/
--password="koha" --user="koha"
should produce:
Authentication failure:
500 Can't connect to admin.kobe.local:80 (Bad
hostname)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Works as described, detects bad url and user credentials.
No koha-qa errors
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described and gives better error messages.
There are some warnings output when running the script before
and after applying the patch.
Bug 10948: make reference labels translatable in OPAC auth results
For some reason the translator script was not picking up the see also
and used for/see from labels on the OPAC. This patch fixes the problem.
To test:
1) Apply patch.
2) Generate PO files.
3) Note that "see from" and "used for/see from" appear.
4) Sign off.
Signed-off-by: Nuño López Ansótegui <nunyo@masmedios.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely, thx for the fix.
Tested by updating the German po files, translating the
strings and installing the templates.
Verified strings show up in German in the authority
result list.
Bug 5645: improve converting simple search to Z39.50 search
This patch builds on the patch for bug 10742 by ensuring
that when a search initiated from the staff interface simple
search returns results, if you click on the Z39.50 search
button, the search form is populated with the search string
without "kw,wrdl".
To test:
[1] Perform a search in the staff interface that will return
results.
[2] Click the Z39.50 search button.
[3] Observe that the search string appears in the title
field in the Z39.50 search form, but with a prefix of
"kw,wrdl".
[4] Apply the patch.
[5] Repeat steps 1-2. This time, the search string appears
without the index prefix. This will make the Z39.50 search
much more likely to work.
[6] Repeat steps 1-2, but with a search that does *not* return
any hits in the Koha database.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No koha-qa errors.
Fixes problem, but I think is better to remove
=back than to add nother =over 4, but I'm not
a POD expert
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10949: restore ability to successfully print hold slips
This fixes a regression introduced by the patch for bug
9394 -- when printing a hold slip using the 'print and confirm'
button, the slip would contain only the text 'reserve not found',
not a full hold slip.
This patch also adds a regression test.
To test:
[1] Check in an item that would fill a hold. Use the 'print
and confirm button' to confirm the hold.
[2] The printout will only contain text to the effect of
'reserve not found'.
[3] Apply the patch.
[4] Repeat step 1. This time, a full hold slip should be printed.
[5] Verify that prove -v t/db_dependent/Reserves.t passes.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Pass all tests, new and old, and QA script.
Verified wrong and corrected behaviour.
Note: Sometimes there will not be the message 'reserve not found'
showing up, but hold information for a different record. This happens
when there exists a reserve_id with the borrowernumber of the patron
in question in your database.
Bug 10965: fix breakage when loading sample itemtypes during install
Bug 10513 added two columns to table itemtypes,
but sample_itemtypes can't be loaded because
it relies on old structure.
This patch rewrites sample_itemtypes.sql, stating
explicitly columns, removing backticks and consolidates
all in one insertion.
To test:
1) On master with current DB structure, delete item types
2) try loading sample_itemtyes.sql
It fails with "ERROR 1136 (21S01) at line 1: Column count doesn't match value count at row 1"
3) apply patch
4) try again, this time it will load and itemtypes created
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
SQL change only.
Tested by running the web installer on an empty database.
All sample data loads without errors.
Jonathan Druart [Fri, 20 Sep 2013 15:21:40 +0000 (17:21 +0200)]
Bug 10925: fix LDAP auth failing if DEBUG is enabled
To reproduce:
1/ Edit your apache virtual host and set the DEBUG environment variable
(SetEnv DEBUG 1).
2/ Try to login with an ldap user
3/ You will be redirected to the 500 error page.
The Koha logs contains:
malformed header from script. Bad header=------------------------------: mainpage.pl
The hashdump routine directly prints to STDOUT (!) and breaks the
headers.
It appears Net::LDAP::?->dump does the same thing.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Maybe we can kill C4::Utils after getting rid of this
Jonathan Druart [Tue, 17 Sep 2013 14:31:46 +0000 (16:31 +0200)]
Bug 10901: Add datatables to the add item page
For a biblio with a lot of items, it is not easy to find the one you
want to edit.
Test plan:
Try to edit/delete item from the add item page.
Verify there is no regression on this page.
Signed-off-by: Pierre Angot <tredok.pierre@gmail.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Adding, editing and deleting items still works.
Search provides useful help for locating the correct items.
Bug 10836: (follow-up) improve display toggles on the OPAC hold request form
This patch improves the the toggles for displaying and hiding the hold
options div and the toggles for displaying the table of specific copies
to request. It also moves the copy table into the hold options div.
To test:
[1] Select a single title in the OPAC and click on the place hold
button.
[2] Click 'Show more options', and select a specific copy to request.
[3] Click 'Hide options'. Verify that the hold options, including the
copy table, are hidden.
[4] Click 'Show more options'. Verify that the specific copy radio
button is still selected and that the copy selected in step to is
selected.
[5] Enable DisplayMultiPlaceHold and select several titles to
request.
[6] Do steps 2, 3, and 4 on various titles on the request form. Verify
that toggling the options link for one title on the form affects
the visibility only for that title.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org>
While signing off I removed one <br /> tag and corrected a float in the
CSS. This helps keep the border between individual hold listings.
Owen Leonard [Wed, 21 Aug 2013 19:24:19 +0000 (15:24 -0400)]
Bug 10836 - New layout for placing holds in the OPAC
This patch changes the layout of the OPAC's place hold screen,
eliminating the table in favor of a more flexible, open display.
To test, place single and multiple holds under various conditions:
- Items which are not available to be place on hold
- With OpacHoldNotes on and off
- With OPACItemHolds on and off
- With OPACAllowHoldDateInFuture on and off
- With IndependentBranches on and off
- With JavaScript disabled
Test setting hold notes, holding specific copies, and setting hold start
dates. When setting a hold start date and hold expiration date, the two
datepickers should work together to prevent invalid date combinations
(dates after today, expiration dates which precede the start date).
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Srdjan [Wed, 5 Jun 2013 04:34:29 +0000 (16:34 +1200)]
Bug 9299: fix LDAP login breakage when ExtendedPatronAttributes is on
To test:
- Configure an LDAP server and $KOHA_CONF, etc.
- Make sure ExtendedPatronAttributes is defined and that
there is no attribute defined that is specified to be
a unique ID.
- Try to log in using an account originating from the
LDAP directory.
- You will got a software error:
Can't use an undefined value as an ARRAY reference at
/home/koha/src/C4/Auth_with_ldap.pm line 183.
- Apply the patch.
- Try to log in again; this time it should work.
Owen Leonard [Mon, 12 Aug 2013 16:31:52 +0000 (12:31 -0400)]
Bug 10730: Use DataTables on the tag review page
This patch enhances the tags review page in the staff client by adding
DataTables sorting to the table of tags.
It also converts the tag list page (list.tt) to use the new DataTables
include introduced by Bug 10649.
To test, apply the patch and view the tags review page for various
categories: Pending, approved, rejected, all. The table should be
sortable by status, term, weight, and date. Sorting by date should work
correctly regardless of date format preference. Title sorting on the tag
list page should work correctly.
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: Replace tab with 4 spaces
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10687: Delete erroneous tags 68a and 68b on default MARC21 auth framework
This patch deletes information for default
MARC21 auth framework on tags 68a and 68b.
Also added update for current installs.
RM note: The 68a and 68b fields were defined in an attempt to include
both MARC21 classification and MARC21 authority records in the same
default framework, but I don't think this has turned out to be useful,
as to my knowledge nobody tries to use MARC21 classification records
in Koha, and if one were to want to, a distinct record type (or at
least auth_type) would be a better way to do it.
To test with current authorities_normal_marc21.sql loaded
1) apply the patch
2) run updatedatabase
3) check on database that there are no more
references to tags 68a and 68b
To test for new installs
1) remove auth frameworks
2) load authorities_normal_marc21.sql
3) check that load without problem
4) check on database that there are no more
references to tags 68a and 68b
Bug 9761: Unit tests for ConfirmFutureHolds changes
Adds tests for CheckReserves with lookahead parameter.
Adds tests for AddReturn with regard to future reserve messages.
The following test cases are added, resulting in 8 new tests:
a) Add a reserve without date, CheckReserve should return it
b) Add a reserve with future date, CheckReserve should not return it
c) Add a reserve with future date, CheckReserve should return it if lookahead
is high enough
d) Check ResFound message of AddReturn for future hold
Test plan:
Run the test. No fails?
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Marcel de Rooy [Thu, 7 Mar 2013 17:46:04 +0000 (18:46 +0100)]
Bug 9761: Reformulating the preference description
After some thought, I had to reformulate what this pref does.
No code changes here.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Marcel de Rooy [Thu, 7 Mar 2013 13:57:25 +0000 (14:57 +0100)]
Bug 9761: dbrev for ConfirmFutureHolds
Db rev for new pref ConfirmFutureHolds.
Test plan:
Run [your server]/cgi-bin/koha/installer/install.pl?step=3&op=updatestructure
Optionally, run a new install to test sysprefs.sql.
Or:
Edit sysprefs.sql, leave at least the last few lines including the new one.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Marcel de Rooy [Mon, 4 Mar 2013 13:47:57 +0000 (14:47 +0100)]
Bug 9761: Make it possible to confirm future hold requests at checkin time
Description:
A new pref ConfirmFutureHolds is added. When confirming a hold at checkin time,
the number of days in this pref is taken into account when looking for reserves.
Note that this pref does not interfere with renewing, issuing or transferring
a book. For report Holds to pull, the default end date is calculated with this
new preference.
The use of ConfirmFutureHolds is useful only when future holds are allowed.
Test plan:
1) Enable future holds. Add a number of days into ConfirmFutureHolds.
2) Place a future hold within this number of days.
3) Run holds to pull report. Check default startdate and enddate.
4) Check this book in. Can you confirm the hold? Do not confirm.
5) Issue the book to another patron. You should not see a warning.
6) Renew the book for this patron via opac or staff. No warning either.
7) Check in again. Warning pops up again.
8) Transfer book. Switch branch. Check in. Hold found pops up. Do not confirm.
9) Back to first branch. Check in (with popup). Remove the hold. Add new future
hold past the number of days. Check in (no warn).
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Katrin Fischer [Thu, 29 Aug 2013 20:26:50 +0000 (22:26 +0200)]
Bug 10803: make "Make payment" in circ easier to translate
To test:
- Choose a patron account
- Add a fine to it
- Switch to the checkout tab of the patron account
- Check for the "Make payment" link. Make is not a link, but payment is.
- Apply patch
- Check again, now both words are linked.
In translation this string is divided into:
. %s Make
payment
Because of this it's difficult to translate it grammatically.
The patch moves 'Make' into the link text, so that both words
will show up together in translation.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Works as described. No koha-qa errors.
Not only improves translatability,
also corrects capitalization.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Owen Leonard [Fri, 20 Sep 2013 15:31:57 +0000 (11:31 -0400)]
Bug 10924: fix updating contact note from OPAC
If you update your "Contact note" via the OPAC that change doesn't
appear in the staff client's "Update patron records" interface. The
field is missing from members-update.tt
To test, log in to the OPAC and update your details
(opac-memberentry.pl), modifying the "Contact note" in the "Alternate
address" section.
In the staff client, view "Patrons requesting modifications"
(members/memgers-update.pl). The changed contact note field should
appear in the list of field awaiting approval for that patron.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Work as described. No koha-qa errors
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
One line change - contact note now updates perfectly.
Kyle M Hall [Wed, 18 Sep 2013 19:24:08 +0000 (15:24 -0400)]
Bug 10911: fix invalid links when displaying records that have 880 fields
Koha intranet search results using XSLT for records with 880 fields have
the details link created by a code path that incorrectly links to some
opac pages.
Test Plan:
1) Enable XSLT for intranet search results
2) Upload or create a record with at least one 880 field
3) Search for the item ( must have multiple hits to avoid redirection )
4) Click the title link, note it is broken
5) Apply this patch
6) Click the title link, note it is correct
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Work as described, no koha-qa errors.
Test
1) imported two times sample record
2) reindex
3) search, find example record, broken links
4) applied patch
5) refresh, good links
NOTE: A similar (invalid references) problem is present on
UNIMARC and NORMAC files
I'll file a new bug for those cases.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely, tested with a different set of sample
records with Hebrew 880 fields.
Bug 10465: remove useless reference to fields 780 and 785 in UNIMARC XSLT files
UNIMARCslim2OPACDetail.xsl and UNIMARCslim2intranetDetail.xsl contained
references to 780 and 785 fields, that exist in MARC21 but not in UNIMARC.
This patch remove the code related to 780 and 785 fields. No effect should
be visible.
To test : in a UNIMARC Koha
1. Be sure that OPACXSLTDetailsDisplay, OPACXSLTResultsDisplay,
XSLTDetailsDisplay and XSLTResultsDisplay sysprefs are set to "default"
2. Apply the patch
3. Search some records in staff interface : the list view and the detail
view must be exacty the same as before you apply the patch.
4. search some records in OPAC : the list view and the detail view must
be exactly the same as before you apply the patch.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: No diplay change, no koha-qa errors.
Removes what can't be displayed.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Checked detail pages in OPAC and intranet still display correctly
and without errors.
Katrin Fischer [Tue, 10 Sep 2013 19:18:13 +0000 (21:18 +0200)]
Bug 10847: Open link to vendor's website in new window
To test:
- Create a new vendor or edit an existing one
- Make sure you have entered a valid URL for the website
- Click the link from the vendor summary page and verify it opens
in a new window/tab (depending on your browser configuration)
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Kyle M Hall [Tue, 21 May 2013 19:58:44 +0000 (15:58 -0400)]
Bug 10305 - _increment_barcode is called twice
For some reason, _increment_barcode is called twice in succession in
cataloguing/additem.pl
Test Plan:
1) Enable autobarcode = incremental
2) Catalog an item, not the barcode
3) Apply this patch
4) Catalog another item, the barcode should be the next in line
as previously. No change should be noted.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Owen Leonard [Tue, 10 Sep 2013 12:25:44 +0000 (08:25 -0400)]
Bug 10651 - Use new DataTables include in administration templates
Bug 10649 introduced a new include file for adding DataTables-related
JavaScript assets. This patch adds use of this include file to all
administration-related pages which use DataTables.
To test, view the following pages and confirm that table sorting is
still working correctly:
- Administration -> Budgets
- Administration -> Authority types -> MARC structure
- Administration -> Authorized values
- Administration -> Library transfer limits
- Administration -> Libraries and groups
- Administration -> Patron types and categories
- Administration -> Cities and towns
- Administration -> Item types
- Administration -> MARC bibliographic framework -> MARC structure
- Administration -> System preferences
- Administration -> System preferences -> Local use
- Administration -> Z39.50 client targets
Owen Leonard [Tue, 10 Sep 2013 16:18:32 +0000 (12:18 -0400)]
Bug 10868 - Use new DataTables include in catalog templates
Bug 10649 introduced a new include file for adding DataTables-related
JavaScript assets. This patch adds use of this include file to all
catalog-related pages which use DataTables.
The checkout history script has been altered to send unformatted dates
to the template, and the template now uses the "title-string" sorting
filter to enable sorting on unformatted dates.
To test, view the following pages and confirm that table sorting is
still working correctly:
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Sorting works. No koha-qa errors. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Note: On the issue history page:
1/ If the checkin on is empty (the item is currently checked out), the line
is sorted in last.
2/ The Renewed column is not sorted by date.
Before this patch, the sort was worse.
Bug 7813: (follow-up) use descriptive text for delete link
This patch replaces the "times" symbol for the local cover image
deletion link with more descriptive text. This was done because
the original "X" was small, is not necessarily going to be universally
understood to signify the deletion action, and because "×"
does not give much context to translators.
Jonathan Druart [Fri, 20 Sep 2013 11:06:48 +0000 (13:06 +0200)]
Bug 7813: (follow-up) improvements for deleting local cover images
This patch:
- displays a js alert if a problem occurred on deleting the
image on the server.
- adds a class for the new span (in order to avoid future problem, if
someone adds a new span).
- adds a title for the [X] link.
- deal with the upload_local_cover_images permission (don't display the
delete link if the logged in user does not have it).
- changes the license version.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
I like the ehancements to the original patch and work as expected.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch adds the ability to delete local cover images from the
detail page. It adds an 'X' button to trigger the deletion. It occurs
using a new SVC script called cover_images that accepts the following
parameters:
It then deletes all valid images passed and returns a JSON object
containing the imagenumbers and the deletion status (1/0). The operation
is triggered using jQuery.ajax, and with the response the corresponding
images get deleted.
Note: currently one image is deleted at a time, but the code is there to
be used.
To test:
- Open the detail page fr a biblionumber containing one or more cover
images, go to its images tab.
- Apply the patch, reload the page, go to the images tab.
- Thumbnails should look better than before ;-)
- An 'X' button should show below each cover.
- Clicking the 'X' button should trigger an alert message asking for
confirmation.
a) Cancel: nothing happens, reload the page and check nothing got
deleted.
b) Accept: the deleted image should be gone, reload the page to check
it doesn't exist anymore and is not a browser/DOM manipulation trick.
- Signoff
Note: check having more cover images than those that fit the width and
see it wraps fine.
P.S. I chose not to implement every possible action on the svc script, but
another bug could be filled for more improvements.
Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Owen Leonard [Fri, 13 Sep 2013 18:45:50 +0000 (14:45 -0400)]
Bug 10888: Don't hide authorities module from users who lack permission to edit authorities
It should be possible for staff client users to search and view
authority records even if they don't have permission to edit them.
To test, apply the patch and view the staff client as a user with and
without "editauthorities" permission.
With "editauthorities" permission, authority search results should show
both an edit and delete link. Viewing the details of an authority
record, one should see a toolbar with edit/delete/new options.
The detail view has been altered to use the term "record" in place of
"biblio" ("Used in X record(s)).
Without "editauthorities" permission, authority search results should
show no edit or delete link. Viewing the details of an authority, the
only option shown in the toolbar should be "Save."
On the staff client home page and in the header's "More" menu the link
to the authorities module should now appear with and without permission
to edit authorities.
This patch also corrects the permissions in the authority export script
to allow saving of authority records by users who do not have permission
to edit.
Magnus Enger [Fri, 9 Aug 2013 08:05:23 +0000 (10:05 +0200)]
Bug 10622 - [SIGNED OFF] Followup: Add --sip, --nosip and --help to man page
The original patch for bug 10622 added the --sip, --nosip and
--help switches to the koha-list command, but did not update the
manpage for the command. This patch does.
To test:
Run these commands and look at the formatted man page:
$ xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl \
debian/docs/koha-list.xml
$ man -l koha-list.8
Make sure this test passes:
$ prove -v xt/verify-debian-docbook.t
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Forgot the docs this time, good catch Magnus
Signed-off-by: Robin Sheat <robin@catalyst.net.nz> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10622: add --sip and --nosip switches to koha-list
Just added those switches.
Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Magnus Enger <magnus@enger.priv.no>
I applied the patch on my local dev install, and then copied the
patched koha-list script to a couple of servers with actual
instances running off the packages, to test the script.
- It seems that the -h switch did not work before this patch, now
both -h and --help works nicely
- --sip and --nosip work as expected, also in combination with
--email and --noemail
The patch does not add --sip and --nosip to the man page for
koha-list, but I will do a followup for that.
Signed-off-by: Robin Sheat <robin@catalyst.net.nz> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Removed unused stuff, added a new config file /etc/default/koha-common
to control the init script behaviour. Currently is only a stub. The config
file could be put on /etc/sysconfig on RedHat and friends. The init script
should work them too. Added a TODO comment regarding the 'status' switch.
To test:
- Apply the patch on master, build your own packages and install.
- The init script should continue to work as expected.
(it can be tested replacing the /etc/init.d/koha-common file with
debian/koha-common.init on a packages install).
- The absence of the /etc/default/koha-common file should not prevent
the init script from working.
Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Robin Sheat <robin@catalyst.net.nz> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Katrin Fischer [Tue, 10 Sep 2013 19:10:28 +0000 (21:10 +0200)]
Bug 10871: Make confirmation message for deleting news translatable
To test:
- Create a news entry in tools > news
- Delete the news entry or multiple entries by selecting them
using the checkboxes to the left and the delete button at the
bottom of the page.
Verify confirmation message shows up correctly with patch applied.
Bonus:
- Update one of the po files and make sure the new strings shows up
there.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10915: (QA followup) warn if cannot read history.txt
This patch makes about.pl test if success opening history.txt, and
shows a convenient warning to the end user. No more warnings in the logs
(about.pl: readline() on closed filehandle $file at /usr/share/koha/intranet/cgi-bin/about.pl line 166)
and better problem solving information for the end user.
Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Mason James [Thu, 19 Sep 2013 12:06:20 +0000 (00:06 +1200)]
Bug 10915: fix About->timeline breakage on incompletely upgraded Koha
This patch supplies a default value for the koha-conf.xml
setting docdir to handle the case where the user neglects
to set it upon upgrade.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Fixes dev and standard installs without docdic tag in koha-conf.xml.
Doesn't break when docdir present either. Warning still present
on packages install that didn't add the docdir definition in koha-conf.xml
David Roberts [Mon, 16 Sep 2013 15:51:33 +0000 (16:51 +0100)]
Bug 10894: Add ID to main address in member entry form
Add an ID to ease customization via jQuery; an ID is already present
on alt address but was missing from main address
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10601: (follow-up) improvements to ->set() and ->get()
This patch improves the POD for C4::BackgroundJob->get(). It also
fixes ->set() so that it cannot scribble over values that are properly
internal to the object.
Bug 10601: (follow-up) unit tests for new ->set() and ->get()
This adds unit test for the new methods in C4::BackgroundJob. One
of the tests verfies that setting extra values does not scribble over
data that is mean to be internal to the C4::BackgroundJob object.
To test:
Verify that prove -v t/db_dependent/BackgroundJob.t passes.
Jonathan Druart [Tue, 16 Jul 2013 15:28:43 +0000 (17:28 +0200)]
Bug 10601: Add a counter on batch items modifications
After executing a batch items modifications, a dialog is displayed above
the result table. It contains the number of items (and total fields)
which has been modified.
Note that items that are selected for modification but which do not
end up actually be changed are not reported in the final counts.
This patch adds two methiods to C4::BackgroundJob, ->set() and ->get(),
that allow background jobs to pass arbitrary data back to the client.
Test plan:
1/ Go to tools/batchMod.pl
2/ Enter a barcodes list
3/ Check/uncheck items and fill some values to apply
4/ Save
5/ The table summary will be displayed with a dialog box on top:
XX item(s) modified (with YY fields modified)
Check that XX and YY correspond with what you expected.
Signed-off-by: Liz Rea <liz@catalyst.net.nz>
batch modification still seems to work correctly, with the helpful addition of the counter. Thanks!
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Tue, 16 Jul 2013 14:43:30 +0000 (16:43 +0200)]
Bug 10599: add option to unselect on loan items on the batch item modification tool
Sometimes when using the batch item modification tool, we would like to
automatically uncheck on loan items.
This patch also adds a new routine in C4::Circulation, IsItemIssued(),
which, when passed an itemnumber, returns whether the item is
currently on loan.
Test plan:
1/ Go to tools/batchMod.pl.
2/ Enter some barcode (at least 1 should be on loan).
3/ Click on the Continue button.
4/ Click on the "Clear on loan" link.
5/ Check that on loan items are unchecked.
Launch the unit test file:
prove t/db_dependent/Circulation/IsItemIssued.t
http://bugs.koha-community.org/show_bug.cgi?id=10572 Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Works as expected, only modifies items that are checked (still). No regression noted.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised.
Marcel de Rooy [Wed, 29 May 2013 12:24:05 +0000 (14:24 +0200)]
Bug 10376: fix ability to print cart from IE9 & 10
Test plan:
1) Test with Firefox (or any other browser except IE):
Add biblio to cart
Go to Cart and click Print
Does the Cart window come back to its original state after confirm/cancel Print?
2) Test with Internet Explorer (I used IE9; testing another version is fine)
Do the same as above. Is behavior now more or less the same?
Signed-off-by: Marc Veron <veron@veron.ch>
1) Test without patch:
IE 10: Does not show print dialog
IE 9 (Developer Emulation in IE 10): Does not show print dialog (as expected)
FF 21.0 OK
Chrome 27.0.1453.110 m: OK
2) Test with patch:
IE 10: OK
IE 9 (Developer Emulation in IE 10): OK
IE 8 (Developer Emulation in IE 10): OK
IE 7 (Developer Emulation in IE 10): OK
FF 21.0 OK
Chrome 27.0.1453.110 m: OK
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Trusting Marc here, as I don't have IE available.
Regression tests in Firefox and Chromium went well.
Owen Leonard [Thu, 15 Aug 2013 20:14:50 +0000 (16:14 -0400)]
Bug 9294 - Move JavaScript out of circulation template
This patch creates a new js file, js/pages/circulation.js, and begins
the process of moving JavaScript into it from circulation.tt. I have
started the process by focusing on sections which are least dependent on
template variables.
To test, load a patron for checkout who has something checked out.
There should be no JavaScript errors:
- Tabs should work.
- Showing and hiding the "Add message" form should work.
- The "specify due date" datepicker should work.
- Controls for selecting checkboxes in the checkouts table should work
Signed-off-by: Campbell Reid-Tait <campbellreidtait@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Just found a weird behavior with checkboxes in the checkouts table, but
still exists on master.
Kyle M Hall [Wed, 14 Aug 2013 18:25:58 +0000 (14:25 -0400)]
Bug 10731: fix use of IntranetSlipPrinterJS by hold slips
Hold slips aren't printing automatically with JS Print Setup because it
appears the system preference IntranetSlipPrint is never being passed to
the template.
Test Plan:
1) Set up JSPrintSetup
http://wiki.koha-community.org/wiki/Setting_up_slip_printer_to_print_silently
2) Place a hold
3) Check the item in to capture the hold
4) Click "Print and confirm"
5) Note the slip does not print automatically
6) Apply this patch
7) Repeat steps 2 through 4
8) Observe that the slip now prints automatically
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Mark Tompsett [Fri, 13 Sep 2013 10:47:15 +0000 (06:47 -0400)]
Bug 10876: Fix opac-MARCdetail.pl displaying items that are meant to be hidden
When OpacHiddenItems is used to hide some, but not all of the
items for a biblio, then the opac-MARCdetail page displayed
all the items, rather than just the ones intended to be visible.
By determining the tag and subtag for items.itemnumber, the
loop which builds the big array can be filtered to exclude
records that should be hidden.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as expected, passes koha-qa also.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10872: UT for GetHiddenItemnumbers and POD fix
This patch adds several unit tests for GetHiddenItemnumbers and fixes the POD for it.
It also wraps the tests for rollback, modernizes and adds a license text to it.
Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Mark Tompsett [Tue, 10 Sep 2013 20:19:58 +0000 (16:19 -0400)]
Bug 10872 - C4::Items GetHiddenItems fix and optimization
There should be a:
"require YAML;"
or
"use YAML qw/Load/;"
as the GetHiddenItems routine has a reference to YAML::Load.
This was discovered while adding a GetHiddenItems() call into
opac/opac-MARCdetail.pl. I believe this problem dates back to
bug 6488 or bug 5984.
I also added an optimization to GetHiddenItems to prevent
processing if there is nothing in the system preference. Test
by searching for a biblio which has some or all of its items
hidden.
Signed-off-by: Mason James <mtj@kohaaloha.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Maybe
return () unless $yaml =~ /\S/;
or
return () if $yaml =~ /^\s*$/;
would have been easier to read.
Mark Tompsett [Fri, 12 Jul 2013 03:13:42 +0000 (23:13 -0400)]
Bug 10584 - Hide OPAC biblio details if all items are hidden
If there are items for a given biblio number, and they are all
hidden, then biblio needs to be hidden. If the biblio needs to
be hidden, it immediately redirects to a 404.pl page, just as
if the biblionumber does not exist.
Arrays used to represent all the items were relocated and used,
added if they didn't exist. Arrays representing the hidden
items were relocated and used if they existed, added if they
didn't exist.
Upon debugging the opac-MARCdetail.pl modification, it was
discovered the reason getHiddenItems was failing was because
'use YAML qw/Load/;' was not mentioned in C4::Items, and other
libraries were triggering the loading of YAML to compensate
for opac-detail.pl and opac-ISBDdetail.pl files.
Signed-off-by: Mason James <mtj@kohaaloha.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10897: remove test for module that has become DB-dependent
This is an alternative appraoch to fixing this bug; as the
compilation test for C4::ILSDI::Services also resides
in t/db_dependent/ILSDI_Services.t, we don't need t/ILSDI_Services.t
at present.
Kyle M Hall [Mon, 15 Jul 2013 12:41:51 +0000 (08:41 -0400)]
Bug 7639: QA Followup - Fix update description
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
With these patches we now have 3 preferences that deal with
fines/fees and lost items:
Replacement price
- On marking lost: WhenLostChargeReplacementFee
- On return: RefundLostItemFeeOnReturn (preexisting)
Overdue fines
- On marking lost: WhenLostForgiveFine
System preferences work according to their description.
Further notes:
- Patches pass all tests and QA script.
- LostItem is changed and needs unit tests.
All occurrences of LostItem have been changed.
- Database update is ok. I had to fix the sysprefs.sql
file that has been recently rewritten and alphabetized.
Paul Poulain [Thu, 21 Mar 2013 10:24:38 +0000 (11:24 +0100)]
Bug 7639: tiny QA follow-up
no need to create a variable just to call to send it as parameter the line after
Signed off by: Alex Hatley <alexh@cctexas.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Kyle M Hall [Tue, 23 Oct 2012 12:03:16 +0000 (08:03 -0400)]
Bug 7639 - system preference to forgive fines on lost items - QA Followup
Test Plan:
1) Apply the patch
2) Run updatedatabase.pl
3) Set WhenLostForgiveFine to Forgive & WhenLostChargeReplacementFee to Charge
4) Issue an item to a borrower, then set to lost from catalogue/moredetail.pl
5) Observe the replacement fee has been charged
6) Return the item
7) Observe the charged fee has been forgiven
8) Set WhenLostForgiveFine to Don't Forgive
9) Repeat 4-6
10) Observe the charged fee has not been forgiven
11) Set WhenLostChargeReplacementFee to Don't Charge
12) Repeat 4
13) Observe that a fee was not charged
Signed-off-by: Alex Hatley <alexh@cctexas.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 7639: add option to forgive overdue fines when declaring items lost
This patch adds functionality to forgive overdue fine when an item is
set to lost status. Fines are forgiven only when the syspref
WhenLostForgiveFine is set to yes. Item can be set to lost status from:
Changed subroutine C4::Circulation::LostItem to forgive fines on the
item depending on the value of syspref WhenLostForgiveFine. This
routine is currently used to return an item and charge a replacement
cost.
Also added a new syspref in C4::Circulation::LostItem -
WhenLostChargeReplacementFee. The replacement fee will now be charged
only if this syspref is set to yes. The default value of the
WhenLostChargeReplacementFee is yes, meaning that current behavior
will not change during upgrade.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Alex Hatley <alexh@cctexas.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Testing notes on last patch in series.