Closed Bug 493091 Opened 15 years ago Closed 15 years ago

isactive should be renamed is_active in all fields

Categories

(Bugzilla :: Bugzilla-General, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: gregaryh, Assigned: gregaryh)

References

Details

Attachments

(1 file)

Convention dictates that an underscore be placed in the field name to separate words. To this end, isactive should be renamed is_active.
Attached patch V1Splinter Review
Placing the calls to bz_rename_column in Install::DB::update_table_definitions for enum tables fails with:

DBD::mysql::db selectcol_arrayref failed: Unknown column 'is_active' in 'where clause' [for Statement "SELECT value FROM priority
           WHERE is_active = ?
        ORDER BY sortkey, value"] at Bugzilla/Field.pm line 879
	Bugzilla::Field::get_legal_field_values('priority') called at Bugzilla/Config/BugFields.pm line 44
	Bugzilla::Config::BugFields::get_param_list('Bugzilla::Config::BugFields') called at Bugzilla/Config.pm line 62
	Bugzilla::Config::_load_params() called at Bugzilla/Config.pm line 197
	Bugzilla::Config::update_params() called at ./checksetup.pl line 154

This is because it needs to call Bugzilla::Field::get_legal_field_values('priority') to set up the defaultpriority parameter. 

After investigating, it seemed reasonable to place the rename in DB::_bz_populate_enum_table as it can do it for each table that is called. 
I am open to other suggestions, but at this point it would either have to be placed directly in checksetup.pl before the call to update_params or it would have to be placed in bz_setup_database, neither of which seemed better options than this.
Assignee: general → ghendricks
Status: NEW → ASSIGNED
Attachment #377704 - Flags: review?(mkanat)
I really don't understand why this change is desired at all, besides for some consistency. This is a 20K patch which is just prone to errors if you miss a single line of code, will probably bitrot several patches, and doesn't help developers very much. IMO, we should only focus on new DB columns. Else you are going to break existing extensions depending on these column names.
Severity: normal → enhancement
OS: Linux → All
Hardware: x86 → All
Version: unspecified → 3.5
Okay, yeah, don't fix it. I'm sorry. It is too much complexity for too little gain, I agree.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → WONTFIX
Attachment #377704 - Flags: review?(mkanat)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: