Uploaded image for project: 'Talend Component Kit'
  1. Talend Component Kit
  2. TCOMP-960

Suggestions parameters are not correctly resolved in Studio

Details

    • Bug
    • Status: Done
    • Major
    • Resolution: Fixed
    • None
    • 1.0.4
    • None
    • All
    • Small

    Description

      Consider following UI Option:
      @Option
      @Suggestable(value = "basedOnComplex", parameters =

      {"dataStore", "complex"}

      )
      private String basedOnComplex;

      and following Suggestions method:
      @Suggestions("basedOnComplex")
      public SuggestionValues basedOnComplex(@Option("ds") final QASuggestionsDatastore store, @Option("c") final ComplexConfig complex) {

      ActionReference contains SimplePropertyDefinition, which are sorted in alphabetic order(in case several properties are located on the same level in the tree) . Thus, in ActionProperty property "c" goes before property "ds". The order of properties in ActionReference is different than relative paths order in Suggestable.parameters().

      However, integration in Studio expects action properties in the same order as relative paths.
      This should be fixed.

      See:
      https://github.com/Talend/component-runtime-qa/blob/master/components/qa/src/main/java/org/talend/components/qa/actions/QASuggestionsDataset.java#L83-L86
      https://github.com/Talend/component-runtime-qa/blob/master/components/qa/src/main/java/org/talend/components/qa/actions/QASuggestionsService.java#L58-L59

      Workaround for component dev:
      ensure Suggestions method parameters go in alphabetic order.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              igonchar Ivan Gonchar
              Ivan Gonchar
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: