itflow
itflow copied to clipboard
Ticket System "view" issue/bug
Hello,
When you work on a ticket for a client, it changes the view back to the general management view (i.e. showing tickets/vendors/calendar, etc) rather than the client info. I think the sidebar should show you options for that particular client when viewing the ticket page for easy access to their data: contacts/assets/logins.
This feels like a bit of an annoying one as we only want to change the navbar to reflect a client's options when viewing a ticket (/ticket.php?ticket_id=?). We have tickets covered under both the client (/client.php?client_id=?&tab=tickets) and management (/tickets.php) views done nicely - not sure how to approach this.
agreed ill see if I can tackle this one
I think the best way to tackle this one is to check the referral GET VAR client_id in the uri
if client_id was in the uri then show the client_side_nav otherwise show the main side_nav
I tried to implement this by adding this check to the header which makes the menu show as expected, but the client name, module count & client banner seems to be controlled from client.php. Calling that from the header breaks the page. As no client_id is set in the URL, this also then means the menu links are broken (e.g. /itflow/ticket.php?client_id=&tab=assets)
// Get the client_id from the referrer
parse_str(parse_url($_SERVER['HTTP_REFERER'], PHP_URL_QUERY), $referrer_params);
if(basename(parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH)) == "client.php"){
include("client_side_nav.php");
// If a client ID is in the referrer, show the client view
elseif(basename(parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH)) == "ticket.php" && intval($referrer_params["client_id"])){
include("client_side_nav.php");
}
// Else show side nav
else{
include("side_nav.php");
}
@johnnyq, I've been thinking about this a little more. How would you feel about having just the main ticket page, with a client filter?
@wrongecho I think a client filter is good on the main ticket page but I still want to keep tickets under clients as well.
The goal for client pages is to keep all things related to that client together and that includes tickets.
The biggest problem I see is updating both tickets.php and client_tickets.php and the problem with side nav and client side_nav I know Its currently really confusing. Lets collect out thought on this one im not sure what I want to do just yet with that.
@johnnyq, I understand - it does indeed make the most sense for the client's section to include everything related to a client - including tickets.
I'm just noticing now we have a huge disparity between the functionality of the main tickets.php page and the client ticket view, especially on top of the navbar issues.
Johnny fixed this - Tickets now show the main navbar no matter where they are accessed from.