summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Group.pm
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2018-06-25 23:28:13 +0200
committerGitHub <noreply@github.com>2018-06-25 23:28:13 +0200
commit7094db8e78304f4f76d48ba230f07fab5c9d0daf (patch)
treee9a0466731955c2b74e1ac1d1743e86e264b1b74 /Bugzilla/Group.pm
parente83b95790d29393e9711aedeccfd63353bbc3cde (diff)
downloadbugzilla-7094db8e78304f4f76d48ba230f07fab5c9d0daf.tar.gz
bugzilla-7094db8e78304f4f76d48ba230f07fab5c9d0daf.tar.xz
Bug 1471044 - Allow some model classes to have dynamic column names with class method DYNAMIC_COLUMNS
When working on bug 1253535 I kept encountering the fragility of our model system. This fragility involves two things: 1) Extensions adding new columns to model objects 2) The use of those model objects in checksetup. In particular, the SecureMail extension causes this problem because (at checksetup-time) we need to lookup certain Group objects. Thus I propose to 1) allow model classes to take their list of columns from the informations schema (exposed via `bz_table_columns_real`) 2) Have Bugzilla::Group do this when being used in a commandline (e.g. checksetup) context.
Diffstat (limited to 'Bugzilla/Group.pm')
-rw-r--r--Bugzilla/Group.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/Bugzilla/Group.pm b/Bugzilla/Group.pm
index fe2a90c05..c941482f0 100644
--- a/Bugzilla/Group.pm
+++ b/Bugzilla/Group.pm
@@ -67,6 +67,11 @@ use constant UPDATE_COLUMNS => qw(
use constant GROUP_PARAMS => qw(chartgroup insidergroup timetrackinggroup
querysharegroup);
+
+sub DYNAMIC_COLUMNS {
+ return Bugzilla->usage_mode == USAGE_MODE_CMDLINE;
+}
+
###############################
#### Accessors ######
###############################