diff options
Diffstat (limited to 'template')
-rw-r--r-- | template/en/default/list/table.html.tmpl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/template/en/default/list/table.html.tmpl b/template/en/default/list/table.html.tmpl index d3fe3231b..7ef53058a 100644 --- a/template/en/default/list/table.html.tmpl +++ b/template/en/default/list/table.html.tmpl @@ -131,8 +131,15 @@ [% IF sorted_by_relevance %] [%- abbrev.$id.title || field_descs.$id || column.title -%] [% ELSE %] + [% IF column.name.match('\s+AS\s+') %] + [%# For aliased columns, use their ID for sorting. %] + [% column.sortalias = id %] + [% ELSE %] + [%# Other columns may sort on their name directly. %] + [% column.sortalias = column.name %] + [% END %] <a href="buglist.cgi?[% urlquerypart FILTER html %]&order= - [% column.name FILTER url_quote FILTER html %] + [% column.sortalias FILTER url_quote FILTER html %] [% ",$qorder" FILTER html IF order %] [%-#%]&query_based_on= [% defaultsavename OR searchname FILTER html %]"> |