[ 
https://jira.nuxeo.com/browse/NXS-895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Anahide Tchertchian reassigned NXS-895:
---------------------------------------

    Assignee: Anahide Tchertchian

> 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
>            Assignee: Anahide Tchertchian
>            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
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets

Reply via email to