[Rt-commit] rt branch, 4.0/user-cf-autocomplete-on-create, created. rt-4.0.4-133-g2fa25de

Kevin Falcone falcone at bestpractical.com
Tue Dec 13 12:44:46 EST 2011


The branch, 4.0/user-cf-autocomplete-on-create has been created
        at  2fa25def442da0d2af3e78c85824762c97036928 (commit)

- Log -----------------------------------------------------------------
commit 2fa25def442da0d2af3e78c85824762c97036928
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Mon Dec 12 19:38:56 2011 -0500

    Switch Users over to the NamePrefix used by every other CF
    
    ProcessObjectCustomFieldUpdates will correctly treat -- plus an Object
    argument as "everything is assigned to the object".
    This has the added benefit of making Autocomplete custom fields now work
    on Users, since Helpers/Autocomplete/CustomFieldValues is expecting
    -(\d*)- and new never matched that.

diff --git a/share/html/Admin/Users/Modify.html b/share/html/Admin/Users/Modify.html
index d189799..0f6072a 100755
--- a/share/html/Admin/Users/Modify.html
+++ b/share/html/Admin/Users/Modify.html
@@ -197,7 +197,7 @@
 % if ($UserObj->id) {
 <& /Elements/EditCustomField, %ARGS, Object => $UserObj, CustomField => $CF &>
 % } else {
-<& /Elements/EditCustomField, %ARGS, NamePrefix => 'Object-RT::User-new-CustomField-', CustomField => $CF &>
+<& /Elements/EditCustomField, %ARGS, NamePrefix => 'Object-RT::User--CustomField-', CustomField => $CF &>
 % }
 </td></tr>
 % }
@@ -276,12 +276,6 @@ else {
 
 	if ($val) {
 		push @results, $msg;
-        foreach my $key ( keys %ARGS) {
-            # Convert custom fields on the "new" object to custom fields on the one we've just created
-            if ($key =~ /^Object-RT::User-new-CustomField-(.*)$/) {
-            $ARGS{'Object-RT::User-'.$val.'-CustomField-'.$1} = delete $ARGS{$key};
-            }
-        }
         push @results, ProcessObjectCustomFieldUpdates( ARGSRef => \%ARGS, Object => $UserObj );
 	} else {
 		push @results, loc('User could not be created: [_1]', $msg);

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


More information about the Rt-commit mailing list