[rt-devel] Adding field to modify TicketObj priority with AfterOwner callback

Rhys Hanrahan rhys at nexusone.com.au
Thu Jan 16 00:25:14 EST 2014

Thanks Kevin! Can you believe that after 4 years of using RT, none of us have actually pulled up the "show details" UI. Amazing.

Since "show details" doesn't require a page re-load, it could well suit our needs (quickly changing priority). But if that's still not enough and I need the extra field anyway, then I'll probably use ARGSRef on BeforeCreate as you suggested.

Very much appreciate your insight.


-----Original Message-----
From: rt-devel-bounces at lists.bestpractical.com [mailto:rt-devel-bounces at lists.bestpractical.com] On Behalf Of Kevin Falcone
Sent: Thursday, 16 January 2014 3:12
To: rt-devel at lists.bestpractical.com
Subject: Re: [rt-devel] Adding field to modify TicketObj priority with AfterOwner callback

On Tue, Jan 14, 2014 at 10:25:02PM +0000, Rhys Hanrahan wrote:
>    The AfterOwner callback gives most agreeable positioning on the creation UI, so that's the
>    callback I've gone with. However, looking at the callback definition in Ticket/Create.html, it
>    looks like the TicketObj is not passed into this particular callback:

Priority is actually already available during ticket creation if you click on Details in the upper right.

As for why your callback doesn't work, you're creating the ticket. At the time AfterOwner is called, the ticket does not exist yet, so it can't pass you anything.

You use AfterOwner to show your priority widget and then use another callback to actually update the ticket.

I'd probably use BeforeCreate to push Priority into the ARGSRef so that it seamless is used during creation, rather than coming as a later transaction.

If you don't want to do that, read the bottom of Create.html's INIT, you'll see that it passes execution to Display.html, so you'll use a callback in there (or even easier, write a Scrip to do it On Create, then it happens for tickets that come in via email in addition to the web UI).


More information about the rt-devel mailing list