[rt-users] Additional field in User details

John Gedeon jgedeon at qualcomm.com
Fri Jan 10 13:07:23 EST 2003


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.
>>>
>>><TEXTAREA name="Employees" COLS=80 ROWS=5
>>>WRAP=VIRTUAL><%$UserObj->Employees%></TEXTAREA>
>>>
>>>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 at 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 at 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;"




More information about the rt-users mailing list