Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Bug with builtInDS based new 5.1d BatchUploader (fieldnames matching)

    Hi Isomorphic,

    I'm trying to use the new BatchUploader features from 5.1d you built in Spring and hit some bugs in this area, which are all important for me.
    I'm using SNAPSHOT_v10.1d_2015-09-20/PowerEdition Deployment.

    Please see the attached builtInDS-based testcase.

    Load string for BuiltInDS.html (can't attach it):
    Code:
    builtinds/sc/DataSourceLoader?dataSource=supplyItem,animals,employees,employeesUpload,batchUpload
    Click image for larger version

Name:	MatchingInBatchUploader.png
Views:	66
Size:	16.5 KB
ID:	231494


    Can you please test this?

    Best regards
    Blama
    Attached Files

    #2
    Note that "Name" can't be matched as it is missing in employeesUpload.ds.xml. So this is expected in the screenshot. I'd assume that the other fields will be matched correctly even though uploadFieldName is not set as the fieldName from the .ds.xml equals the column name in the .csv.

    Best regards
    Blama
    Last edited by Blama; 22 Sep 2015, 02:27.

    Comment


      #3
      Hi Isomorphic,

      please see that the matching worls as expected with this fully qualified .ds.xml (see attachment). So I assume the bug is somewhere in best-guessing the correct value for uploadFieldName.

      Your docs ("If uploadFieldName is set on any of the uploadDataSource's fields, the BatchUploader will use that name to map the uploaded file's content.") do not sound as if this field is mandatory in order to work.

      Best regards
      Blama
      Attached Files

      Comment


        #4
        This issue has been resolved in 5.1, and the fix will be available in the next nightly build.

        Regards,
        Isomorphic Software

        Comment


          #5
          Hi Isomorphic,

          this is fixed for me using SNAPSHOT_v10.1d_2015-09-27/PowerEdition.

          Thanks a lot,
          Blama

          Comment


            #6
            Hi Isomorphic,

            this is not fixed if you explicitly specify the uploadFieldName in .ds.xml.
            Please see this .ds.xml:

            Code:
            <DataSource ID="employeesUpload" serverType="sql" tableName="employeeTable" recordName="employee">
                <fields>
                    <field name="EmployeeId" [B]uploadFieldName="Employee ID"[/B] title="Employee ID" type="integer" primaryKey="true" required="true" />
                    <field name="Name" uploadFieldName="Name" title="Name" type="text" length="128" />
            
                    <!-- Removed type="integer" in ReportsTo, as this triggers another error -->
                    <field name="ReportsTo" [B]uploadFieldName="Manager"[/B] title="Manager" required="true" foreignKey="employees.EmployeeId" />
            
                    <field name="Job" uploadFieldName="Job" title="Title" type="text" length="128">
                        <valueMap>
                            <value>Developer</value>
                            <value>IT-Infrastructure</value>
                        </valueMap>
                    </field>
            
                    <field name="Gender" uploadFieldName="Gender" title="Gender" type="text" length="7">
                        <valueMap>
                            <value>male</value>
                            <value>female</value>
                        </valueMap>
                    </field>
                </fields>
            </DataSource>
            and this .csv:
            Code:
            Employee ID,Name,Manager,Job,Gender
            7000,Michael Mann,NOTKNOWN,Developer,male
            8000,Ray Sun,Charles Madigen,IT-Infrastructure,
            For me, it results in:
            Click image for larger version

Name:	ExplicitlySetFieldNamesIgnored.png
Views:	54
Size:	13.7 KB
ID:	231640

            Best regards
            Blama

            Comment


              #7
              This is fixed and will be available in the next (2015-10-02) nightly build.

              Comment


                #8
                This is fixed for me, thank you.

                Best regards
                Blama

                Comment

                Working...
                X