diff options
author | mkanat%bugzilla.org <> | 2006-07-19 04:10:31 +0000 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2006-07-19 04:10:31 +0000 |
commit | f27aaa287562fb880934565d6a091ab1674bfab4 (patch) | |
tree | ef713bebee235631f1435d0312a0494caed9c8c1 /Bugzilla | |
parent | aa205508ed3bc52b02cde76286daaec40aebfa5c (diff) | |
download | bugs-f27aaa287562fb880934565d6a091ab1674bfab4.tar bugs-f27aaa287562fb880934565d6a091ab1674bfab4.tar.gz bugs-f27aaa287562fb880934565d6a091ab1674bfab4.tar.bz2 bugs-f27aaa287562fb880934565d6a091ab1674bfab4.tar.xz bugs-f27aaa287562fb880934565d6a091ab1674bfab4.zip |
Bug 344521: Make custom fields optionally functional on enter_bug.cgi
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=myk
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/DB/Schema.pm | 2 | ||||
-rw-r--r-- | Bugzilla/Field.pm | 19 |
2 files changed, 20 insertions, 1 deletions
diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm index c885987bc..94e457dd0 100644 --- a/Bugzilla/DB/Schema.pm +++ b/Bugzilla/DB/Schema.pm @@ -464,6 +464,8 @@ use constant ABSTRACT_SCHEMA => { sortkey => {TYPE => 'INT2', NOTNULL => 1}, obsolete => {TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => 'FALSE'}, + enter_bug => {TYPE => 'BOOLEAN', NOTNULL => 1, + DEFAULT => 'FALSE'}, ], INDEXES => [ fielddefs_name_idx => {FIELDS => ['name'], diff --git a/Bugzilla/Field.pm b/Bugzilla/Field.pm index 2118d41ac..e964141d4 100644 --- a/Bugzilla/Field.pm +++ b/Bugzilla/Field.pm @@ -82,7 +82,8 @@ use constant DB_COLUMNS => ( 'description', 'type', 'custom', - 'obsolete' + 'obsolete', + 'enter_bug', ); our $columns = join(", ", DB_COLUMNS); @@ -182,6 +183,19 @@ a boolean specifying whether or not the field is obsolete; sub obsolete { return $_[0]->{obsolete} } +=over + +=item C<enter_bug> + +A boolean specifying whether or not this field should appear on +enter_bug.cgi + +=back + +=cut + +sub enter_bug { return $_[0]->{enter_bug} } + =pod @@ -267,6 +281,9 @@ sub match { if (defined $criteria->{obsolete}) { push(@terms, "obsolete=" . ($criteria->{obsolete} ? "1" : "0")); } + if (defined $criteria->{enter_bug}) { + push(@terms, "enter_bug=" . ($criteria->{enter_bug} ? '1' : '0')); + } my $where = (scalar(@terms) > 0) ? "WHERE " . join(" AND ", @terms) : ""; my $records = Bugzilla->dbh->selectall_arrayref( |