Additional field in User details

Hiya,

I’ve run into a problem I can’t seem to resolve. I would appreciate any
help anyone can offer. I’m running RT 2.0.13.

I’m looking to add an additional field to the Users table to keep track of
the names of the employees that are using that username. It might sound
obscure, but it’s pretty important to the scheme I’m working with.

So, I added a row for it in the database like this:

mysql> alter table Users add Employees blob;
mysql> insert into Users (Employees) VALUES(NULL);

Next, I opened up User.pm and added a corresponding entry for “Employees”:
vi /usr/local/rt/lib/RT/User.pm

my %Cols = (
# {{{ Core RT info
Name => ‘public/read/write/admin’,
Password => ‘write’,
Comments => ‘read/write/admin’,
Employees => ‘read/write/admin’,

Next, I added this statement to Admin/Users/Modify.html to display the
Employees field.

<%$UserObj->Employees%>

and at the bottom:

$Employees=> undef
</%ARGS>

But I got the following error on that page:

Mason error

component stack: /Admin/Users/Modify.html [standard]
/autohandler [standard]

code
stack: /usr/local/rt/WebRT/data/obj/STANDARD/Admin/Users/Modify.html:332
/usr/local/rt/WebRT/data/obj/STANDARD/autohandler:69

misc info: error while executing /Admin/Users/Modify.html [standard]:

As a side note, I was able to replace the “Employees” with a previously
created, but unused value. For instance - I replaced it with Creator
(which was a valid field, but isn’t usually displayed at all on
Modify.html) and it worked fine.

By the way, here’s autohandler:69

68 else {
69 $m->call_next;
70 }

I would appreciate any help on this issue. It has me greatly befuddled.

Thanks.
Sean Byron

Does nobody have any experience adding additional User fields to RT?

I am getting rather dejected here :frowning:

Sean

Does nobody have any experience adding additional User fields to RT?

Do they need to be searchable? (I haven’t got around to searchable yet.)

-Rich

Rich Lafferty --------------±----------------------------------------------
Ottawa, Ontario, Canada | Save the Pacific Northwest Tree Octopus!
http://www.lafferty.ca/ | Save The Pacific Northwest Tree Octopus
rich@lafferty.ca -----------±----------------------------------------------

No, they don’t need to be searchable. It’s just something I need to be
able to edit in the User details screen (Modify.html). We’re keeping track
of the names of the Employees at each of our customers for authentication
purporses. Any details on your implementation would be GREATLY
appreciated!

Sean B

No, they don’t need to be searchable. It’s just something I need to be
able to edit in the User details screen (Modify.html). We’re keeping track
of the names of the Employees at each of our customers for authentication
purporses. Any details on your implementation would be GREATLY
appreciated!

Oh, user details, haven’t done that. But there’s already a field in
there for the name, so I can’t quite picture what you need.

-Rich

Rich Lafferty --------------±----------------------------------------------
Ottawa, Ontario, Canada | Save the Pacific Northwest Tree Octopus!
http://www.lafferty.ca/ | Save The Pacific Northwest Tree Octopus
rich@lafferty.ca -----------±----------------------------------------------

No, they don’t need to be searchable. It’s just something I need to be
able to edit in the User details screen (Modify.html). We’re keeping track
of the names of the Employees at each of our customers for authentication
purporses. Any details on your implementation would be GREATLY
appreciated!

Oh, user details, haven’t done that. But there’s already a field in
there for the name, so I can’t quite picture what you need.

Ok, are you using 1 User Object per Customer (site), and you want to
record the names of the valid employees at each Customer ?

If the case, with 2.0.x I’d suggest using the Watchers table (by defining
another Watcher type), but since thats on the way out, that doesn’t solve
your problem.

Otherwise, you probably want to be adding a ‘CustomerID’ field, and each
(customer) employee is a seperate RT User.

                         Bruce Campbell                            RIPE
               Systems/Network Engineer                             NCC
             www.ripe.net - PGP562C8B1B             Operations/Security

Ok, are you using 1 User Object per Customer (site), and you want to
record the names of the valid employees at each Customer ?

If the case, with 2.0.x I’d suggest using the Watchers table (by defining
another Watcher type), but since thats on the way out, that doesn’t solve
your problem.

Otherwise, you probably want to be adding a ‘CustomerID’ field, and each
(customer) employee is a seperate RT User.

FWIW, this is what we do – except we’ve renamed the nickname field to
hold the requiestor’s company’s tech-support contract number, and modified
the search-for-users page to let you search on that number

(We’ve also got a workflow hack that lets our phone people select or
create a user first and then fill out a ticket, which works nicely
with the above, because the TS contract number shows up for our TSRs
when calls come in.)

Cheers,

-Rich

Rich Lafferty --------------±----------------------------------------------
Ottawa, Ontario, Canada | Save the Pacific Northwest Tree Octopus!
http://www.lafferty.ca/ | Save The Pacific Northwest Tree Octopus
rich@lafferty.ca -----------±----------------------------------------------

I think we’re missing the point :slight_smile:

I’d like to know how to add an additional attribute to the Users table,
in my case Employees, but it could as well be eye color or favorite food,
and have it work. I understand that the “searchable” part is tricky - but
that’s not something I need right now. I just need to add an additional
field that I can update via Modify.html.

If anyone has any experience adding a field to the Users table, please let
me know where I am going wrong. Thanks.

This is repasted from my first post, but it describes what I’ve done so
far:

Hiya,

I’ve run into a problem I can’t seem to resolve. I would appreciate any
help anyone can offer. I’m running RT 2.0.13.

I’m looking to add an additional field to the Users table to keep track of
the names of the employees that are using that username. It might sound
obscure, but it’s pretty important to the scheme I’m working with.

So, I added a row for it in the database like this:

mysql> alter table Users add Employees blob;
mysql> insert into Users (Employees) VALUES(NULL);

Next, I opened up User.pm and added a corresponding entry for “Employees”:
vi /usr/local/rt/lib/RT/User.pm

my %Cols = (
# {{{ Core RT info
Name => ‘public/read/write/admin’,
Password => ‘write’,
Comments => ‘read/write/admin’,
Employees => ‘read/write/admin’,

Next, I added this statement to Admin/Users/Modify.html to display the
Employees field.

<%$UserObj->Employees%>

and at the bottom:

$Employees=> undef
</%ARGS>

But I got the following error on that page:

Mason error

component stack: /Admin/Users/Modify.html [standard]
/autohandler [standard]

code
stack: /usr/local/rt/WebRT/data/obj/STANDARD/Admin/Users/Modify.html:332
/usr/local/rt/WebRT/data/obj/STANDARD/autohandler:69

misc info: error while executing /Admin/Users/Modify.html [standard]:

As a side note, I was able to replace the “Employees” with a previously
created, but unused value. For instance - I replaced it with Creator
(which was a valid field, but isn’t usually displayed at all on
Modify.html) and it worked fine.

By the way, here’s autohandler:69

68 else {
69 $m->call_next;
70 }

I would appreciate any help on this issue. It has me greatly befuddled.

Thanks.
Sean Byron

Hiya,

I’ve run into a problem I can’t seem to resolve. I would appreciate any
help anyone can offer. I’m running RT 2.0.13.

I’m looking to add an additional field to the Users table to keep track of
the names of the employees that are using that username. It might sound
obscure, but it’s pretty important to the scheme I’m working with.

So, I added a row for it in the database like this:

mysql> alter table Users add Employees blob;
mysql> insert into Users (Employees) VALUES(NULL);

Next, I opened up User.pm and added a corresponding entry for “Employees”:
vi /usr/local/rt/lib/RT/User.pm

my %Cols = (
# {{{ Core RT info
Name => ‘public/read/write/admin’,
Password => ‘write’,
Comments => ‘read/write/admin’,
Employees => ‘read/write/admin’,

Next, I added this statement to Admin/Users/Modify.html to display the
Employees field.

<%$UserObj->Employees%>

and at the bottom:

$Employees=> undef
</%ARGS>

But I got the following error on that page:

Mason error

component stack: /Admin/Users/Modify.html [standard]
/autohandler [standard]

code
stack: /usr/local/rt/WebRT/data/obj/STANDARD/Admin/Users/Modify.html:332
/usr/local/rt/WebRT/data/obj/STANDARD/autohandler:69

misc info: error while executing /Admin/Users/Modify.html [standard]:

As a side note, I was able to replace the “Employees” with a previously
created, but unused value. For instance - I replaced it with Creator
(which was a valid field, but isn’t usually displayed at all on
Modify.html) and it worked fine.

By the way, here’s autohandler:69

68 else {
69 $m->call_next;
70 }

I would appreciate any help on this issue. It has me greatly befuddled.

Thanks.
Sean Byron

I too have been working at getting this exact thing to work as well. I
managed to do all the stuff same as Sean and am stuck with a similar
problem. I cannot seem to figure out how to access the column that is in
the database. I added a function to User.pm that was called Order (thats
the name of my field that I wish to add) and have it return a default
value, that fixes the error from mason that I got, however I cant seem to
get the data into or out of the db.

Any help is welcomed.
John

At 04:12 PM 10/2/2002, you wrote:

Hiya,

I’ve run into a problem I can’t seem to resolve. I would appreciate any
help anyone can offer. I’m running RT 2.0.13.

I’m looking to add an additional field to the Users table to keep track of
the names of the employees that are using that username. It might sound
obscure, but it’s pretty important to the scheme I’m working with.


So, I added a row for it in the database like this:

mysql> alter table Users add Employees blob;
mysql> insert into Users (Employees) VALUES(NULL);


Next, I opened up User.pm and added a corresponding entry for “Employees”:
vi /usr/local/rt/lib/RT/User.pm

my %Cols = (
# {{{ Core RT info
Name => ‘public/read/write/admin’,
Password => ‘write’,
Comments => ‘read/write/admin’,
Employees => ‘read/write/admin’,

Next, I added this statement to Admin/Users/Modify.html to display the
Employees field.

<%$UserObj->Employees%>

and at the bottom:

$Employees=> undef
</%ARGS>


But I got the following error on that page:

Mason error

component stack: /Admin/Users/Modify.html [standard]
/autohandler [standard]

code
stack: /usr/local/rt/WebRT/data/obj/STANDARD/Admin/Users/Modify.html:332
/usr/local/rt/WebRT/data/obj/STANDARD/autohandler:69

misc info: error while executing /Admin/Users/Modify.html [standard]:


As a side note, I was able to replace the “Employees” with a previously
created, but unused value. For instance - I replaced it with Creator
(which was a valid field, but isn’t usually displayed at all on
Modify.html) and it worked fine.

By the way, here’s autohandler:69

68 else {
69 $m->call_next;
70 }


I would appreciate any help on this issue. It has me greatly befuddled.

Thanks.
Sean Byron


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm

<>< Proverbs 3:5 “Trust in the Lord with all your heart and lean not on
your own understanding;”

I found that in my function Order I can call $self->__Value(dbfield) and
get almost any data. I can show the name email creator user id etc but it
returns null for my Order field. If i login in to the database i can see
that the field is not null what else do I need to change?

Previous changes.
John

At 08:56 AM 1/10/2003, you wrote:

I too have been working at getting this exact thing to work as well. I
managed to do all the stuff same as Sean and am stuck with a similar
problem. I cannot seem to figure out how to access the column that is in
the database. I added a function to User.pm that was called Order (thats
the name of my field that I wish to add) and have it return a default
value, that fixes the error from mason that I got, however I cant seem to
get the data into or out of the db.

Any help is welcomed.
John

At 04:12 PM 10/2/2002, you wrote:

Hiya,

I’ve run into a problem I can’t seem to resolve. I would appreciate any
help anyone can offer. I’m running RT 2.0.13.

I’m looking to add an additional field to the Users table to keep track of
the names of the employees that are using that username. It might sound
obscure, but it’s pretty important to the scheme I’m working with.


So, I added a row for it in the database like this:

mysql> alter table Users add Employees blob;
mysql> insert into Users (Employees) VALUES(NULL);


Next, I opened up User.pm and added a corresponding entry for “Employees”:
vi /usr/local/rt/lib/RT/User.pm

my %Cols = (
# {{{ Core RT info
Name => ‘public/read/write/admin’,
Password => ‘write’,
Comments => ‘read/write/admin’,
Employees => ‘read/write/admin’,

Next, I added this statement to Admin/Users/Modify.html to display the
Employees field.

<%$UserObj->Employees%>

and at the bottom:

$Employees=> undef
</%ARGS>


But I got the following error on that page:

Mason error

component stack: /Admin/Users/Modify.html [standard]
/autohandler [standard]

code
stack: /usr/local/rt/WebRT/data/obj/STANDARD/Admin/Users/Modify.html:332
/usr/local/rt/WebRT/data/obj/STANDARD/autohandler:69

misc info: error while executing /Admin/Users/Modify.html [standard]:


As a side note, I was able to replace the “Employees” with a previously
created, but unused value. For instance - I replaced it with Creator
(which was a valid field, but isn’t usually displayed at all on
Modify.html) and it worked fine.

By the way, here’s autohandler:69

68 else {
69 $m->call_next;
70 }


I would appreciate any help on this issue. It has me greatly befuddled.

Thanks.
Sean Byron


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm


<>< Proverbs 3:5 “Trust in the Lord with all your heart and lean not on
your own understanding;”


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm


<>< Proverbs 3:5 “Trust in the Lord with all your heart and lean not on
your own understanding;”

<>< Proverbs 3:5 “Trust in the Lord with all your heart and lean not on
your own understanding;”

Can anyone offer some help as to how this is done?

Date: Fri, 10 Jan 2003 10:07:23 -0800

I found that in my function Order I can call $self->__Value(dbfield) and
get almost any data. I can show the name email creator user id etc but it
returns null for my Order field. If i login in to the database i can see
that the field is not null what else do I need to change?

Previous changes.
John

At 08:56 AM 1/10/2003, you wrote:

I too have been working at getting this exact thing to work as well. I
managed to do all the stuff same as Sean and am stuck with a similar
problem. I cannot seem to figure out how to access the column that is in
the database. I added a function to User.pm that was called Order (thats
the name of my field that I wish to add) and have it return a default
value, that fixes the error from mason that I got, however I cant seem
to get the data into or out of the db.

Any help is welcomed.
John

At 04:12 PM 10/2/2002, you wrote:

Hiya,

I’ve run into a problem I can’t seem to resolve. I would appreciate any
help anyone can offer. I’m running RT 2.0.13.

I’m looking to add an additional field to the Users table to keep track of
the names of the employees that are using that username. It might sound
obscure, but it’s pretty important to the scheme I’m working with.


So, I added a row for it in the database like this:

mysql> alter table Users add Employees blob;
mysql> insert into Users (Employees) VALUES(NULL);


Next, I opened up User.pm and added a corresponding entry for “Employees”:
vi /usr/local/rt/lib/RT/User.pm

my %Cols = (
# {{{ Core RT info
Name => ‘public/read/write/admin’,
Password => ‘write’,
Comments => ‘read/write/admin’,
Employees => ‘read/write/admin’,

Next, I added this statement to Admin/Users/Modify.html to display the
Employees field.

<%$UserObj->Employees%>

and at the bottom:

$Employees=> undef
</%ARGS>


But I got the following error on that page:

Mason error

component stack: /Admin/Users/Modify.html [standard]
/autohandler [standard]

code
stack: /usr/local/rt/WebRT/data/obj/STANDARD/Admin/Users/Modify.html:332
/usr/local/rt/WebRT/data/obj/STANDARD/autohandler:69

misc info: error while executing /Admin/Users/Modify.html [standard]:


As a side note, I was able to replace the “Employees” with a previously
created, but unused value. For instance - I replaced it with Creator
(which was a valid field, but isn’t usually displayed at all on
Modify.html) and it worked fine.

By the way, here’s autohandler:69

68 else {
69 $m->call_next;
70 }


I would appreciate any help on this issue. It has me greatly befuddled.

Thanks.
Sean Byron


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm


<>< Proverbs 3:5 “Trust in the Lord with all your heart and lean not on
your own understanding;”


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm


<>< Proverbs 3:5 “Trust in the Lord with all your heart and lean not on
your own understanding;”


<>< Proverbs 3:5 “Trust in the Lord with all your heart and lean not on
your own understanding;”


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm

<>< Proverbs 3:5 “Trust in the Lord with all your heart and lean not on
your own understanding;”

Turns out that after I restarted the rt system the call to
$self->_Value(dbfield) worked.
John

At 03:53 PM 1/13/2003, you wrote:

Can anyone offer some help as to how this is done?

Date: Fri, 10 Jan 2003 10:07:23 -0800

I found that in my function Order I can call $self->__Value(dbfield) and
get almost any data. I can show the name email creator user id etc but
it returns null for my Order field. If i login in to the database i can
see that the field is not null what else do I need to change?

Previous changes.
John

At 08:56 AM 1/10/2003, you wrote:

I too have been working at getting this exact thing to work as well. I
managed to do all the stuff same as Sean and am stuck with a similar
problem. I cannot seem to figure out how to access the column that is
in the database. I added a function to User.pm that was called Order
(thats the name of my field that I wish to add) and have it return a
default value, that fixes the error from mason that I got, however I
cant seem to get the data into or out of the db.

Any help is welcomed.
John

At 04:12 PM 10/2/2002, you wrote:

Hiya,

I’ve run into a problem I can’t seem to resolve. I would appreciate any
help anyone can offer. I’m running RT 2.0.13.

I’m looking to add an additional field to the Users table to keep
track of
the names of the employees that are using that username. It might sound
obscure, but it’s pretty important to the scheme I’m working with.


So, I added a row for it in the database like this:

mysql> alter table Users add Employees blob;
mysql> insert into Users (Employees) VALUES(NULL);


Next, I opened up User.pm and added a corresponding entry for
“Employees”:
vi /usr/local/rt/lib/RT/User.pm

my %Cols = (
# {{{ Core RT info
Name => ‘public/read/write/admin’,
Password => ‘write’,
Comments => ‘read/write/admin’,
Employees => ‘read/write/admin’,

Next, I added this statement to Admin/Users/Modify.html to display the
Employees field.

<%$UserObj->Employees%>

and at the bottom:

$Employees=> undef
</%ARGS>


But I got the following error on that page:

Mason error

component stack: /Admin/Users/Modify.html [standard]
/autohandler [standard]

code
stack:
/usr/local/rt/WebRT/data/obj/STANDARD/Admin/Users/Modify.html:332
/usr/local/rt/WebRT/data/obj/STANDARD/autohandler:69

misc info: error while executing /Admin/Users/Modify.html [standard]:


As a side note, I was able to replace the “Employees” with a previously
created, but unused value. For instance - I replaced it with Creator
(which was a valid field, but isn’t usually displayed at all on
Modify.html) and it worked fine.

By the way, here’s autohandler:69

68 else {
69 $m->call_next;
70 }


I would appreciate any help on this issue. It has me greatly befuddled.

Thanks.
Sean Byron


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm


<>< Proverbs 3:5 “Trust in the Lord with all your heart and lean not
on your own understanding;”


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm


<>< Proverbs 3:5 “Trust in the Lord with all your heart and lean not on
your own understanding;”


<>< Proverbs 3:5 “Trust in the Lord with all your heart and lean not on
your own understanding;”


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm


<>< Proverbs 3:5 “Trust in the Lord with all your heart and lean not on
your own understanding;”


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm


<>< Proverbs 3:5 “Trust in the Lord with all your heart and lean not on
your own understanding;”

<>< Proverbs 3:5 “Trust in the Lord with all your heart and lean not on
your own understanding;”