Difference between revisions of "OnStatusChange"

From Request Tracker Wiki
Jump to navigation Jump to search
m (2 revisions imported)
 
 
Line 2: Line 2:


To get condition 'On Stall':
To get condition 'On Stall':
 
<pre>
  INSERT INTO ScripConditions(
  INSERT INTO ScripConditions(
   Name,
   Name,
Line 24: Line 24:
   NOW()
   NOW()
  );
  );
</pre>


Get user id from other records in this table, this id is not used much, but should be correct.
Get user id from other records in this table, this id is not used much, but should be correct.


To get 'On Delete' and other conditions you have to insert similar data where Argument field matches the status value.
To get 'On Delete' and other conditions you have to insert similar data where Argument field matches the status value.

Latest revision as of 14:17, 13 August 2016

RT is distributed with condition 'On Resolve' which is based on module RT::Condition::StatusChange. This module has functionality to handle other statuses as well, but only one thing you have to do. You have to insert description of the new scrip condition into database of the RT.

To get condition 'On Stall':

 INSERT INTO ScripConditions(
   Name,
   Description,
   ExecModule,
   Argument,
   ApplicableTransTypes,
   Creator,
   Created,
   LastUpdatedBy,
   LastUpdated
 ) VALUES (
   'On Stall',
   'Whenever a ticket is stalled',
   'StatusChange',
   'stalled',
   'Status',
   <user_id>,
   NOW(),
   <user_id>,
   NOW()
 );

Get user id from other records in this table, this id is not used much, but should be correct.

To get 'On Delete' and other conditions you have to insert similar data where Argument field matches the status value.