Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Is there a way to sort the list of versions descending

65 views
Skip to first unread message

Anik Cadieux

unread,
Sep 10, 2008, 7:57:45 AM9/10/08
to support-...@lists.mozilla.org
When I do a search in Bugzilla, the list of versions is displayed in
ascending order, so the older version is at the top.

But I would prefer to have the most recent version at the top.

For target milestones, we can use the "sortkey", but there is no "sortkey"
for versions.

How can I sort the list of a product's versions descending ?

Anik Cadieux

www.Dynagram.com

Tosh, Michael J

unread,
Sep 10, 2008, 10:59:12 AM9/10/08
to Anik Cadieux, support-...@lists.mozilla.org
Quoting Anik Cadieux:
> How can I sort the list of a product's versions descending ?

You could locate $vars-{version} in the cgi and use some Perl trickery
to reverse the array. Just be careful in enter_bug.cgi because the LAST
item in the array is assumed to be the newest.

Chris Donaghey

unread,
Sep 15, 2008, 12:23:45 PM9/15/08
to
I agree with this - I find this really annoying.

Anybody know of a solution ?

Tosh, Michael J

unread,
Sep 15, 2008, 12:42:26 PM9/15/08
to Chris Donaghey, support-...@lists.mozilla.org
Quoting Chris Donaghey:
> I agree with this - I find this really annoying.
>
> Anybody know of a solution ?

1) in Bugzilla/Product.pm:versions(), add "ORDER BY value DESC" to the
SQL call.
2) in enter_bug.cgi, change the following line:
$default{'version'} = $vars->{'version'}->[$#{$vars->{'version'}}];
To:
$default{'version'} = $vars->{'version'}->[0];

bastian.w...@gmail.com

unread,
Oct 4, 2013, 5:01:19 AM10/4/13
to
In Bugzilla Version 4.4 you have to change:

1) in Bugzilla/Version.new_from_list():
return [sort { vers_cmp(lc($a->name), lc($b->name)) } @$list];
To:
return [sort { vers_cmp(lc($b->name), lc($a->name)) } @$list];
0 new messages