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

Setting Tosca Function on top of unsaved value causes problems

XMLWordPrintable

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

      If an invalid (i.e. does not adhere to constraints) literal value is attempted to be added to a list, an error is thrown. It is then possible to set a TOSCA function value for the property (without using the 'Discard' button to clear the invalid value).

      Setting the TOSCA function value is successful, however it an attempt is then made to overwrite the TOSCA function value with a valid value an error is thrown because the old invalid value is still sent to the backend (along with the new valid value)

       

      Secondly, if you add valid literal values to a list without clicking the save button and also add a TOSCA function value, then the saving of the TOSCA function value results in the added (but unsaved) literal values being lost

       

      The solution to both these issues is to not allow use of the TOSCA function button when there is unsaved values. I think it already works this way for the top level check box on the property but not for values in a list etc. 

      Or perhaps a better solution would be to disable the checkboxes when there are unsaved changes (why enable the checkboxes if all the buttons are disabled)

       

      To reproduce (second part:

       

      • Import the attached VFC
      • Add instance of this VFC to a service
      • In the properties assignment view, add a value to the list property
      • Set the value to 5
      • Click 'Save' button, an error is thrown
      • Check the checkbox for the list entry
      • Pick any TOSCA function value
      • Click 'Save' to exit the TOSCA Function modal
      • To value in the list is now successfully set to the TOSCA function value
      • Open the TOSCA function value again and click 'Clear'
      • With the TOSCA function value now removed, add the valid value to the list (i.e. 5.5)
      • An error is thrown

       

       

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

              Created:
              Updated:
              Resolved: