Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

A better ticket list!

1234568»

Comments

  • Hi, can someone attach modified version tickets.inc.php  with status and dept. for v1.10-rc.3?
    thank you.
  • Hi @IgorLinde, you can check the post of @Kushelbek in the page 7. It is very complete and clear how to do it and works for v1.10-rc.3 too.

  • I combined the department column and the status column mod into one
    file. I give you guys credit for figuring it out. I have attached
    tickets.inc.php with both mods done already on 1.9.14.


    I
    really want to also add a column for date created, since the current
    date column is based on the last response of the ticket. I'm just not
    sure how to query the created column in the ticket_thread table
    tickets.inc.php.txt
    33K
  • After this changes, Department showing two times.
  • Okay, I know I am doing something stupid here but my brain is toast and I have had enough.

    I am trying to add a custom list field to my ticket view. I have al ist of all of our locations and I want that to display in the agent view. I added the columns and everything is great except the view shows the index value instead of the friendly name from the list. In OST 1.9.4 it worked fine but in 1.9.14 it shows the ID not the value from the list.

    I tried adding a JPOIN statement to fix this but I know I am doing something wrong here. Any help please?

    The list id comes back but I want the value or even the extra field value will do here.

    Here are my edits from tickets.inc.php (in bold)


    $qselect.=' ,IF(ticket.duedate IS NULL,IF(sla.id IS NULL, NULL, DATE_ADD(ticket.created, INTERVAL sla.grace_period HOUR)), ticket.duedate) as duedate '
             .' ,CAST(GREATEST(IFNULL(ticket.lastmessage, 0), IFNULL(ticket.closed, 0), IFNULL(ticket.reopened, 0), ticket.created) as datetime) as effective_date '
             .' ,ticket.created as ticket_created, CONCAT_WS(" ", staff.firstname, staff.lastname) as staff, team.name as team '
             .' ,IF(staff.staff_id IS NULL,team.name,CONCAT_WS(" ", staff.lastname, staff.firstname)) as assigned '
             .' ,IF(ptopic.topic_pid IS NULL, topic.topic, CONCAT_WS(" / ", ptopic.topic, topic.topic)) as helptopic '
             .' ,cdata.priority as priority_id, cdata.location, cdata.roomnumber, cdata.subject, pri.priority_desc, pri.priority_color';

    $qfrom.=' LEFT JOIN '.TICKET_LOCK_TABLE.' tlock ON (ticket.ticket_id=tlock.ticket_id AND tlock.expire>NOW()
                   AND tlock.staff_id!='.db_input($thisstaff->getId()).') '
           .' LEFT JOIN '.STAFF_TABLE.' staff ON (ticket.staff_id=staff.staff_id) '
           .' LEFT JOIN '.TEAM_TABLE.' team ON (ticket.team_id=team.team_id) '
           .' LEFT JOIN '.SLA_TABLE.' sla ON (ticket.sla_id=sla.id AND sla.isactive=1) '
           .' LEFT JOIN '.TOPIC_TABLE.' topic ON (ticket.topic_id=topic.topic_id) '
           .' LEFT JOIN '.TOPIC_TABLE.' ptopic ON (ptopic.topic_id=topic.topic_pid) '
          .' LEFT JOIN '.CDATA_TABLE.' location ON (ticket.location=cdata.id) '

           .' LEFT JOIN '.TABLE_PREFIX.'ticket__cdata cdata ON (cdata.ticket_id = ticket.ticket_id) '

           .' LEFT JOIN '.PRIORITY_TABLE.' pri ON (pri.priority_id = cdata.priority)';




  • Wonder if someone could help, using v1.10 and trying to incorporate two fields.  First is a custom field which is populated when the contact has been created.  The other field is I want to display the Help Topic associated with the ticket. I am not a programmer in anyway, but will to give it a try if someone can point me in the right direction with examples.
  • edited November 2016
    I have one part working and that is using

    <td>  <?php echo $T['user__cdata__customlist']; ?>     </td>

    But the list is just showing me numbers which I know refer to another table, but how do I get the actual text of this field.

    Might be easier to work off the Help Topic ID and then I can infer that with my custom list. 

    Under // Select pertinent columns, I have added

    'topic_id'

    At the end of the table I have added

    <td>  <?php echo $T['topic_id']; ?>     </td>

    image

    Now it's displaying the internal ID, how do I go about referencing this internal ID to the table which contains the Topic names which is located in ost_list_items

  • Has anyone successfully added a column in 1.10 yet? The code was changed so much with the addition of the custom sort options that my old mod does not work.

    I did basically the same thing as @chiefer above but used 'topic' instead of 'topic_id' and have the same results. My help topic column is showing the topic id number rather than the name (with the exception that its blank rather than displaying 0 for tickets with no assigned help topic). I tried the suggestion from @Kushelbek on page 7 but got a blank column. 

    image
    Column.jpg
    640 x 205 - 47K
  • edited November 2016
    OK, This is what we did to get the Topic column to display the actual name:

    In the include\staff\tickets.inc.php file


    Add Line 33: 'topic' => __('Help Topic')

    Add Line 77: 'topic' => array(
    Add Line 78: 'width' => '16%',
    Add Line 79: 'heading' => __('Help Topic'),
    Add Line 80: 'sort_col' => 'topic',
    Add Line 90: ),

    Add  'topic',  to $queue_sort_options = array  at lines 89, 96, 107, 116, 196
    Add 'topic',  to  $tickets->values( at line 375

    Add Line 602 <td class="nohover" align="left">
    Add Line 603 <?php echo Topic::getLocalNameById($T['topic']); ?></td>

    Change Line 613 <td colspan="8">

    Hope this helps someone.

  • Blueyeguy,

    Yes, thanks!
  • Has anyone got this to work on v1.10 stable? I am looking to add just the department tab to the ticket view.
  • I want to do exactly what @rowlandan25  did but with version 1.10. I'm the attached guide he posted clear back when, but the code has changed so much I don't even know where to begin. Following the steps in page 7 of this thread just confuse me more. REally looking for some help.
    87513eb63dfc028ae8dbae48d89a4a.pdf
    600K
  • Hi,

    i follwed @blueyeguy steps and successfully added a 'Status' column in 1.10
    I would like to show in another column the telephone number, but I don't know how to get the 'phone' parameter ...
    Can anyone give me a direction....
    I'm pulling 'phone', 'mobile', etc.. information from AD on a nightly basis, by using @Chefkeks script (https://github.com/Chefkeks/osTicket-Addons)

    I would be happy for some advice

    Running on: osTicket v1.10
    Web Server Apache/2.4.7 (Unix)
    MySQL 5.0.11
    PHP 5.5.12 
  • HI,

    I would like to add a student ID number to the view. This student ID number is a required custom field in the users contact information. I know how to modify the code to add this as into the table how I don't know how to get this information from the database?

    In addition I would also like to modify the search field to that I can also search for this custom student ID number?

    I would be very happy if you could help me with the sql query and where to edit it.

    osTicket Version: v1.10 (901e5ea)
    Apache: Apache/2.4.10 (Debian)
    mySQL:5.7.15
    PHP: 5.6.25
  • Thanks @blueyeguy - I eventually managed to get it working with your advice.
  • edited January 28
    Hi Guys,

    Can you please help me to show the data on these two columns?

    image


    osTicket Version: v1.10 (901e5ea) 

    Thank you,
    Alfie
    q11.png
    1071 x 397 - 55K
  • apanelo013 if you manage to get the department field added in with the information, can you let me know how you managed it as this is something I am working to build on also.
  • I can't get this working. Does the editing will only be in tickets.inc.php file only or do I need to edit other php files?

    Please help
  • Unable to sort by department on the "open tickets" queue v1.10

    . I went at the code on my own with very little coding experience, and I got a working and sortable department column on the open queue.

    In /include/staff/tickets.inc.php I modified two sets of code. WARNING this worked great for me so far, but I'm not sure of any future erorrs or implications it might cause down the road. Backup up your db and your tickets.inc.php file. The column is still titled "assigned to" but shows the departments and I'm ok with that and not going to attempt to make it perfect.

    Line 327>332 These are responsible for making the column sortable when you click it.

    case 'assignee':
    $tickets->order_by('dept__name', $orm_dir);
    $tickets->order_by('dept_id', $orm_dir);
    $tickets->order_by('dept__name', $orm_dir);
    $queue_columns['dept_id']['sort_dir'] = $sort_dir;
    break;

    Line 517>523 This set of lines made the "assigned to" column populate departments instead.

    $lc='';
    if ($showassigned) {
    if ($T['dept_id'])
    $lc = Dept::getLocalById($T['dept_id'], 'name', $T['dept__name']);
    elseif ($T['dept_id'])
    $lc = Dept::getLocalById($T['dept_id'], 'name', $T['dept__name']);
    }
    else {
    $lc = Dept::getLocalById($T['dept_id'], 'name', $T['dept__name']);



    Good luck, and please post improvements.

  • Just FYI, I've been running this modified code live for about a month now and it has worked perfectly. All departments are shown in the "open" tickets queue and it allows me or any agent to sort tickets by department.
  • So is there a guide for v1.10 that is all in one place instead of spread out across 8 pages?
  • Q: So is there a guide for v1.10 that is all in one place instead of spread out across 8 pages?
    A: No there isn't

  • I have attached  the pdf on how we added two columns to our
    OSticket V1.10 and also attached the already modified ticket.inc.php
    file you guy have to remove the .txt at the end.

    We added a status column and a department column
    osTicket add to columns - notes.pdf
    373K
    tickets.inc.php.TXT
    28K
  • Hey everyone. I'm wondering if anyone could help me add Priority Level to the Tasks column. I'd like it to look / work the same way as it does on the Tickets page.

    Thanks!
Sign In or Register to comment.