blob: b373c54678c11cb5dfcc8d4e8c4ca83ce933ed1c (
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
|
#!/usr/bin/perl
package RT::Ticket;
use strict;
=head2 MissingRequiredFields
Return all custom fields with the Required flag set for which this object
doesn't have any non-empty values.
=cut
sub MissingRequiredFields {
my $self = shift;
my $CustomFields = $self->CustomFields;
my @results;
while ( my $CF = $CustomFields->Next ) {
next if !$CF->Required;
if ( !length($self->FirstCustomFieldValue($CF->Id) || '') ) {
push @results, $CF;
}
}
return @results;
}
1;
|