[rt-users] restrict setting status to "resolved"

Tom Lahti toml at bitstatement.net
Thu Apr 2 20:13:04 EDT 2009


Despite all my work with the REST interface, I know little to nothing about
scrips.  I've been asked to restrict setting ticket status to 'resolved'
unless the actor is a requestor.

I tried setting up a scrip with condition On resolve, Action User defined,
Stage Transaction Create:

  return 1 if $self->TransactionObj->IsInbound;
  $TicketObj->_Set(Field => 'Status', Value => 'open', RecordTransaction => 0);
  return 0;

and also:

  return 1 if $self->TransactionObj->IsInbound;
  $TicketObj->_Set(Field => 'Status', Value => 'open', RecordTransaction => 0);
  return 1;


and tried this in both custom action prep code and custom action cleanup
code, as I'm not terribly clear on where it belongs.  (I probably also want
the Value to be the 'old value', but I'm not sure how to access that).

However, nothing seems to have any effect on a user being able to set a
ticket status to resolved when they are not a requestor.  Any scrip fu
guru's out there willing to beat me with a clue bat?

-- 
-- ============================
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- ============================



More information about the rt-users mailing list