Re: [rt-users] Extension to allow queue change on creating child ticket

2012-06-13 Thread Christian Loos
Am 12.06.2012 22:38, schrieb Mike Johnson:
 Greetings all,
 
 I searched for an answer to this, but couldn't come up with anything 
 relevant.
 
 Is there an extension out there, or has someone customized their rt
 to allow you to pick the queue a child ticket gets created in? So we
 don't have to do a multi-step process to have children tickets on a
 parent that are in a different queue?
 
 Would there be some sort of scrip I could make to do this if there
 isn't an extension or customization?
 
 Any insight on this would be appreciated.
 
 Thanks! Mike.
 
 -- Mike Johnson Datatel Programmer/Analyst Northern Ontario School of
 Medicine 955 Oliver Road Thunder Bay, ON   P7B 5E1 Phone: (807)
 766-7331 Email: mike.john...@nosm.ca mailto:mike.john...@nosm.ca

Attached a patch with a not perfect but working solution.

-Chris
From 72d48f4805ae1c28bcf4199911109908c0f09402 Mon Sep 17 00:00:00 2001
From: Christian Loos cl...@netcologne.de
Date: Mon, 18 Jul 2011 12:44:35 +0200
Subject: [PATCH] show queue select on ticket cloning

If you come to the ticket create page by the create link in the links section
of a ticket (cloning), show a queue select box.
If you change the queue, the create page is reloaded by javascript to show
the custom fields for the new queue.
---
 html/Ticket/Create.html |9 -
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/html/Ticket/Create.html b/html/Ticket/Create.html
index 6daec7b..d0174b9 100755
--- a/html/Ticket/Create.html
+++ b/html/Ticket/Create.html
@@ -64,8 +64,15 @@
 | /Widgets/TitleBox, title = loc(Create a new ticket) 
 table border=0 cellpadding=0 cellspacing=0
 trtd class=label|/lQueue/:/td
-td class=value Elements/ShowQueue, QueueObj = $QueueObj 
+% # NOTE: show queue select on ticket cloning
+% # TODO: find a better way than javascript and send it to Best Practical
+td class=value
+% if ($CloneTicket) {
+ /Elements/SelectQueue, Name = Queue, ShowNullOption = 0, ShowAllQueues 
= 0, Default = $ARGS{Queue}, OnChange = 'location.href = 
location.href.replace(/(.+Queue=)\d+(.*)/, \'$1\' + this.value + \'$2\');' 
+% } else {
+ Elements/ShowQueue, QueueObj = $QueueObj 
 input type=hidden class=hidden name=Queue value=% $QueueObj-Name % 
/
+% }
 /td
 td class=label|/lStatus/:
 /td
-- 
1.7.2.3

[rt-users] Extension to allow queue change on creating child ticket

2012-06-12 Thread Mike Johnson
Greetings all,

I searched for an answer to this, but couldn't come up with anything
relevant.

Is there an extension out there, or has someone customized their rt to
allow you to pick the queue a child ticket gets created in? So we don't
have to do a multi-step process to have children tickets on a parent that
are in a different queue?

Would there be some sort of scrip I could make to do this if there isn't an
extension or customization?

Any insight on this would be appreciated.

Thanks!
Mike.

-- 
Mike Johnson
Datatel Programmer/Analyst
Northern Ontario School of Medicine
955 Oliver Road
Thunder Bay, ON   P7B 5E1
Phone: (807) 766-7331
Email: mike.john...@nosm.ca