Commit graph

113 commits

Author SHA1 Message Date
Frédérick Capovilla
079796ed18 Bug 5661 Fix a problem when doing an authority search with no sort order
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-02-03 10:32:40 +13:00
Colin Campbell
a8e1e54430 Bug 4309 Do not throw error on auth search of multiple fields
Ensures the multiple search does not throw a 500 error but
allows a single search to be used as well

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-24 20:15:51 +13:00
1190833149 Bug 5375 (Update date/time last transaction (MARC 005) when saving authority record)
Update 005 date/time when saving authority record for MARC21 and UNIMARC.

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-05 08:44:05 +13:00
9bd16d23b2 bug 5243: avoid crash when saving authority records on certain setups
This does not seem to occur on all platforms - C4::Search
exports SimpleSearch() by default - but adding the 'C4::Search::'
qualifier certainly doesn't hurt things.

Patch by Fridolyn Somers <fridolyn.somers@gmail.com>

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-02 16:13:27 +13:00
e9c0a11d41 Bug 5264 (Retain additional bibliographic subfields when merging authorities) [for master only]
The current code in AuthoritiesMarc.pm rewrites all subfields from the report
tag in the authority record to fields in related bibliographic records when
merging authorities. Additional subfields in the biblio records (e.g. relator
code or term) are lost in the process.

This patch retains the original algorithm but restores the additional subfields
from the original biblio record when rewriting the linked marc fields.

