Uploaded image for project: 'Nuxeo Studio'
  1. Nuxeo Studio
  2. NXS-6544

Fix use of logical operators when more than one 'property changed' in 'Before document modification' event handler definition

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.6.4
    • Fix Version/s: 4.8.0
    • Component/s: Automation

      Description

      When using more than 1 property in field Current document properties have change, logical operators OR or AND are used to generate the expression, they don't seem to work, Using || or && instead works (in field Custom EL expression).
      How to reproduce:

      • in Studio Modeler, create a new event handler on event Before document modification
      • add the 2 following properties to field Current document properties have changed and check the At least one of box:
        • dc:title
        • dc:description
      • link it e.g. to an automation script that simply produces a warning in the logs:
        function run(input, params) {
          Console.warn('<propertiesChanged> ' + input.path);
          return input;
        }
        
      • deploy the Studio project to a Nuxeo instance
      • create a document of type File
      • edit the created document and change the title or the description

      Expected result: the warning <propertiesChanged> is produced in the server.log file
      Actual result: the warning <propertiesChanged> is NOT produced in the server.log file

      Workaround: Use the field Custom EL expression with the following expression instead of the 2 properties in field Current document properties have changed:

      (Document.doc.getProperty("dc:description").isDirty() || Document.doc.getProperty("dc:title").isDirty())
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                PagerDuty

                Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.