[rt-devel] Scrip feedback

Ruslan Zakirov ruz at bestpractical.com
Tue May 21 15:26:17 EDT 2013


On Tue, May 21, 2013 at 11:14 PM, Bradley Bell <bradleyb at uw.edu> wrote:

> As far as I can tell, there is no easy way for a scrip to provide
> feedback to end users.
> For example if I have a scrip that reverts a status change, the
> scrip's Commit method could return (1, "Feedback Here") and then in
> the UI, instead of just seeing:
>
> * Ticket 8: Status changed from 'open' to 'stalled'
>
> They would also see
> * Ticket 8: Can't be stalled without a Due date. Status changed back to
> 'open'
>
> or whatever.
>
> Is there something that already provides this functionality or would a
> patch be welcomed?
>

1) Scrips are not best for such things. New RT allows you to prevent
operations much easily in UI by using checks_failure (grep) and callbacks.

2) Patch is not bad. I want user visible feedback from Scrips too.

3) Return value of Prepare/Commit methods is not good candidate. Mostly
because of backwards compatibility. I think a method in scrip action's
class can be used, for example AddMessage or something like that.

4) If you want to see it merged into RT core then it's better to implement
something dirty and quick, publish it for review and comments on rt-devel at list.



> --
> Bradley Bell
> Classroom Support Services | University of Washington
> 035 Kane Hall | Box 353095 Seattle, WA 98195-3095
> p 206.543.9900 | f 206.685.7892 | www.css.washington.edu
>
>
> --
> RT Training in Seattle, June 19-20: http://bestpractical.com/training
>



-- 
Best regards, Ruslan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-devel/attachments/20130521/227e0511/attachment.html>


More information about the rt-devel mailing list