View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004416 | mantisbt | customization | public | 2004-08-27 12:39 | 2009-06-26 12:07 |
Reporter | grangeway | Assigned To | thraxisp | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Fixed in Version | 1.0.0 | ||||
Summary | 0004416: Roadmap - Move configurations to database | ||||
Description | Move configurations to database | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
parent of | 0001265 | closed | grangeway | Please provide a project based filter option for emails |
parent of | 0002385 | closed | grangeway | 'mail on' settings broken up by role |
parent of | 0003796 | closed | grangeway | Bug dependant Email notification |
parent of | 0002415 | closed | grangeway | Allow users to specify email notifiation on a per project basis |
parent of | 0004320 | acknowledged | Email filtering | |
parent of | 0001139 | closed | achumakov | [all lang] date localisation |
parent of | 0001174 | closed | grangeway | Allow file uploads on a per project / per user base |
has duplicate | 0004883 | closed | Want to customize Mantis by project | |
has duplicate | 0004046 | closed | thraxisp | config variables via a "manage" tab |
has duplicate | 0006136 | closed | thraxisp | Make all configuration stored in DB. For administrate site from it. |
has duplicate | 0005014 | closed | atrol | Automated editing of config_inc.php |
child of | 0004181 | closed | Features in Mantis 1.1 release | |
Not all the children of this issue are yet resolved or closed. |
Maybe issue 0001139 should be also covered here. |
|
Proposal: A number of Config Options could be 'per-user' or 'per-project'. The implementation needs to be backwards compatible in that existing "config_inc.php / config_defaults_inc.php" settings should be preserved. Setting the options will require a new UI (Manage Configuration) under the Manage section. It will make use of the project selection (current project or All Projects). Settings should also be cached for performance. Schema: Add a new table (mantis_config) containing config_id (string), project_id(int) , user_id(int), type(int), value(string). The type field is used to define the coding for the value string. Examples are int, string, and serialized value. Changes: Open Issues: |
|
By "string", do you mean "varchar"? If so, I think that "blob" (medium perhaps) is more appropriate, since it may pottentially contain many different types of data (possibly serialized). |
|
Fields in database: email: Issue Defaults: View: Reminder Settings Sponsorship Settings File Upload Status / Workflow Settings Project Settings Bugnote Settings Custom Fields |
|
Yes, "value" should be a BLOB (up to 65k). |
|
How are you going to handle access to change the values in the DB? Example: could a manager change the values in 'Issue Defaults:' but only an admin change all others? I know it will be easy to restrict any changes to admin, but it may be wise to include access permissions based on roles in the DB as well. What do you think? |
|
One other thing to consider: settings in the database will control who can change settings in the database. This raises the possibility that someone could change settings in such a way that nobody can access the settings thereafter. There will need to be some sort of "rescue" mechanism that allows recovery from such changes, like a config_emergency_inc.php. |
|
The initial implementation was intended to be accessible by Administrators only. Adding an additional field to the table (access (int)) would allow others to change things. Since someone has to be trusted, I would leave that field accessible by administrators only. For the UI, we could leave viewing accessible to all (most?) and get both the update and view function out of the same set of pages. |
|
OK, I guess the fact that you didn't include "$g_manage_user_threshold" in the list of fields to move to the database means the only way an installation could screw itself is to delete all administrators, which would be a bad thing today as well. |
|
thraxisp: is your list of fields same as the list I added to wiki previously? "Yes, "value" should be a BLOB (up to 65k). " We might need to think about this one - adodb datadict only has 'B' (as longblob). Surely, we want a text format, not a binary format for storing configuration variables? |
|
thraxisp: is your list of fields same as the list I added to wiki previously? "Yes, "value" should be a BLOB (up to 65k). " We might need to think about this one - adodb datadict only has 'B' (as longblob). Surely, we want a text format, not a binary format for storing configuration variables? |
|
Yes, the list is roughly what was posted on the developer's wiki. Given that I was thinking of serializing arrays / structures, a large text field is what is needed. The XS type you added would work. |
|
This is now partially coded. I've attached a screen shot of the email notification configuration screen. |
|
Quick question, if I add a custom status (per the manual) will the additional statuses be available to configure with these changes? E.G. I add 'Waiting Approval' after feedback. Will I see a row for this status? |
|
Yes, the page is built dynamically based on the enumerations. |
|
A prototype of the workflow configuration has been attached. |
|
Is there a way of handling multiple values (arrays)? Blobs aren't beautiful and certainly not readable or editable. Personally I'd prefer storage as strings. Better to understand, restore and for maintenance. |
|
Array (and objects) are currently handled by serialization. Personally, I think that internal storage is what is easiest for the system to use. A GUI is provided for users to see the result in a friendly fashion. The workflow is stored internally as an array, for example. |
|
I uploaded an Excel spreadsheet to enumerate all of the current settings. It has descriptions for all of the configs, their possible values and most of the defaults. It also has columns to set whether a config should be settable globally, by project, or by user. I've also added columns showing whether the values should be set from an installer or UI (or neither). I'll start a thread on the forum for discussion. (http://forums.mantisbt.org/viewtopic.php?p=232) |
|
Most of this was done a long time ago. I think that individual bugs should be raised for mssing configuration pages. Asuning people actually use them. |
|