summaryrefslogtreecommitdiff
path: root/lib/RTx/MandatoryCustomFields.pm
blob: f908be3815ae0e8d3542633bf13eff0d34629623 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package RTx::MandatoryCustomFields;

our $VERSION = "0.01";

1;

=head1 NAME

RTx::MandatoryCustomFields - RT Extension to require custom fields to be set before resolving a ticket

=head1 DESCRIPTION

This RT extension adds a field to custom field definitions, allowing 
the field to be designated as "Required".  If this is enabled, tickets 
with no value in that custom field will refuse to resolve.  Note that 
unlike the Mandatory Subject extension, the field does not have to be 
set to create the ticket.

Required fields are enforced in the web interface, not the RT API, so 
they can be bypassed fairly easily by command-line, email, or other 
mechanisms for changing a ticket's status.  This extension is for 
encouraging good habits, not for security.

=head1 INSTALLATION

 perl Makefile.PL
 make
 make initdb # if you have never installed this extension before
 make install

If your RT is not in the default path (/opt/rt3), you must set RTHOME 
first.

=head1 CONFIGURATION

Add this line to your RT_SiteConfig.pm:

Set(@Plugins, ( 'RTx::MandatoryCustomFields' ));

If you already have a Set(@Plugins ...) line, add 'RTx::MandatoryCustomFields'
to the list of values.

Then edit your custom field and check the 'Required' box.  Any number of 
custom fields may be flagged as required.

If the user tries to resolve a ticket when one or more required fields 
are empty, 

=head1 AUTHOR

Mark Wells <mark@freeside.biz>

=cut