Default version for new bugs?

Christian Robottom Reis kiko at
Thu Nov 25 13:22:29 UTC 2004

On Wed, Nov 24, 2004 at 05:27:20PM -0600, Dave Williss wrote:
> The template looks like it's trying to get it from some kind of filter, but
> I don't see any place to set it and I don't see any place in the database
> to store it.  We'd like to be able to set it on a per-product basis, since
> different products are at different version numbers.

Actually the code that tries to set a default version does:

    # Use the version specified in the URL, if one is supplied. If not,
    # then use the cookie-specified value. (Posting a bug sets a cookie
    # for the current version.) If no URL or cookie version, the default
    # version is the last one in the list (hopefully the latest one).
    # Eventually maybe each product should have a "current version"
    # parameter.
    $vars->{'version'} = $::versions{$product} || [];
    if (formvalue('version')) {
        $default{'version'} = formvalue('version');
    } elsif (defined $cgi->cookie("VERSION-$product") &&
        lsearch($vars->{'version'}, $cgi->cookie("VERSION-$product")) != -1)
        $default{'version'} = $cgi->cookie("VERSION-$product");
    } else {
        $default{'version'} = $vars->{'version'}->[$#{$vars->{'version'}}];

Which means to me it:
    - Tries to get the default from the CGI parameters
    - Tries to get the default from a cookie (bizarre)
    - Uses the last item in the list

This is half-bogus to me and having a default version in the product
table would be an improvement -- explicit is better than implicit,

I also feel the default milestone has no business being an input
type="text"; it should be a SELECT box. 

Does anyone concur with me?

Take care,
Christian Robottom Reis | | [+55 16] 3361 2331

More information about the developers mailing list