View Issue Details

IDProjectCategoryView StatusLast Update
0004416mantisbtcustomizationpublic2009-06-26 12:07
Reportergrangeway Assigned Tothraxisp  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Fixed in Version1.0.0 
Summary0004416: Roadmap - Move configurations to database
Description

Move configurations to database
Allow control such configuration through web pages.
Allow per project settings, per user settings, per user/per project settings.

TagsNo tags attached.
Attached Files
email_config_screen.pdf (77,338 bytes)
config.xls (106,496 bytes)

Relationships

parent of 0001265 closedgrangeway Please provide a project based filter option for emails 
parent of 0002385 closedgrangeway 'mail on' settings broken up by role 
parent of 0003796 closedgrangeway Bug dependant Email notification 
parent of 0002415 closedgrangeway Allow users to specify email notifiation on a per project basis 
parent of 0004320 acknowledged Email filtering 
parent of 0001139 closedachumakov [all lang] date localisation 
parent of 0001174 closedgrangeway Allow file uploads on a per project / per user base 
has duplicate 0004883 closed Want to customize Mantis by project 
has duplicate 0004046 closedthraxisp config variables via a "manage" tab 
has duplicate 0006136 closedthraxisp Make all configuration stored in DB. For administrate site from it. 
has duplicate 0005014 closedatrol 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.

Activities

ralfiii

ralfiii

2005-01-24 18:08

reporter   ~0009085

Maybe issue 0001139 should be also covered here.

thraxisp

thraxisp

2005-02-05 17:45

reporter   ~0009221

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:
config_get()
looks for specified config_id + current user + current project.
if not found, config_id + current user + all_project
if not found, config_id + default user + current project
if not found, config_id + default user + all_project.
if not found, use GLOBAL[config_id]

Open Issues:
1) should this replace the existing user preferences?

jferraz

jferraz

2005-02-05 18:12

reporter   ~0009222

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).

thraxisp

thraxisp

2005-02-05 18:50

reporter   ~0009223

Fields in database:

email:
$g_default_notify_flags
$g_notify_flags
$g_email_receive_own (extend to per user in future)
$g_default_email_on_new
$g_default_email_on_assigned
$g_default_email_on_feedback
$g_default_email_on_resolved
$g_default_email_on_closed
$g_default_email_on_reopened
$g_default_email_on_bugnote
$g_default_email_on_status
$g_default_email_on_new_minimum_severity
$g_default_email_on_assigned_minimum_severity
$g_default_email_on_feedback_minimum_severity
$g_default_email_on_resolved_minimum_severity
$g_default_email_on_closed_minimum_severity
$g_default_email_on_reopened_minimum_severity
$g_default_email_on_bugnote_minimum_severity
$g_default_email_on_status_minimum_severity
$g_default_email_on_priority_minimum_severity
$g_default_email_bugnote_limit
$g_view_handler_threshold
$g_view_history_threshold

Issue Defaults:
$g_default_bug_view_status
$g_default_bugnote_view_status
$g_default_bug_severity
$g_default_bug_priority

View:
$g_default_advanced_report
$g_default_advanced_view
$g_default_advanced_update
$g_history_default_visible
$g_history_order

Reminder Settings
$g_store_reminders
$g_reminder_recipents_monitor_bug
$g_default_reminder_view_status

Sponsorship Settings
$g_enable_sponsorship
$g_minimum_sponsorship_amount = 5;

File Upload
$g_allow_file_upload
$g_file_upload_method

Status / Workflow Settings
$g_bug_submit_status
$g_bug_assigned_status
$g_bug_reopen_status
$g_bug_reopen_resolution
$g_bug_readonly_status_threshold
$g_bug_resolved_status_threshold
$g_auto_set_status_to_assigned
$g_status_enum_workflow
$g_report_bug_threshold
$g_update_bug_threshold
$g_monitor_bug_threshold
$g_private_bug_threshold
$g_handle_bug_threshold
$g_private_bugnote_threshold
$g_bug_reminder_threshold
$g_delete_bug_threshold
$g_set_view_status_threshold
$g_change_view_status_threshold
$g_update_readonly_bug_threshold
$g_view_changelog_threshold
$g_update_bug_status_threshold
$g_set_status_threshold
$g_limit_reporters
$g_allow_close_immediately
$g_allow_reporter_close
$g_allow_reporter_reopen

Project Settings
$g_upload_project_file_threshold
$g_view_proj_doc_threshold
$g_manage_news_threshold

Bugnote Settings
$g_add_bugnote_threshold
$g_update_bugnote_threshold
$g_delete_bugnote_threshold
$g_bugnote_allow_user_edit_delete

Custom Fields
$g_manage_custom_fields_threshold
$g_custom_field_link_threshold

thraxisp

thraxisp

2005-02-05 18:54

reporter   ~0009224

Yes, "value" should be a BLOB (up to 65k).

Matt_wc

Matt_wc

2005-02-06 23:50

reporter   ~0009226

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?

gtomlin

gtomlin

2005-02-07 10:20

reporter   ~0009228

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.

thraxisp

thraxisp

2005-02-07 11:12

reporter   ~0009229

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.

gtomlin

gtomlin

2005-02-07 11:54

reporter   ~0009231

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.

grangeway

grangeway

2005-02-07 13:58

reporter   ~0009233

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).
mssql schema uses IMAGE, pgsql BYTEA...

Surely, we want a text format, not a binary format for storing configuration variables?

grangeway

grangeway

2005-02-07 13:58

reporter   ~0009234

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).
mssql schema uses IMAGE, pgsql BYTEA...

Surely, we want a text format, not a binary format for storing configuration variables?

thraxisp

thraxisp

2005-02-07 14:31

reporter   ~0009236

Last edited: 2005-02-07 15:16

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.

thraxisp

thraxisp

2005-02-13 20:45

reporter   ~0009301

This is now partially coded. I've attached a screen shot of the email notification configuration screen.

Matt_wc

Matt_wc

2005-02-13 21:14

reporter   ~0009302

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?

thraxisp

thraxisp

2005-02-13 21:36

reporter   ~0009303

Yes, the page is built dynamically based on the enumerations.

thraxisp

thraxisp

2005-02-24 19:03

reporter   ~0009382

A prototype of the workflow configuration has been attached.

mgerben

mgerben

2005-02-25 08:09

reporter   ~0009385

Is there a way of handling multiple values (arrays)?
Will be neccesary if you ever want to move from using thresholds to fixed values.

Blobs aren't beautiful and certainly not readable or editable. Personally I'd prefer storage as strings. Better to understand, restore and for maintenance.

thraxisp

thraxisp

2005-02-25 08:31

reporter   ~0009386

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.

thraxisp

thraxisp

2005-03-06 16:15

reporter   ~0009488

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)

thraxisp

thraxisp

2009-05-19 20:07

reporter   ~0021844

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.