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

Allow multivalued complex fields to have the required constraint

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 73.6.2
    • Fix Version/s: 73.16
    • Component/s: Schemas

      Description

      USE CASE

      • In JSF UI, a list widget is used for multivalued / complex multivalued fields
      • The list widget can be marked as required in the UI so that you are forced to enter at least one value
      • In Web UI, this translates to a `nuxeo-data-table` element
      • For JSF => Web UI migration, we want to move constraints expressed in the UI to the schemas so that we can scaffold proper layouts in Designer afterwards
      • So we would add a required constraint on the property and use a `nuxeo-data-table` element for the layout
      • But it would be akward for users to have a required constraint set at schema level if they do not see a red `*` on the field in web ui => `nuxeo-data-table` element should handle this

      EXAMPLE USAGE
      complex field address (required)

      • street name and number (required)
      • state (optional)
      • ...

      in the example above,

      • I want my user to have to fill in an address, so I make the address field required,
      • then in the address some parts only are required so only some of the sub fields are required.
        Currently we handle the second part only.

      TODO
      TP 10.1+
      Given that ELEMENTS-552 is done

      • Allow multivalued complex fields in Studio schemas to have the required constraint (schemas, workflow and node variables, automation parameters if they support this type of field when this ticket is taken care of)
      • Only applies to multivalued complex fields, not single valued ones

      ACCEPTANCE CRITERIA

      • When adding a complex multivalued field to a schema, I can edit this field and add the required constraint on it
      • When adding the required constraint, the generated XML contains this constraint
      • If I remove the multivalued option on the complex field, the required constraint is not available anymore in the UI
      • If I remove the multivalued option on the complex field, the required constraint is not added to the generated XML

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 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 - 4 days
                  4d

                    PagerDuty

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