[Rt-commit] rt branch, 4.2/bulk-autocomplete, created. rt-4.2.12-91-g150f210

Shawn Moore shawn at bestpractical.com
Mon Nov 16 11:47:28 EST 2015


The branch, 4.2/bulk-autocomplete has been created
        at  150f210b9a49730775d633b9c647dcc88fb3629d (commit)

- Log -----------------------------------------------------------------
commit e6c84c1098d5940ab45a683d1f4197f9e57e7e5f
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Mon Nov 16 16:42:42 2015 +0000

    Support autocomplete custom fields in bulk update
    
        This partially addresses I#15259

diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index 0860404..bea9a8d 100644
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -3123,8 +3123,9 @@ sub _ParseObjectCustomFieldArgs {
     foreach my $arg ( keys %$ARGSRef ) {
 
         # format: Object-<object class>-<object id>-CustomField[:<grouping>]-<CF id>-<commands>
+        # or: Bulk-<Add or Delete>-CustomField[:<grouping>]-<CF id>-<commands>
         # you can use GetCustomFieldInputName to generate the complement input name
-        next unless $arg =~ /^Object-([\w:]+)-(\d*)-CustomField(?::(\w+))?-(\d+)-(.*)$/;
+        next unless $arg =~ /^(?:Bulk-(?:Add|Delete)|Object-([\w:]+)-(\d*))-CustomField(?::(\w+))?-(\d+)-(.*)$/;
 
         # For each of those objects, find out what custom fields we want to work with.
         #                   Class     ID     CF  grouping command
diff --git a/share/html/Elements/BulkCustomFields b/share/html/Elements/BulkCustomFields
index 871e306..5511e92 100644
--- a/share/html/Elements/BulkCustomFields
+++ b/share/html/Elements/BulkCustomFields
@@ -87,6 +87,9 @@
 % # Pass datemanip format to prevent another tz date conversion
 <td><& /Elements/EditCustomFieldDateTime, @add, Default => undef, Format => 'datemanip' &></td>
 <td><& /Elements/EditCustomFieldDateTime, @del, Default => undef, Format => 'datemanip' &><br />
+% } elsif ($cf->Type eq 'Autocomplete') {
+<td><& /Elements/EditCustomFieldAutocomplete, @add &></td>
+<td><& /Elements/EditCustomFieldAutocomplete, @del &><br />
 % } else {
 %   $RT::Logger->crit("Unknown CustomField type: " . $cf->Type);
 %   next

commit 150f210b9a49730775d633b9c647dcc88fb3629d
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Mon Nov 16 16:44:31 2015 +0000

    Hint to the user that they can't bulk update other CF types
    
        This partially addresses I#15259

diff --git a/share/html/Elements/BulkCustomFields b/share/html/Elements/BulkCustomFields
index 5511e92..46263ad 100644
--- a/share/html/Elements/BulkCustomFields
+++ b/share/html/Elements/BulkCustomFields
@@ -91,6 +91,7 @@
 <td><& /Elements/EditCustomFieldAutocomplete, @add &></td>
 <td><& /Elements/EditCustomFieldAutocomplete, @del &><br />
 % } else {
+    <td colspan="2"><em><&|/l&>(Unsupported custom field type)</&></em></td>
 %   $RT::Logger->crit("Unknown CustomField type: " . $cf->Type);
 %   next
 % }

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


More information about the rt-commit mailing list