[Koha-bugs] [Bug 8612] CSV export profile to have custom fields in export csv basket

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Mar 23 10:58:51 CET 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8612

--- Comment #81 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
See two things so far:

[1] Regex for field does not work:
$field =~ s/[^\.]*\.?//; # Remove the table name if exists.
Does not work well if there is no table in front.
Try this:
$field="title";
print "$field\n";
$field =~ s/[^\.]*\.?//; # Remove the table name if exists.
print "$field\n";

[2] Regex for header and fieldname makes header no longer optional.
        while ( $csv_profile_content =~ /
            ([^=]+) # header
            =
            ([^\|]+) # fieldname (table.row or row)
            \|? /gxms
        ) {
But if I understand correctly from this feature, the header should be optional.
=== Quote
You have to define which fields you want to export, separated by pipes.
You can also use your own headers (instead of the ones from Koha) by prefixing
the field name with an header, followed by the equal sign.
===
If I remove the headers now, I will have an empty csv file.

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


More information about the Koha-bugs mailing list