Closed Bug 398159 Opened 19 years ago Closed 13 years ago

"Days since bug changed" "changed by" "foo@bar.com" throws an error

Categories

(Bugzilla :: Query/Bug List, defect)

3.0.2
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: LpSolit, Unassigned)

Details

With the previously mentioned boolean search, you get: Can't use (TO_DAYS(NOW()) - TO_DAYS(bugs.delta_ts)) as a field name This makes it pretty hard to understand what's wrong exactly.
Search.pm contains: "^(changedin|days_elapsed)," => sub { $f = "(" . $dbh->sql_to_days('NOW()') . " - " . $dbh->sql_to_days('bugs.delta_ts') . ")"; }, but also: my $fieldid = $chartfields{$f}; if (!$fieldid) { ThrowCodeError("invalid_field_name", {field => $f}); } which fails as the DB contains 'days_elapsed'. joel, is that intended?
The Bugzilla 3.0 branch is now locked to security bugs and dataloss fixes only. This bug doesn't fit into one of these two categories and is retargetted to 3.2 as part of a mass-change. To catch bugmails related to this mass-change, use lts081207 in your email client filter.
Target Milestone: Bugzilla 3.0 → Bugzilla 3.2
Target Milestone: Bugzilla 3.2 → ---
It appears as though Bugzilla::DB::Oracle is not getting called properly; the code in Oracle.pm for sql_to_days is correct, but Oracle is reporting that it has sql using "TO_DAYS", which does not exist in Oracle SQL -- something isn't calling (or creating $dbh) correctly? This error can be caused by any query that attempt to do a "Days since bug changed" advanced boolean chart.
Sorry, this was a false alarm. I am getting the error because I had two rows in my FIELDDEFS table with the description "Days since bug changed", and its name was (TO_DAYS(NOW()) - TO_DAYS(bugs.delta_ts)) -- don't know where that came from, but I just did a huge upgrade on this system, I assume it's leftover cruft from something past.
No error thrown anymore.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.