Make it possible to assign ticket to other user at ticket creation
paddy_mul - April 17, 2009 - 15:01
| Project: | Support Ticketing System |
| Version: | 6.x-1.0-rc1 |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed |
Description
Hey,
I'm having problems assigning tickets. So far I have created 3 clients and 6 users on the system. I can create tickets fine but when I try to assign a ticket to another user I only get the name of the current user in the dropdown list.
In the jobtrack module section of the permissions I have checked off "can assign tickets to other users" for the right users. Even when I log in as the super administrator I can't assign tickets to individual users just to the admin.
Is there something obvious I'm missing?
Thanks

#1
In order to be able to assign a ticket to a user, that user has to be able to access that ticket. Thus, for example if you have a client named "Foo", then you need to assign "access Foo tickets" permissions to all users that we want to be able to assign Foo tickets to. With that done, anyone with "can assign tickets to other users" permissions should be able to assign tickets to other users with "access Foo tickets" permissions.
I recommend you read through INSTALL.txt to get a better understand of how the module is designed to work. See #5 in that file for more details on permissions.
#2
Hey, Thanks for the reply I have the permissions setup as suggested in the install.txt but the problem still exists. I have found a way to assign tickets to users though.
When I sign in as a client and straight away click on "create ticket" I can't assign tickets to any users (only to the logged in client). If however I go to view the job tickets of any client first then I return to "create ticket" I can now assign tickets to any of the users. Is this the normal workflow?
Thanks for your help attached below are two screenshots the first is when the admin tries to create a job ticket immediately and the second is after going view the job tickets of a client first before creating a job ticket.
#3
This is currently the normal/expected workflow. In order to know who can be assigned a ticket, the module needs to know which client the ticket belongs to. It currently does not implement AHAH, so you can not assign the ticket to anyone until it has been saved the first time and a client has been set.
Marking this as a feature request, and updating the title. Patches are welcome to make the module utilize AHAH so that this is possible. Putting it into a postponed state until someone contributes a patch, or provides funding, or I end up with a need myself.
#4
FWIW: This is very related to #377708: Make it possible to subscribe other users at ticket creation..
#5
Moving to support project.
#6
I took a stab at implementing support for this today, but ran out of time. I'm going to go ahead and post what I've got so far in case someone else gets a chance to finish it before I get around to looking at this again. Be sure to flush your caches after applying this patch, necessary for the ahah callback to be added to your menu. (Ultimately I'll automate this in the install file, but not until it fully works).
What works:
1) It works whether Assigned is a select or a autocomplete textfield
2) When a new client is selected, it correctly updates Assigned with the available users (if select -- otherwise it updates the autocomplete path)
What's broken:
1) If you try and submit a ticket after changing the Client and you Assign the ticket to a user that wasn't available in the first client, you get a validation error.
2) If you select a new Client, and the previously Assigned user doesn't have access to the new client, you get an error
3) Permissions have not been implemented
There's no need for you to test this unless you plan to help fix the remaining issues and submit a new patch.
#7
This actually works now, so long as you view the client before you create the ticket. Anyone wanting to cleanup the AHAH in the above patch to improve the functionality is welcome.