Skip to content

Support of special attribute updates in add_property

I. Nüske requested to merge f-217-set-special-property into dev

Summary

The Entity.add_property method now checks whether the name of an added property matches a special attribute and, if so, updates the attribute instead.
Addresses #217

Focus

  • Should similar behaviour be supported for updates using only id? If so, how would I go about finding out which id the name attribute/property has server-side?
  • As the method is called add_property and special attributes do not support multi-properties (as far as I know?), should we guard against an overwrite by only setting the attribute if it is currently None?

Test Environment

A unit test is included, is it sufficient?

Check List for the Author

  • All automated tests pass
  • Reference related issues
  • Up-to-date CHANGELOG.md (or not necessary)
  • Up-to-date JSON schema (or not necessary)
  • Appropriate user and developer documentation (or not necessary)
  • 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 (or not necessary)
  • Appropriate user and developer documentation (or not necessary)
  • 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 specifications? Are they satisfied?
Edited by I. Nüske

Merge request reports

Loading