From 1cfcd2304d986a23e237a08cefa1d03edd32c291 Mon Sep 17 00:00:00 2001 From: "ghendricks%novell.com" Date: Wed, 28 May 2008 17:55:41 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20436138=20=C3=A2=C2=80=C2=93=20Unable=20to?= =?UTF-8?q?=20add=20or=20edit=20plan=20for=20an=20existing=20test=20case.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://10.0.0.236/trunk@251883 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/testopia/tr_process_case.cgi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/mozilla/webtools/testopia/tr_process_case.cgi b/mozilla/webtools/testopia/tr_process_case.cgi index a204e4161cf..e20115c08c8 100755 --- a/mozilla/webtools/testopia/tr_process_case.cgi +++ b/mozilla/webtools/testopia/tr_process_case.cgi @@ -89,6 +89,25 @@ elsif ($action eq 'update_doc'){ } } +elsif ($action eq 'link') { + print $cgi->header; + my @plans; + foreach my $id (split(',', $cgi->param('plan_ids'))){ + my $plan = Bugzilla::Testopia::TestPlan->new($id); + ThrowUserError("testopia-read-only", {'object' => $plan}) unless $plan->canedit; + push @plans, $plan; + } + ThrowUserError('missing-plans-list') unless scalar @plans; + + foreach my $plan (@plans){ + $case->link_plan($plan->id); + } + + delete $case->{'plans'}; + + print "{'success': true}"; +} + elsif ($action eq 'unlink'){ print $cgi->header; my $plan_id = $cgi->param('plan_id');