summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--extensions/BugmailFilter/Extension.pm3
-rw-r--r--extensions/BugmailFilter/template/en/default/account/prefs/bugmail_filter.html.tmpl4
2 files changed, 4 insertions, 3 deletions
diff --git a/extensions/BugmailFilter/Extension.pm b/extensions/BugmailFilter/Extension.pm
index 60c180ca7..01719db1f 100644
--- a/extensions/BugmailFilter/Extension.pm
+++ b/extensions/BugmailFilter/Extension.pm
@@ -140,7 +140,8 @@ sub user_preferences {
$fields{$field->name} = $field->description;
}
- $vars->{fields} = [
+ $vars->{fields} = \%fields;
+ $vars->{field_list} = [
sort { lc($a->{description}) cmp lc($b->{description}) }
map { { name => $_, description => $fields{$_} } }
keys %fields
diff --git a/extensions/BugmailFilter/template/en/default/account/prefs/bugmail_filter.html.tmpl b/extensions/BugmailFilter/template/en/default/account/prefs/bugmail_filter.html.tmpl
index 1bcbd35ae..6d59e52b1 100644
--- a/extensions/BugmailFilter/template/en/default/account/prefs/bugmail_filter.html.tmpl
+++ b/extensions/BugmailFilter/template/en/default/account/prefs/bugmail_filter.html.tmpl
@@ -43,7 +43,7 @@ var cpts = new Array();
<td>
<select name="field" id="field">
<option value="">__Any__</option>
- [% FOREACH field = fields %]
+ [% FOREACH field = field_list %]
<option value="[% field.name FILTER html %]">
[% field.description FILTER html %]
</option>
@@ -143,7 +143,7 @@ var cpts = new Array();
</td>
<td>[% filter.product ? filter.product.name : 'Any' FILTER html %]</td>
<td>[% filter.component ? filter.component.name : 'Any' FILTER html %]</td>
- <td>[% filter.field ? filter.field.description : 'Any' FILTER html %]</td>
+ <td>[% filter.field ? fields.${filter.field.name} : 'Any' FILTER html %]</td>
<td>[% filter.relationship ? filter.relationship_name : 'Any' FILTER html %]</td>
<td>[% filter.action ? 'Exclude' : 'Include' %]</td>
</tr>