From d807bc23b37960187378c44c4f03db2e44660b67 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 6 Dec 2009 23:44:54 +0000 Subject: [PATCH] fix initial value of agent types when cloning --- httemplate/edit/part_pkg.cgi | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index 7140ca500..f2c7448d5 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -340,7 +340,8 @@ my $edit_callback = sub { $recur_disabled = $object->freq ? 0 : 1; - (@agent_type) = map {$_->typenum} qsearch('type_pkgs',{'pkgpart'=>$1}); + (@agent_type) = + map {$_->typenum} qsearch('type_pkgs', { 'pkgpart' => $object->pkgpart } ); my @report_option = (); foreach ($object->options) { @@ -397,6 +398,11 @@ my $clone_callback = sub { $object->disabled('Y'); + } else { #not when cloning... + + (@agent_type) = + map {$_->typenum} qsearch('type_pkgs',{ 'pkgpart' => $object->pkgpart } ); + } %options = $object->options; -- 2.11.0