[Rt-commit] rt branch 5.0/tweak-query-builder-criteria updated. rt-5.0.1-612-g873b9b694a
BPS Git Server
git at git.bestpractical.com
Wed Nov 10 22:09:13 UTC 2021
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".
The branch, 5.0/tweak-query-builder-criteria has been updated
via 873b9b694a45bfc0b6da4595f5a10e44f101f0e6 (commit)
from f1dcd5d5e31d73390bfc7a281d8a52d4d278cb5f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 873b9b694a45bfc0b6da4595f5a10e44f101f0e6
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Nov 11 05:45:27 2021 +0800
Include custom roles in the core watcher search criteria
PickCustomRoles is not used anywhere now, so it's deprecated.
diff --git a/share/html/Search/Elements/PickBasics b/share/html/Search/Elements/PickBasics
index 155ea71754..7281749949 100644
--- a/share/html/Search/Elements/PickBasics
+++ b/share/html/Search/Elements/PickBasics
@@ -439,7 +439,7 @@ else {
Field => {
Type => 'component',
Path => 'SelectPersonType',
- Arguments => { Default => 'Requestor' },
+ Arguments => { Default => 'Requestor', Queues => \%queues },
},
Op => {
Type => 'component',
diff --git a/share/html/Search/Elements/PickCriteria b/share/html/Search/Elements/PickCriteria
index 5c691453c8..d2b20fb6d6 100644
--- a/share/html/Search/Elements/PickCriteria
+++ b/share/html/Search/Elements/PickCriteria
@@ -62,7 +62,6 @@
% $m->callback( %ARGS, CallbackName => "AfterCFs" );
% } else {
<& PickBasics, queues => \%queues &>
- <& PickCustomRoles, queues => \%queues &>
<& PickTicketCFs, queues => \%queues &>
<& PickObjectCFs, Class => 'Transaction', queues => \%queues &>
<& PickObjectCFs, Class => 'Queue', queues => \%queues &>
diff --git a/share/html/Search/Elements/PickCustomRoles b/share/html/Search/Elements/PickCustomRoles
index cd55a95bed..d533a6d92c 100644
--- a/share/html/Search/Elements/PickCustomRoles
+++ b/share/html/Search/Elements/PickCustomRoles
@@ -49,6 +49,8 @@
%queues => ()
</%ARGS>
<%INIT>
+RT->Deprecated( Message => '/Search/Elements/PickCustomRoles is obsolete', Remove => '5.2' );
+
my $CustomRoles = RT::CustomRoles->new( $session{'CurrentUser'});
foreach my $id (keys %queues) {
# Gotta load up the $queue object, since queues get stored by name now.
diff --git a/share/html/Search/Elements/SelectPersonType b/share/html/Search/Elements/SelectPersonType
index c4ee5c3723..8dbd6514fe 100644
--- a/share/html/Search/Elements/SelectPersonType
+++ b/share/html/Search/Elements/SelectPersonType
@@ -105,6 +105,19 @@ else {
}
else {
@types = qw(Requestor Cc AdminCc Watcher Owner QueueCc QueueAdminCc QueueWatcher);
+
+ my $CustomRoles = RT::CustomRoles->new( $session{'CurrentUser'});
+ foreach my $id (keys %Queues) {
+ my $queue = RT::Queue->new($session{'CurrentUser'});
+ $queue->Load($id);
+ next unless $queue->Id;
+ $CustomRoles->LimitToObjectId($queue->Id);
+ }
+ $m->callback(
+ CallbackName => 'MassageCustomRoles',
+ CustomRoles => $CustomRoles,
+ );
+ push @types, map { [ "CustomRole.{" . $_->Name . "}", $_->Name ] } @{ $CustomRoles->ItemsArrayRef };
}
@subtypes = @{ $RT::Tickets::SEARCHABLE_SUBFIELDS{'User'} };
@@ -122,4 +135,5 @@ $Scope => $Class eq 'RT::Assets' ? 'asset' : 'ticket'
$Name => 'WatcherType'
$Role => undef
@Roles => ()
+%Queues => ()
</%ARGS>
-----------------------------------------------------------------------
Summary of changes:
share/html/Search/Elements/PickBasics | 2 +-
share/html/Search/Elements/PickCriteria | 1 -
share/html/Search/Elements/PickCustomRoles | 2 ++
share/html/Search/Elements/SelectPersonType | 14 ++++++++++++++
4 files changed, 17 insertions(+), 2 deletions(-)
hooks/post-receive
--
rt
More information about the rt-commit
mailing list