mozlist custom bug entry form (product=mozilla.org&format=mozlist) adds foxfood keyword when not supposed to

RESOLVED FIXED

Status

()

RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: dkl, Assigned: glob)

Tracking

Development

Details

(URL)

(Reporter)

Description

3 years ago
Found this in the CI test for development branch when testing the mozlist form. Failed stating that the foxfood keyword did not exist. Which is does not. The BMO extension adds a foxfood keyword is format=fxos-feature but should not be trying to add it for format=mozlist.

This works in production and bugzilla-dev as the keywords does exist there and is added to mozlist bugs when it should not be adding it. Not sure if this is messing up someones metrics somewhere :)

extensions/BMO/Extension:

sub bug_before_create {
    my ($self, $args) = @_;
    my $params = $args->{params};
    if (exists $params->{groups}) {
        # map renamed groups
        $params->{groups} = [ _map_groups($params->{groups}) ];
    }
    if (Bugzilla->cgi->param('format') // '' eq 'fxos-feature') {
        print STDERR "format: " . Bugzilla->cgi->param('format');
        $self->_pre_fxos_feature($args);
    }
}

If I change:

    if (Bugzilla->cgi->param('format') // '' eq 'fxos-feature') {

to:

    if ((Bugzilla->cgi->param('format') // '') eq 'fxos-feature') {

it works properly.

dkl
(Assignee)

Comment 1

3 years ago
this code only exists in dev.

To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git
   de69722..6810170  development -> development
Assignee: nobody → glob
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Version: Production → Development/Staging
You need to log in before you can comment on or make changes to this bug.