On 6/23/16 8:19 AM, David Schmidt wrote:
Hello

In case someone takes the ticket ownership wile I am composing a
response I would like to redisplay the ticket (the submitted response
shouldnt be deleted) and add a warning informing the user about the
change in ownership.

I guess this is the correct callback

html/Callbacks/RT-Extension-WarnTicketTaken/Ticket/Update.html/BeforeSubmit

but /Ticket/Update.html is quite the monster for an unexperienced RT
dev. :)

Where can I get the response text from so it doesnt get lost and how do
I add a warning?

I might try the BeforeUpdate callback. You should be able to use the validation code to add your new check. You can make the page redisplay by setting $checks_failure to 1 and you can display a message by adding it to @results. BeforeUpdate gives you both of those. You can see an example above after the call to ValidateCustomFields.

    unless ( $status ) {
        push @results, @msg;
        $checks_failure = 1;
    }

You shouldn't need to worry about re-adding input values yourself, it should happen automatically.

You didn't mention your RT version, but this should be similar across most current versions.
---------
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016

Reply via email to