Closed Bug 139588 Opened 22 years ago Closed 22 years ago

TT 2.07 problem: newly added columns are only one (1) character wide

Categories

(Bugzilla :: User Interface, defect)

2.15
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.16

People

(Reporter: afranke, Assigned: myk)

Details

Attachments

(1 file, 1 obsolete file)

Newly added columns (via "Change Columns" link on buglist.cgi) have their
content values displayed only up to a width of a single character (*1*
character) if you use TT 2.07. According to myk it works fine on TT 2.06.
This is definitely a 2.16 issue.
Target Milestone: --- → Bugzilla 2.16
So it turns out that there is at least another serious regression caused by the
new TT 2.07: The choose-product.html.tmpl (most easily triggered by
describecomponents.cgi or enter_bug.cgi ) only displays the values (and links to
the product) for the first product. There are table cells and colons for the
other products as well, but the content is missing completely for them.
Also, bug 139542 may be caused by TT 2.07, but that's just a guess, I haven't
verified it.

Probably the easiest solution is to warn people not to use TT 2.07 because it's
too buggy. 
Err, no, we want to _require_ 2.07. I don't see this, nor do I see bug 139542.
I'm not too sure what I'm meant to see with your comment #0, mind you.

One thing you need to notice is that if you went from not using XS to using XS,
then the files are moved to the binary install directories, (ie i386-linux).
This may cause problems, somehow, if stuff is mixed, sepcially if somehow you
change which stash you are using half way through. Try deleting the old
installation first. To be safe, delete them both, and then reinstall 2.07. Does
that fix this problem, after reverting this patch?
Actually, the only column I'm seeing problems with after updating
to Template-Toolkit v2.07 is the TargetM[ilestone] column.  It's
only 1 column wide.
I found the problem.  In template/en/default/list/table.html.tmpl,
there is no 'size' parameter set for 'status_whiteboard' or for
'target_milestone'.

I believe 'target_milestone' should be set to 7 (which is
length('TargetM')), but I'm not sure what 'status_whiteboard'
should be set to, though it should probably have an elipses
set for it.
Attached patch Patch v.1 (obsolete) — Splinter Review
This fixed the TargetM[ilestone] column for me.  I don't use
the Status Whiteboard, so I can't test it locally, but the 
patch changes it to be identical to the Summary column (since
they are similar size in show_bug.cgi).
Note that the behaviour of the truncate() function may have changed
in TT 2.07, which could be the original culprit.  I haven't had
time to verify this, though.
Truncate is a Bugzilla function defined in globals.pl.  I think the problem here
is that TT 2.07 implements a built-in "size" function for hashes and is now
interpreting "abbrev.target_milestone.size" as "the size of the
abbrev.target_milestone hash" instead of "the value for the size key in the
abbrev.target_milestone hash" for abbreviation records with no size value.

Instead of adding a maximum size for these fields, which are not currently
restricted by size, we should change the name of this field from "size" to
"maxlength" or something similar so we don't run afoul of the "size" function.
The problem is that our size atttribute will override teh builtin one, but if it
doesn't exist, then we fall back to TT's one, due to scoping rules, and that
will return 1. So the problem is that we relied on the size attribute possilby
not being present, and then TT made it always present. The best fix is to just
change the name.

Just to confirm, noone else is seeing the issue in comment #3?
Attached patch Patch v.2Splinter Review
As suggested - size -> maxlength. I don't have 2.07 yet, so I can't test if it
fixes the problem, but it should.

Gerv
Attachment #80858 - Attachment is obsolete: true
Comment on attachment 80918 [details] [diff] [review]
Patch v.2

r=ddk  Works for me!  (Renamed to Patch v.2)
Attachment #80918 - Attachment description: Patch v.1 → Patch v.2
Attachment #80918 - Flags: review+
Keywords: patch, review
Comment on attachment 80918 [details] [diff] [review]
Patch v.2

Works. r=myk
Attachment #80918 - Flags: review+
Checking in template/en/default/list/table.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/list/table.html.tmpl,v 
<--  table.html.tmpl
new revision: 1.3; previous revision: 1.2
done
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: