Closed Bug 140437 Opened 22 years ago Closed 22 years ago

Clean up parameters

Categories

(Bugzilla :: Administration, task)

2.15
task
Not set
major

Tracking

()

RESOLVED FIXED
Bugzilla 2.16

People

(Reporter: gerv, Assigned: gerv)

References

Details

Attachments

(1 file, 2 obsolete files)

The following parameters are no longer used, and can be removed:
preferlists
capitalizelists
errorhtml
blurbhtml
mostfreqhtml
nummilestones
entryheaderhtml

Currently, checksetup.pl just nukes removed parameters. We should probably dump
the HTML ones, at least, to a file and tell the admin where it is.


The following parameters are deprecated; that is, if you want to change them
from the default, you are better off editing the relevant template. We should
say so in their descriptions:
headerhtml
bodyhtml 
bannerhtml
footerhtml

Gerv
Target Milestone: --- → Bugzilla 2.16
Attached patch Patch v.1 (obsolete) — Splinter Review
Here it is.

Note that dumping them to a file is probably OK for these particular params;
however, we may have to do something more intelligent at some point for the
ones which this patch "deprecates" - i.e. dynamically insert them into the
appropriate template. Or we could decide that it's not worth it, and let the
admin do it. <shrug>. We can discuss that later.

Gerv
Are we sure these HTML-template parameters are unused?  Not everything is
templatised.  You need to keep them in sync at the moment to handle both situations.

Full removal is bug #100089.
We should also remove the despot params. They're not used anywhere.
I checked - the HTML params I'm removing are not used. The ones I'm deprecating
still are.

Gerv
Attached patch Patch v.2 (obsolete) — Splinter Review
No despot params.

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

>Index: checksetup.pl
>===================================================================
>RCS file: /cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v
>retrieving revision 1.139
>diff -u -r1.139 checksetup.pl
>--- checksetup.pl	26 Apr 2002 21:12:42 -0000	1.139
>+++ checksetup.pl	27 Apr 2002 07:03:43 -0000
>@@ -750,6 +750,15 @@
>         if (!grep($_ eq $item, @::param_list) && $item ne "version") {
>             print "The $item parameter is no longer used in Bugzilla\n" . 
>                   "and has been removed from your parameters file.\n";
>+            
>+            open(PARAMFILE, ">param-$item.txt") 
>+                  || die "$0: Can't open param-$item.txt for writing: $!\n";
>+            print PARAMFILE $::param{$item};
>+            close PARAMFILE;
>+                

Hmm. Why not put all the params into an "oldparams.txt" file, rather than lots
of separate files?
> Hmm. Why not put all the params into an "oldparams.txt" file, rather than lots
> of separate files?

I'm sure I had a good reason when I wrote the patch, but I can't think what it
is now, so let's do that :-)

Gerv
If they are still used, why are we deprecating them?  They are still the only
way to customise every header and footer (eg reports.cgi. edit*.cgi).
My thinking has changed somewhat here. This is the current idea (please criticise):

PutHeader() and PutFooter() now call the templates. This means that customising
the templates customises all headers and footers.

Over in bug 140435, I am doing a proper template for the footer, which includes
all the defaults for the Command Menu, blurbhtml, footerhtml etc. I think we
should do the same thing for the header.

This would mean that all the header and footer template params are no longer
used anywhere. We would then remove them from defparams.pl. This would mean they
got written out to the oldparams.txt file (as proposed in this bug.)

Lastly, add a release note:

"The bodyhtml, blurbhtml, footerhtml etc. parameters are now obsolete, and have
been removed from Bugzilla. When you run checksetup.pl, their contents will be
dumped to a file "oldparams.txt" in the Bugzilla directory. If you have
customised these parameters, you will need to take your customisations out of
this file and edit template/en/default/global/header.html.tmpl and
template/en/default/global/footer.html.tmpl so that they contain your changes."

This seems the right thing to do to me.

Gerv
I think Gerv's approach sounds sensible. 

As for upgrading admins moving their customizations from parameters to
templates: the automatics mentioned in comment 1 would be cool but probably
still not worth the effort - especially since many of the current templates are
rather complex rather than just lumps of html tagsoup.  

My question is: what can be done to offer an easier migration for the admins? It
would be acceptable if you could just copy the previous parameter value from
oldparams.txt to a template and get the thing working. Theoretically this is
possible even with the current header template, but the admin should be guided
so that you wouldn't have to be a template toolkit specialist to cope with this
upgrade. So, at least Gerv's release note should contain a reference to where
more information on this particular phase of customization can be found.

Nit: As far as I can see, oldparams.txt should reside in data directory.
> My question is: what can be done to offer an easier migration for the admins? It

We could add comments to the template indicating which sections correspond to
the old parameters. Then they could just about cut and paste (with a little
thought.)

Gerv
Exactly what we do here depends on bug 140435 getting checked in; when it is,
we'll be able to remove some more parameters.

Gerv
Assignee: justdave → gerv
Depends on: 140435
Keywords: patch
Attached patch Patch v.3Splinter Review
Patch v.3 - review comments addressed, and extra obsolete parameters removed.

Gerv
Attachment #81266 - Attachment is obsolete: true
Comment on attachment 82706 [details] [diff] [review]
Patch v.3

2xr= justdave
Attachment #82706 - Flags: review+
Fixed.

Checking in defparams.pl;
/cvsroot/mozilla/webtools/bugzilla/defparams.pl,v  <--  defparams.pl
new revision: 1.72; previous revision: 1.71
done
Checking in checksetup.pl;
/cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v  <--  checksetup.pl
new revision: 1.146; previous revision: 1.145
done
Checking in CGI.pl;
/cvsroot/mozilla/webtools/bugzilla/CGI.pl,v  <--  CGI.pl
new revision: 1.153; previous revision: 1.152
done
Checking in globals.pl;
/cvsroot/mozilla/webtools/bugzilla/globals.pl,v  <--  globals.pl
new revision: 1.168; previous revision: 1.167
done
Checking in relogin.cgi;
/cvsroot/mozilla/webtools/bugzilla/relogin.cgi,v  <--  relogin.cgi
new revision: 1.18; previous revision: 1.17
done

Gerv
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: