Rock icon indicating copy to clipboard operation
Rock copied to clipboard

Attributes don't save when creating a new Metric

Open nlBayside opened this issue 2 years ago • 1 comments

A Picture Is worth a Thousand Words

Screen Shot 2022-07-19 at 3 43 29 PM

Description

When creating a brand new Metric, attribute values do not save. The Metric gets saved with all the information except for its attributes that were thought to be assigned. A person has to edit the now existing metric to add the attribute values.

Steps to Reproduce

  1. Ensure that the Metric Entity Type has attributes. It does not matter what kind.
  2. Go to create a new Metric.
  3. Add an attribute value to the Metric's attributes.
  4. Click "Save". (The Attribute Value should not have saved)
  5. Click "Edit" to add the Attribute Value to the now existing Metric.
  6. Click "Save" to finally add the Attribute Value.

Expected behavior: Attribute values to be added to the new Metric on creation.

Actual behavior: The new Metric is created without any attribute values assigned.

Rock Version: [12.8, 13.6] Client Culture Setting: [en-US]

nlBayside avatar Jul 19 '22 22:07 nlBayside

Screen Shot 2022-07-19 at 4 16 16 PM

On further examination, it looks like the attribute value does save; however, it gets saved with EntityId = 0. So it saves to the database, but not to the Metric correctly. This was examined using the SQL Profiler.

nlBayside avatar Jul 19 '22 23:07 nlBayside