RT::Queue::QueueNumber Unimplemented in HTML::Mason::Commands

Hi all,

I couldn’t find anything about the 'Unimplemented in HTML::Mason::Commands’
error I receive. What I’m trying to do is the following:

  • I’ve added an extra field to the database table ‘Queues’ named
    ’QueueNumer’

What I’m trying to do now is to use this field in RT. However, whatever I
try to use this field I get the RT::Queue::QueueNumber Unimplemented in
HTML::Mason::Commands error.

For example somewhere in Elements/Quicksearch by using:

$queue->QueueNumber ($queue is defined in Quicksearch and working for the
other fields).

Can someone help me out with this (minor) problem. I have looked around but
couldn’t find documention on how to implement new database field.

Thx,

Rolph

You can’t just add a file to a table. You need to define
the subroutine in Queue_Overlay.pm or Queue_Local.pm.

It might be better to use Attributes for what you are doing.
Then again, some callbacks may need to be added for displaying/
editing callbacks.

-ToddOn Tue, Jan 04, 2005 at 11:30:47PM +0100, Haspers wrote:

Hi all,

I couldn’t find anything about the ‘Unimplemented in HTML::Mason::Commands’
error I receive. What I’m trying to do is the following:

  • I’ve added an extra field to the database table ‘Queues’ named
    ‘QueueNumer’

What I’m trying to do now is to use this field in RT. However, whatever I
try to use this field I get the RT::Queue::QueueNumber Unimplemented in
HTML::Mason::Commands error.

For example somewhere in Elements/Quicksearch by using:

$queue->QueueNumber ($queue is defined in Quicksearch and working for the
other fields).

Can someone help me out with this (minor) problem. I have looked around but
couldn’t find documention on how to implement new database field.

Thx,

Rolph


The rt-users Archives

Be sure to check out the RT wiki at http://wiki.bestpractical.com

Haspers wrote:

Hi all,

I couldn’t find anything about the ‘Unimplemented in HTML::Mason::Commands’
error I receive. What I’m trying to do is the following:

  • I’ve added an extra field to the database table ‘Queues’ named
    ‘QueueNumer’

What I’m trying to do now is to use this field in RT. However, whatever I
try to use this field I get the RT::Queue::QueueNumber Unimplemented in
HTML::Mason::Commands error.

For example somewhere in Elements/Quicksearch by using:

$queue->QueueNumber ($queue is defined in Quicksearch and working for the
other fields).
Add description of this field into sub _ClassAccessible which is defined
in Queue_Overlay.pm. Read DBIx::SearchBuilder docs and tests.

But it’s better to use Attributes as Todd suggested.

Ruslan,

Don’t you also need to define the accessors since they are not
generated by the factory script? Or, do you assume the column
is added before factory is run? Or, is there AUTOLOAD magic
that takes care of it?

Thanks.

-ToddOn Wed, Jan 05, 2005 at 01:47:12PM +0300, Ruslan U. Zakirov wrote:

Add description of this field into sub _ClassAccessible which is defined
in Queue_Overlay.pm. Read DBIx::SearchBuilder docs and tests.

But it’s better to use Attributes as Todd suggested.

Todd Chapman wrote:

Ruslan,

Don’t you also need to define the accessors since they are not
generated by the factory script? Or, do you assume the column
factory script doesn’t generate accessors. it genarates default
descriptions only.
is added before factory is run? Or, is there AUTOLOAD magic
that takes care of it?
AUTOLOAD generates accessors when you call them first time. Description
of the field it takes from hash that _ClassAccessible sub should return.
I didn’t use factory script but AFAIKS it generates default
_ClassAccessible sub into Foo.pm files, but in RT most of this subs are
overriden in Foo_Overlay.pm files.

Never mind all, I had it right (Queue_Overlay.pm with _ClassAccessible) but
forgot to restart apache :slight_smile: Very stupid I know :slight_smile:
Thanks all for the help.

RolphFrom: Ruslan U. Zakirov [mailto:Ruslan.Zakirov@acronis.com]
Sent: woensdag 5 januari 2005 16:14
To: Todd Chapman
Cc: Haspers; rt-users@lists.bestpractical.com
Subject: Re: [rt-users] RT::Queue::QueueNumber Unimplemented in
HTML::Mason::Commands

Todd Chapman wrote:

Ruslan,

Don’t you also need to define the accessors since they are not
generated by the factory script? Or, do you assume the column
factory script doesn’t generate accessors. it genarates default
descriptions only.
is added before factory is run? Or, is there AUTOLOAD magic
that takes care of it?
AUTOLOAD generates accessors when you call them first time. Description
of the field it takes from hash that _ClassAccessible sub should return.
I didn’t use factory script but AFAIKS it generates default
_ClassAccessible sub into Foo.pm files, but in RT most of this subs are
overriden in Foo_Overlay.pm files.

Thanks.

-Todd

Add description of this field into sub _ClassAccessible which is defined
in Queue_Overlay.pm. Read DBIx::SearchBuilder docs and tests.

But it’s better to use Attributes as Todd suggested.

Todd Chapman wrote:

Ruslan,

Don’t you also need to define the accessors since they are not
generated by the factory script? Or, do you assume the column
factory script doesn’t generate accessors. it genarates default
descriptions only.
is added before factory is run? Or, is there AUTOLOAD magic
that takes care of it?
AUTOLOAD generates accessors when you call them first time. Description
of the field it takes from hash that _ClassAccessible sub should return.
I didn’t use factory script but AFAIKS it generates default
_ClassAccessible sub into Foo.pm files, but in RT most of this subs are
overriden in Foo_Overlay.pm files.

These days, what happens is actually that Foo.pm has a

sub _CoreAccessible

and Foo_Overlay.pm has a

sub _OverlayAccessible

and RT::Record merges the two together into _ClassAccessible.