projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'requirement-specs-custom-variables'
[kivitendo-erp.git]
/
SL
/
DB
/
RequirementSpec.pm
diff --git
a/SL/DB/RequirementSpec.pm
b/SL/DB/RequirementSpec.pm
index
bad9803
..
1cc1771
100644
(file)
--- a/
SL/DB/RequirementSpec.pm
+++ b/
SL/DB/RequirementSpec.pm
@@
-175,6
+175,11
@@
sub _copy_from {
%attributes);
}
%attributes);
}
+ # Copy custom variables.
+ foreach my $var (@{ $source->cvars_by_config }) {
+ $self->cvar_by_name($var->config->name)->value($var->value);
+ }
+
my %paste_template_result;
# Clone text blocks and pictures.
my %paste_template_result;
# Clone text blocks and pictures.
@@
-207,7
+212,7
@@
sub _copy_from {
$self->$accessor($paste_template_result{parts});
# Save new object -- we need its ID for the items.
$self->$accessor($paste_template_result{parts});
# Save new object -- we need its ID for the items.
- $self->save;
+ $self->save
(cascade => 1)
;
my %id_to_clone;
my %id_to_clone;