зеркало из https://github.com/mozilla/gecko-dev.git
Order tags by name and trim whitespace before saving
This commit is contained in:
Родитель
fd94166307
Коммит
b40bb596e6
|
@ -1517,9 +1517,11 @@ sub tags {
|
|||
my $self = shift;
|
||||
my $dbh = Bugzilla->dbh;
|
||||
return $self->{'tags'} if exists $self->{'tags'};
|
||||
my $tagids = $dbh->selectcol_arrayref("SELECT tag_id
|
||||
my $tagids = $dbh->selectcol_arrayref("SELECT test_case_tags.tag_id
|
||||
FROM test_case_tags
|
||||
WHERE case_id = ?",
|
||||
INNER JOIN test_tags ON test_case_tags.tag_id = test_tags.tag_id
|
||||
WHERE case_id = ?
|
||||
ORDER BY test_tags.tag_name",
|
||||
undef, $self->{'case_id'});
|
||||
my @tags;
|
||||
foreach my $id (@{$tagids}){
|
||||
|
|
|
@ -1243,9 +1243,11 @@ sub tags {
|
|||
my ($self) = @_;
|
||||
my $dbh = Bugzilla->dbh;
|
||||
return $self->{'tags'} if exists $self->{'tags'};
|
||||
my $tagids = $dbh->selectcol_arrayref("SELECT tag_id
|
||||
my $tagids = $dbh->selectcol_arrayref("SELECT test_plan_tags.tag_id
|
||||
FROM test_plan_tags
|
||||
WHERE plan_id = ?",
|
||||
INNER JOIN test_tags ON test_plan_tags.tag_id = test_tags.tag_id
|
||||
WHERE plan_id = ?
|
||||
ORDER BY test_tags.tag_name",
|
||||
undef, $self->{'plan_id'});
|
||||
my @plan_tags;
|
||||
foreach my $t (@{$tagids}){
|
||||
|
|
|
@ -870,9 +870,11 @@ sub tags {
|
|||
my ($self) = @_;
|
||||
my $dbh = Bugzilla->dbh;
|
||||
return $self->{'tags'} if exists $self->{'tags'};
|
||||
my $tagids = $dbh->selectcol_arrayref("SELECT tag_id
|
||||
my $tagids = $dbh->selectcol_arrayref("SELECT test_run_tags.tag_id
|
||||
FROM test_run_tags
|
||||
WHERE run_id = ?",
|
||||
INNER JOIN test_tags ON test_run_tags.tag_id = test_tags.tag_id
|
||||
WHERE run_id = ?
|
||||
ORDER BY test_tags.tag_name",
|
||||
undef, $self->{'run_id'});
|
||||
my @tags;
|
||||
foreach my $t (@{$tagids}){
|
||||
|
|
|
@ -163,7 +163,7 @@ sub store {
|
|||
my $self = shift;
|
||||
my $dbh = Bugzilla->dbh;
|
||||
my $key;
|
||||
|
||||
$self->{'tag_name'} = trim($self->{'tag_name'});
|
||||
$dbh->bz_lock_tables('test_tags WRITE');
|
||||
($key) = $dbh->selectrow_array("SELECT tag_id FROM test_tags
|
||||
WHERE LOWER(tag_name) = ?",
|
||||
|
|
Загрузка…
Ссылка в новой задаче