Status

()

defect
--
minor
RESOLVED FIXED
13 years ago
13 years ago

People

(Reporter: spam, Assigned: spam)

Tracking

2.23
Bugzilla 3.0
Bug Flags:
approval +

Details

Attachments

(1 attachment, 2 obsolete attachments)

1. time tracking link has an unescaped &.
2. as of custom field, empty table are inserted.273847
Posted patch patch for tip (obsolete) — Splinter Review
i'm not sure if [% IF Bugzilla.get_fields.name %] is correct though.
Attachment #234027 - Flags: review?

Comment 2

13 years ago
Comment on attachment 234027 [details] [diff] [review]
patch for tip

>Index: template/en/default/bug/edit.html.tmpl

> [% USE Bugzilla %]
>+[% IF Bugzilla.get_fields.name %]

What you want is Bugzilla.get_fields({ obsolete => 0, custom => 1 }).size. Probably should you save Bugzilla.get_fields({ obsolete => 0, custom => 1 }) in a variable in the template to avoid calling Bugzilla->get_fields twice.



>Index: template/en/default/flag/list.html.tmpl

>-            <option value="X"></option>
>+            <option value="X">&nbsp;</option>

This doesn't help; blanks are invalid too. I tested already. :) I see no way to fix this problem, so we should leave it alone for now.
Attachment #234027 - Flags: review? → review-
Posted patch patch for tip v2 (obsolete) — Splinter Review
(In reply to comment #2)
> Probably should you save Bugzilla.get_fields({ obsolete => 0, custom => 1 }) in
> a variable

is this OK?
I'm not using custom field so not checked :-P

> >+            <option value="X">&nbsp;</option>
> This doesn't help; blanks are invalid too.

np, that seems tidy ext's issue. validator don't claim about it :-)
so i removed them :-D
Attachment #234027 - Attachment is obsolete: true
Attachment #234141 - Flags: review?

Comment 4

13 years ago
Comment on attachment 234141 [details] [diff] [review]
patch for tip v2

>+[% ${field} = Bugzilla.get_fields({ obsolete => 0, custom => 1 }) %]

Write [% fields = Bugzilla.get_... %]. This means that "fields" is now an array. In Perl, you would write it @fields.


>+[% IF field.size %]

Write [% IF fields.size %] (means "if scalar(@fields)", i.e the number of elements in the array).


>+  [% FOREACH field %]

Write [% FOREACH field = fields %]. In Perl, you would write this as: foreach my $field (@fields), i.e. $field is now one element of the @fields array.


I hope this helps to understand how the TT syntax works. :) Also, do not forget to fix the indentation. It should be:

[% IF fields.size %]
  <table>
    [% FOREACH field = fields %]
      ...
    [% END %]
  </table>
[% END %]
Attachment #234141 - Flags: review? → review-

Updated

13 years ago
Assignee: ui → bmo
Attachment #234141 - Attachment is obsolete: true
Attachment #234213 - Flags: review?

Comment 6

13 years ago
Comment on attachment 234213 [details] [diff] [review]
patch for tip v3

r=LpSolit
Attachment #234213 - Flags: review? → review+

Updated

13 years ago
Status: NEW → ASSIGNED
Flags: approval?
Flags: approval? → approval+

Comment 7

13 years ago
Checking in template/en/default/bug/edit.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/bug/edit.html.tmpl,v  <--  edit.html.tmpl
new revision: 1.81; previous revision: 1.80
done

All tests successful.
Status: ASSIGNED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.