Skip to content

Document reference resolver and move person resolving to separate example

Florian Spreckelsen requested to merge f-person-reference into dev

Summary

See #237 (closed) and https://gitlab.indiscale.com/caosdb/customers/geomar/management/-/issues/7. Introduces an explanation on how to customize the resolving of references. Also moves the resolving of referenced Person Records by their first name and last name properties to a separate example that is enabled by default.

Focus

The new explanation is in src/doc/extension/references.rst; the example was moved from src/core/js/ext_references.js to src/ext/js/person_reference_resolver.js.

Test Environment

make doc and verify that the new section in the documentation is correct and understandable.

On a CaosDB instance with at least a Person RecordType with firstname and lastname properties, a Person Record with values for one or both, and a Record referencing this Person Record, verify that the reference is still resolved as person.firstname + " " + person.lastname. Disable the custom module in the build properties (either by removing the BUILD_EXT_REFERENCES_CUSTOM_RESOLVER variable or by setting BUILD_MODULE_EXT_RESOLVE_REFERENCES=DISABLED) and check that the reference is now resolved to entity name if present or entity id instead.

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 Alexander Kreft

Merge request reports

Loading