Using Saved Search in Whining
Hello. I have a problem using the Saved Search in Whining.
I have setup my whining, event, schedule and saved search to be used
for the whine. No problem there, it sends me and email with the
search. The problem is, the search being sent thru email by the
whining feature of bugzilla is not the save search I have specified.
It uses the default columns of bugzilla. No matter what I change on my
save search that is set to use on Whining, it is not being used.
Can anyone direct me how to fix this? Thanks.
Re: Using Saved Search in Whining
On May 25, 11:20*pm, arnoldceci...@gmail.com wrote:[color=blue]
> Hello. I have a problem using the Saved Search in Whining.
>
> I have setup my whining, event, schedule and saved search to be used
> for the whine. No problem there, it sends me and email with the
> search. The problem is, the search being sent thru email by the
> whining feature of bugzilla is not the save search I have specified.
> It uses the default columns of bugzilla. No matter what I change on my
> save search that is set to use on Whining, it is not being used.
>
> Can anyone direct me how to fix this? Thanks.[/color]
Known enhancement request, see the following bug:
[url]https://bugzilla.mozilla.org/show_bug.cgi?id=245375[/url]
Re: Using Saved Search in Whining
On May 26, 10:42*pm, Mike <oreom...@gmail.com> wrote:[color=blue]
> On May 25, 11:20*pm, arnoldceci...@gmail.com wrote:
>[color=green]
> > Hello. I have a problem using the Saved Search in Whining.[/color]
>[color=green]
> > I have setup my whining, event, schedule and saved search to be used
> > for the whine. No problem there, it sends me and email with the
> > search. The problem is, the search being sent thru email by the
> > whining feature of bugzilla is not the save search I have specified.
> > It uses the default columns of bugzilla. No matter what I change on my
> > save search that is set to use on Whining, it is not being used.[/color]
>[color=green]
> > Can anyone direct me how to fix this? Thanks.[/color]
>
> Known enhancement request, see the following bug:[url]https://bugzilla.mozilla..org/show_bug.cgi?id=245375[/url][/color]
Thank you for the reply. So this is still in the process of
enhancement? I'm using version 3.2.3 of bugzilla by the way.
Is there any work around? My project needs the whining report with
saved search.
Re: Using Saved Search in Whining
On May 26, 7:19*pm, arnoldceci...@gmail.com wrote:[color=blue]
> Thank you for the reply. So this is still in the process of
> enhancement? I'm using version 3.2.3 of bugzilla by the way.
>
> Is there any work around? My project needs the whining report with
> saved search.[/color]
Correct. The columns are hard coded in two places:
[url]http://mxr.mozilla.org/bugzilla3.2/source/template/en/default/whine/mail.html.tmpl#67[/url]
and
[url]http://mxr.mozilla.org/bugzilla3.2/source/whine.pl#427[/url]
What you could do, is modify whine.pl to only return bug ids, then
convert them to bug objects ( Bugzilla::Bug->new_from_list(@ids) )
1) Change @searchfields to this: my @searchfields = ( 'bugs.bug_id' );
2) Update the building of bug objects, here is my code:
my $sqlquery = $search->getSQL();
my $bug_ids = $dbh->selectcol_arrayref($sqlquery);
my @bugs = @{Bugzilla::Bug->new_from_list($bug_ids)};
if ($thisquery->{'onemailperbug'}) {
$args->{'onemailperbug'} = $thisquery->{'onemailperbug'};
foreach my $bug (@bugs) {
$args->{'queries'} = [
{
'name' => $thisquery->{'name'},
'title' => $thisquery->{'title'},
'bugs' => [ $bug ],
},
];
mail($args);
delete $args->{'queries'};
}
}
else { # It belongs in one message with any other lists
$thisquery->{'bugs'}=\@bugs;
push @{$return_queries}, $thisquery;
}
}
return $return_queries;
3) Then you can specify any valid bug field in the template/en/default/
whine/mail.html.tmpl template.
4) I *THINK* that $searchparams could have a columnlist if it is
saved, and you can use that, or use DEFAULT_COLUMN_LIST constant if
not.