зеркало из https://github.com/mozilla/pjs.git
- display last added/edited/cloned testcase/subgroup by default
This commit is contained in:
Родитель
731b546dd1
Коммит
3bf7ef51f5
|
@ -57,6 +57,7 @@ if ($c->param("subgroup_id")) {
|
|||
$subgroup_id = $c->param("subgroup_id");
|
||||
}
|
||||
my $rebuild_cache = 0;
|
||||
my $defaults;
|
||||
if ($c->param("delete_subgroup_button")) {
|
||||
my $subgroup = Litmus::DB::Subgroup->retrieve($subgroup_id);
|
||||
if ($subgroup) {
|
||||
|
@ -79,6 +80,7 @@ if ($c->param("delete_subgroup_button")) {
|
|||
if ($new_subgroup) {
|
||||
$status = "success";
|
||||
$message = "Subgroup cloned successfully. New subgroup ID# is " . $new_subgroup->subgroup_id;
|
||||
$defaults->{'subgroup_id'} = $new_subgroup->subgroup_id;
|
||||
$rebuild_cache = 1;
|
||||
} else {
|
||||
$status = "failure";
|
||||
|
@ -104,6 +106,7 @@ if ($c->param("delete_subgroup_button")) {
|
|||
$new_subgroup->update_testcases(\@selected_testcases);
|
||||
$status = "success";
|
||||
$message = "Subgroup added successfully. New subgroup ID# is " . $new_subgroup->subgroup_id;
|
||||
$defaults->{'subgroup_id'} = $new_subgroup->subgroup_id;
|
||||
$rebuild_cache = 1;
|
||||
} else {
|
||||
$status = "failure";
|
||||
|
@ -125,6 +128,7 @@ if ($c->param("delete_subgroup_button")) {
|
|||
$subgroup->update_testcases(\@selected_testcases);
|
||||
$status = "success";
|
||||
$message = "Subgroup ID# $subgroup_id updated successfully.";
|
||||
$defaults->{'subgroup_id'} = $subgroup_id;
|
||||
$rebuild_cache = 1;
|
||||
} else {
|
||||
$status = "failure";
|
||||
|
@ -136,8 +140,10 @@ if ($c->param("delete_subgroup_button")) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
my $defaults;
|
||||
$defaults->{'subgroup_id'} = $c->param("subgroup_id");
|
||||
}
|
||||
|
||||
if ($defaults) {
|
||||
$vars->{'defaults'} = $defaults;
|
||||
}
|
||||
|
||||
|
|
|
@ -57,6 +57,7 @@ if ($c->param("testcase_id")) {
|
|||
}
|
||||
|
||||
my $rebuild_cache = 0;
|
||||
my $defaults;
|
||||
if ($c->param("delete_testcase_button")) {
|
||||
my $testcase = Litmus::DB::Testcase->retrieve($testcase_id);
|
||||
if ($testcase) {
|
||||
|
@ -79,6 +80,7 @@ if ($c->param("delete_testcase_button")) {
|
|||
if ($new_testcase) {
|
||||
$status = "success";
|
||||
$message = "Testcase cloned successfully. New testcase ID# is " . $new_testcase->testcase_id;
|
||||
$defaults->{'testcase_id'} = $new_testcase->testcase_id;
|
||||
$rebuild_cache=1;
|
||||
} else {
|
||||
$status = "failure";
|
||||
|
@ -113,6 +115,7 @@ if ($c->param("delete_testcase_button")) {
|
|||
$new_testcase->update_subgroups(\@selected_subgroups);
|
||||
$status = "success";
|
||||
$message = "Testcase added successfully. New testcase ID# is " . $new_testcase->testcase_id;
|
||||
$defaults->{'testcase_id'} = $new_testcase->testcase_id;
|
||||
$rebuild_cache=1;
|
||||
} else {
|
||||
$status = "failure";
|
||||
|
@ -140,6 +143,7 @@ if ($c->param("delete_testcase_button")) {
|
|||
$testcase->update_subgroups(\@selected_subgroups);
|
||||
$status = "success";
|
||||
$message = "Testcase ID# $testcase_id updated successfully.";
|
||||
$defaults->{'testcase_id'} = $testcase_id;
|
||||
$rebuild_cache=1;
|
||||
} else {
|
||||
$status = "failure";
|
||||
|
@ -151,9 +155,11 @@ if ($c->param("delete_testcase_button")) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
my $defaults;
|
||||
$defaults->{'testcase_id'} = $c->param("testcase_id");
|
||||
$vars->{'defaults'} = $defaults;
|
||||
}
|
||||
|
||||
if ($defaults) {
|
||||
$vars->{'defaults'} = $defaults;
|
||||
}
|
||||
|
||||
if ($status and $message) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче