diff --git a/jans-core/script/src/main/java/io/jans/service/custom/script/CustomScriptManager.java b/jans-core/script/src/main/java/io/jans/service/custom/script/CustomScriptManager.java index a4447560437..b3a8b0f251e 100644 --- a/jans-core/script/src/main/java/io/jans/service/custom/script/CustomScriptManager.java +++ b/jans-core/script/src/main/java/io/jans/service/custom/script/CustomScriptManager.java @@ -220,7 +220,7 @@ private ReloadResult reloadCustomScriptConfigurations( } if (ScriptLocationType.FILE == newCustomScript.getLocationType()) { - // Replace script revision with file modification time. This should allow to + // Add to script revision file modification time. This should allow to // reload script automatically after changing location_type long fileModifiactionTime = getFileModificationTime(newCustomScript.getLocationPath()); @@ -258,10 +258,10 @@ private ReloadResult reloadCustomScriptConfigurations( } if (ScriptLocationType.FILE == loadedCustomScript.getLocationType()) { - // Replace script revision with file modification time. This should allow to + // Add to script revision file modification time. This should allow to // reload script automatically after changing location_type long fileModifiactionTime = getFileModificationTime(loadedCustomScript.getLocationPath()); - loadedCustomScript.setRevision(fileModifiactionTime); + loadedCustomScript.setRevision(newCustomScript.getRevision() + fileModifiactionTime); if (fileModifiactionTime != 0) { String scriptFromFile = loadFromFile(loadedCustomScript.getLocationPath());