The problem also exists in 3.0. Two separate patches have been submitted.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 08:47:28 -04:00
7c0e441d50 replace references to defunct info email address
Now links to Koha project website.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-06-25 05:18:44 -04:00
Andrew Elwell
c6bf50d052 The start of some POD cleanups in C4/*.pm
If these are acceptable I'll continue - target is to get rid of all warnings
and errors with podcheck and make sure that any man and html formatted pod
docs look 'OK'

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-06-09 08:38:55 -04:00
64daee5495 fix a common "developement" typo
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-25 14:38:38 -04:00
Donovan Jones
593a7d8e6a Bug 2505 - Add commented use warnings where missing in *.pm 2010-04-21 20:28:51 +12:00
Lars Wirzenius
7279f55b60 Fix FSF address in directory C4/
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-03-16 20:17:56 -04:00
Colin Campbell
bcde53b5ba Bug 2505 Enabled warnings in authorities/*
Fixed obvious warnings generators in scripts
with mismatched comparisons or undefined variables
removed temporary variable selected while ensuring the
comparison it represented was between two defined variables

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-08 21:47:53 -05:00
Paul Poulain
bc5aa652a6 BuildSummary AuthoritiesMarc Enhancement
Change in BuildSummary for UNIMARC
2010-01-28 15:11:56 +01:00
Henri-Damien LAURENT
f64de645da Bug :authid empty in Authorities Default summary 2010-01-28 15:11:50 +01:00
Henri-Damien LAURENT
19ac7c1569 Bug Fix : 3343 MT1313 Authorities MARC summary
When more than one heading, fields are mixed and not well ordered
2009-11-11 20:59:32 +01:00
Henri-Damien LAURENT
2d15dcabc8 Performance improvement authorities-list.pl
CountUsage in Authorities has a performance problem.
We now rely on SimpleSarch for that purpose and it should be better
2009-10-26 15:33:21 +01:00
Henri-Damien LAURENT
349afe78ee Bug fix : 3618
Add some error proof on BuildUnimarcHierarchies
2009-09-30 11:30:33 +02:00
Jean-André Santoni
1d04f6b7c2 This little hack makes BuildUnimarcHierarchy able to work with any 2.. field. 2009-09-30 11:30:09 +02:00
Henri-Damien LAURENT
7eca37db4f Authorities bulkmarcimport
Adding some new options to bulkmarcimport :
-k idtagsubfield in order to store the id of the file record into another field
-match tagsubfield,index
-a to import authorities
-l logfilename to store logs

Bug Fixing : C4/Charset.pm
Charset was incorrect for UNIMARC Authorities

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-30 11:22:21 +02:00
Colin Campbell
3b6c36a4f3 Moved some variable definitions out of conditionals
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-07 17:08:16 -05:00
Galen Charlton
716c170b5d fix warning in C4::AuthoritiesMarc::merge()
"my" variable @X masks earlier declaration in same scope at C4/AuthoritiesMarc.pm line 1200

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-26 09:50:56 -05:00
Henri-Damien LAURENT
6c5f9d46d8 Removing map calls in void context
Thanks Joe.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 22:34:12 -05:00
Henri-Damien LAURENT
42bebf7a21 problem saving authority with ? and other special characters [resend]
Filtering those signs in order not to have them interpreted.
Removing some warns

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 22:33:53 -05:00
Henri-Damien LAURENT
9289055703 Bug Fix : 2494
Adds some rewriting
bug fix for merging
AddAuthority had some problem with updating existing data.
ModAuthority adds a new Syspref called MergeAuthoritiesOnUpdate which is used to launch or disable biblios update when updating an authority

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 22:33:20 -05:00
Henri-Damien LAURENT
385ffe5179 Merging authorities caused an encoding problem in biblios
MARC::File::USMARC::decode is not aware of encoding as MARC::File::XML is
So it caused a problem when decoding information and updating biblios.
Now uses MARC::File::XML
Encoding is OK

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 22:32:18 -05:00
Mason James
2a1501f539 BUG:3072 small work-around patch to restore authorities searching
this is a work-around fix, until a future patch arrives to define the missing 'Heading-Main' zebra-index.

for 3.0.x

[RM note: also included in HEAD so that I can include the UNIMARC(A)
 updates by HDL]

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 22:04:16 -05:00
Henri-Damien LAURENT
40ab51d8f7 Bug Fixing : searching on mainmainentry was disabled
Adding Heading-Main as new index code in order to search only on Heading-main when $a selected.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 21:59:04 -05:00
Henri-Damien LAURENT
e5d1bced25 Adding some Error proof on GetAuthority
return undef if there is a problem

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 21:01:36 -05:00
Henri-Damien LAURENT
e7282020f7 Restoring startsby search on authorities.
[RM note: fixes bug 2792]

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 20:56:58 -05:00
Brian Harrington
4c4cae22da Revisions to auto-generated authorities patch
It turns out that the "blank" record created by MARC::Record->new()
has a leader, so now I explicitly create one in addbiblio.pl.  I
also realized I can't count. :-)

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 14:01:15 -05:00
Brian Harrington
fe95a8ee9b Patch to improve auto-generated MARC21 authorities
This patch makes sure that MARC21 authorities have a minimal
Leader, 008, and 040.  If an authority record is created through
BiblioAddsAuthority it generates a 670 based on information in
the bib record.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-21 14:29:15 -05:00
Galen Charlton
d8da146e65 commented out unconditional warns
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-08-09 11:05:57 -05:00
Henri-Damien LAURENT
efc64f4424 Bug fix : use delete_field/insert_grouped_field rather than replace_with
replace_with maight have unexpected behaviour.
Has to test merge_authority.pl

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-08-09 11:05:55 -05:00
Henri-Damien LAURENT
ca8d24546e Bug Fixing merge_authority.pl
merge works on the fly now.
But for an obscure reason, merge_authority.pl fails to update database when lanched on command line.
Adding one table to LOCK for noZebra UPDATE in Biblio.pm
You should remove C4::Search from merg_authority.pl

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-08-09 11:05:53 -05:00
Galen Charlton
98f638bb14 bug 2254 [1/3]: fixed GetAuthType(); avoid crash
Improved C4::AuthoritiesMarc::GetAuthType() so that
it returns either a hashref (if the authority type exists)
or undef (if it does not exist).  The same
accessor should not be used to either return a single
value or all values of a settings list.  Note that
all existing clients of GetAuthType are expecting
either a single hashref or undef; none of them
expected the arrayref that could be returned by
the previous version of the accessor.

When BiblioAddsAuthorities is ON, addbiblio.pl
now checks the return value of GetAuthType and
no longer crashes as follows if the MARC framework
specifies an invalid authority type for a given subfield:

Can't coerce array into hash at .../cataloging/addbiblio.pl line 738.

No documentation changes.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-25 11:39:24 -05:00
Henri-Damien LAURENT
8be4679e7f unlocking table when adding/updating authorities is finished.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-24 11:51:48 -05:00
Chris Nighswonger
9b47b82a77 Porting SimpleSearch return changes to all code calling it.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-17 05:52:45 -05:00
Andrew Moore
5c51edc653 bug 1890: fixing calls to C4::Search::SimpleSearch
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-01 06:44:23 -05:00
Henri-Damien LAURENT
097e8f1c52 bug fix : 1804 : Now empty authorities and empty search return results.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-21 21:45:14 -05:00
Galen Charlton
be5b9bd4da removed lock tables for authority updates
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-03 10:46:12 -06:00
Galen Charlton
77b1420026 indexing - explicitly pass previous record to ModZebra
Because NoZebra indexing requires having both
the old and new versions of a record when processing
an updated, I adjusted the ModZebra sub to require
that the old version be explicitly passed to it.
That way, the zebraqueue row (for Zebra mode) can
now be added *after* the biblio and biblioitems
updates have been completed.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-03 10:46:10 -06:00
Galen Charlton
b549d7e1f1 added StripNonXmlChars to C4::Charset
Added invocations of StripNonXmlChars to uses
of new_from_xml() that involve records
saved to Koha fields via MARC::Record->as_xml();
for batch jobs that work on MARC XML files
coming from external sources, StripNonXmlChars
should not necessarily be used, as it may
be better to reject a file or record if it
contains that kind of encoding error.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-02-08 20:22:42 -06:00
Joe Atzberger
f59595d92f C4 - BEGIN blocks and 1; __END__ for modules
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-07 20:02:18 -06:00
Galen Charlton
8340c478fa start of big MARC21 authorities work
* Defined local field 942$a to store the authority type
  for MARC21 instead of 152$b
* Added 942$b to MARC21 authority framework.
* Added auth_header.authid and auth_header.authtypecode
  to appropriate subfields in MARC21 authority framework.
* Started work on two new modules:
    C4::AuthoritiesMarc::MARC21
    C4::AuthoritiesMarc::UNIMARC
  These modules will be used to extract MARC-format-specific
  behavior out of C4::AuthoritiesMarc
* Updated Zebra config for MARC21 to use only the 942$a
  for the authority type.
* For MARC21, added logic to move 152$b to 942$a for
  existing authority records.  Specifically, AddAuthority
  now does this move when a record is saved, while
  GetAuthority and GetAuthorityXML do this when
  extracting a record for other use.  This logic
  is temporary, and can hopefully be removed later, once
  use of 152$b in MARC21 authorities is confirmed to be
  absent for Koha users.  I will also create a batch
  job to do this update in one fell swoop.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-04 18:42:40 -06:00
Galen Charlton
25b4628e8d minor POD correction
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-04 18:40:55 -06:00
Joshua Ferraro
aabea3417b WARNING: Updates to Index Defs for Authorities
This commit is a partial fix to authority control for MARC21,
and better authority handling in general (for UNIMARC too).
Before this patch, authority searching, editing, saving, was
not functioning, or was extremely buggy.

WARNING: You will need to re-index your authority database after
applying this commit.

The following changes have been made:

  * Normalizing record.abs index names (in both MARC21 and UNIMARC)
  * Synching authorities/bib1.att, ccl.properties, AuthoritiesMarc.pm
    with new indexes (UNIMARC too)
  * Clean up biblios/bib1.att (remove duplicate att defs)
  * Clean up authorities-* templates to conform to new styles
  * Fixed search failure when using Default framework (now searches
    All)

Also included are several fixes to the built-in SRU server for
Authority and Biblio, it's recommended that you update your
koha-conf.xml file:

  * adding explain-authorities.xml and explain-biblios.xml
  * adding necessary info to koha-conf.xml to enable SRU/W
  * adding several example XSLT stylesheets, that can be used
    for SRU on-the-fly transformations (to MODS, DC, RDF, etc.)

Still remaining for 3.0 are the following tasks:

  * update MARC21 frameworks (authority and cross-reference bib)
  * update display code/templates in authority results list
  * update search code/templates to utilize index points
  * implement 'grouping' of authtypes for searching (Name, Title, Subject)
  * repair utility to import auths and perform matching
  * repair bibliographic import to match auths and warn if no match

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 00:28:40 -06:00
Joshua Ferraro
da8a4ca991 BIG COMMIT: minimal fix to authorities search
This is a minimal fix -- pname authorities work propertly, but nothing
else has been tested yet

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-26 20:23:16 -06:00
Henri-Damien LAURENT
0fe6451026 Adding 100$a coded field for UNIMARCAUTH and 152$b for any add
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-20 18:26:12 -06:00
Henri-Damien LAURENT
ddf553ca17 BugFix : authorities resultlist display was missing one item on end of list.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-19 18:55:03 -06:00
Paul POULAIN
0c76ef36ae Addind a reported_tag entry.
the reported tag contains all subfields to report from the authority into the biblio.

NOTE : It is a feature usefull only for OpenCataloger, but OpenCataloger needs it.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-14 09:12:37 -06:00
Henri-Damien LAURENT
65295e5e22 authorities result lists where badly paged.
finalresult contained the whole list and not only the useful results.
resultlist contained only 19 elements. adding one
parameters passed through pages contained also empty parameters deleting them.
Conflicts:

	C4/AuthoritiesMarc.pm

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-13 18:25:52 -06:00