Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-117850

Cannot delete data provider if previously used in form.

    Details

      Description

      Description:

      • If a data provider has been previously selected in a form, it cannot be deleted unless explicitly removed. 

      Steps to reproduce:

      • Create a simple data provider
        • Content & Data  >  Forms  >  Data Providers Tab  > Add New REST Data Provider
        • Sample data provider: Name "Countries", URL "http://localhost:8080/api/jsonws/country/get-countries/";  In outputs: Label = "CountryName", Path: "nameCurrentValue", Type: "List"  (followed this article  for creation). 
        • Save data provider
      • Create a new form 
        • Content & Data  >  Forms  >  Add New Form
        • Name your form anything you want
        • Add "Select from list" field  >  Select 'from data provider' option  >  Select previously created "Countries" data provider  >  Select "CountryName" as output parameter
        • Save form
      • Remove data provider from form
        • Click on your "Select from list" field, and instead of data provider, select "Manually" and enter any option "abc" 
        • Save form
      • Try to delete data provider now
        • Content & Data  >  Forms  >  Data Providers Tab 
        • "Countries"  >  Three Dots  > Delete

       

       Expected: Can delete data provider since no longer used by form

       Actual: Get Error and cannot delete:
       `The data provider cannot be deleted because it is required by one or more forms.`
       
       
      Workaround:  * Can delete data provider if explicitly removed from form

        • Content & Data  >  Forms  >  Your form
        • Select "Select from list" field  >  Select 'from data provider' option  (you will see that "Countries" is still selected there)  >  Select "Choose an option" >  switch back to create list "Manually"  >  Save form
        • Should be able to delete data provider now

        Attachments

          Activity

            People

            Assignee:
            cleyton.magalhaes Cleyton Magalhaes (Inactive)
            Reporter:
            ekaterina.nesterovich Ekaterina Nesterovich
            Participants of an Issue:
            Recent user:
            Jason Pince
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              42 weeks, 6 days ago

                Packages

                Version Package
                7.2.10 DXP FP8
                7.2.10.2 DXP SP3
                7.2.X
                7.3.5 CE GA6
                7.3.10 DXP GA1
                Master