[rt-devel] Adding field to modify TicketObj priority with AfterOwner callback
Kevin Falcone
falcone at bestpractical.com
Wed Jan 15 11:11:52 EST 2014
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).
-kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 235 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-devel/attachments/20140115/427ed335/attachment.pgp>
More information about the rt-devel
mailing list