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

Customise the Open tickets view?

I know I need to modify some core files, but I want to add the department to the open tickets view, replacing the priority column.

I'm running osTicket (V1.8.0-rc1)

I have over 1500 tickets so I'd like to not completely destroy everything by guessing.

Thanks for any help.

Comments

  • I've made an edit to add Dept.  I did not remove any column.  My edits are in 1.8.1.2.  Please verify your code before simply copy/paste.  I took clues from other posts, sorry I do not remember who to give some credit to.
    Additions are in yellow, file is "tickets.inc.php".

    PART 1:
    Around line 356:
                if($showassigned ) {
                    //Closed by
                    if(!strcasecmp($status,'closed')) { ?>
                        <th width="150">
                            <a <?php echo $staff_sort; ?> href="tickets.php?sort=staff&order=<?php echo $negorder; ?><?php echo $qstr; ?>"
                                title="Sort By Closing Staff Name <?php echo $negorder; ?>">Closed By</a></th>
                    <?php
                    } else { //assigned to ?>
                        <th width="120"> <?php // 20140422: was 150 shortened to 120. ?>
                            <a <?php echo $assignee_sort; ?> href="tickets.php?sort=assignee&order=<?php echo $negorder; ?><?php echo $qstr; ?>"
                                title="Sort By Assignee <?php echo $negorder;?>">Assigned To</a></th>
                                
                        <?php // ---20140422: Add dept to open ticket list: ?>
                         <th width="100">
                        <a <?php echo $dept_sort; ?> href="tickets.php?sort=dept&order=<?php echo $negorder;?><?php echo $qstr; ?>"
                            title="Sort By Department <?php echo $negorder; ?>">Department</a></th>
                        <?php // <<<---END 20140422. ?>
                            
                    <?php
                    }


  • PART 2:

    Around Line 450:
                    } else { ?>
                    <td class="nohover" align="center" style="background-color:<?php echo $row['priority_color']; ?>;">
                        <?php echo $row['priority_desc']; ?></td>
                    <?php
                    }
                    ?>
                    <td nowrap>&nbsp;<?php echo $lc; ?></td>
                                    
                    <?php // ---20140422: Add dept row to open ticket list: ?>
                    <?php
                    if($showassigned && strcasecmp($status,'closed')) { ?>
                        <td><?php echo $row['dept_name'];?></td>
                    <?php
                    }
                    ?>
                    <?php // <<<---END 20140422. ?>
                    
                    
                </tr>

  • Hello edge

    I
    made for your instruction but not exactly happened, can provide your tickets.inc.php file to compare.
    Thanks.
    See my result below


    image
    dep.png
    573 x 160 - 6K
  • Hi thanks for your help but I did customize the view and also added some other columns I needed.I then and went and modified a lot of other views like the new ticket view etc...

    Thanks!
  • thank you very much!
Sign In or Register to comment.