Skip to content

Save Derived Column values to PropertyState #3438

@perryr16

Description

@perryr16

Background

Derived Columns are loosely calculated as: derived_column_value = derived_column.evaluate(property_state)

Issue

Derived Column values are dynamically calculated on each inventory list page load and have a few known performance issues:

  • They are calculated one column at a time and as the number of visible derived columns increases the page load time also increases
  • Dynamically calculated values prevent a user from being able to sort/filter by a derived column

Saving derived column data to the database would increase performance and allow for more advanced filtering and sorting.

A potential solution:

  • save the derived column values to a property state inside a new attribute dictionary called derived_data. This would be similar to 'extra_data' on the property_state
  • after a new derived column is saved, run a method to add derived_data to every property_state attached to a property_view
  • after a property is updated, or new data is uploaded run a method to update or refresh derived data
  • add a dropdown action on the inventory list for "refresh derived data"

Metadata

Metadata

Labels

MaintenanceTag as maintenance if the issue relates to general cleanup, maintenance, etc. Do not delete label.Needs DiscussionFor issues that are unclear or needs more information to understand requirements or the use-case

Type

No type

Projects

Status

Testing on Dev/Stage

Relationships

None yet

Development

No branches or pull requests

Issue actions