[Bps-public-commit] RT-Extension-LDAPImport branch, useful-callbacks, updated. 0.34-9-g030c57b

Ruslan Zakirov ruz at bestpractical.com
Fri Feb 22 16:55:25 EST 2013


The branch, useful-callbacks has been updated
       via  030c57bbb7d31eaada24d49097442d7c1c778a2d (commit)
      from  5e7880fdcba2fd51baaaec1a0a45fc2a2cc2b9ee (commit)

Summary of changes:
 lib/RT/Extension/LDAPImport.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

- Log -----------------------------------------------------------------
commit 030c57bbb7d31eaada24d49097442d7c1c778a2d
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Sat Feb 23 01:53:40 2013 +0400

    sort keys when we process a mapping
    
    So callbacks get reliable set in 'result' argument.

diff --git a/lib/RT/Extension/LDAPImport.pm b/lib/RT/Extension/LDAPImport.pm
index 87ad64f..75c4a32 100644
--- a/lib/RT/Extension/LDAPImport.pm
+++ b/lib/RT/Extension/LDAPImport.pm
@@ -154,6 +154,8 @@ The currently processed key and value from the mapping.
 =item result
 
 Hash reference with results of completed mappings for this ldap entry.
+This should be used to inject that are not in the mapping, not to inspect.
+Mapping is processed in literal order of the keys.
 
 =back
 
@@ -729,7 +731,7 @@ sub _parse_ldap_mapping {
     my $mapping = $args{mapping};
 
     my %res;
-    foreach my $rtfield ( keys %$mapping ) {
+    foreach my $rtfield ( sort keys %$mapping ) {
         next if $args{'skip'} && $rtfield =~ $args{'skip'};
         next if $args{'only'} && $rtfield !~ $args{'only'};
 

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



More information about the Bps-public-commit mailing list