Galen Charlton [Thu, 10 Oct 2013 17:18:43 +0000 (17:18 +0000)]
bug 8252: (follow-up) test both GRS1 and DOM indexing
This patch expands t/db_dependent/Search.t to run
the same tests using both the GRS-1 and DOM indexing
modes. It also adds hooks in zebra_config.pl to make
it easier to stage test cases for non-MARC21 Zebra
indexing.
Note that in DOM mode one of the tests is currently a
TODO, as relevance ranking for wegihted queries differs
between GRS-1 and DOM.
To test:
[1] Verify that prove -v t/db_dependent/Search.t passes.
This patch fixes biblio-zebra-indexdefs.xsl files.
It was generated from biblio-koha-indexdefs.xsm with the new
koha-indexdefs-to-zebra.xsl amended by F. Démians's patch.
To test :
- Take a DOM UNIMARC Koha
- Apply all the patchs of 8252 bug, including this one
- Copy src/etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl
to your etc/zebradb/marc_defs/unimarc/biblios/ located in your
installation directory
- Run rebuid_zebra -b -x -r -v
- make advanced searches on staff interface and opac, on coded fields
indexes (Audience, Literary genre, Biography, Illustration, Content,
Video Types, Serial Type, Periodicity, Regularity, Picture)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Ok for me. This patch put in sync indexes XSL definition with
authoritative XML definition. Subsequently, it won't be difficult to
amend DOM UNIMARC indexes defintion if necessary. And, as it is, I don't
see any regression, whereas I can see huge improvements. Thanks Mathieu!
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
I applied the patch and ran
xsltproc koha-indexdefs-to-zebra.xsl ../marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml \
> ../marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl
I looked at the generated file. It looks nice.
Then I copied it file in my INSTALLDIR/etc/zebra.... and reindexed my
records with rebuild_zebra.pl
I made some searches on coded position index and non coded position
indexes, everything works.
Mathieu Saby [Mon, 6 May 2013 17:58:09 +0000 (19:58 +0200)]
Bug 8252: Followup for Date/time-last-modified and Music number
This followup restores the original wording of "Date/time-last-modified"
index, and change the name of "Music-number" index to
"Number-music-publisher"
To test :
1. In a UNIMARC Koha instance
2. Apply patchs #1, #2 and this followup
3. Copy from src/etc/zebradb directory to the etc/zebradb/ in your main
Koha directory the following files:
-- zebradb/biblios/etc/bib1.att
-- zebradb/ccl.properties
-- zebradb/marc_defs/unimarc/biblios/record.abs
-- zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml
-- zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl
4. Rebuild zebra with -b -x -v -r options
5. Write a value like "test071a" in 071$a field in a record
6. Check if you can find this record with this search:
"ccl=Number-music-publisher:test071a"
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No koha-qa errors.
Test
Copy files
reindex full
Modify a couple of record to add 071a with test message
Reindex -v -z -b -x
Search test message as described and found modified records.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Mathieu Saby [Wed, 27 Mar 2013 15:04:28 +0000 (16:04 +0100)]
Bug 8252: Fix indexing of UNIMARC 1xx for DOM
This patch makes the same changes in UNIMARC DOM configuration as patch
1 made for GRS-1.
positions of subfields are indexed that way :
In biblio-koha-indexdefs.xml :
tag="100" subfields="a" offset="17" length="1"
In biblio-zebra-indexdefs.xsl :
xslo:value-of select="substring(., 17, 1)"
I had to edit biblio-zebra-indexdefs.xsl by hand, because
etc/zebdradb/xml/koha-indexdefs-to-zebra.xsl does only support
"subtring" in handle-one-index-control-field template.
It is good for MARC21, but not for UNIMARC : in MARC21, indexing
subtrings is needed for controled field (001-009, with no subfields)
But in UNIMARC it is needed for subfields of 1XX fields.
So if DOM indexing is working with these new files, we may need to
change koha-indexdefs-to-zebra.xsl.
Test plan (not possible in a sandbox) :
1) In a Koha instance using UNIMARC and DOM indexing
2) Apply Patch 1 and Patch 2 (this one)
3) Copy the following files from the etc/zebradb directory of your
source into the etc/zebradb directory of your main Koha directory :
-- etc/zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml
-- etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl
-- etc/zebradb/ccl.properties
-- etc/zebradb/biblios/etc/bib1.att
4) rebuild zebra with -x -b -r -v options
5) check if coded filters in advanced search are usable in OPAC and
Staff interface
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works. No koha-qa errors.
Test for DOM
Apply patches
Don't forget to copy files
reindex
Search by coded fields works, also Country-publication
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Mathieu Saby [Fri, 1 Feb 2013 13:52:05 +0000 (14:52 +0100)]
Bug 8252: Fix indexing of UNIMARC 1xx for GRS-1
Before fixing UNIMARC DOM indexing, we must fix GRS-1 indexing
1) In advanced search, some Coded fields index are not working: Print,
Illustration, Content
2) Country-heading index is not working
3) Some subfields are indexed in wrong indexes :
102$a should be in Country-publication instead of Country-heading
(non defined in bib1.att)
106$a, filled only for printed works, should be in ff88-23 (form of
item) instead of itype. (ff88-23 is made for Marc21 008 pos
23, which contains the same data as 106a)
200$b should be in Material-type instead of (or in addition to) itype
and itemtype: (Material-type :"free-form string, ... that
describes the material type of the item, e.g., cassette, kit,
computer database, computer file.")
100$a pos 22-24 should not be indexed as "ln" : it is the language of
the record, not the language of the ressource
4) Index names are too long : if we index new positions of coded fields,
with existing names it breaks Zebra indexing (there must be a limit
in line lenghth in record.abs?)
5) There are a lot of warns when rebuiding zebra.
This patch make some changes in bib1.att (could be used later to improve
search) :
- fixing wording for att 51 and 1012
- adding comments for attributes based on MARC21 008 field (8800-8841)
- creating 8806 (tpubdate), 8838 (Modified-code), 8818 (ff8-18), 8840
(ff8-18-21), 8819 (ff8-19), 8821 (ff8-21), 8828 (ff8-28), 8830
(ff8-30), 8831 (ff8-31)
- creating attributes specific to UNIMARC : 9701-9707 (Video-mt,
Graphics-type, Graphics-support, Title-page-availability,
Cumulative-index-availability, script-Title, char-encoding)
- setting apart 3 blocks of attributes, so it could be easy to make
further changes :
-- common to Marc21 and UNIMARC : 8806, 8822, 8838
-- slightly different in Marc21 and UNIMARC (different meanings
according to the type of the record => don't match a single
UNIMARC field)
-- specific to UNIMARC : 9701-9707
In ccl.properties :
- creating a new index: Country-publication 1=1053
- suppressing some warns by mapping with bib1 att:
Date-time-last-modified, Name, rtype, Music-number
- defining indexes using the 3 blocks attributes defined in bib1
(common to Marc21 and UNIMARC, slightly different, specific to UNIMARC)
In record.abs :
- renaming some index for 100-105-110 fields
- correcting indexing of 102$a (country of publication)
106$a (ff88-23)
100$a pos 22-24 (language of record, no more
indexed)
105$a pos. 0-3 (illustration code)
200$b (for the moment, I keep it indexed in
itype and itemtype, but also Material-Type)
In C4/Search.pm :
- adding "Country-publication" index
In OPAC and staff interface template subtypes_unimarc.in :
- renaming indexes to take into account the changes made to Zebra
config files
To test (this cannot be done with a sandbox) :
1) Apply the patch in a UNIMARC GRS-1 Koha instance
2) Copy the following files from the etc/zebradb of your source
directory into the etc/zebradb of your main Koha directory:
-- etc/zebradb/biblios/etc/bib1.att
-- etc/zebradb/ccl.properties
-- etc/zebradb/marc_defs/unimarc/biblios/record.abs
3) Reindex your data (rebuild_zebra -x -b -r -v)
4) Try to use those Coded fields indexes in Advanced search, in OPAC
and Staff interface (available after clicking on "More options",
then on "Coded information filters"):
Audience, Print, Literary genre, Biography, Illustration, Content,
Video Types, Serials, Serial Type, Periodicity, Regularity
5) Try to search "Country-publication=FR" in simple search
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No koha-qa errors.
Tests for GRS-1
Followed test plan
Search by coded fields works, but only on OPAC,
on staff there are few options
Search by Country-publication works after patch
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Galen Charlton [Wed, 9 Oct 2013 05:26:27 +0000 (05:26 +0000)]
bug 6201: (follow-up) update unit tests
This patch updates the unit tests for the BibTeX export
to add a regression test for supplying the author for
non-UNIMARC records. It also adjusts the test to reflect
the change in quote character from "" to {}.
To test:
[1] Verify that prove -v t/db_dependent/Record.t passes
Bug 6201: Add fields 1xx to marc2bibtex (for MARC21 and NORMARC)
Modified Record::marc2bibtex to varlidate fields 100, 110 and 111 in
non-UNIMARC flavours.
Test plan:
1)Search any books in the OPAC with a main entry (1XX in MARC21, 700-720 in UNIMARC)
2)Export the record in the bibtex format
==>The output won't contain the main entry.
3)Apply the patch
4)Export the record
==>The record will contain the main entry
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes a long standing bug.
Passes all tests and QA script.
Tested with multiple records, seems to work well.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Fridolyn SOMERS [Fri, 7 Jun 2013 10:14:02 +0000 (12:14 +0200)]
Bug 10430 - status filter not working in serial claims when translated
With a translated intranet (ie fr-FR) the status filter does not work
for "Late" status. It is because status in combobox filter is
translated "Retard" and status in table is translated "En retard".
This patch changed javascript filter to work on a status code instead
of status name.
The new classes may be used to change CSS depending on status.
Test plan :
- Use a translated intranet (ie fr-FR)
- Go to serials claim of a vendor with issues of multiple status
- Check that status filter does its work
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patch passes all tests and QA script.
The status filter should probably be changed to only
allow filtering on status that can appear on the page.
Jonathan Druart [Tue, 5 Mar 2013 12:52:20 +0000 (13:52 +0100)]
Bug 9747: Fix NSB/NSE sorting issues on z3950 search results
At least the BNF server returns results containing non-sorting
characters (NSB/NSE).
In order to sort results according these characters, this patch adds a
new Datatable function.
Test plan:
- search 'tintin' on the z3950 search (cataloguing/z3950_search.pl)
- sort on title (default sort) and check that results are not well
sorted.
- apply this patch
- do the same search and check that the first result is "Hergé. Les
Aventures de Tintin..."
The value of the cell is:
<td>\88Hergé. Les \89Aventures de Tintin...</td>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Works as advertised and doesn't break existing searching
Owen Leonard [Mon, 9 Sep 2013 18:46:23 +0000 (14:46 -0400)]
Bug 10794: fix sorting on billing date column in invoices table
This patch adds the sorting by title string option to the table of
invoices. This allows column data to be sorted based on the
ISO-formatted date rather than the formatted-for-display date. A "blank"
(0000-00-00) date is added to cells which contain no date data.
To test, view the Acquisitions Invoices page (acqui/invoices.pl) and
confirm that the "Billing date" column is sorted correctly regardless of
the dateformat system preference.
Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Template only change, passes all tests and QA script.
Sorting of the billing column now works as expected.
Bug 10641 - GetBooksellerWithLateOrders in C4::Bookseller.pm has some incoherences
This patch fixes some incoherences of the routine
GetBooksellerWithOrders().
Now it considers the field $estimateddeliverydateto and it replaces it
by now() only if it is undef.
Also, it doesn't test if $aqbookseller.deliverytime is not Null anymore
but if $deliverytime = null or undef, it replaces it by 0.
It also verifies if $delay is >= 0 and return undef if it is a negative
value.
To Test:
Before, this routine sorts out the BookSellerWithLateOrders. If a
bookseller did not specify a deliverytime, it would never appears in
the list of LateOrders. Moreover, if the field "Estimated delivery
date to" was specified, it didn't take care of the value and it
returns the late order up to today's date.
Now, the returned list considers all the fields give and if the
delivery time of the bookseller is not specified, it calculates the
late orders as if the deliverytime is 0. By default, all booksellers
which have orders in late until today are listed unless "estimated
delivery date to" is specified.
prove t/db_dependent/Bookseller.t
t/db_dependent/Bookseller.t ..
[Some warnings about uninitialized values]
WARNING: GetBooksellerWithLateOrders is called with a negative value at C4/Bookseller.pm line 135.
t/db_dependent/Bookseller.t .. ok
All tests successful.
Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass.
Kenza Zaki [Wed, 28 Aug 2013 08:46:07 +0000 (10:46 +0200)]
Bug 10795: Improvements for GetOpenIssue in C4::Circulation
This patch adds some improvements for the routine GetOpenIssue().
Now, it verifies if the parameter is given (if not it returns undef)
and it returns $sth->fetchrow_hashref() instead of a $issue.
To test:
prove t/db_dependent/Circulation_issue.t
t/db_dependent/Circulation_issue.t .. ok
All tests successful.
Files=1, Tests=16, 2 wallclock secs ( 0.06 usr 0.01 sys + 1.09 cusr 0.07 csys = 1.23 CPU)
Result: PASS
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Same situation as the one noted in comment of
Bug 10683, test fails unless there is an issuingrule
All, All with 1 as renewals allowed.
With that condition, it succeeds
No koha-qa errors
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Kenza Zaki [Wed, 28 Aug 2013 08:08:10 +0000 (10:08 +0200)]
Bug 10683: add unit tests for CRUD routines in C4::Circulation
This patch adds some unit tests wrapped in a transaction for
C4::Circulation.pm.
Circulation_Branch.t adds tests for routines which deal with
branch_item_rules,branch_borrower_circ_rules,
default_branch_circ_rules, default_circ_rules, and
default_branch_item_rules in the database.
Circulation_issue.t adds tests for routines which deal with accountline
and issues in the database.
NOTE: Some commented tests have to be fixed, and some tests can be added.
More, other routines of Circulation.pm are tested in the patches:
10692 UT: Routines about transfers in Circulation.pm need unit tests
10710 UT : OfflineOperation's routines in C4/Circulation.t need unit tests
10767 UT: Routines which interact with the table issuingrules in C4/Circulation need unit test
Test plan:
prove t/db_dependent/Circulation_issue.t
t/db_dependent/Circulation_issue.t .. ok
All tests successful.
Files=1, Tests=16, 0 wallclock secs ( 0.02 usr 0.00 sys + 0.40 cusr 0.02 csys = 0.44 CPU)
Result: PASS
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Well, I don't know exactly what to do with this, so
I left it to QA
a) prove t/db_dependent/Circulation_Branch.t works well and without erros
b) prove t/db_dependent/Circulation_issue.t works without errors for me
ONLY if I have a issuingrule for All, All with 1 as renewals allowed, in
other cases it fails.
No koha-qa errors
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Kenza Zaki [Thu, 8 Aug 2013 08:39:26 +0000 (10:39 +0200)]
Bug 10698: give C4::Circulation::DeleteTransfer() a return value
This patch adds return values to DeleteTransfer:
Undef if no parameters are given
1 if a Transfer is deleted
0E0 if a wrong parameter is given
It also fixes some unit tests in t/db_dependent/Circulation_transfers.t
To test:
prove t/db_dependent/Circulation_transfers.t
t/db_dependent/Circulation_transfers.t .. ok
All tests successful.
Files=1, Tests=14, 20 wallclock secs ( 0.03 usr 0.00 sys + 0.39 cusr 0.02 csys = 0.44 CPU)
Result: PASS
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Applied 10681 and 10692 before 10698
Run prove t/db_dependent/Circulation_transfers.t without errors
No koha-qa errors on all 3 patches
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Kenza Zaki [Mon, 12 Aug 2013 12:40:50 +0000 (14:40 +0200)]
Bug 10711: make GetOfflineOperation() return $sth->fetchrow_hashref instead of $result
To test :
prove t/db_dependent/Circulation_OfflineOperation.t
t/db_dependent/Circulation_OfflineOperation.t .. ok
All tests successful.
Files=1, Tests=7, 19 wallclock secs ( 0.02 usr 0.01 sys + 0.24 cusr 0.02 csys = 0.29 CPU)
Result: PASS
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: applied 10681 and 10710 before 10711
prove t/db_dependent/Circulation_OfflineOperation.t run without errors
koha-qa reports only 2 tabulations, fixed in a follow-up
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Kenza Zaki [Mon, 5 Aug 2013 09:28:03 +0000 (11:28 +0200)]
Bug 10681: remove inappropriate uses of finish() from C4::Circulation
This patch gets rid of finish().
From the man page
finish()
Indicate that no more data will be fetched from this statement handle
before it is either executed again or destroyed.
You almost certainly do not need to call this method.
Adding calls to "finish" after loop that fetches all rows is a common
mistake, don't do it, it can mask genuine problems like uncaught fetch errors.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Kenza Zaki [Mon, 5 Aug 2013 09:50:40 +0000 (11:50 +0200)]
Bug 10682: remove inappropriate uses of finish() from C4::Reserves
This patch gets rid of finish.
From the man page
finish()
Indicate that no more data will be fetched from this statement handle
before it is either executed again or destroyed.
You almost certainly do not need to call this method.
Adding calls to "finish" after loop that fetches all rows is a common
mistake, don't do it, it can mask genuine problems like uncaught fetch errors.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Similar to other patches from the same author
I run prove t/db_dependent/Reserves.t without errors
don't know if more tests are needed.
No koha-qa errors
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Kenza Zaki [Mon, 5 Aug 2013 13:55:40 +0000 (15:55 +0200)]
Bug 10685: remove inappropriate uses of finish in C4::Accounts.pm
This patch gets rid of finish.
From the man page
finish()
Indicate that no more data will be fetched from this statement handle
before it is either executed again or destroyed.
You almost certainly do not need to call this method.
Adding calls to "finish" after loop that fetches all rows is a common
mistake, don't do it, it can mask genuine problems like uncaught fetch errors.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Similar to other patches from the same author.
Run prove t/db_dependent/Accounts.t without errors
No koha-qa errors
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Kyle M Hall [Thu, 19 Sep 2013 16:18:11 +0000 (12:18 -0400)]
Bug 10917: allow staff to update hold pickup location without modify_holds_priority
A librarian cannot modify a hold's pickup location unless he or she has
the permission modify_holds_priority. This appears to be a bug and not
by design. The reason the update fails is due to the priority not being
passed to ModReserve. The priority is not displayed when a librarian
does not have the modify_holds_priority permission.
Test Plan:
1) Remove the modify_holds_priority from your logged in user
* User cannot be a superlibrarian
2) Attempt to change the pickup location for a hold
3) Note the change fails
4) Apply this patch
5) Repeat step 2
6) Note the change succeeds
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Template change only.
Passes all tests and QA script.
Tested:
- Confirmed that changing the pickup location is not
possible in master without the modify_holds_priority
permission
- Confirmed that the patch fixes the problem - pickup
location can now be changed with and without the
permission
- Pickup location can still not be changed, when
IndependentBranches is activated
Mark Tompsett [Tue, 27 Aug 2013 21:29:20 +0000 (17:29 -0400)]
Bug 7764: rework the INSTALL.ubuntu instructions
This is a major rework. Key improvements include:
- Removed confusing multiple versions for Ubuntu leaving only one set
of instructions.
- The packages koha-deps and koha-perldeps are used.
- License has been updated to reflect GPL3.
- More wiki reference links have been included.
- It is aimed to be based on source, not just tarball or just git.
- Sample output has been cut as much as possible.
- Almost cut-and-paste easy, making it friendlier than INSTALL.debian.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed a tiny typo: seperate
Makes all sense to me - only wondering a bit about the recommendation
of using lynx for the web installer.
Quite an improvement, so passing QA.
Kyle M Hall [Wed, 9 May 2012 16:47:19 +0000 (12:47 -0400)]
Bug 5544: prefer library email address over admin address as notice sender
Right now overdues come from the branch, but the
others come from the admin email address - this
is a problem in multi-branch systems because they
have to come up with one email address that all
branches have access to.
C4::Letters::_send_message_by_email currently sets
the from address in the following order:
1) Address specified in message
2) Koha admin email address
The order will now be:
1) Address specified in message
2) Borrower's home library email address
3) Koha admin email address
Test Plan:
1) Set your library email addresses, and the KohaAdminEmailAddress
Make sure each of them are unqiue
2) Choose a borrower, enable the enhanced messaging and enable the
checkout and checkin email notices. Use your email address for
the borrower's email so you can recieve the emails.
3) Check out an item, check the from address of the email,
it should be the email addres set in KohaAdminEmailAddress
4) Apply the patch
5) Return the item, check the from address of the email,
it should match the email address set for the borrower's
home library.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Julian Maurice [Fri, 27 Sep 2013 09:48:01 +0000 (11:48 +0200)]
Bug 10856: Fix cover display in shelf browser
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I was able to reproduce the problem with local covers and
the patch fixes it in my tests.
Owen Leonard [Tue, 17 Sep 2013 12:33:01 +0000 (08:33 -0400)]
Bug 10856: (Follow-up) improve behavior of the "close shelf browser" link
In Firefox at least, the shelf browser cannot be reopened after
hiding it with the "close shelf browser" link. This followup improves
the behavior of the "close shelf browser" link so that the shelf browser
can be redisplayed.
To test, open a bibliographic detail page in the OPAC and click a
"browse shelf" link. Click the "close shelf browser" link--the shelf
browser should be hidden. Click the original "browse shelf" link and the
shelf browser should reappear without reloading the page.
Test with Firefox and Chrome (at least).
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass.
Testing notes:
- New unit tests in t/db_dependent/ShelfBrowser.t pass.
- System preference OPACShelfBrowser still works as expected.
- Closing and opening the shelf browser works as expected.
- Next and Previous links show new and nicer behaviour.
- Logs are clean.
Tested with Firefox and Chromium under Ubuntu.
Notes: The currently displayed record could maybe be highlighted
a bit better.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
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.