Imported MARC notice and Authorities: : inconsistent database
Hello, Recently, we have imported a set of notices, from another abbey, in the reservoir. When we create a new examplar using the previous imported notices, the field 700.9 (authority - internal koha number) refering the auth_id isn't updated or removed (still reference the old authority number, in the other catalog). As result, we have an examplar with 700.a (authority name) correct, but with an internal reference wrong (not valid in us catalog). If we search all notices linked with an authority, there is wrong attribution. Next an example. Starting with: - Notices in reservoir: - Title_A / Author_A (auth_id = 1) [from import] - Authority in catalog: - Author_B (auth_id = 1) [created locally] - Notice in catalog: - Title_B / Author_B (auth_id = 1) Next, we create a new examplar based on notice in reservoir, result: - Authority in catalog: - Author_B (auth_id = 1) [created locally] - Notice in catalog: - Title_A / Author_A (auth_id = 1) - Title_B / Author_B (auth_id = 1) (doubt if Author_A added in authorities or not) Now, if search notice attached with Author_B (auth_id = 1): results: - Title_A / Author_A (auth_id = 1) - Title_B / Author_B (auth_id = 1) The database is inconsistent. Where is the problem: - a misused of imported MARC: an option somewhere should be set... - a bug in importing MARC: 700.9 should be cleaned before import... - another possibility ? Currently, no bug report filled, as I don't no if it is a misusing or a bug. Thanks. -- Frère Sébastien Marie Abbaye Notre Dame de La Trappe 61380 Soligny-la-Trappe Tél: 02.33.84.17.00 Fax: 02.33.34.98.57 Web: http://www.latrappe.fr/
Hello, As we obtain no reply for an inconsistent database, I will explain again the problem, with SQL for examples. Currently, after using imported set of notices and using it we have the following results: SELECT count(*) FROM biblioitems WHERE extractvalue(biblioitems.marcxml, '/record/datafield[@tag="700"]/subfield[@code="9"]') != '' AND extractvalue(biblioitems.marcxml, '/record/datafield[@tag="700"]/subfield[@code="9"]') NOT IN ( SELECT authid FROM auth_header ); +----------+ | count(*) | +----------+ | 121 | +----------+ english-version: If I extract from MarcXML (on table biblioitems) the 700.9 (Primary Author, koha_internal_code) and search in auth_header, we currently have 121 items with no-existent 700.9 . This is only a part of the problem: some 700.9 are existent but wrong (points to bad authority). SELECT count(*) FROM biblioitems, auth_header WHERE extractvalue(biblioitems.marcxml, '/record/datafield[@tag="700"]/subfield[@code="9"]') = auth_header.authid AND extractvalue(biblioitems.marcxml, '/record/datafield[@tag="700"]/subfield[@code="a"]') != extractvalue(auth_header.marcxml, '/record/datafield[@tag="200"]/subfield[@code="a"]'); +----------+ | count(*) | +----------+ | 3 | +----------+ Any suggestions ? This seems a bug (in import of notices where old koha_internal_code is not removed), but I would prefered have your opinion before submit a bugreport. And I will like some clues to correct the inconsitences ! Thanks. -- Frère Sébastien Marie Abbaye Notre Dame de La Trappe 61380 Soligny-la-Trappe Tél: 02.33.84.17.00 Fax: 02.33.34.98.57 Web: http://www.latrappe.fr/ On Sat, Jan 29, 2011 at 12:13:28PM +0100, Frère Sébastien Marie wrote:
Hello,
Recently, we have imported a set of notices, from another abbey, in the reservoir.
When we create a new examplar using the previous imported notices, the field 700.9 (authority - internal koha number) refering the auth_id isn't updated or removed (still reference the old authority number, in the other catalog).
As result, we have an examplar with 700.a (authority name) correct, but with an internal reference wrong (not valid in us catalog).
If we search all notices linked with an authority, there is wrong attribution.
Next an example.
Starting with: - Notices in reservoir: - Title_A / Author_A (auth_id = 1) [from import]
- Authority in catalog: - Author_B (auth_id = 1) [created locally]
- Notice in catalog: - Title_B / Author_B (auth_id = 1)
Next, we create a new examplar based on notice in reservoir, result: - Authority in catalog: - Author_B (auth_id = 1) [created locally]
- Notice in catalog: - Title_A / Author_A (auth_id = 1) - Title_B / Author_B (auth_id = 1)
(doubt if Author_A added in authorities or not)
Now, if search notice attached with Author_B (auth_id = 1): results: - Title_A / Author_A (auth_id = 1) - Title_B / Author_B (auth_id = 1)
The database is inconsistent.
Where is the problem: - a misused of imported MARC: an option somewhere should be set... - a bug in importing MARC: 700.9 should be cleaned before import... - another possibility ?
Currently, no bug report filled, as I don't no if it is a misusing or a bug.
Thanks. -- Frère Sébastien Marie Abbaye Notre Dame de La Trappe 61380 Soligny-la-Trappe Tél: 02.33.84.17.00 Fax: 02.33.34.98.57 Web: http://www.latrappe.fr/
Hie, I see what you meen. But has far as I know, the link between biblio and authorities is not managed during import (it would be quite difficult I think). Subfield 700$9 is considered as a normal data. You may find a script in Koha to synchronise the biblio fields with the existing authorities. If not, you'll have to create it. Maybe a SQL script is enought. Tell us if you suceed. Best regards, 2011/2/15 Frère Sébastien <semarie-koha@latrappe.fr>
Hello,
As we obtain no reply for an inconsistent database, I will explain again the problem, with SQL for examples.
Currently, after using imported set of notices and using it we have the following results:
SELECT count(*) FROM biblioitems WHERE extractvalue(biblioitems.marcxml, '/record/datafield[@tag="700"]/subfield[@code="9"]') != '' AND extractvalue(biblioitems.marcxml, '/record/datafield[@tag="700"]/subfield[@code="9"]') NOT IN ( SELECT authid FROM auth_header ); +----------+ | count(*) | +----------+ | 121 | +----------+
english-version: If I extract from MarcXML (on table biblioitems) the 700.9 (Primary Author, koha_internal_code) and search in auth_header, we currently have 121 items with no-existent 700.9 .
This is only a part of the problem: some 700.9 are existent but wrong (points to bad authority).
SELECT count(*) FROM biblioitems, auth_header WHERE extractvalue(biblioitems.marcxml, '/record/datafield[@tag="700"]/subfield[@code="9"]') = auth_header.authid AND extractvalue(biblioitems.marcxml, '/record/datafield[@tag="700"]/subfield[@code="a"]') != extractvalue(auth_header.marcxml, '/record/datafield[@tag="200"]/subfield[@code="a"]'); +----------+ | count(*) | +----------+ | 3 | +----------+
Any suggestions ? This seems a bug (in import of notices where old koha_internal_code is not removed), but I would prefered have your opinion before submit a bugreport.
And I will like some clues to correct the inconsitences !
Thanks.
-- Frère Sébastien Marie Abbaye Notre Dame de La Trappe 61380 Soligny-la-Trappe Tél: 02.33.84.17.00 Fax: 02.33.34.98.57 Web: http://www.latrappe.fr/
On Sat, Jan 29, 2011 at 12:13:28PM +0100, Frère Sébastien Marie wrote:
Hello,
Recently, we have imported a set of notices, from another abbey, in the reservoir.
When we create a new examplar using the previous imported notices, the field 700.9 (authority - internal koha number) refering the auth_id isn't updated or removed (still reference the old authority number, in the other catalog).
As result, we have an examplar with 700.a (authority name) correct, but with an internal reference wrong (not valid in us catalog).
If we search all notices linked with an authority, there is wrong attribution.
Next an example.
Starting with: - Notices in reservoir: - Title_A / Author_A (auth_id = 1) [from import]
- Authority in catalog: - Author_B (auth_id = 1) [created locally]
- Notice in catalog: - Title_B / Author_B (auth_id = 1)
Next, we create a new examplar based on notice in reservoir, result: - Authority in catalog: - Author_B (auth_id = 1) [created locally]
- Notice in catalog: - Title_A / Author_A (auth_id = 1) - Title_B / Author_B (auth_id = 1)
(doubt if Author_A added in authorities or not)
Now, if search notice attached with Author_B (auth_id = 1): results: - Title_A / Author_A (auth_id = 1) - Title_B / Author_B (auth_id = 1)
The database is inconsistent.
Where is the problem: - a misused of imported MARC: an option somewhere should be set... - a bug in importing MARC: 700.9 should be cleaned before import... - another possibility ?
Currently, no bug report filled, as I don't no if it is a misusing or a bug.
Thanks. -- Frère Sébastien Marie Abbaye Notre Dame de La Trappe 61380 Soligny-la-Trappe Tél: 02.33.84.17.00 Fax: 02.33.34.98.57 Web: http://www.latrappe.fr/
Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
-- Fridolyn SOMERS ICT engineer PROGILONE - Lyon - France fridolyn.somers@gmail.com
* Fridolyn SOMERS (fridolyn.somers@gmail.com) wrote:
Hie,
I see what you meen.
But has far as I know, the link between biblio and authorities is not managed during import (it would be quite difficult I think). Subfield 700$9 is considered as a normal data.
You may find a script in Koha to synchronise the biblio fields with the existing authorities. If not, you'll have to create it. Maybe a SQL script is enought.
Tell us if you suceed.
Hi All There is a script in misc link_bibs_to_authorities.pl which should create the linkages for you Chris
Best regards,
2011/2/15 Fr�re S�bastien <[1]semarie-koha@latrappe.fr>
Hello,
As we obtain no reply for an inconsistent database, I will explain again the problem, with SQL for examples.
Currently, after using imported set of notices and using it we have the following results:
SELECT count(*) �FROM biblioitems �WHERE extractvalue(biblioitems.marcxml, '/record/datafield[@tag="700"]/subfield[@code="9"]') != '' � AND extractvalue(biblioitems.marcxml, '/record/datafield[@tag="700"]/subfield[@code="9"]') NOT IN ( � �SELECT authid FROM auth_header ); +----------+ | count(*) | +----------+ | � � �121 | +----------+
english-version: If I extract from MarcXML (on table biblioitems) the 700.9 (Primary Author, koha_internal_code) and search in auth_header, we currently have 121 items with no-existent 700.9 .
This is only a part of the problem: some 700.9 are existent but wrong (points to bad authority).
SELECT count(*) �FROM biblioitems, auth_header �WHERE extractvalue(biblioitems.marcxml, '/record/datafield[@tag="700"]/subfield[@code="9"]') = auth_header.authid � AND extractvalue(biblioitems.marcxml, '/record/datafield[@tag="700"]/subfield[@code="a"]') != extractvalue(auth_header.marcxml, '/record/datafield[@tag="200"]/subfield[@code="a"]'); +----------+ | count(*) | +----------+ | � � � �3 | +----------+
Any suggestions ? This seems a bug (in import of notices where old koha_internal_code is not removed), but I would prefered have your opinion before submit a bugreport.
And I will like some clues to correct the inconsitences ! Thanks.
-- Fr�re S�bastien Marie Abbaye Notre Dame de La Trappe 61380 Soligny-la-Trappe T�l: 02.33.84.17.00 Fax: 02.33.34.98.57 Web: [2]http://www.latrappe.fr/
On Sat, Jan 29, 2011 at 12:13:28PM +0100, Fr�re S�bastien Marie wrote: > Hello, > > Recently, we have imported a set of notices, from another abbey, in > the reservoir. > > When we create a new examplar using the previous imported notices, > the field 700.9 (authority - internal koha number) refering the > auth_id isn't updated or removed (still reference the old authority > number, in the other catalog). > > As result, we have an examplar with 700.a (authority name) correct, > but with an internal reference wrong (not valid in us catalog). > > If we search all notices linked with an authority, there is wrong > attribution. > > Next an example. > > Starting with: > �- Notices in reservoir: > � �- Title_A / Author_A (auth_id = 1) [from import] > > �- Authority in catalog: > � �- Author_B (auth_id = 1) [created locally] > > �- Notice in catalog: > � �- Title_B / Author_B (auth_id = 1) > > > Next, we create a new examplar based on notice in reservoir, result: > �- Authority in catalog: > � �- Author_B (auth_id = 1) [created locally] > > �- Notice in catalog: > � �- Title_A / Author_A (auth_id = 1) > � �- Title_B / Author_B (auth_id = 1) > > (doubt if Author_A added in authorities or not) > > Now, if search notice attached with Author_B (auth_id = 1): > �results: > � - Title_A / Author_A (auth_id = 1) > � - Title_B / Author_B (auth_id = 1) > > The database is inconsistent. > > Where is the problem: > �- a misused of imported MARC: an option somewhere should be set... > �- a bug in importing MARC: 700.9 should be cleaned before import... > �- another possibility ? > > Currently, no bug report filled, as I don't no if it is a misusing > or a bug. > > Thanks. > -- > Fr�re S�bastien Marie > Abbaye Notre Dame de La Trappe > 61380 Soligny-la-Trappe > T�l: 02.33.84.17.00 > Fax: 02.33.34.98.57 > Web: [3]http://www.latrappe.fr/ _______________________________________________ Koha-devel mailing list [4]Koha-devel@lists.koha-community.org [5]http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : [6]http://www.koha-community.org/ git : [7]http://git.koha-community.org/ bugs : [8]http://bugs.koha-community.org/
-- Fridolyn SOMERS ICT engineer PROGILONE - Lyon - France [9]fridolyn.somers@gmail.com
References
Visible links 1. mailto:semarie-koha@latrappe.fr 2. http://www.latrappe.fr/ 3. http://www.latrappe.fr/ 4. mailto:Koha-devel@lists.koha-community.org 5. http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel 6. http://www.koha-community.org/ 7. http://git.koha-community.org/ 8. http://bugs.koha-community.org/ 9. mailto:fridolyn.somers@gmail.com
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
-- Chris Cormack Catalyst IT Ltd. +64 4 803 2238 PO Box 11-053, Manners St, Wellington 6142, New Zealand
Hie, Thanks for the solution. I have a question : In this script, it seems that if the authority is changed, the items are deleted : # delete any item tags my ($itemtag, $itemsubfield) = GetMarcFromKohaField("items.itemnumber", ''); foreach my $field ($bib->field($itemtag)) { $bib->delete_field($field); } Why is that ? Regards, 2011/2/15 Chris Cormack <chrisc@catalyst.net.nz>
Hie,
I see what you meen.
But has far as I know, the link between biblio and authorities is not managed during import (it would be quite difficult I think). Subfield 700$9 is considered as a normal data.
You may find a script in Koha to synchronise the biblio fields with
* Fridolyn SOMERS (fridolyn.somers@gmail.com) wrote: the
existing authorities. If not, you'll have to create it. Maybe a SQL script is enought.
Tell us if you suceed.
Hi All
There is a script in misc link_bibs_to_authorities.pl which should create the linkages for you
Chris
Best regards,
2011/2/15 Fr�re S�bastien <[1]semarie-koha@latrappe.fr>
Hello,
As we obtain no reply for an inconsistent database, I will explain
again
the problem, with SQL for examples.
Currently, after using imported set of notices and using it we have
the
following results:
SELECT count(*) �FROM biblioitems �WHERE extractvalue(biblioitems.marcxml, '/record/datafield[@tag="700"]/subfield[@code="9"]') != '' � AND extractvalue(biblioitems.marcxml, '/record/datafield[@tag="700"]/subfield[@code="9"]') NOT IN ( � �SELECT authid FROM auth_header ); +----------+ | count(*) | +----------+ | � � �121 | +----------+
english-version: If I extract from MarcXML (on table biblioitems)
the
700.9 (Primary Author, koha_internal_code) and search in
auth_header, we
currently have 121 items with no-existent 700.9 .
This is only a part of the problem: some 700.9 are existent but
wrong
(points to bad authority).
SELECT count(*) �FROM biblioitems, auth_header �WHERE extractvalue(biblioitems.marcxml, '/record/datafield[@tag="700"]/subfield[@code="9"]') = auth_header.authid � AND extractvalue(biblioitems.marcxml, '/record/datafield[@tag="700"]/subfield[@code="a"]') != extractvalue(auth_header.marcxml, '/record/datafield[@tag="200"]/subfield[@code="a"]'); +----------+ | count(*) | +----------+ | � � � �3 | +----------+
Any suggestions ? This seems a bug (in import of notices where old koha_internal_code is not removed), but I would prefered have your opinion before submit a bugreport.
And I will like some clues to correct the inconsitences ! Thanks.
-- Fr�re S�bastien Marie Abbaye Notre Dame de La Trappe 61380 Soligny-la-Trappe T�l: 02.33.84.17.00 Fax: 02.33.34.98.57 Web: [2]http://www.latrappe.fr/
On Sat, Jan 29, 2011 at 12:13:28PM +0100, Fr�re S�bastien Marie
wrote:
> Hello, > > Recently, we have imported a set of notices, from another abbey,
in
> the reservoir. > > When we create a new examplar using the previous imported notices, > the field 700.9 (authority - internal koha number) refering the > auth_id isn't updated or removed (still reference the old
authority
> number, in the other catalog). > > As result, we have an examplar with 700.a (authority name)
correct,
> but with an internal reference wrong (not valid in us catalog). > > If we search all notices linked with an authority, there is wrong > attribution. > > Next an example. > > Starting with: > �- Notices in reservoir: > � �- Title_A / Author_A (auth_id = 1) [from import] > > �- Authority in catalog: > � �- Author_B (auth_id = 1) [created locally] > > �- Notice in catalog: > � �- Title_B / Author_B (auth_id = 1) > > > Next, we create a new examplar based on notice in reservoir,
result:
> �- Authority in catalog: > � �- Author_B (auth_id = 1) [created locally] > > �- Notice in catalog: > � �- Title_A / Author_A (auth_id = 1) > � �- Title_B / Author_B (auth_id = 1) > > (doubt if Author_A added in authorities or not) > > Now, if search notice attached with Author_B (auth_id = 1): > �results: > � - Title_A / Author_A (auth_id = 1) > � - Title_B / Author_B (auth_id = 1) > > The database is inconsistent. > > Where is the problem: > �- a misused of imported MARC: an option somewhere should be
set...
> �- a bug in importing MARC: 700.9 should be cleaned before
import...
> �- another possibility ? > > Currently, no bug report filled, as I don't no if it is a misusing > or a bug. > > Thanks. > -- > Fr�re S�bastien Marie > Abbaye Notre Dame de La Trappe > 61380 Soligny-la-Trappe > T�l: 02.33.84.17.00 > Fax: 02.33.34.98.57 > Web: [3]http://www.latrappe.fr/ _______________________________________________ Koha-devel mailing list [4]Koha-devel@lists.koha-community.org [5]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : [6]http://www.koha-community.org/ git : [7]http://git.koha-community.org/ bugs : [8]http://bugs.koha-community.org/
-- Fridolyn SOMERS ICT engineer PROGILONE - Lyon - France [9]fridolyn.somers@gmail.com
References
Visible links 1. mailto:semarie-koha@latrappe.fr 2. http://www.latrappe.fr/ 3. http://www.latrappe.fr/ 4. mailto:Koha-devel@lists.koha-community.org 5.
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
6. http://www.koha-community.org/ 7. http://git.koha-community.org/ 8. http://bugs.koha-community.org/ 9. mailto:fridolyn.somers@gmail.com
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
-- Chris Cormack Catalyst IT Ltd. +64 4 803 2238 PO Box 11-053, Manners St, Wellington 6142, New Zealand
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux)
iEYEARECAAYFAk1a04UACgkQZgbcHEvgMLP8wgCgk+uADfW1pIdH4bg3NqhRJBy4 VEkAmgLTX84coNwkJT7j18YgXV2OOiCt =3N0Z -----END PGP SIGNATURE-----
-- Fridolyn SOMERS ICT engineer PROGILONE - Lyon - France fridolyn.somers@gmail.com
* Fridolyn SOMERS (fridolyn.somers@gmail.com) wrote:
Hie,
Thanks for the solution.
I have a question : In this script, it seems that if the authority is changed, the items are deleted : # delete any item tags my ($itemtag, $itemsubfield) = GetMarcFromKohaField("items.itemnumber", ''); foreach my $field ($bib->field($itemtag)) { $bib->delete_field($field); }
Why is that ?
Hi Fridolyn http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=2258 If you want to know more check out commit 6858da97c361fe9a5fddfed7c6d9b1103b27dca0 The commit message is bug 2258 - do not duplicate embedded items If a MARC bib is modified by this batch job, do not duplicate the item tags embedded in it (e.g., 952 for MARC21). When modifying a bib record, any embedded item tags must be removed before calling ModBiblio - perhaps this should be moved to ModBiblio itself. Also removed an error in the job's help text. FYI I found this information using git blame. Chris
Regards,
2011/2/15 Chris Cormack <[1]chrisc@catalyst.net.nz>
* Fridolyn SOMERS ([2]fridolyn.somers@gmail.com) wrote: > Hie, > > I see what you meen. > > But has far as I know, the link between biblio and authorities is not > managed during import (it would be quite difficult I think). > Subfield 700$9 is considered as a normal data. > > You may find a script in Koha to synchronise the biblio fields with the > existing authorities. > If not, you'll have to create it. Maybe a SQL script is enought. > > Tell us if you suceed.
Hi All
There is a script in misc [3]link_bibs_to_authorities.pl which should create the linkages for you
Chris
> > Best regards, > > 2011/2/15 Fr�re S�bastien <[1][4]semarie-koha@latrappe.fr> > > Hello, > > As we obtain no reply for an inconsistent database, I will explain again > the problem, with SQL for examples. > > Currently, after using imported set of notices and using it we have the > following results: > > SELECT count(*) > �FROM biblioitems > �WHERE extractvalue(biblioitems.marcxml, > '/record/datafield[@tag="700"]/subfield[@code="9"]') != '' > � AND extractvalue(biblioitems.marcxml, > '/record/datafield[@tag="700"]/subfield[@code="9"]') NOT IN ( > � �SELECT authid FROM auth_header ); > +----------+ > | count(*) | > +----------+ > | � � �121 | > +----------+ > > english-version: If I extract from MarcXML (on table biblioitems) the > 700.9 (Primary Author, koha_internal_code) and search in auth_header, we > currently have 121 items with no-existent 700.9 . > > This is only a part of the problem: some 700.9 are existent but wrong > (points to bad authority). > > SELECT count(*) > �FROM biblioitems, auth_header > �WHERE extractvalue(biblioitems.marcxml, > '/record/datafield[@tag="700"]/subfield[@code="9"]') = > auth_header.authid > � AND extractvalue(biblioitems.marcxml, > '/record/datafield[@tag="700"]/subfield[@code="a"]') != > extractvalue(auth_header.marcxml, > '/record/datafield[@tag="200"]/subfield[@code="a"]'); > +----------+ > | count(*) | > +----------+ > | � � � �3 | > +----------+ > > Any suggestions ? This seems a bug (in import of notices where old > koha_internal_code is not removed), but I would prefered have your > opinion before submit a bugreport. > > And I will like some clues to correct the inconsitences ! > Thanks. > > -- > Fr�re S�bastien Marie > Abbaye Notre Dame de La Trappe > 61380 Soligny-la-Trappe > T�l: 02.33.84.17.00 > Fax: 02.33.34.98.57 > Web: [2][5]http://www.latrappe.fr/ > > On Sat, Jan 29, 2011 at 12:13:28PM +0100, Fr�re S�bastien Marie wrote: > > Hello, > > > > Recently, we have imported a set of notices, from another abbey, in > > the reservoir. > > > > When we create a new examplar using the previous imported notices, > > the field 700.9 (authority - internal koha number) refering the > > auth_id isn't updated or removed (still reference the old authority > > number, in the other catalog). > > > > As result, we have an examplar with 700.a (authority name) correct, > > but with an internal reference wrong (not valid in us catalog). > > > > If we search all notices linked with an authority, there is wrong > > attribution. > > > > Next an example. > > > > Starting with: > > �- Notices in reservoir: > > � �- Title_A / Author_A (auth_id = 1) [from import] > > > > �- Authority in catalog: > > � �- Author_B (auth_id = 1) [created locally] > > > > �- Notice in catalog: > > � �- Title_B / Author_B (auth_id = 1) > > > > > > Next, we create a new examplar based on notice in reservoir, result: > > �- Authority in catalog: > > � �- Author_B (auth_id = 1) [created locally] > > > > �- Notice in catalog: > > � �- Title_A / Author_A (auth_id = 1) > > � �- Title_B / Author_B (auth_id = 1) > > > > (doubt if Author_A added in authorities or not) > > > > Now, if search notice attached with Author_B (auth_id = 1): > > �results: > > � - Title_A / Author_A (auth_id = 1) > > � - Title_B / Author_B (auth_id = 1) > > > > The database is inconsistent. > > > > Where is the problem: > > �- a misused of imported MARC: an option somewhere should be set... > > �- a bug in importing MARC: 700.9 should be cleaned before import... > > �- another possibility ? > > > > Currently, no bug report filled, as I don't no if it is a misusing > > or a bug. > > > > Thanks. > > -- > > Fr�re S�bastien Marie > > Abbaye Notre Dame de La Trappe > > 61380 Soligny-la-Trappe > > T�l: 02.33.84.17.00 > > Fax: 02.33.34.98.57 > > Web: [3][6]http://www.latrappe.fr/ > _______________________________________________ > Koha-devel mailing list > [4][7]Koha-devel@lists.koha-community.org > [5][8]http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > website : [6][9]http://www.koha-community.org/ > git : [7][10]http://git.koha-community.org/ > bugs : [8][11]http://bugs.koha-community.org/ > > -- > Fridolyn SOMERS > ICT engineer > PROGILONE - Lyon - France > [9][12]fridolyn.somers@gmail.com > > References > > Visible links > 1. mailto:[13]semarie-koha@latrappe.fr > 2. [14]http://www.latrappe.fr/ > 3. [15]http://www.latrappe.fr/ > 4. mailto:[16]Koha-devel@lists.koha-community.org > 5. [17]http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > 6. [18]http://www.koha-community.org/ > 7. [19]http://git.koha-community.org/ > 8. [20]http://bugs.koha-community.org/ > 9. mailto:[21]fridolyn.somers@gmail.com > _______________________________________________ > Koha-devel mailing list > [22]Koha-devel@lists.koha-community.org > [23]http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > website : [24]http://www.koha-community.org/ > git : [25]http://git.koha-community.org/ > bugs : [26]http://bugs.koha-community.org/
-- Chris Cormack Catalyst IT Ltd. [27]+64 4 803 2238 PO Box 11-053, Manners St, Wellington 6142, New Zealand -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux)
iEYEARECAAYFAk1a04UACgkQZgbcHEvgMLP8wgCgk+uADfW1pIdH4bg3NqhRJBy4 VEkAmgLTX84coNwkJT7j18YgXV2OOiCt =3N0Z -----END PGP SIGNATURE-----
-- Fridolyn SOMERS ICT engineer PROGILONE - Lyon - France [28]fridolyn.somers@gmail.com
References
Visible links 1. mailto:chrisc@catalyst.net.nz 2. mailto:fridolyn.somers@gmail.com 3. http://link_bibs_to_authorities.pl/ 4. mailto:semarie-koha@latrappe.fr 5. http://www.latrappe.fr/ 6. http://www.latrappe.fr/ 7. mailto:Koha-devel@lists.koha-community.org 8. http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel 9. http://www.koha-community.org/ 10. http://git.koha-community.org/ 11. http://bugs.koha-community.org/ 12. mailto:fridolyn.somers@gmail.com 13. mailto:semarie-koha@latrappe.fr 14. http://www.latrappe.fr/ 15. http://www.latrappe.fr/ 16. mailto:Koha-devel@lists.koha-community.org 17. http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel 18. http://www.koha-community.org/ 19. http://git.koha-community.org/ 20. http://bugs.koha-community.org/ 21. mailto:fridolyn.somers@gmail.com 22. mailto:Koha-devel@lists.koha-community.org 23. http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel 24. http://www.koha-community.org/ 25. http://git.koha-community.org/ 26. http://bugs.koha-community.org/ 27. file:///tmp/tel:%2B64%204%20803%202238 28. mailto:fridolyn.somers@gmail.com
-- Chris Cormack Catalyst IT Ltd. +64 4 803 2238 PO Box 11-053, Manners St, Wellington 6142, New Zealand
On Tue, Feb 15, 2011 at 12:44:22PM +0100, Fridolyn SOMERS wrote:
But has far as I know, the link between biblio and authorities is not managed during import (it would be quite difficult I think). Subfield 700$9 is considered as a normal data.
I think a better behavior should be to strip 700$9 (in the export stage, where its known unambigiously that 700$9 is really the koha_internal_number) ? Its resolv inconsistences in the import stage (no reference to a wrong authority), and should simplify future relinking.
You may find a script in Koha to synchronise the biblio fields with the existing authorities. If not, you'll have to create it. Maybe a SQL script is enought.
misc/link_bibs_to_authorities.pl should be the right (thanks Chris), but it failed with UNIMARC flavour... $ ./link_bibs_to_authorities.pl --test --verbose Can't locate object method "new" via package "C4::Heading::UNIMARC" (perhaps you forgot to load "C4::Heading::UNIMARC"?) at /srv/koha/koha-git-tree/C4/Heading.pm line 168. In my repository, there is no "C4/Heading/UNIMARC.pm" ... only "C4/Heading/MARC21.pm". But "C4/Heading.pm" refers to C4::Heading::UNIMARC . ----- BEGIN C4/Heading.pm: lines 164-173 ----- sub _marc_format_handler { my $marcflavour = shift; if ($marcflavour eq 'UNIMARC') { return C4::Heading::UNIMARC->new(); } else { return C4::Heading::MARC21->new(); } } ----- END C4/Heading.pm ----- And I can't verify against the git tree (git.koha-community.org seem currently hanged: ping ok, connect 80 ok, but no responses from server), but my current version its from Jan 6, 2011 , and the _marc_format_handler function dated to 2008 (date based with git blame) : so I think ok, but its lacks UNIMARC support for ./link_bibs_to_authorities.pl .
Tell us if you suceed.
Working progress... Thanks. -- Frère Sébastien Marie Abbaye Notre Dame de La Trappe 61380 Soligny-la-Trappe Tél: 02.33.84.17.00 Fax: 02.33.34.98.57 Web: http://www.latrappe.fr/
Hi, I ask review for my (start of) solution, against inconsitent between authority (auth_header.auth_id) and koha_internal_code (like 700$9). The restoration of the consistent should be in 2 stages: - stop inconsistent growing - relinks authorities This is for the first stage: stop inconsistent growing... (as we continue to catalog using some external marc files) Currently, 'cataloguing/addbiblio.pl' not check authorities if field like 700$9 exists (see BiblioAddAuthorities function). If a subfield '3' or '9' exists in field 500, 600,..., 700... there is not search for authority and the function assume the koha_internal_number is right (I think this behaviour is wrong). So, I want to strip this subfield: if no subfield, BiblioAddAuthorities will search for authority and create it if not found. Here a piece of code (the most part is taken from 'BiblioAddAuthorities') : sub BiblioCleanKohaInternalCode { my ( $record, $frameworkcode ) = @_; my $dbh=C4::Context->dbh; my $query=$dbh->prepare(qq| SELECT authtypecode,tagfield FROM marc_subfield_structure WHERE frameworkcode=? AND (authtypecode IS NOT NULL AND authtypecode<>\"\")|); $query->execute($frameworkcode ? $frameworkcode : ''); while (my $data=$query->fetchrow_hashref){ foreach my $field ($record->field($data->{tagfield})){ # clean code 3 and 9 (if exists) $field->delete_subfield(code => ['3', '9']); } } } and I call it just after 'MARCfindbreeding', in order to sanitize the record just getted. It seems to function well: the page show record without xxx$9, and at the creation of the notice, authorities are search, found or created, and linked. But what do you think: is it safe or not, to strip '3' and '9' code in these fields ? Thanks. -- Frère Sébastien Marie Abbaye Notre Dame de La Trappe 61380 Soligny-la-Trappe Tél: 02.33.84.17.00 Fax: 02.33.34.98.57 Web: http://www.latrappe.fr/
participants (3)
-
Chris Cormack -
Fridolyn SOMERS -
Frère Sébastien Marie