<div dir="ltr">Jesse,<br><br>But this isn't a matter of permissions checking. If iterating over the query results skips disabled rows then Count should be able to eliminate them too. Right?<br><br>-Todd<br><br><div class="gmail_quote">
On Tue, Sep 16, 2008 at 12:56 PM, Jesse Vincent <span dir="ltr"><<a href="mailto:jesse@bestpractical.com">jesse@bestpractical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c"><br>
On Sep 16, 2008, at 11:41 AM, Todd Chapman wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
$QueueObj->TicketCustomFields->Count  includes disabled fields in it's Count. Should that be?<br>
<br>
If I do it this way:<br>
<br>
my $cfs = $QueueObj->TicketCustomFields;<br>
$cfs->ItemsArrayRef;<br>
my $count = $cfsw->Count;<br>
<br>
the the correct number is returned.<br>
<br>
SB version 1.48, RT version 3.6.3<br>
<br>
Is my technique wrong or is there a bug?<br>
</blockquote>
<br></div></div>
This is the same issue you see when doing a ticket search in RT. "Count" does a raw COUNT() in the database if you haven't previously actually loaded all the data from the database. Otherwise, it counts the rows on the perl side.<br>

<br>
ItemsArrayRef fully instantiates the list.<br>
<br>
You could get the same behaviour by calling:<br>
<br>
$cfs->First; $cfs->Count;<br>
<br>
<br>
</blockquote></div><br></div>