On Mar 26, 2015, at 11:52 AM, Al Joslin <[email protected]> wrote:
> 
> I would like to have a button on the display page of a ticket that when 
> clicked runs some code (*) which then causes the display page to refresh
> 
> I have the code (*) written which queries a remote database and updates an rt 
> ticket based on what it finds
>       - this is all perl code, using DBI to connect the external db
> 
> I don’t care if the code is stored in RT or not
> 
> How can I do this?
> 
> I can create a button on the Ticket display page which submits a form to an 
> url, perhaps I should return the result as a redirect back to the Ticket 
> display page ?

Hi Al,

There is probably a way to hack this into the RT pages but the way I'd probably 
do it is build a separate webpage on a different virtualhost that will do what 
you want (very simple page with the button) and the necessary headers to 
redirect to the referrer.  Then I'd use a custom field to show that page 
(custom fields can show data *or* actual webpage content).  When I click the 
button within the custom field that's displaying this other page it would go to 
that page, do what it's supposed to do and then redirect back to the referrer 
(the display page in RT).  Be sure to protect the page on the virtualhost 
somehow so it's not available to someone who should not see/use it.

Landon Stewart : [email protected]
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to