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

Assign Ticket not limited to my department

Is it possible to limit the assignment of a ticket just to a person within my department?
Also when there is a department transfer, it doesn't sever the ticket assignment. Is it possible to drop ticket assignment when the department is transferred? 

It looks like these two functions (department transfer and assign ticket) have been designed to be independent of one another.

Kind Regards

Nick

Comments

  • You can limit the ticket assignment here:

    Admin Panel > Agents > Departments > "Name of the department" > Ticket Assignment (Restrict ticket assignment to department members)
  • Thanks Chefkeks,
    Can't believe I missed that.

    Regards

    Nick
  • Is it possible to un assign ticket upon department transfer? 
  • Unfortunately Ticket un-assignment can only be done by the department manager currently and there is no automated un-assignment when tickets are move to another department.
  • Thanks for looking Chefkeks,

    I took a quick glance at the code, and it looks like the code which updates the ticket is following: 
    (file :scp/tickets.php) 
                   //If no errors - them attempt the transfer.
                    if(!$errors && $ticket->transfer($_POST['deptId'], $_POST['transfer_comments'])) {
                        $msg = sprintf(__('Ticket transferred successfully to %s'),$ticket->getDeptName());
                        //Check to make sure the staff still has access to the ticket
                        if(!$ticket->checkStaffAccess($thisstaff))
                            $ticket=null;

                    }

    I can easily unassign the ticket by adding  $ticket->unassign();

    so the code becomes, 
                    //If no errors - them attempt the transfer.
                    if(!$errors && $ticket->transfer($_POST['deptId'], $_POST['transfer_comments'])) {
                        $msg = sprintf(__('Ticket transferred successfully to %s'),$ticket->getDeptName());
                        //Check to make sure the staff still has access to the ticket
                        $ticket->unassign();
                        if(!$ticket->checkStaffAccess($thisstaff))
                            $ticket=null;

                    }

    This will do exactly what I want (I think) however, I don't know if this is good practise. Is there more of a plugin way to do this?

    I see that osTicket is Git controlled 


    Regards

    Nick.

     
  • Plugin system is still in development and so modifying the code for such little tweaks is still the best way to do and you found exactly the right function therefore I think ;)

    Yes osTicket is git controlled, so when you like to do a pull request, feel free to do so. When the developers agree with your code they may merge it and everyone can benefit - but no guarantee that they will like it / merge it - but suggesting is better as hiding such nice little enhancements in my opinion.

    Cheers,
    Michael
  • Hi Michel,
    I have written a git commit which
    1) Adds checkbox under Tick Assignment on Agents->Departments page which adds option to unassign ticket assignment on department transfer.
    2) Made couple of changes to a couple of classes to make this feature work.

    This seems to work ok, and it is a useful feature at least to me.....

    Do you know how I can push this up, to an area they can check it out and decide if they like it or not?

    Regards

    Nick

  • Writing from the phone (currently on the move/bus) so I keep it short this time... Just create a pull request over at the official github repo in the develop branch: https://github.com/osTicket/osTicket-1.8
  • Thanks Richard,
    I have now made a pull request.

    Regards

    Nick
Sign In or Register to comment.