check if queue id is given for new ticket. this is useful if

you want to provide a link for the appropriate queue.
This commit is contained in:
Andreas Kotowicz 2011-02-06 19:17:55 +01:00
parent 2d302ceba6
commit 594be07b26

View File

@ -666,6 +666,8 @@ def create_ticket(request):
initial_data = {}
if request.user.usersettings.settings.get('use_email_as_submitter', False) and request.user.email:
initial_data['submitter_email'] = request.user.email
if request.GET.has_key('queue'):
initial_data['queue'] = request.GET['queue']
form = TicketForm(initial=initial_data)
form.fields['queue'].choices = [('', '--------')] + [[q.id, q.title] for q in Queue.objects.all()]