Broken Trac Report
Bruce Gray
bruce.gray at acm.org
Thu Apr 28 14:13:55 UTC 2011
> On Thu, Apr 28, 2011 at 1:33 AM, Jonathan "Duke" Leto <jonathan at leto.net
> > wrote:
>> Can somebody fix this report?
>>
>> http://trac.parrot.org/parrot/report/6
On Apr 28, 2011, at 8:10 AM, Andrew Whitworth wrote:
> I removed the offending clause from the report query, and it appears
> to work now. Whether it does the correct thing still, I can't say. I
> don't know what it is supposed to do.
I see what the clause was intended to do, and have replaced it, then
fixed it.
Fixed by changing this:
ORDER BY
(milestone IS NULL),
milestone DESC,
(status = 'closed'),
(
CASE status
WHEN 'closed'
THEN modified
ELSE (-1)*p.value
END
) DESC
to this:
ORDER BY
(milestone IS NULL),
milestone DESC,
(status = 'closed'), -- Within each milestone, closed tickets
appear at bottom
(
-- Closed tickets sort youngest to oldest
-- Open tickets sort most urgent to least urgent
CASE status
WHEN 'closed'
THEN changetime
ELSE (-1) * CAST( p.value AS INTEGER )
END
) DESC
1. "modified" is an alias for "changetime", and aliases are not
allowed in the ORDER BY clause.
2. "p.value" is a text field, even though it is always an int value
when used for Priority, and so needs a CAST().
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
More information about the parrot-dev
mailing list