isactive should be renamed is_active in all fields

RESOLVED WONTFIX

Status

()

Bugzilla
Bugzilla-General
--
enhancement
RESOLVED WONTFIX
9 years ago
9 years ago

People

(Reporter: Greg Hendricks, Assigned: Greg Hendricks)

Tracking

Details

Attachments

(1 attachment)

(Assignee)

Description

9 years ago
Convention dictates that an underscore be placed in the field name to separate words. To this end, isactive should be renamed is_active.
(Assignee)

Comment 1

9 years ago
Created attachment 377704 [details] [diff] [review]
V1

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)

Comment 2

9 years ago
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

Comment 3

9 years ago
Okay, yeah, don't fix it. I'm sorry. It is too much complexity for too little gain, I agree.
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → WONTFIX

Updated

9 years ago
Attachment #377704 - Flags: review?(mkanat)
You need to log in before you can comment on or make changes to this bug.