Skip to content

Commit fc23d61

Browse files
committed
Limit lookup type for custom roles in reports
Previously custom roles were only for tickets, but not any more since we added assets support.
1 parent 7fba788 commit fc23d61

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/RT/Report.pm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ our %GROUPINGS_META = (
134134
return () unless $queues;
135135

136136
my $crs = RT::CustomRoles->new( $self->CurrentUser );
137+
$crs->LimitToLookupType( $self->RecordClass->CustomFieldLookupType );
138+
# Adding this to avoid returning all records when no queues are available.
139+
$crs->LimitToObjectId(0);
140+
137141
for my $id ( keys %$queues ) {
138142
my $queue = RT::Queue->new( $self->CurrentUser );
139143
$queue->Load($id);

0 commit comments

Comments
 (0)