Issue #741 has been updated by Dmitriy S.
THIS method convert from array (where id returns as [cn=....] ) to the same
String ([cn=....] )
org.lsc.utils.JScriptEvaluator.java
private Object instanceEval(final Task task, final String expression,
final Map<String, Object> params)
throws LscServiceException
{...
ret = engine.eval(expressionImport, bindings); // Array to Object
...
}
/** {@inheritDoc} */
public String evalToString(final Task task, final String expression,
final Map<String, Object> params)
throws LscServiceException {
Object result = instanceEval(task, expression, params);
if (result == null) {
return null;
} else if (result instanceof String) {
return (String)result;
} else {
return result.toString(); // Object.toString WITH
"[...]"
}
// return (String) Context.jsToJava(result, String.class);
}
This result will assign to mainIdentifier.
...
itmBean.setMainIdentifier(ScriptingEvaluator.evalToString(task, dn, table)); //
Everytime with "[" "]"
...
and we have code where you compare two strings. And this expression everytime
returns LscModificationType.CHANGE_ID:
...
if (!"".equals(itmBean.getMainIdentifier()) &&
dstBean.getMainIdentifier().compareToIgnoreCase(itmBean.getMainIdentifier()) !=
0) {
return LscModificationType.CHANGE_ID;
} else {
return LscModificationType.UPDATE_OBJECT;
}
...
dstBean.getMainIdentifier() = cn=..... but
itmBean.getMainIdentifier() = [cn=...]
----------------------------------------
Bug #741: LSC doesn't do modify operation
http://tools.lsc-project.org/issues/741
Author: Dmitriy S
Status: New
Priority: Low
Assigned to: Clément OUDOT
Category:
Target version:
Problem in version: 2.1.1
Hello, I have a problem.
I have configured LSC (AD is source, mySQL is destination), I try to do
synchronization:
lsc -s ADSyncTask
Everything is OK, all records was created. Next I changed a value in AD and I
tried to do synchronization again.
lsc -s ADSyncTask
All entries: 8, to modify entries: 0, successfully modified entries: 0, errors: 0
Next, I deleted everything records in mySQL
lsc -c ADSyncTask
Everything is OK, all records was deleted.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://tools.lsc-project.org/my/account
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org
lsc-dev mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-dev