Skip to content

F query quotation

Timm Fitschen requested to merge f-query-quotation into dev

Summary

Handles entity names with empty space used in queries in ext_autocompletion and edit_mode.

Fixes https://gitlab.com/caosdb/caosdb-webui/-/issues/165

Focus

  • The two changes in ext_autocompletion and edit_mode are independent.
  • See the new test case to understand what this is about: (Auto-completion for FIND RECORD Ice should yield Ice Core as a result, but insert it with quotation into the search bar.
  • The change in edit_mode handles a name like "Ice Core" when the edit mode generates a query for listing all possible entities in reference properties (which has to be quoted, otherwise, syntax error).

Test Environment

Manual testing would be good.

  1. Insert a RecordType with an empty space in the name and maybe another one without.
  2. For edit mode: create another entity and drag'n'drop the entity with an empty space into the new entities properties. This should trigger edit_mode.retrieve_datatype_list with a quoted name in the query.
  3. For auto-completion: Type FIND and then the first three characters into the search bar. The resulting query should have a quoted name.

Check List for the Author

Please, prepare your MR for a review. Be sure to write a summary and a focus and create gitlab comments for the reviewer. They should guide the reviewer through the changes, explain your changes and also point out open questions. For further good practices have a look at our review guidelines

  • All automated tests pass
  • Reference related Issues
  • Up-to-date CHANGELOG.md
  • Annotations in code (Gitlab comments)
    • Intent of new code
    • Problems with old code
    • Why this implementation?

Check List for the Reviewer

  • I understand the intent of this MR
  • All automated tests pass
  • Up-to-date CHANGELOG.md
  • The test environment setup works and the intended behavior is reproducible in the test environment
  • In-code documentation and comments are up-to-date.
  • Check: Are there spezifications? Are they satisfied?

For further good practices have a look at our review guidelines.

Edited by Henrik tom Wörden

Merge request reports

Loading