Closed Bug 344513 Opened 18 years ago Closed 18 years ago

Make plain-text custom fields functional on all pages except enter_bug.cgi

Categories

(Bugzilla :: Bugzilla-General, enhancement, P1)

2.23
enhancement

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: mkanat, Assigned: mkanat)

References

Details

Attachments

(1 file, 1 obsolete file)

bug 287325 added plain-text custom fields to show_bug.cgi.

Now we need to make them functional on:

buglist.cgi, “Change Several Bugs at Once”, and the “Long List” format of a bug (which is also the Printable Version).

Making them work on enter_bug.cgi should be a separate bug, since it should be optional for them to be there.
Status: NEW → ASSIGNED
Priority: -- → P1
Attached patch v1 (obsolete) — Splinter Review
Okay, here. This was pretty simple.

myk, if you're around, you can also feel free to review this, but I figured you were busy and may not have the time.
Attachment #229080 - Flags: review?(LpSolit)
Blocks: 344521
Comment on attachment 229080 [details] [diff] [review]
v1

>Index: colchange.cgi

>+push(@masterlist, Bugzilla->custom_field_names);

1) colchange.cgi will display custom column names instead of their description. Probably should you hack list/change-columns.html.tmpl to something similar to:

[% FOREACH field = Bugzilla.get_fields(...) %]
  [% field_descs.${field.name}  = $field.description %]
[% END %]

An alternative would be to pass custom field objects in a separate variable in colchange.cgi and directly use field objects in the template.


2) The "Bug Changes" section in query.cgi shows the field name too instead of its description.
Attachment #229080 - Flags: review?(LpSolit) → review-
In bug/edit.html.tmpl, could move custom fields about the timetracking table? This would make the UI a bit better.
(In reply to comment #2)
> Probably should you hack list/change-columns.html.tmpl to something similar to

Even better: why not hack global/field-descs.none.html to let it look at Bugzilla->get_fields() ? This way, you use it from everywhere. Also, maybe could we even load all field descriptions from the 'fielddefs' table instead of having them defined in so many places (including buglist.cgi and its DefineColumn() routine).
The field descriptions need to be defined only in field_descs, actually, not in the database. They need to be localizable. We have a separate bug for that.

I didn't write the code for bug/edit.html.tmpl, so that's not a part of this bug.

But yeah, we could have fielddefs read the descriptions in the database, for now.
Attached patch v2Splinter Review
Good idea--now we automatically put in the Description from the database for any field that's not in field_descs.
Attachment #229080 - Attachment is obsolete: true
Attachment #229417 - Flags: review?(LpSolit)
Comment on attachment 229417 [details] [diff] [review]
v2

>Index: template/en/default/global/field-descs.none.tmpl
>+  [% field_descs.${field.name} = field.description 
>+     IF !field_descs.${field_name}.defined %]

Nit: you should use .exists instead of .defined.

008filter.t is complaining that this directive is unfiltered. As you suggested on IRC, adding SET fixes the warning. r=LpSolit with these comments fixed. Nice patch. :)
Attachment #229417 - Flags: review?(LpSolit) → review+
Flags: approval?
Flags: approval? → approval+
Checking in buglist.cgi;
/cvsroot/mozilla/webtools/bugzilla/buglist.cgi,v  <--  buglist.cgi
new revision: 1.341; previous revision: 1.340
done
Checking in colchange.cgi;
/cvsroot/mozilla/webtools/bugzilla/colchange.cgi,v  <--  colchange.cgi
new revision: 1.57; previous revision: 1.56
done
RCS file: /cvsroot/mozilla/webtools/bugzilla/skins/standard/show_bug.css,v
done
Checking in skins/standard/show_bug.css;
/cvsroot/mozilla/webtools/bugzilla/skins/standard/show_bug.css,v  <--  show_bug.css
initial revision: 1.1
done
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.79; previous revision: 1.78
done
Checking in template/en/default/bug/field.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/bug/field.html.tmpl,v  <--  field.html.tmpl
new revision: 1.4; previous revision: 1.3
done
Checking in template/en/default/bug/show-multiple.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/bug/show-multiple.html.tmpl,v  <--  show-multiple.html.tmpl
new revision: 1.30; previous revision: 1.29
done
Checking in template/en/default/bug/show.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/bug/show.html.tmpl,v  <--  show.html.tmpl
new revision: 1.14; previous revision: 1.13
done
Checking in template/en/default/global/field-descs.none.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/global/field-descs.none.tmpl,v  <--  field-descs.none.tmpl
new revision: 1.14; previous revision: 1.13
done
Checking in template/en/default/list/edit-multiple.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/list/edit-multiple.html.tmpl,v  <--  edit-multiple.html.tmpl
new revision: 1.36; previous revision: 1.35
done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Blocks: 345104
Blocks: 345381
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: