Hello,I figured out how to add the header for the help topic and even how to configure the sort feature.  What I am having trouble with is actually getting the data from my database to populate the column I have created.  I've looked at some different forum posts and even tried to supplement their $qselect and $qfrom statements with no luck.Here is my current SELECT statement with no modifications for the help topic:$qselect ='SELECT ticket.ticket_id,tlock.lock_id,ticket.`number`,ticket.dept_id,ticket.staff_id,ticket.team_id '    .' ,user.name'    .' ,email.address as email, dept.dept_name'    .' ,ticket.status,ticket.source,ticket.isoverdue,ticket.isanswered,ticket.created ';Here is my current FROM statement with no modifications for the help topic:$qfrom=' FROM '.TICKET_TABLE.' ticket '.       ' LEFT JOIN '.USER_TABLE.' user ON user.id = ticket.user_id'.       ' LEFT JOIN '.USER_EMAIL_TABLE.' email ON user.id = email.user_id'.       ' LEFT JOIN '.DEPT_TABLE.' dept ON ticket.dept_id=dept.dept_id ';How can I change these to populate my help topic column.  And also is this all that needs to be done to populate it with values?I have also included a screenshot of my ticket overview so you can see what I am trying to do.Any help would be greatly appreciated.  Thank you!

ocTicketHelp.png

I am assuming I have to add a td somewhere in this block of code, after the td for subject, but I am lost as to what I would include in this td: <td align="center" class="nohover">                    <input class="ckb" type="checkbox" name="tids" value="<?php echo $row; ?>" <?php echo $sel?'checked="checked"':''; ?>>                </td>                <?php } ?>                <td align="center" title="<?php echo $row; ?>" nowrap>                  <a class="Icon <?php echo strtolower($row); ?>Ticket ticketPreview" title="Preview Ticket"                    href="tickets.php?id=<?php echo $row; ?>"><?php echo $tid; ?></a></td>                <td align="center" nowrap><?php echo Format:($row); ?></td>                <td><a <?php if ($flag) { ?> class="Icon <?php echo $flag; ?>Ticket" title="<?php echo ucfirst($flag); ?> Ticket" <?php } ?>                    href="tickets.php?id=<?php echo $row; ?>"><?php echo $subject; ?></a>                <td nowrap><?=$row?>&nbsp;</td>                     <?php                        if ($threadcount>1)                            echo "<small>($threadcount)</small>&nbsp;".'<i                                class="icon-fixed-width icon-comments-alt"></i>&nbsp;';                        if ($row)                            echo '<i class="icon-fixed-width icon-group faded"></i>&nbsp;';                        if ($row)                            echo '<i class="icon-fixed-width icon-paperclip"></i>&nbsp;';                    ?>                </td>                <td nowrap>&nbsp;<?php echo Format:($row,22,strpos($row,'@')); ?>&nbsp;</td>                <?php                if($search && !$status){                    $displaystatus=ucfirst($row);                    if(!strcasecmp($row,'open'))                        $displaystatus="<b>$displaystatus</b>";                    echo "<td>$displaystatus</td>";                } else { ?>                <td class="nohover" align="center" style="background-color:<?php echo $row; ?>;">                    <?php echo $row; ?></td>                <?php                }                ?>                <td nowrap>&nbsp;<?php echo $lc; ?></td>            </tr>            <?php

Right now I have the td set up like this but it is just pulling in the ticket number with a link to the ticket attached.  I'm not sure what variables I need to replace to get the help topics inserted:<td align "center" title="<?php echo $row; ?>" nowrap>                  <a class="Icon <?php echo strtolower($row); ?>Ticket ticketPreview" title="Preview Ticket"                  href="tickets.php?id=<?php echo $row; ?>"><?php echo $tid; ?></a></td>

I know that this is the data that gets populated but I need to get a handle to my topic.  I am not sure how or what variable to use or where this variable is specified at or how I can set this variable to the help topic of the ticket.

$variable name for the help topic of the ticket and I would be set lol

So I looked in class.ticket.php and found that the variable is $topic.I tried this and it gives me nothing so I don't know if my qselect or qfrom fields are not right but I guess I will continue to talk to myself and try to figure that out lol

Found this on another discussion, seems to work. Now on to a sortable organization column!<td><?php echo (isset($row)) ? $row : '&nbsp;';?></td>

SOLUTION:Here are the changes you should need to make in order that they appear in the tickets.inc.php file:Add Help Topic to sort array (make sure your sort array matches the following) :Line 151 (estimate): $sortOptions=array('date'=>'effective_date','ID'=>'ticket.`number`',    'pri'=>'pri.priority_urgency','name'=>'user.name','subj'=>'cdata.subject',    'status'=>'ticket.status','assignee'=>'assigned','staff'=>'staff',    'dept'=>'dept.dept_name', 'helptopic'=>'helptopic');Set up your header where you want it in the table:Line 337 (estimate): <th width="120"><a <?php echo $topic_sort; ?>

href="tickets.php?sort=helptopic&order=<?php echo $negorder;

?><?php echo $qstr; ?>"title="Sort By Topic <?php echo $negorder; ?>">Help Topic</a></th>Next is your <td> or table data that will populate the help topic. 

Make sure this is placed in the same position as your header with

regards to the other columns so everything lines up.Line 422(estimate): <td><?php echo (isset($row)) ? $row : '&nbsp;';?></td>I hope this

helps.  I think this is all you should need to add the help topic

column.  Let me know if you run into any problems. 

4 months later

Hellohere i want to support on customized support in "open ticket" , 1, if we want to add the "select departments"2. integrate new field like select "field1 and field2" etc.Let me clear, how to add above mentioned fields.

Write a Reply...