I attached an updated file.  It looks like when you copied it over the special characters changed to html (the & changed to & and some other similar things) and it put a break in some weird spots (splitting the name of $sql to $sq).  Anyways, I changed the 3 functions.  Let me know if you have any other questions/comments!

Thank you. But now it says Parse error: syntax error, unexpected '&' on line 55. Apparently Wordpad isn't the best option for coding... I'm such a newb...

Hey tuomasjar, looking at the code, that was my fault.  When I copied the code over, it changed all of my special characters.  I changed the link 2 posts above to the correct copy of the class.ticket.php.  Feel free to save it again and it should be good.I personally use textpad when programming.

Well the next problem is when I create a ticket it says Fatal error: Call to undefined function setTicketStatus() on line 2231. There was an extra > on that line which I removed. On the closed tickets list (I haven't got any tickets on open tickets list, which is the reason I tried to create one) on the status column it says ;'>What's up with these spammers here?

actually found the error myself. But it won't populate the ticket status drop-down list from the database and it says ;'> on every ticket list.

Fixed the tickets.inc.php and fixed out the ;'> (My copying had been messed up, so again there is a line break before and after - )Still not populating the list.

Found the error in the class.ticket.php, which was wrong list_id. My list_id is 1 and it wasn't talked about in the database/prep section. Now only the ticket view is not working. It has the column, but nothing in it. As in the picture. Is the problem in tickets.inc.php?

ticket status.jpg

Hey Tuomasjar,I am updating the instructions to include the list id.  As for the column, I would guess that would be where the problem is.  It looks like you have the <td> in the ticket view, but I would make sure you are pulling the database information (make sure the stat stuff is in the $qselect):    .',MAX(IF(field.name = \'stat\', itm.value, NULL)) as `stat_name`'    .',MAX(IF(field.name = \'stat\', itm.extra, NULL)) as `stat_color`'I'm sorry the instructions were not complete, but thank you so much for helping finding the issues in them.

Tuomasjar,

Find the following section of code:$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 '.TICKET_ATTACHMENT_TABLE.' attach ON (ticket.ticket_id=attach.ticket_id) '

.' LEFT JOIN '.TICKET_THREAD_TABLE.' thread ON ( ticket.ticket_id=thread.ticket_id) '

.' 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) ';Add the following code in the middle of it:

.' LEFT JOIN ost_list_items itm ON itm.id=ans.value_id'

That should take care of it.

when i try to add this button here To add the form here, insert the following code: <div class="clear" style="padding-bottom;"></div> <div> <h2>Update Ticket Status</h2> <form method="POST" action="tickets.php?id=<?php echo $ticket->getId(); ?>" name="update"> <?php csrf_token(); ?> <input type="hidden" name="a" value="process"> <input type="hidden" name="do" value="set_simple_status"> <select name="updatestatus" width="150" style="width: 150px" required> <?php  $ticket->getTicketStatuses(); ?> </select>&nbsp;&nbsp; <input type="submit" value="Update Status" class="button"> </form> </div> The button is there and the drop down meny is there. but when i push update it cant save. it says i neet to perform an action. and if i do add more things to do... it says exaktly the same... every thing elese work great. for now i just removed the button its no problem becous we can go into edit and make the change there. but we whant to save one step. 

Hey ismannen,It sounds like an issue with scp->tickets.php. In this file, you need to add the status update case. Find:case 'process':  switch(strtolower($_POST)):Under this switch, add the following case statement:  case 'set_simple_status':    if(!$thisstaff->canManageTickets()){      $errors='Perm. Denied. You are not allowed change the status.';    }    if(!$errors){      $newStatus = $_POST;      $ticket->setTicketStatus($newStatus, 0);      $comment = 'Ticket status changed to ' . $ticket->getStatusName($newStatus) . ' by user: ' . $thisstaff->getName();      $ticket->logNote('Ticket status changed', $comment, 'SYSTEM', false);    }  break;

I am working on updating the instructions to include these instructions.Andy

tanx. i gonna check this later today.

Now it won't show any tickets for any staff user. Edit:Now I got 25 e-mails about db-error: Not unique table/alias: 'itm'.Well I have added that line you suggested to two different qfrom-places. Is one of them too much?

You only need the qfrom and qselect statements once.  Adding them again will give you those errors.

Well removed the line from statement, but the problem persists. On the ticket lists it won't show new statuses.

@[deleted] awesome, good hear.@[deleted] would you have any time that I could take a look at it with you?  I think it would be easier than going by this one post at a time.  

@[deleted] Which timezone you live in? Unfortunately this week will be full of things to do, so I can't do much about this. I live in Finland so UTC+2

Hey tuomasjar, I am at UTC-6, the weekend would work fine for me, I am usually up late if that works for you, otherwise I can get up early.  What time works for you?