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!

Hello. We plan to use Osticket and have a big screen in the support room so everyone can see how the proccess is going.
I have a problem with the standard tiket view (wich we plan to use as the main view). It only shows open tickets but don't show the status. We would like to have a screen like the main articdesk one (attached)
image
Is there a way to do so?
«1345678

Comments

  • edited December 2013
    I am assuming something like how I have modified ours?

    image

    I modified it a little to include the status which can be changed by staff members.  I would be happy to post the changes I made to the ticket and ticket view.
    Ticket Queue.jpg
    1158 x 576 - 194K
  • looks great! How does it filter and order tickets? I assume it doesn't show closed ones
  • Closed tickets are set in a separate queue, which can be accessed by either searching (it will show open tickets on top and closed tickets on bottom) or by clicking on the Closed Tickets sub-menu.  Filtering tickets by default is by ticket date.  I changed mine to sort by building and then by ticket status.
  • Yeah, that's right for us
  • Hello Rowland! Were you able to post the changes?
  • I am in the process of marking were I changed everything.  I will get back to you soon!

    Andy
  • Thank you!

  • Hello,
    here are my simple customizations for a job:


    image
    1AACL.png
    1202 x 923 - 186K
  • Great. Very informative. With  a little CSS it could be more eye catching. And also it could use the "2 hours ago" style instead of date/time. There is a little JS library that does the trick
  • edited December 2013
    Hey vchigne, I attached the changes I made to add a status to the ticket.  Let me know if you find any mistakes in the instructions.
    OSTicket Status.pdf
    600K
  • edited December 2013
    Don't think so, they seem pretty clear. I'll modify my installation tomorrow and let you know.
    Thanks
  • any here that can help me and explain where i can find this number ? 


    Database Setup/Prep 
    Once the status list is set up, we will begin by finding some information in the database that we will 
    need later on. It is important to do this step after setting up the custom list and adding the field to the 
    form so that you can get the values you need. 
     
    The first value we need is your Field ID, which will be used in the set_ticket_status() function, in 
    class.ticket.php. 

  • edited February 2014
    Sure, you need to access the database to find this information.  Once you log into your database, navigate to the table ost_form_field which houses all of the custom fields in OS Ticket.  What ever name you gave the field in the steps above, look for that name.  Here is what you are looking for.  Let me know if that doesn't help you.
  • BTW Rownland, the instructions worked very well! We are changing the Css, let you know when it's done. Thank you very much!
  • Thank you. we figured everything out... 

    with a few spesial ediths we got everything to work.

    Thank you for the help. 
  • Moving this thread to the mods section.
  • Rownland,

    This is a great MOD. I just set it up on v1.8.0.1.

    I have a few questions. I am having trouble updating the status in the ticket screen. When I select the new status and then click on the "Update Status" button, I am receiving a "You must select action to perform" error. I am sure I am missing something, but was wondering if anyone else ran into this problem.

    Also where is the function that you describe in this section of your instructions:

    In the ticket create() function, we need to add a line of code at the end to set the status on the ticket creation. Right above return $ticket;, add the following line:

    //Add status to the ticket $ticket->setTicketStatus(26, 1); 
  • edited January 2014
    Rownland, This is a great MOD. I just set it up on v1.8.0.1. I have a few questions. I am having trouble updating the status in the ticket screen. When I select the new status and then click on the "Update Status" button, I am receiving a "You must select action to perform" error. I am sure I am missing something, but was wondering if anyone else ran into this problem. Also where is the function that you describe in this section of your instructions: In the ticket create() function, we need to add a line of code at the end to set the status on the ticket creation. Right above return $ticket;, add the following line: //Add status to the ticket $ticket->setTicketStatus(26, 1); 
    First off, for the function, you need to split that line in half to look like this:
    //Add status to the ticket 
    $ticket->setTicketStatus(26, 1); 

    As for the Update, 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['do'])):

    Under this switch, add the following case statement:

      case 'set_simple_status':
        if(!$thisstaff->canManageTickets()){
          $errors['err']='Perm. Denied. You are not allowed change the status.';
        }
        if(!$errors){
          $newStatus = $_POST['updatestatus'];
          $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;

    Sorry about that, I was looking through the instructions and this section wasn't in there.  I will add it to the instructions and update those.  Let me know if that fixes it (I got the error when I removed this section).  I will update the PDF with this information.

    Andy
  • I got a Parse error: syntax error, unexpected T_STRING on line 65 in class.ticket.php. I have attached it here. Could someone tell what I did wrong? I tried to go over it, but couldn't find what I pasted wrong.
    class.ticket.txt
    82K
  • edited January 2014
    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!
  • edited January 2014
    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.
  • edited January 2014
    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.
  • edited January 2014
    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
    219 x 129 - 27K
  • edited January 2014
    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.
  • edited January 2014
    Thanks to you helping me to get this working.
    Here's the tickets.inc.php file. I can't find anything wrong on those lines and yet it won't find them.
    tickets.inc.txt
    28K
  • edited January 2014

    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:10px;"></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. 


Sign In or Register to comment.