Closed
Bug 372531
Opened 17 years ago
Closed 17 years ago
"match" should be a generic function in Bugzilla::Object
Categories
(Bugzilla :: Bugzilla-General, enhancement)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.2
People
(Reporter: mkanat, Assigned: mkanat)
Details
Attachments
(1 file, 1 obsolete file)
5.87 KB,
patch
|
LpSolit
:
review+
|
Details | Diff | Splinter Review |
The current Bugzilla::Field::match function would be useful for all of our objects, I think. At the very least, I had a use for it in some customizations I did, and so I've already done this, I just have to pull out the patch and attach it.
Assignee | ||
Comment 1•17 years ago
|
||
This is the initial version, as I implemented it. However, it includes the ability for match() to match NULL and NOT NULL, which we don't need yet, so we shouldn't include that upstream.
Assignee: general → mkanat
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•17 years ago
|
||
Comment on attachment 257179 [details] [diff] [review] v1 Actually, I'll need the NOT NULL and NULL stuff soon for the "fields that control other fields." If you want me to take it out and submit another patch, though, I'd also be happy to do that.
Attachment #257179 -
Flags: review?(LpSolit)
Comment 3•17 years ago
|
||
Comment on attachment 257179 [details] [diff] [review] v1 >Index: Bugzilla/Object.pm >+ my @join; >+ foreach my $join_def (@{$class->MATCH_JOIN}) { >+ my %def = %$join_def; >+ my ($f_table, $from, $to) = @def{qw(table from to)}; >+ push(@join, "LEFT JOIN $f_table ON $table.$from = $f_table.$to"); >+ } >+ my $join_sql = join("\n", @join); Per our discussion on IRC, this should go away.
Attachment #257179 -
Flags: review?(LpSolit) → review-
Assignee | ||
Comment 4•17 years ago
|
||
Okay, removed that code and added POD.
Attachment #257179 -
Attachment is obsolete: true
Attachment #261574 -
Flags: review?(LpSolit)
Comment 5•17 years ago
|
||
Comment on attachment 261574 [details] [diff] [review] v2 >Index: Bugzilla/Object.pm >+ if ($value eq NOT_NULL) { Next time, please do some minimal tests first. :) Bareword "NOT_NULL" not allowed while "strict subs" in use at Bugzilla/Object.pm line 153, <DATA> line 225. Bareword "IS_NULL" not allowed while "strict subs" in use at Bugzilla/Object.pm line 153, <DATA> line 225. You have to |use Bugzilla::Constants| in Object.pm in order to use NOT_NULL and IS_NULL. r=LpSolit with this line added.
Attachment #261574 -
Flags: review?(LpSolit) → review+
Updated•17 years ago
|
Flags: approval+
Assignee | ||
Comment 6•17 years ago
|
||
Ah, thanks for catching that. :-) I copied this code out of NASA code, and I must have just missed that block. Checking in Bugzilla/Constants.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Constants.pm,v <-- Constants.pm new revision: 1.70; previous revision: 1.69 done Checking in Bugzilla/Field.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Field.pm,v <-- Field.pm new revision: 1.26; previous revision: 1.25 done Checking in Bugzilla/Object.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Object.pm,v <-- Object.pm new revision: 1.15; previous revision: 1.14 done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•