Improve link row field copy/paste and import
This merge request introduce the ability to give text values to single_select, multiple_select and link_row fields so that you don't have to know the ids of the related select options/rows to import or paste textual data.
For now only linked single value primary field table can be imported this way which means it excludes a linked table with multiple_select, file_field, collaborator_field and link_row field as primary field.
If there is an ambiguity: two options with the same name or two rows that match the same value, the first one in their ordering is used.
The main visible difference from a end user perspective is that you can now import a table with linked rows and you can paste text values to link row field.
I've also simplified a bit the maintenance by using the prepare_value_for_db_in_bulk method even for one value.
To test the feature,
- populate the test data (you might need to drop the exiting test database first) and export the table in CSV then reimport it.
- copy a link row field value, paste it in a text file (this step is crucial otherwise your are in rich copy/paste mode) then copy/paste it in a link row field that contains the same textual values for various primary field linked table. (you can directly forge the values in your text editor also if you want to).
- You can also use the API to create a new row with mixed id/text value for these fields.
Merge Request Checklist
-
changelog.md has been updated if required -
New/updated Premium features are separated correctly in the premium folder -
The latest Chrome and Firefox have been used to test any new frontend features -
Documentation has been updated -
Quality Standards are met -
Performance: tables are still fast with 100k+ rows, 100+ field tables -
The redoc API pages have been updated for any REST API changes -
Our custom API docs are updated for changes to endpoints accessed via api tokens -
The UI/UX has been updated following UI Style Guide
Closes #1121 (closed)