If a user as access to more than one client, he may want to see all the tickets and not tickets for a specific client. What I propose is an URL like /support/all instead of /support/client_name to accesss all the clients. I will post a patch before the end of the week if someone think it's a good idea

Comments

court-jus’s picture

StatusFileSize
new3.87 KB

Here is the patch, it adds support/all and support/all/{state_name} (for exampel support/all/pending)

court-jus’s picture

Status: Active » Needs review
jeremy’s picture

Status: Needs review » Needs work

A few thoughts:

1) There's no point in declaring the $states array multiple times. Just move it above the first while loop that uses it, and re-use it in your code.

2) In the 'all clients' view, there's no way to know which ticket is assigned to which client. This is confusing to me -- doubly so if we default to this view. I think the client needs to be listed in one of the columns when in this view.

3) Does your patch respect permissions? It's important that a user is not able to view tickets for any clients that they do not have "view CLIENT tickets" permissions for. It looks to me like anyone viewing tickets for all clients would indeed see tickets for all clients, not just those they have permissions to view.

court-jus’s picture

1) right
2) right
3) right

well i agree on the 3 points, that's making me a really bad "patcher" :-)

myke’s picture

I agree that this feature is needed. We need a permission View All Clients.

With the current system, creating a group for each client, things could get complicated very quickly.

-Myke

Rafael Cansinos’s picture

I agree with you, completely,

RikiB’s picture

Same here.

justadropofwater’s picture

subscribing

jeremy’s picture

Status: Needs work » Postponed (maintainer needs more info)

You can already view a list of all tickets assigned to you (if you enable "Display support ticket links in profile" on the Support ticketing system admin page). Simply view your user profile, and then click the "View recent tickets" link. Is that what you're looking for?

prasannah.ganeshan’s picture

This is exactly what I need. But currently it's not showing the assigned Ticket for a user, instead it's showing all the tickets created by that user.

It would be a create help if someone can tell me how this can be achieved

NToronto’s picture

I created a number of new primary menu items for each team member as follows:

"Joe's Tickets" - http://www.domain.com/support/6/assigned
"Jim's Tickets" - http://www.domain.com/support/7/assigned
"Dave's Tickets" - http://www.domain.com/support/8/assigned

This show a list of all tickets currently assigned to that user.

Is that what you are looking to accomplish?

prasannah.ganeshan’s picture

This sounds good. But how can we do this with out having to use it with menu items. i.e When Jeo logs in I direct him to his assigned issues and he wont be able to other tickets.

twooten’s picture

@prasannah.ganeshan,

I've successfully used the rules module to redirect users. I used 'support/[account:uid]/assigned' as the redirect URL.

Tim

rsevero’s picture

Category: feature » support
Status: Postponed (maintainer needs more info) » Fixed

Marking it as fixed as the 'support/[account:uid]/assigned' URL seems to present the requested list.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

olak’s picture

Version: 6.x-1.0 » 6.x-1.6-rc1
Status: Closed (fixed) » Needs work

hi!

the patch for "show.all tickets" doesnt apply anymore due to changes to the code of the support.module

Zsuffa Dávid’s picture

Version: 6.x-1.6-rc1 » 7.x-1.x-dev
Assigned: court-jus » Unassigned
Category: support » feature
StatusFileSize
new2.69 KB

Hi all,

Here is the drupal 7 version of 'show all clients tickets' patch based on the d6 version of court-jus.

david

thomas1977’s picture

Wondering if this patch (or similar functionality) will be included in a future update to the module? To be able to get a full overview of all support tickets regardless of specifically selected clients seems like a very obvious feature. Going to try out the patch as soon as possible.

thomas1977’s picture

When trying to apply the patch using Terminal in OSX, I get:

patching file support.module
Hunk #1 FAILED at 329.
Hunk #2 FAILED at 3225.
Hunk #3 FAILED at 3245.
Hunk #4 FAILED at 3314.

Any ideas?

dqd’s picture

thomas1977: Jeremy did a commit before you post here.

Maybe the patch doesn't match no more.

spgd01’s picture

I need this. this is an old patch. Will it work on recent 7.x-1-x.dev?

bransom’s picture

I find the patch is successful on hunks 1,3,4 against 7.x-1.0-rc1. Part of what's bugging me is that I thought sure I saw multiple clients showing at one stage of setting up the module.

------------------------------
Hunk #1 succeeded at 328 (offset -1 lines).
Hunk #2 FAILED at 3224.
Hunk #3 succeeded at 3171 (offset -72 lines).
Hunk #4 succeeded at 3240 with fuzz 2 (offset -72 lines).
1 out of 4 hunks FAILED -- saving rejects to file support.module.rej

