hello,is possible add a columns in the user directory  /scp/users.php i want show the content of last note for each user..which file i've to mod?can i remove status column?

MOD:in the user directory table counts only OPEN ticket near to user namean user with 1 ticked closed now is: Name Surname (1)will become Name Surnameline 67 on include/staff/user.inc.php$from .= ' LEFT JOIN '.TICKET_TABLE.' ticket ON (ticket.user_id = user.id and ticket.status!="closed") ';im still working for understand how to add a column

DONE!from line 65 select the last note from st_note (change st_note with your DB suffix example your_note)$select .= ', count(DISTINCT ticket.ticket_id) as tickets ';$select .= ', st_note.body as ultimanota ';$from .= ' LEFT JOIN '.TICKET_TABLE.' ticket ON (ticket.user_id = user.id and ticket.status!="closed") ';$from .= ' LEFT JOIN st_note ON st_note.id =( SELECT b.id FROM st_note AS b WHERE b.ext_id = concat(\'U\',user.id) ORDER by b.id DESC limit 1) ';line 136 (more or less): show the first 30 chars of the last note                   $status = substr($row,0,30)."...";

osticket-example-mod-columns-user.png

now i add there the user custom field too ;) if interested just ask

10 years later

Hello Jotaro, I want to display some extra fields in the user directory as well, I think you found out how to do it but I find your code snippets very difficult to read and understand. Could you publish it in a clearer way? IOW show the pieces of the code where you have added your colums? Grazie! Hans

    Write a Reply...