|
#1
|
|||
|
|||
|
Hey everyone,
So I'm new here. Just stumbled upon osTicket the other day and have an add-on I've done that hopefully some others can put to use. I'm sure it's probably not the best or most efficient way to do it but it gets the job done. So if you'd like to be able to assign a staff user to a ticket from the list of tickets, here's how I did it. First... I added the column header to the table in tickets.inc.php: /include/staff/tickets.inc.php -- around line 412 (my line numbers are probably kinda high) HTML Code:
<th width="180" >Assign...</th> /include/staff/tickets.inc.php -- around line 479 PHP Code:
/include/class.ticket.php -- at the end of the class PHP Code:
Then I added a the javascript used when the new select box is changed. Back to tickets.inc.php!: /include/staff/tickets.inc.php -- very beginning of document, line 1! Code:
<script type="text/javascript">
function changeAssignee(ticketID)
{
var obj = "staff_select"+ticketID;
var sel = document.getElementById(obj);
var assignee = sel.options[sel.selectedIndex].value;
var url = "index.php?update=staff&staffid="+assignee+"&ticket_id="+ticketID;
window.location.href = url;
}
</script>
/include/staff/tickets.inc.php -- right after the first line of PHP code... line 17 for me, line 3 by default. PHP Code:
![]() Oh yea... I also made the content holder in the /scp/ directory larger. I did that by modifying /scp/css/main.css /scp/css/main.css -- about line 62 only thing I've changed are the widths Code:
#container {
width:1000px;
text-align: left;
margin:5px auto 0 auto;
background:url(../images/pagebg.jpg) top left repeat-x #fff;
border:1px solid #ccc;
border-bottom:none;
padding-bottom: 20px;
}
#footer {
width:990px;
_width:860px;
padding:2px 5px 2px 5px;
border:1px solid #ccc;
border-top:1px solid #666;
background:#ececec;
text-align:center;
margin:0 auto 0 auto;
}
Have fun!
|
|
#2
|
|||
|
|||
|
Hey, can we make this so only managers/admins can see this column?
|
|
#3
|
|||
|
|||
|
To make it so that only admins or managers can see the final column I modified the column headers and the column cell itself to be enclosed in a condition.
/include/staff/tickets.inc.php -- my line 412 PHP Code:
PHP Code:
|
|
#4
|
|||
|
|||
|
Great,
does this still send emails to the assignee when it is assigned? |
|
#5
|
|||
|
|||
|
yes it does.
(thanks me) |
|
#6
|
|||
|
|||
|
I'm pretty sure it doesn't. I was going to add that next...
|
|
#7
|
|||
|
|||
|
Updated to send emails when the user is assigned to a ticket --
I had to redo just a small bit of code located at my line 18 in tickets.inc.php /include/staff/tickets.inc.php -- my line 18 (immediately after the first line of original code in the file) PHP Code:
|
|
#8
|
|||
|
|||
|
Quote:
Thanks for your hard work but can you please just post whole tickets.inc.php and class.ticket.php files as the line numbers you've given don't match what so ever? Maybe it's also compatibility issue. Is that working with RC5? Cheers! |
|
#9
|
|||
|
|||
|
interested in this too!!
![]() is it working with RC5? |
|
#10
|
|||
|
|||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|