[Koha-bugs] [Bug 13040] Improve exporter to allow multiple branch selections

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Oct 23 02:57:18 CEST 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13040

Robin Sheat <robin at catalyst.net.nz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Failed QA                   |Needs Signoff

--- Comment #3 from Robin Sheat <robin at catalyst.net.nz> ---
(In reply to Paola Rossi from comment #2)
> <pre>Arguments must be MARC::Field object at [....]/tools/export.pl line 395
> </pre>

This actually looks like an error in general. I have tested it against master
and can reproduce it (though on current master it's line 396.)

Looking at the code, this can't work:

if ( $f =~ m/^(\d{3})(.)?$/ ) {
    my ( $field, $subfield ) = ( $1, $2 );

    # skip if this record doesn't have this field
    if ( defined $record->field($field) ) {
        if ( defined $subfield ) {
            my @tags = $record->field($field);
            foreach my $t (@tags) {
                $t->delete_subfields($subfield);
            }
        }
        else {
            $record->delete_fields($field);
        }
    }
}

where the 'delete_fields' line is the one causing the error. It can't take a
tag like the regex pulls out, it must take a MARC::Field. So, I'm going to put
this back to Needs Signoff as this is an unrelated bug.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list