Uploaded image for project: 'Nuxeo Elements'
  1. Nuxeo Elements
  2. ELEMENTS-473

nuxeo filter does not work in custom form

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Not A Bug
    • Affects Version/s: 2.1.3
    • Fix Version/s: 2.2.1, 2.3.1
    • Component/s: UI

      Description

      1. Install Nuxeo 9.3
      2. In Modeler, create a custom document type
      3. In the Designer create custom forms
      4. In the forms add the following:
            User:[[user]]<br>
            currentUser:[[currentUser]]<br>
            <nuxeo-filter user="[[user]]" expression="user.isAdministrator">
              this user is admin
            </nuxeo-filter><br>
            <nuxeo-filter user="[[user]]" expression="!user.isAdministrator">
              this currentUser is NOT admin
            </nuxeo-filter>
            <nuxeo-filter user="[[currentUser]]" expression="currentUser.isAdministrator">
              this currentUser is admin
            </nuxeo-filter><br>
            <nuxeo-filter user="[[currentUser]]" expression="!user.isAdministrator">
              this currentUser is NOT admin
            </nuxeo-filter>
        
      5. Log in as Administrator
      6. Sync the project with the server
      7. Click the + button to create a document
      8. Observe this does not display any value for user or currentUser (see createForm.png)
      9. Observe all the messages are displayed: this user is admin, this user is NOT admin, this currentUser is admin, this currentUser is NOT admin (see createForm.png)

      Expected behavior : user or currentUser should be valued and only the nuxeo-filter bloc for the admin should be displayed.

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 10 minutes
                10m