Bug 518324 - Add a way to clear the assignee of a test case.
Bug 518325 - Cannot filter for 'unassigned' test cases of a test run. git-svn-id: svn://10.0.0.236/trunk@258539 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1428,6 +1428,7 @@ sub init {
|
||||
foreach my $profile ("author", "manager", "default_tester",
|
||||
"assignee", "testedby"){
|
||||
$t = $cgi->param($profile . "_type") || '';
|
||||
$t = "isnull" if ($cgi->param($profile) eq '--unassigned--');
|
||||
if ($t eq "exact" || $t eq '') {
|
||||
$t = "anyexact";
|
||||
if ($cgi->param($profile)){
|
||||
|
||||
@@ -516,13 +516,14 @@ sub set_assignee {
|
||||
my ($user_id) = @_;
|
||||
|
||||
my $assignee = $self->_check_assignee($user_id);
|
||||
my $oldassignee = $self->assignee->login;
|
||||
my $oldassignee = $self->assignee->login || '--unassigned--';
|
||||
my $newassignee = Bugzilla::User->new($assignee);
|
||||
my $newassignee_name = $newassignee->id ? $newassignee->login : '--unassigned--';
|
||||
|
||||
$self->_update_fields({'assignee' => $assignee});
|
||||
$self->{'assignee'} = $assignee;
|
||||
|
||||
my $note = "Assignee changed from $oldassignee to ". $newassignee->login;
|
||||
my $note = "Assignee changed from $oldassignee to ". $newassignee_name;
|
||||
$note .= " by ". Bugzilla->user->login;
|
||||
$note .= " for build '". $self->build->name;
|
||||
$note .= "' and environment '". $self->environment->name;
|
||||
|
||||
@@ -113,8 +113,10 @@ elsif ($action eq 'update_note'){
|
||||
elsif ($action eq 'update_assignee'){
|
||||
print $cgi->header;
|
||||
ThrowUserError("testopia-read-only", {'object' => $caserun}) unless $caserun->canedit;
|
||||
|
||||
my $assignee_id = login_to_id(trim($cgi->param('assignee')),'THROW_ERROR');
|
||||
my $assignee_id;
|
||||
if ($cgi->param('assignee')){
|
||||
$assignee_id = login_to_id(trim($cgi->param('assignee')),'THROW_ERROR');
|
||||
}
|
||||
|
||||
$caserun->set_assignee($assignee_id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user