jeremy’s picture

Status: Needs work » Postponed

FWIW: a proper solution for this is part of the upcoming 7.x-2.x branch. I don't intend to address this in the 7.x-1.x branch. (A well-written and community tested patch would still be accepted, however)

Anonymous’s picture

Status: Postponed » Needs review
StatusFileSize
new8.46 KB

I've implemented this on on 7.x-1.x branch. Hope somebody can review, test it, so Jeremy could also review and apply?

Cheers!

jeremy’s picture

Status: Needs review » Needs work

How do you address per-client permissions? At a quick review, it looks like the feedback in #3 is still applicable...?

Anonymous’s picture

Yes, it is. So here is a patch to get permissions working when listing all clients.

Cheers!

Anonymous’s picture

Status: Needs work » Needs review
sinasalek’s picture

StatusFileSize
new8.82 KB

#24 and #26 patches applied cleanly, however there was no need for #26 since support/all was only accessible for support administrator.
I merged the two patches and replaced that permission so non admins can also access all tickets
I added a access callback , if user have access to to any client he can also access all clients page
I could make it accessible if user had access to more than one client but since i think it's going to be a very popular page :) and much users are going to use it by default there was no need to

I also completely removed #26 patch and converted it to a query condition due to performance considerations. Now the query result only contains the tickets from the clients that the user have access to, no longer need to check each ticket separately using PHP

Note that patch is against the latest DEV

Check it out

Anonymous’s picture

StatusFileSize
new20.26 KB

@sinasalek: May be u can help me. I applied your patch from #28. I cant detect why i get 2 "All clients" menu links on the "Support ticket" menu. I attach a screenshot.

Cheers!

sinasalek’s picture

That's strange! , only on All clients menu item is defined!
Did you clear your Drupal's cache?
Also you must apply the patch against latest dev, since you wrote the original patch , mine might conflict with your own modification

Anonymous’s picture

Yes, many times :) I've applied it without my modifications (latest upstream dev + your patch)

sinasalek’s picture

If it's working properly for you then please mark it as RTBC :)

Anonymous’s picture

Status: Needs review » Reviewed & tested by the community

It works, just has that little duplicate menu item :)

sinasalek’s picture

Status: Reviewed & tested by the community » Needs review

Though it's fixed for you. Out of ideas right now i'll see if i can find a fix for that

Anonymous’s picture

May be it is related with the previos menu item defined lilke:

  $items['support/all/unsubscribe/%user/%'] = array(
    'page callback' => 'support_unsubscribe_user',
    'page arguments' => array('all', 3, 4),
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );

Maybe that 'support/all/unsubscribe/' is duplicating alongside the new 'support/all' ?

Anonymous’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new8.82 KB

Unrelated at all with #35! The only bug causing the duplicate was using t() on the 'All clients' title.

The patch from #28 with that fix. Cheers!

sinasalek’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new10.22 KB

No quite there yet :)
That patch cause trouble in project sub module since it relies on 'support_client' metatag.
Here is another patch including the change from #36 to address this issue
Note that project module has another bug but since it's not related to this patch i'll create another issue for that

ellen.davis’s picture

Test patch from#37. Works great. Now I get a listing of all the support items at support/all.

sinasalek’s picture

Status: Needs review » Reviewed & tested by the community
xaa’s picture

Test patch from#37.
Seems working fine. thanks.

It will be great if you can also include the tabs menu (open, pending, close).
At the end, a dropdown with projects list to filter the tickets will be very nice.

michaelfavia’s picture

StatusFileSize
new11.58 KB

Rerolled #37.

tinker’s picture

Status: Reviewed & tested by the community » Needs work

There is already a function _support_available_clients() which checks which clients a user has access and keeps a static array to stop repeat queries to the database. It returns an array keyed by client id.

In support menu you can use $clients_allowed = _support_available_clients(). For all client access count( $clients_allowed) would give access rights. For the queries on the support page you can implode(',' (array_keys( $clients_allowed))) and have you list of IN clients to filter on.

By using this function it will save at least 7 queries if only one client exists. If you have the more clients then it saves many queries.

wqmeng’s picture

Issue summary: View changes

#41 works very well.

I also add a URL alias to redirect the url from /support to /support/all so that no confusion to a user that who access the tickets list from client A then to client B when he submit a ticket to client B.

Thank you, hope this module will active again.

purencool’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev
Status: Needs work » Active

This will be implemented using views