Closed Bug 342837 Opened 18 years ago Closed 17 years ago

All templates should expose certain variables

Categories

(Bugzilla :: User Interface, enhancement)

2.20.1
x86
Linux
enhancement
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: timeless, Unassigned)

Details

(Keywords: ue)

The current template interface is basically "each cgi decides what variables to pass to the template based on what it has historically used".

This is a terrible design method. Some variables should *always* be available (and *always* with the same name) so that no matter what you're customizing, you can use them.

<AlthA> I must agree with Daniel here, my experience is that some stuff simply isn't there to play with. One of the simple customizations i'm thinking of here is the fact that you have to expose the bug variable to the template in attachment.cgi, to do ANYTHING based on which product you're adding an attachment for. 

I don't really want to come up with a full list now, but let's start by making sure the Bug variable is exposed in all templates that deal with bugs.
The "user" variable should always contain the currently logged-in user.

Gerv
We should only have variables which are always defined for *all* templates, such as 'constants' (from Constants.pm) and 'user' (which is always Bugzilla->user). Having bug as always defined doesn't make sense to me. First because most templates are not about a specific bug, and second because when you play with a bug, several others are generally involved (due to dependencies and duplicates).

Either explicit which variables you would always want (and we can then discuss about whether we want them or not) or INVALIDate this bug.
Keywords: ue
Per my comment 2.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.