[rt-users] Re: Additional field in User details

Sean Byron sean at zerolag.com
Tue Oct 8 13:36:51 EDT 2002


I think we're missing the point :)

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.

<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





More information about the rt-users mailing list