Bug 7180: (follow-up) change syspref description

- the blank line is now useless
- add an example for the syspref value

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
Jonathan Druart 2013-09-10 10:30:25 +02:00 committed by Galen Charlton
parent 9997918f02
commit b9619a485e
2 changed files with 10 additions and 3 deletions

View File

@ -492,7 +492,14 @@ sub add_matcher_list {
sub get_infos_syspref {
my ($record, $field_list) = @_;
my $syspref = C4::Context->preference('MarcFieldsToOrder');
my $yaml = YAML::Load($syspref);
$syspref = "$syspref\n\n"; # YAML is anal on ending \n. Surplus does not hurt
my $yaml = eval {
YAML::Load($syspref);
};
if ( $@ ) {
warn "Unable to parse MarcFieldsToOrder syspref : $@";
return ();
}
my $r;
for my $field_name ( @$field_list ) {
my @fields = split /\|/, $yaml->{$field_name};

View File

@ -46,10 +46,10 @@ Acquisitions:
- Upon receiving items, update their subfields if they were created when placing an order (e.g. o=5|a="foo bar").
- pref: AcqItemSetSubfieldsWhenReceived
-
- Set the mapping values for a new order line created from a marcrecord (staged file). In a YAML format, so you have to finished with an empty line.
- Set the mapping values for a new order line created from a marcrecord (staged file).
- pref: MarcFieldsToOrder
type: textarea
- "For example:<br/>price: 947$a|947$c<br/>quantity: 969$h<br/>budget_code: 922$a<rb/>"
Printing:
-
- Use the