[Rt-commit] rt branch 5.0/search-user-cf-in-sql updated. rt-5.0.2-11-gc61ea4a667

BPS Git Server git at git.bestpractical.com
Fri May 20 18:58:44 UTC 2022


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/search-user-cf-in-sql has been updated
       via  c61ea4a66739358dd2527363c3fe477cfd21fa85 (commit)
      from  06f83df55cb8d8cf9069f45d238e6bf3443f0f59 (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 c61ea4a66739358dd2527363c3fe477cfd21fa85
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat May 21 02:37:26 2022 +0800

    Add user cfs to query builder criteria

diff --git a/share/html/Search/Elements/SelectPersonType b/share/html/Search/Elements/SelectPersonType
index 0aa0ba78ec..db94417dde 100644
--- a/share/html/Search/Elements/SelectPersonType
+++ b/share/html/Search/Elements/SelectPersonType
@@ -91,6 +91,12 @@ else {
     @subtypes = @{ $RT::Tickets::SEARCHABLE_SUBFIELDS{'User'} };
 }
 
+my $cfs = RT::CustomFields->new( $session{CurrentUser} );
+$cfs->LimitToLookupType( RT::User->CustomFieldLookupType );
+while ( my $cf = $cfs->Next ) {
+    push @subtypes, 'CustomField.{' . $cf->Name . '}';
+}
+
 $m->callback(Types => \@types, Subtypes => \@subtypes);
 
 </%INIT>

-----------------------------------------------------------------------

Summary of changes:
 share/html/Search/Elements/SelectPersonType | 6 ++++++
 1 file changed, 6 insertions(+)


hooks/post-receive
-- 
rt


More information about the rt-commit mailing list