[rt-devel] trouble re-assigning owners in scrips

seph seph at directionless.org
Sat Feb 28 23:33:52 EST 2004


I'm using rt 3.0.6, so perhaps this is all fixed...

I'm trying to create a custom scrip action that, on resolve, changes
the queue, the status, and the owner. the first 2 are easy, but
changing the owner is proving difficult. 

If I do the obvious:

$self->TicketObj->_Set(Field => 'Status', 
                             Value => "new", RecordTransaction => 1);
$self->TicketObj->_Set(Field => 'Owner', 
                             Value => 10, RecordTransaction => 1);

The ticket history is interesting. I get:

  RT_System - owner change
  seph - status change
  seph - owner change
  RT_System - status change

Unfortunatly, this means my scrip's owner change doesn't stick. This
looks a lot like the code that handles the scrips runs before whatever
parses the user options, oops. So I was thinking I'd do the
owner-reassignment in the new queue.

Something like "When a ticket is moved into this queue" "change the
owner" but, creating that custom condition has proved
unpleasant. Using a custom scrip, with only "return 1;" in all 3
fields, results in rt logging "Couldn't commit User Defined" for the
tickets transfered into that queue. For normal actions, like comments,
it does nothing as expected.

Anyone have an ideas about either the right way to change the owner,
or what that bug might be?

seph



More information about the Rt-devel mailing list