BMO/CustomFlags
< BMO
Jump to navigation
Jump to search
BMO - Custom Flags
Current State
Currently the flags we are using to track major product development (mostly the tracking-* and status-* flags) are implemented on BMO as single select drop-down custom fields.
Layered on top of this we have minor modifications to the Bugzilla core code, which allows the BMO Bugzilla extension to apply visibility and access controls to each field based on the product and group membership.
Issues
Bugzilla's custom field implementation adds fields by adding a column to the bugs table. This presents several issues:
- Adding a new field requires a schema change, and this takes a while to happen on MySql (approx 3 minutes on the current hardware). The only way for this to happen safely is to disable updating of bugs while the field is being added
- Adding a field cannot be executed via the web pages, it must be performed from the console, which means IT must add each field. This has resulted in delays in getting fields added
- There are possible performance issues with adding many columns to the bugs table. One the "fast train" development cycle, each product on the train will have two new fields added every three months (there will be at least four products on the train, probably more to come). Once a field has been used, it can't be dropped from the schema.
- Any changes to the security policy require updates to the BMO extension's code, which then need to be deployed
Proposal
Implement a purpose-built custom flag mechanism for tracking, status, etc flags.
(more to come)
Implementation
Permissions
We need a permissions matrix for each field, editable via an admin page:
| Old | New | No-Privs | canconfirm | editbugs | Setter |
|---|---|---|---|---|---|
| Clear | Request | [ x ] | [ - ] | [ x ] | [ x ] |
| Clear | Set | [ - ] | [ - ] | [ - ] | [ x ] |
| Request | Clear | [ x ] | [ - ] | [ x ] | [ x ] |
| Request | Set | [ - ] | [ - ] | [ x ] | [ x ] |
| Set | Clear | [ - ] | [ - ] | [ x ] | [ x ] |
| Set | Request | [ - ] | [ - ] | [ x ] | [ x ] |
Notes:
- the "Setter" column will be determined by group membership -- if a user is a member of any of the specified groups the "setter" rules would apply to them
Schema
- ms_flags(id, name, is_active, description, sort_key)
- ms_flags_values(id, ms_flags_id, value, sort_key, is_active)
- ms_flags_bugs(ms_flags_id, bug_id, value)
- ms_flags_setters(ms_flags_id, groups_id)
- ms_flags_permissions(ms_flags_id, change, no_priv, canconfirm, editbugs, setter)
- change = 0 (c->r), 1 (c->s), 2 (r->c), 3 (r->s), 4 (s->c), 5 (s->r)