|
From: Jirka P. <fi...@us...> - 2002-04-13 16:26:34
|
> This does sound good, but I want to have a discussion on how we can add > other lookups like this and the database version of the phpBB guys in a > modular fashion. How can we make it so that anyone who has something > extra they want to track in the database can just add a new table with > values (let's say phases of the moon for example) and then tie the bug > table to the phases_of_moon table? I'm thinking of something like the > skeleton script that helps you get started writing a php extension. It > generates the header, c, and test files that you can use as a jumping > off point for writing an extension. Perhaps we could write a skeleton > script that creates a db-changes file (alter the bug table, create the > new lookup table, etc.). I guess the first thing to do is have a > detailed outline of all the changes that need to be made to the code > base and database to have a new lookup, such as Environment, added and > trackable. Let's try and do this in a modular fashion rather than just > adding more and more lookups. And what if we do not want to abuse user with a skeleton script or something (not everyone is capable to run skeleton scripts), but if we will create new part of administration interface integrated into phpBugTracker's administration? Let's follow the user on his way to add new field: 1) User (Admin in this step) wants to track the phase of the Moon. 2) Admin opens administration and clicks on New field. 3) Admin fills if the field will be only the variable value or foreign key. 4) If it will be the variable, tables and scripts (config.php, cofig-dist.php and other) are self modified. 5) If it will be foreign key, user is forced to fill at least one value, which will be available for selection. New table is created, rows (with values sumbitted by user) are inserted into it and scripts are self modified. Rather than modifying scripts, this fields may be configured in the database table or .ini file. I understand, it needs more coding than creating a skeleton script, but it will be more user friendly. So, we can create new table TBL_EXTRAS, which will contain extra fields and foreign keys. We also need modify TBL_BUG and TBL_PROJECT, because some extra fields will stay per project and other extra fileds will stay per bug. For example version_to_be_closed will be property (or attribute) of a Bug and database_version will be property of a Project. I don't actually know if we will ever have extra fields for e.g. Component or not. Jirka |