[Rt-commit] rtir branch, 3.2/grouped-cfs-on-create-incident-and-run-investigation, created. 3.2.0-22-ge9c9cddb

? sunnavy sunnavy at bestpractical.com
Wed Mar 28 09:02:43 EDT 2018


The branch, 3.2/grouped-cfs-on-create-incident-and-run-investigation has been created
        at  e9c9cddbbd8621643a63bd3b2cc2b79f4c37563a (commit)

- Log -----------------------------------------------------------------
commit e9c9cddbbd8621643a63bd3b2cc2b79f4c37563a
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Mar 27 05:57:23 2018 +0800

    Massage grouped CF inputs too on "Create Incident and run Investigation"
    
    On "Create Incident and run Investigation", the form contains CF values
    for both queues. We need to filter out CF inputs that are not applied to
    the current queue, so on CreateTicket call, RT could get a clean %ARGS
    and not issue the error log of:
    
        Invalid context object RT::Queue (5) for CF 2; skipping CF
    
    Previously it doesn't consider CF groupings, this commit fixes this.

diff --git a/html/RTIR/Investigation/Elements/Create b/html/RTIR/Investigation/Elements/Create
index 9657e919..163b3b44 100644
--- a/html/RTIR/Investigation/Elements/Create
+++ b/html/RTIR/Investigation/Elements/Create
@@ -276,12 +276,10 @@ if ( ($DefaultsNamePrefix||'') ne $NamePrefix ) {
         Abort('Queue not found');
     }
 
-    my $prefix = 'Object-RT::Ticket--CustomField-';
-
     my %cf_map;
     foreach my $k( keys %ARGS ) {
-        next unless $k =~ /^\Q$prefix\E(\d+)(.*?)$/;
-        my ($cf_id, $rest) = ($1, $2);
+        next unless $k =~ /^(Object-RT::Ticket--CustomField(?::\w+)?-)(\d+)(.*?)$/;
+        my ($prefix, $cf_id, $rest) = ($1, $2, $3);
 
         unless ( exists $cf_map{ $cf_id } ) {
             my $src_cf = $queue->LoadCustomFieldByIdentifier($cf_id);

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


More information about the rt-commit mailing list