Uploaded image for project: 'Service Design and Creation'
  1. Service Design and Creation
  2. SDC-4382

Cannot set value to a instance property with valid values constraint

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • London Release
    • London Release
    • None
    • None

      To reproduce:

      • Import a VFC with a valid_values constraint on a property of type float
      • Add an instance of the VFC to a Service
      • Set the value of the property on the instance to one of the valid values
      • An error is thrown

      Cause:

      When the request is sent to the backend to set the value of the property, the full property definition, including constraints is included. The backend then checks if the constraints have been modified (not allowed). The comparison of the valid values constraint fails because the stored original values are stored as integers but the incoming new values are not converted to integers, so even though the values are logically the same to comparison fails as they are different types

      Note: the issue is not seen when the constraint is added through the UI, only when the VFC is imported with the constraint

            MichaelMorris Michael Morris
            MichaelMorris Michael Morris
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: