[JIRA] Updated: (NXS-895) Event handlers with EL is not well evaluated: opposite value is returned
[ https://jira.nuxeo.com/browse/NXS-895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alain Escaffre updated NXS-895: --- Priority: Major (was: Minor) Event handlers with EL is not well evaluated: opposite value is returned Key: NXS-895 URL: https://jira.nuxeo.com/browse/NXS-895 Project: Nuxeo Studio Issue Type: Bug Affects Versions: 2.5 Reporter: Sun Tan Priority: Major Fix For: 2.5.1, Short term backlog For instance, If we have an expression like {code} !Document.hasFacet(Folderish) {code} It will execute the event handler only if the document DOES HAVE the facet folderish From org.nuxeo.ecm.automation.core.events.EventHandler:250 {code} if (expression != null) { if (expr == null) { expr = Scripting.newExpression(expression); } if ((Boolean) expr.eval(ctx)) { return false; } } return true; {code} is wrong and should be {code} if (expression != null) { if (expr == null) { expr = Scripting.newExpression(expression); } if (!(Boolean) expr.eval(ctx)) { return false; } } return true; {code} -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira ___ ECM-tickets mailing list ECM-tickets@lists.nuxeo.com http://lists.nuxeo.com/mailman/listinfo/ecm-tickets
[JIRA] Updated: (NXS-895) Event handlers with EL is not well evaluated: opposite value is returned
[ https://jira.nuxeo.com/browse/NXS-895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sun Tan updated NXS-895: Affects Version/s: 2.5 Event handlers with EL is not well evaluated: opposite value is returned Key: NXS-895 URL: https://jira.nuxeo.com/browse/NXS-895 Project: Nuxeo Studio Issue Type: Bug Affects Versions: 2.5 Reporter: Sun Tan For instance, If we have an expression like {code} !Document.hasFacet(Folderish) {code} It will execute the event handler only if the document DOES HAVE the facet folderish From org.nuxeo.ecm.automation.core.events.EventHandler:250 {code} if (expression != null) { if (expr == null) { expr = Scripting.newExpression(expression); } if ((Boolean) expr.eval(ctx)) { return false; } } return true; {code} is wrong and should be {code} if (expression != null) { if (expr == null) { expr = Scripting.newExpression(expression); } if (!(Boolean) expr.eval(ctx)) { return false; } } return true; {code} -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira ___ ECM-tickets mailing list ECM-tickets@lists.nuxeo.com http://lists.nuxeo.com/mailman/listinfo/ecm-tickets