Roughly Line #189 @ ticket.php (osticket/upload/scp/)
Look for "$redirect = 'tickets.php';"
I modify osticket so may not be exactly.
Simplest way to stay on the ticket if still open (the functionality i use) otherwise if its closed goto the open tickets page, comment out the redirect.
//$redirect = 'tickets.php';