UI module owner

Daniel Berlin dberlin at dberlin.org
Tue Jun 27 13:11:02 UTC 2006


Gervase Markham wrote:
> Daniel Berlin wrote:
>> I have maintained many Bugzillae, and I have *never had a single
>> Bugzilla where all i had to do was change templates*.
> 
> Did you make the same changes each time, or different changes depending
> on the circumstances?
> 

Usually the same changes, but i've had to rewrite them several times in
the past few versions, as every version doesn't just seem to move code
(which i don't really mind), but rewrite the same code again and again
(This is not simple mod_perlification remnants)

> Or, to phrase the question another way, do you think it's realistic to
> aim to have a bug system which works for a significant percentage of
> people without requiring code changes?

Yes, but I don't believe Bugzilla is doing a good job of it, at all.

In fact, I know of an large bugzilla user (supporting about 40 products,
with >100k bugs total) that just completely gave up on Bugzilla very
very recently because they got tired of trying to support their own
changes in the face of the code changes Bugzilla is currently going
through.  Most of their changes consisted of what I have done for GCC:
adding a few fields, removing a few fields, and the validation
associated with this.
Other than that, they wanted to do nice ajax'y things, but the workflow
and code of bugzilla just doesn't give you the necessary hooks to do
this without hacking up every source file in sight.
Given all this, they just decided to put a couple engineers on the task
of making a nice sane bug tracker, and surprisingly, in about 2 man
years, they have *done just that*.

> Which changes did you most commonly have to make?

Let's see:

Exposing any new variable to the bugs templates requires changing the code.

Hiding a field that Bugzilla believes is required but is useless to your
installation requires hacking up the edit script and the templates.

Adding any sort of validation routines for some of the more freeform
fields requires hacking up post_bug.cgi, the templates, the error list,
the xml importer, etc.

Adding or removing a field from the actual database is worse than any of
this, and the way custom fields are progressing, it's unlikely to solve
it for another 5 years.

It's even worse if i want to add a "did you mean?" style page for
misentered input to a field.

The problem isn't even that I have to write code, it's that i have to
hack up the standard source files to do it, and I should not have to,
because then i have to maintain these hacks as the source files change
and move.

Bugzilla seems to have missed the entire idea that people need to write
source code to do things, and to provide *standard source code hooks* in
places to let me do these things that load files from some standard dir.

That way, you guys can rewrite and move your code around, and just give
me a damn bug object or a bug transaction or something, and i'll do my
validation or whatever, and throw an error if there is a problem.

As a side note, I've actually always been surprised that bugzilla has no
transaction objects, considering that things either look really ugly, or
are just broke, if the database is left half-modified. IE bugs with no
initial comment, etc.  Why the process of modifying a bug in some
manner, from beginning to end, for a single request that may change the
bug, the duplicates list, and the comments, is not encapsulated in some
transaction object is beyond me.

But back to the topic at hand: half the time in changing this stuff
between versions is figuring out where the code moved, then just
rewriting it to whatever the new style of the day is for that code.  It
doesn't really do anything different, it just seems to have changed
coding style because someone felt it looked cleaner (again I'm *not*
talking about the obviously necessary changes for mod_perl'ification,
like removing globals, etc).

The template system is nice, but most of Bugzilla changes affect the
dynamic workflow of Bugzilla in some small way, and templates don't
provide enough to let you do this.

> 
>> The only people i've met who *ever* use Bugzilla in it's default
>> configuration are those who are using it very temporarily, and don't
>> want to "fuss with code to get it to work how I want". That's an exact
>> quote, btw.  Note the use of the word "code". This is not a mistake.  No
>> interesting customization people perform can be performed to Bugzilla
>> without modifying the *existing code*.
> 
> There are loads of "interesting" customisations you can make without
> modifying code. Perhaps you meant "useful"?

I disbelieve you :).
Then again, I don't consider changing the colors and look to be interesting
> 
> If so, I'd be interested to know why bug entry templates, the format
> system, the skin system, the custom templates system and the hooks
> system are all not useful? Did we solve all the wrong problems?

Mostly, yes.
The only templates people I know change are maybe the front template,
and whatever is required to hide or move around some field.
The hooks system is mostly useless, because you still can't do anything
interesting without hacking up shipped source files that you really
don't want to be touching.

Ideally, all the code *I* need to write to do what I want should be in
separately source files that bugzilla loads and calls, and to be honest,
for what i'm doing for GCC Bugzilla, I don't think this is unreasonable
at all.


--Dan



More information about the developers mailing list