[Rt-devel] Re: RT::Attribute::Name Unimplemented in RT::Attributes error

Joby Walker joby at u.washington.edu
Wed Dec 21 18:49:14 EST 2005


We are using attributes for a bunch of saved resources (Searches,
Reports (Statistics like graphs), scheduled reports, etc) and our custom
stuff will occasionally exhibit the Attributes error -- even with the
DBIx::SearchBuilder "fix" (removing the line).

Today I extended RT::Attributes to remove the caching and made it
similar to the other collection classes.  I have yet to see a failure --
but there is a lot more testing to do.

Attributes_Local.pm
----------------------------------------------------------------
package RT::Attributes;

use strict;
no warnings qw(redefine);

sub _DoSearch {
    my $self = shift;
    $self->SUPER::_DoSearch();
}

sub Named {
    my $self = shift;
    my $name = shift;
    $self->Limit(FIELD => 'Name',
                 OPERATOR => '=',
                 VALUE => $name);
    $self->_DoSearch();

    my @attributes;
    while (my $attr = $self->Next) {
        push (@attributes, $attr);
    }
    return @attributes;
}
return 1;
----------------------------------------------------------------


Joby Walker
ITI SSG, C&C, University of Washington


Jesse Vincent wrote:
> 
> 
>>>Will you try running entirely without that line for a bit to see if it
>>>does the right thing? It's a dubious feature that I'll yank from
>>>searchbuilder if we can't otherwise track this down.
>>>
>>>Jesse
>>
>>Sure - this is on a development box so there's no risk for me in omitting 
>>that line.
> 
> 
> It's also for a feature that RT hadn't yet made use of ;) (In fact, only
> our "new application" does. And that's actually running on Jifty::DBI,
> the next generation of searchbuilder tech.
> 
> 
> 
>>Thanks,
>>Steve 
>>
> 
> 


More information about the Rt-devel mailing list