Bug 111830
Summary: | SQL bug for "days since bug changed" boolean chart | ||
---|---|---|---|
Product: | [Community] Bugzilla | Reporter: | Maxwell Kanat-Alexander <mkanat> |
Component: | Bugzilla General | Assignee: | David Lawrence <dkl> |
Status: | CLOSED NOTABUG | QA Contact: | David Lawrence <dkl> |
Severity: | medium | Docs Contact: | |
Priority: | high | ||
Version: | 2.17 | CC: | sundaram |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2006-02-14 20:03:27 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Maxwell Kanat-Alexander
2003-12-10 18:19:57 UTC
to_days will have to be conditioned out in the code and a sql statement with the equivalent PG function be added when used with PG. The PG date function age() or interval() is probably what is needed. Will look into fixing this. Thanks This can be fixed by changing: to_days(now()) - to_days(bugs.delta_ts) to this: (now() - '0000-01-01'::date) - (delta_ts - '0000-01-01'::date) Hope that helps... Sorry, make that bugs.delta_ts in the new line... It needs to be changed in the fielddefs table, I believe. (Changed the summary to be more accurate.) -Max Actually, this seems to work properly: to_char(now() - bugs.delta_ts, 'DD')::int The problem is that otherwise (in the code from comment 2) PostgreSQL returns it as a string with "x days y minutes..." and so on. -Max Wait, thinking about it a bit more, what users expect (and what the MySQL code is actually doing) is this: to_char(now(), 'J')::int - to_char(bugs.delta_ts, 'J')::int -Max I am closing this bug report as there has not been any activity on this for a while and there has been various changes made to bugzilla in the meantime. If the issue still exists, kindly reopen it. Thank you. |