Using Saved Search in Whining - Mozilla

This is a discussion on Using Saved Search in Whining - Mozilla ; 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 ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Using Saved Search in Whining

  1. 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.

  2. Re: Using Saved Search in Whining

    On May 25, 11:20*pm, arnoldceci...@gmail.com wrote:
    > 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.


    Known enhancement request, see the following bug:
    https://bugzilla.mozilla.org/show_bug.cgi?id=245375

  3. Re: Using Saved Search in Whining

    On May 26, 10:42*pm, Mike wrote:
    > On May 25, 11:20*pm, arnoldceci...@gmail.com wrote:
    >
    > > 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.

    >
    > Known enhancement request, see the following bug:https://bugzilla.mozilla..org/show_bug.cgi?id=245375


    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.

  4. Re: Using Saved Search in Whining

    On May 26, 7:19*pm, arnoldceci...@gmail.com wrote:
    > 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.


    Correct. The columns are hard coded in two places:
    http://mxr.mozilla.org/bugzilla3.2/s...l.html.tmpl#67
    and
    http://mxr.mozilla.org/bugzilla3.2/source/whine.pl#427

    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.

+ Reply to Thread