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

Wrong behavior if "Limit ticket access to ONLY assigned tickets" enabled

"Limit ticket access to ONLY assigned tickets" is a great feature. However, if checked, staff cannot see the closed tickets which were assigned to them which seems like a bug . 

How do I fix that so that staff can see all tickets assigned to them and also any past tickets which were assigned & closed by them.




Comments

  • You don't.  Once a ticket is closed, it is no longer assigned to them.
    IF you would like them to have continued to access to a ticket make sure that it is assigned to a department that the staff has access to.
  • I don't agree with that, a staff should be able to see the tickets which were assigned to them and they have closed. If not, that's a wrong behavior. In fact, the reason there are two tabs, for open and closed tickets. Also, the intention is to limit ticket view to only what was assigned, so showing all the department ticket is not a solution.
  • You're more than welcome to agree or disagree as you see fit, however it does not change the way that it is intentional, and how it works.
  • ntozier, Can you elaborate on your workaround please?  I have the same issue.

    We want to limit ticket view to the assigned agent or team.  But we also need them to be able to access closed tickets for reference.  All users are in the same department now and they cannot search or view tickets once they are closed.

  • same issue.
  • Somewhere in the depth of discussion I already suggested this workaround:
    Create an extra, internal department for closed tickets with full access for all users. So basically a "closed" ticket deparment where you move tickets to before closing them. I don't know a better workaround but this is one I can imagine of.

    I'm definitely too active here ... Happend more than once today :D
    • You have posted 2 times within 60 seconds. A spam block is now in effect on your account. You must wait at least 300 seconds before attempting to post again.

  • I agree with jeevhi, it's the wrong behaviour. So I've created a workable solution based on version 1.9.4

    Edit "tickets.inc.php" in the "./include/staff/" folder:
    Around line 74, add the following code:
    if ($thisstaff->showAssignedOnly())
        $qwhere.=' OR ( ticket.staff_id='.db_input($thisstaff->getId())
            .' AND status.state="closed") ';


    Edit "class.ticket.php" in the "./include/" folder:
    Around line 2252, add the following code:
    if ($staff->showAssignedOnly())
                $where[] = '(ticket.staff_id='.db_input($staff->getId()).' AND status.state="closed")';


    Works how it should now.
  • Another section of code needs to be added to the above solution for it to work in version 1.9.4

    Edit "class.ticket.php" in the "/.include/" folder:
    Around line 180, add the following code:
    //Staff has access to the closed ticket
            if ($staff->showAssignedOnly() && ($staff->getId() == $this->getStaffId()) )
                return true;


  • i agree as well, 
    already said on another post, it doesn't make any sense for them not to be able to see closed tickets. 
    not only for reference, there may be a genuine reason for an agent to re-open the ticket, but it's completely impossible with the current design. 
    what's the point of being able to apply 'view only assigned tickets' if we then have to allow them to see an entire departments tickets, just to see something they've previously closed.

    also, i'm not sure chefkeks solution is even possible. in 1.9.4 we can't assign agents to more than one department. i don't know if that was possible in previous versions.
  • thanks fearless
  • @chefkeks, @ntozier

    I opened a new thread in github. I would like to have a possibility to change this behavior.

    Kind regards

    Sweeny
  • edited March 2015
    thanks dude this mod is very helpful indeed.
  • We do have same issue here had i agree that this is a wrong behavior.
    my staff can't go back and check on someone tickets history to see if that person opened a ticket in the past with the same issue or not and this makes our logging system useless.

    I'm using 1.9.5.1 version and I'm wonder if I could go with the mentioned mod or not?
    please help
  • Has anyone gotten the code changes above to function in v1.9.6?

    We have implemented the code changes but certain users are still unable to see closed tickets.

  • Working good with v1.9.7
  • Works on 1.9.9... any chance of getting the closed ticket count to reflect what they have closed?  I'm just showing a "0", even if they click on it and have tickets in there.  I'll keep working on it and post a solution if I find it.
  • Actually this appears to not be working in the latest version - When you do this and click "edit ticket", make an edit and submit, the page goes white.  The changes are made, but it doesn't load the "thread" page again :-/
  • We have the same issue.
  • +1 for this feature, I think for many users this would be extremely useful because closed tickets are sometimes required for reference and the workaround of creating a separate department is not really ideal.
  • The patch proposed by fearless worked fine on 1.9.9 but the closed counter still shows 0. I also confirm the problem when you try to save edits. It gave a server error 500.
  • Same problem in v1.10-rc.2 (231f11e).

    I believe it's natural for Agents to look back for older tickets if needed. We have returning customers. This feature could help many times. 

    Br,
    Dali
  • Are there any paid custom modifications of osticket available? Of course I don’t mind the feature is used publicly after being paid.

    I have a PHP programmer that most likely would fix this, but it that goes overwritten by next update, same problem can happen with every update.

    Thank you very much.

    Br,
    Dali

  • I have not used OSTicket in a while but I tend to agree with some of the comments on here. If a ticket was assigned to someone and closed by that same someone then Access should still be retained. Closed or not.

    @dali unfortunately there is no way in OSTicket for a mod to be implemented without needed to be re-done upon the next release (yet). The Plugin architecture is at least a cleaner way of implementing mods but fundamentally you are still extending or modifying the core code which is there to make it work. The best way I have been told to try and get this added more permanently into the core code is to edit the code, create a git issue and submit a pull req.
  • So, a plugin to view old tickets would be appreciated then? I know my next job!
  • Yes, I would appreciate it greatly!

    Thank you!
  • Alright, I've started, written a patch, and infrastructure to manage versioned patches for Admins. 

    Yeah.. Sounds complicated, basically, you get a few checkboxes of which "MOD"s you want to enable, and it keeps track of it in the background and applies and reverts the patches whenever you enable/disable the MOD. 

    I keep referring to them as MOD, because they do actually Modify core, however they are encapsulated within a Plugin, so should be relatively version safe. :-)

    I'll get it thoroughly tested and play with it some more, but I thought you should know progress is being made.

    Checkout the idea here: https://github.com/clonemeagain/osticket-mod-to-plugin/blob/master/mods/EnableClosedTicketsView.1.9.patch (Used the above code to write a patch, and the surrounding plugin manages the patch). 
Sign In or Register to comment.