The bug from #18 (uploadFieldName) is now fixed for me for some time now.
Thank you
Blama
Announcement
Collapse
No announcement yet.
X
-
A fix for this was committed today, you should see the issue go away with tomorrow's nightly (13 November)
Leave a comment:
-
Sorry, this problem got put to one side pending feedback, and then forgotten about. We will pick this up tomorrow (the developer assigned to it is in a European timezone)
Leave a comment:
-
Hi Isomorphic,
do you have an ETA for the solution you mentioned in #21? On 16th Oct it sounded like it was almost finished.
Best regards
Blama
Leave a comment:
-
Hi Isomorphic,
did you already implement the solution you mentioned in #21?
Best regards
Blama
Leave a comment:
-
Hi Isomorphic,
the issue from #18 is fixed for me using today's nightly.
Thank you,
Blama
Leave a comment:
-
Hi Isomorphic,
do you already have the solution you mentioned in #21?
Best regards
Blama
Leave a comment:
-
Yes we do. It's a bit of an edge case - we only send records that are known to pass validation, so we don't really expect an error response. The only reason we get one here is that the PK of the record is keyed in by the user, which is pretty unusual. Be that as it may, it was a bug; the fix will be present in nightly builds as of tomorrow, 17 October
Leave a comment:
-
Hi Isomorphic,
Originally posted by Isomorphic View PostWe see the problem with the uploadFieldName mapping - a fix will be going in today or possibly Monday, once some internal discussions about exact required behavior have been resolved.
Originally posted by Isomorphic View PostOn your second request - can you provide a use case where this would be useful/helpful? For data import, we attempt to be as accommodating as possible with field identifiers because the import source might well be a spreadsheet provided by an end user.
I was talking about the real ID lookup in the DB:
Code:=== 2015-10-16 13:16:52,242 [ec-6] INFO SQLDataSource - [builtinApplication.null] Performing fetch operation with criteria: {criteria:[[B]{value:"Springs offensive 2015",fieldName:"NAME",operator:"iEquals"}[/B],{value:1,fieldName:"TENANT_ID",operator:"equals"},{value:1,fieldName:"CREATED_BY_TENANT_ID",operator:"equals"},{value:1,fieldName:"MODIFIED_BY_TENANT_ID",operator:"equals"}],operator:"and",_constructor:"AdvancedCriteria"} values: {criteria:[{value:"Springs offensive 2015",fieldName:"NAME",operator:"iEquals"},{value:1,fieldName:"TENANT_ID",operator:"equals"},{value:1,fieldName:"CREATED_BY_TENANT_ID",operator:"equals"},{value:1,fieldName:"MODIFIED_BY_TENANT_ID",operator:"equals"}],operator:"and",_constructor:"AdvancedCriteria"} === 2015-10-16 13:16:52,243 [ec-6] INFO SQLDataSource - [builtinApplication.null] derived query: SELECT $defaultSelectClause FROM $defaultTableClause$defaultAnsiJoinClause WHERE $defaultWhereClause === 2015-10-16 13:16:52,244 [ec-6] INFO SQLDataSource - [builtinApplication.null] 1787: Executing SQL query on 'Oracle': SELECT T_CAMPAIGN.ID, T_CAMPAIGN.TENANT_ID, T_CAMPAIGN.CREATED_BY, T_CAMPAIGN.CREATED_AT, T_CAMPAIGN.MODIFIED_BY, T_CAMPAIGN.MODIFIED_AT, .... [B]WHERE ((LOWER(T_CAMPAIGN.NAME) = LOWER('springs offensive 2015')[/B] AND T_CAMPAIGN.NAME IS NOT NULL) ...
Do you also see the issue from #18?
Best regards
BlamaLast edited by Blama; 16 Oct 2015, 03:55.
Leave a comment:
-
We see the problem with the uploadFieldName mapping - a fix will be going in today or possibly Monday, once some internal discussions about exact required behavior have been resolved.
On your second request - can you provide a use case where this would be useful/helpful? For data import, we attempt to be as accommodating as possible with field identifiers because the import source might well be a spreadsheet provided by an end user. So if you have a field definition like this:Code:<field name="Foo" title="Bar" />
Leave a comment:
-
Hi Isomorphic,
could you also make the string -> ID lookup query case sensitivity configurable (like you did here for Validator.ISUNIQUE) or change the default sensitivity to CS?
Best regards
Blama
Leave a comment:
-
Hi Isomorphic,
the main bug from this thread is NOT fixed. It works in the sample, but only because name and uploadFieldName is the same in the .ds.xml.
If you change uploadFieldName="ReportsTo" to uploadFieldName="ReportsTo2" and also change the column name in the .csv to ReportsTo2 you'll notice that the string->ID lookup does not take place and the validator uses a wrong (string) value.
If you then also change the name to ReportsTo2 it is working again.
The fix here is most likely easy, but identifying this as the reason took me half a day.
Best regards
Blama
Leave a comment:
-
Hi Isomorphic,
to #2:
I got to the bottom of this. Funny thing is that the responses are exactly the same for good and bad request, see the attached files. So it is related to the internal state of the BatchUploader.
Steps to reproduce:- Make .csv file good ("NOTKNOWN" -> "Charles Madigan)", enter new IDs in 1st column (important)
- Upload the file and commit
- 2 records added success message is shown
- Upload the very same file again and commit
- You'll get an Unique Constraint error in a popup (not a validation error!)
- Change csv file, enter new IDs in 1st column
- Upload the changed file and commit
- "null" warning is shown.
Blama
Leave a comment:
-
Hi Isomorphic,
to #1: I just wanted to suggest that Validator.isOneOf could use the valueMap so that there is no need to repeat it, until I saw the docs:
Tests whether the value for this field matches any value from an arbitrary list of acceptable values. The set of acceptable values is specified via the list property on the validator, which should be set to an array of values. If validator.list is not supplied, the valueMap for the field will be used. If there is no valueMap, not providing validator.list is an error.
Best regards
Blama
Leave a comment:
-
Specifying a valueMap on a field isn't sufficient to enforce that submitted values fall within the valueMap - we allow fields to use valueMaps as essentially a suggested value, but also allow additional values to be applied (for example via a ComboBoxItem with addUnknownValues set to true).
From the docs for DataSourceField.valueMap:
...To enforce that a field should be constrained to only the values in the valueMap, either declare field.type as "enum", or use a ValidatorType of "isOneOf" with explicitly listed values. Otherwise, although a normal SelectItem control will only allow values from the valueMap to be entered, other controls such as a ComboBox will allow other values to be entered.
Leave a comment:
Leave a comment: