[rt-users] can't have CreateChildTicket working

The Anarcat anarcat at anarcat.ath.cx
Wed Jun 11 12:58:00 EDT 2008


Hi,

I know this has been discussed and solved on this mailing list, but even
then I can't figure it out properly, even after reading through all of
this thread:

http://www.mail-archive.com/rt-users@lists.bestpractical.com/msg12072.html

The problem for me is that the wiki page lists a lot of solutions and
none of them do anything at all for me. So I'll just detail what I tried
here and I hope we can build on that. I basically tried two approaches:

== ShowBeforeHistory callback ==

My first attempt was to follow verbatim what was detailed in the wiki
page.

# cd /usr/local/rt3/share/html/Callbacks/Koumbit/Ticket/Display.html/
# cat > ShowBeforeHistory 
<FORM ACTION="<% $RT::WebPath %>/Ticket/Create.html" NAME="CreateTicketInQueue">
  <input type="submit" value="Create child request in">
  <& /Elements/SelectQueue, Name => 'Queue', %ARGS, ShowNullOption => 0, ShowAllQueues => 0 &>
  <input type="hidden" name="new-MemberOf" value="<%$Ticket->Id%>">
  <input type="hidden" name="Subject" value="Child of: <%$Ticket->Subject%>">
</FORM>

<%INIT>
</%INIT>

<%ARGS>
$Ticket => undef
$Verbose =>  0
$Default => 0
</%ARGS>
# /usr/local/etc/rc.d/apache2 restart

This didn't seem to work, maybe because I didn't put it in the right
directory. Putting it in rt3/local/html worked, but created the
following error instead:

Can't call method "Id" on an undefined value at
/usr/local/rt3/local/html/Callbacks/SA/Ticket/Display.html/BeforeShowHistory
line 13.

== ShowLinks callback ==

So I tried to put the callback in "showlinks", as was suggested on the
mailing list.

# cd /usr/local/rt3
# mkdir -p local/html/Callbacks/child/Elements/
# cd local/html/Callbacks/child/Elements/
# cat > ShowLinks
<FORM ACTION="<% $RT::WebPath %>/Ticket/Create.html" NAME="CreateTicketInQueue">
  <input type="submit" value="Create child request in">
  <& /Elements/SelectQueue, Name => 'Queue', %ARGS, ShowNullOption => 0, ShowAllQueues => 0 &>
  <input type="hidden" name="new-MemberOf" value="<%$Ticket->Id%>">
  <input type="hidden" name="Subject" value="Child of: <%$Ticket->Subject%>">
</FORM>

<%INIT>
</%INIT>

<%ARGS>
$Ticket => undef
$Verbose =>  0
$Default => 0
</%ARGS>
# /usr/local/etc/rc.d/apache2 restart

This doesn't yield anything whatsoever: no error, no output.

== Results ==

For reference, this is FreeBSD 6.3, with Apache 2 + FastCGI / Mason.

Note that today I tried the first solution suggested on the wiki page
but I also tried, some time ago, the other solutions that would hook
into all transactions. Those would also fail to work, but would produce
some output/errors. I still didn't get those (more complicated)
solutions to work and gave up back then. Now I'm trying to focus on the
simpler, less featured solution (I would like to create more than
"child" tickets but also dependencies, referals...)

Any help very welcome,

A.

-- 
We are discreet sheep; we wait to see how the drove is going, and then go
with the drove.
                        - Mark Twain
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20080611/1c42a4de/attachment.sig>


More information about the rt-users mailing list