[Rt-devel] logic bug on caching queues

Jesse Vincent jesse at bestpractical.com
Thu Jul 5 07:29:09 EDT 2007


On Jul 5, 2007, at 6:47 AM, Nicholas Clark wrote:

> I note that RT::Queue::StatusArray() is documented as
>
>   Returns an array of all statuses for this queue
>
> Whilst the current implementation does not return different results  
> per
> queue, the facility seems to be there to do it.
>

The facility is... partially there.  I'd love to see patches to push  
us further in that direction.

> However /html/Elements/SelectStatus has
>
>     <%ONCE>
>     my $queue = new RT::Queue($session{'CurrentUser'});
>     my @status = $queue->StatusArray();
>     </%ONCE>
>
>
> Am I right in my understanding of Mason that that ONCE block is run  
> exactly
> once at the time of loading the page? If so, surely it will cache  
> the status
> list to early, and hence prevent a correct drop down if someone  
> wishes to
> customise RT to have different statuses available on different queues.
>

I'd be ok with flipping it from a <%once> to a <%init> block. but do  
note that you're never actaully loading a specific $queue in that code.


> Nicholas Clark
> _______________________________________________
> List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/ 
> rt-devel
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://lists.bestpractical.com/pipermail/rt-devel/attachments/20070705/12d83e70/PGP.pgp


More information about the Rt-devel mailing list