This project is read-only.

Opening a ticket on behalf of a user

Jun 7, 2010 at 7:15 PM

Hello,

I have a question regarding creating a new ticket in Slick Ticket. Is is possible for me to open a ticket on behalf of another user? Our end users don't always log-in and create the ticket themselves, they just send us an email, so to have the functionality to open a ticket on behalf of another user when entering the data would be very helpful.

Any ideas?

Jun 10, 2010 at 9:21 AM

This is not a default behavior for a few reasons.

The way ST is set up, user accounts are not made until they log into the system.  In the latest code if given the lowest rights, users can submit tickets themselves and have no rights to see/do anything else.  It is recommended that you make a 1-level group for submitting tickets and use this functionality.

If you still want to submit for other users, a couple approaches could be made.  You could manually (or create an automated method) populate the users table then add in a new dropdown/blank to insert it into the ticket.  Or simply add a textfield or something like that.

Basically, this will not be added to the root project, but if you want to add it for your own use, it would be easy.

Jul 21, 2010 at 5:54 AM

Hi,

 

I have just done this but is only available to people with certain level secuirty as in code. of course it can be changed to your liking.

 

file: new_ticket.aspx   => create your drop down menu for choosing user
file: new_ticket.aspx.cs
just after !ispostback add =>

ddlUser.Items.Add(new ListItem("", ""));          
 if (accessLevel == 10)            {              
            foreach (user usr in db.users)                {                    
                   ddlUser.Items.Add(new ListItem(usr.userName, usr.id.ToString()));              
             }            

 

also under the button submit click event change the section where the user u variable is being set to:
user u;        

if (ddlUser.SelectedItem.Text != "")          
 u = Users.Get(db, ddlUser.SelectedItem.Text);        
else            
u = Users.Get(db, userName); 

 

And thats it. The ticket add event uses the 'u' object which we are setting depending on what the user has input on the input screen.