CustomStatuses

From Request Tracker Wiki
Revision as of 16:03, 6 April 2016 by Admin (talk | contribs) (4 revisions imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search



This page 'CustomStatuses' is tagged as OUTDATED
This page contains out of date and possibly misleading information or instructions such as installation methods or configuration examples that no longer apply. Please consider this warning when reading the page below.
If you have checked or updated this page and found the content to be suitable, please remove this notice by editing the page and remove the Outdated template tag.


Please use Lifecycles to accomplish this, on RT 4.0 and higher.



RT has several built-in status codes, including "new", "open", "resolved", and "stalled".

Not everyone's work-flow fits nicely into using these particular status codes. One answer is to use custom fields. This has been discussed at length e.g; discussion from 2004

However, if you "Use custom fields" is unsatisfactory, you can in fact add new statuses to RT. [=etc/RT_Config.pm] states:

You can define new statuses and even reorder existing statuses here.
WARNING. DO NOT DELETE ANY OF THE DEFAULT STATUSES. If you do, RT
will break horribly.

The statuses you add must be no longer than 10 characters: if they are, it will seem to work until you try to actually set one of the long values, at which point you will get an "Invalid status for #nn" error.

Some statuses that have been suggested are:

  • wcr or pending - Waiting for Customer Response to a question in the ticket
  • finished - a task is Finished, but still waiting for confirmation from the customer

Adding statuses to SiteConfig

Copy the appropriate lines below into SiteConfig and add replace the example custom statuses wth your own, then restart RT. See also NonTransitioningStatus

3.8

Set(@ActiveStatus, qw(new open XXX stalled));
Set(@InactiveStatus, qw(resolved XXX rejected deleted SPAM));

Pre-3.8

@ActiveStatus = qw(new open XXX stalled);
@InactiveStatus = qw(resolved XXX rejected deleted);

After 4.0

After 4.0 a new lifecycle management function is introduced, which includes the statuses.

The old configurations are deprecated, at the webserver restart (For example Apache2), you'll get an error, warning you to change this.

More info: CustomStatusesInRt4

Scrip actions for custom statuses

For the case where you're adding something like 'finished' to inform the requestor that you believe you have finished the required work and you would like confirmation from them that they're happy with it, a possible solution is:

@ActiveStatus = qw(new open stalled finished) unless @ActiveStatus;

% mysql rt3
mysql>  INSERT INTO ScripConditions
       (Name, Description, ExecModule, Argument, ApplicableTransTypes, Creator, Created, LastUpdatedBy, LastUpdated)
VALUES ('On Finish', 'Whenever a ticket is finished', 'StatusChange', 'finished', 'Status,Set', 1, NOW(), 1, NOW());

This will give you the additional condition "On Finish" which can be used to send an email to requestors saying "Hi, we believe we've finished the task. Could you please check that it's resolved to your satisfaction and let us know by responding to this email. Thanks." without writing a UserDefined Scrip.

A little nasty maybe - but using the 'StatusChange' module's encapsulation of the required behaviour.