X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Flib%2FRT%2FCustomFieldValues%2FGroups.pm;h=d37f7a43046fbe75b9f675f01f20449b98839be1;hb=de9d037528895f7151a9aead6724ce2df95f9586;hp=f14fd6bd25c4f738eb8d0335e481eedc4813dcb6;hpb=fc6209f398899f0211cfcedeb81a3cd65e04a941;p=freeside.git diff --git a/rt/lib/RT/CustomFieldValues/Groups.pm b/rt/lib/RT/CustomFieldValues/Groups.pm index f14fd6bd2..d37f7a430 100644 --- a/rt/lib/RT/CustomFieldValues/Groups.pm +++ b/rt/lib/RT/CustomFieldValues/Groups.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -53,10 +53,42 @@ use warnings; use base qw(RT::CustomFieldValues::External); +=head1 NAME + +RT::CustomFieldValues::Groups - Provide RT's groups as a dynamic list of CF values + +=head1 SYNOPSIS + +To use as a source of CF values, add the following to your F +and restart RT. + + # In RT_SiteConfig.pm + Set( @CustomFieldValuesSources, "RT::CustomFieldValues::Groups" ); + +Then visit the modify CF page in the RT admin configuration. + +=head1 METHODS + +Most methods are inherited from L, except the +ones below. + +=head2 SourceDescription + +Returns a brief string describing this data source. + +=cut + sub SourceDescription { return 'RT user defined groups'; } +=head2 ExternalValues + +Returns an arrayref containing a hashref for each possible value in this data +source, where the value name is the group name. + +=cut + sub ExternalValues { my $self = shift; @@ -75,14 +107,6 @@ sub ExternalValues { return \@res; } -eval "require RT::CustomFieldValues::Groups_Vendor"; -if ($@ && $@ !~ qr{^Can't locate RT/CustomFieldValues/Groups_Vendor.pm}) { - die $@; -}; - -eval "require RT::CustomFieldValues::Groups_Local"; -if ($@ && $@ !~ qr{^Can't locate RT/CustomFieldValues/Groups_Local.pm}) { - die $@; -}; +RT::Base->_ImportOverlays(); 1;