Bug report #15789

attribute table: virtual field values are not updated when underlying field values changes

Added by Mathieu Pellerin - nIRV almost 8 years ago. Updated over 5 years ago.

Status:Feedback
Priority:Normal
Assignee:-
Category:Attribute table
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:23709

Description

On master, the displayed values of virtual field(s) within an attribute table are not updated when the underlying field values are changed. The user has to close the attribute table and re-open the window to see the changes.

Steps to reproduce
  1. Create a new project and add a vector dataset
  2. Open the layer properties window, and go to the Fields section
  3. Create a new virtual field with a simple expression that relies on a field present in the dataset (for e.g., "my_numerical_field * 2")
  4. Apply the change and close the properties window
  5. Open the attribute table window, and take a look at the virtual field values to verify the expression work
  6. Switch edit mode on via the attribute table window's toolbar button
  7. Click on a cell to change the value of the field you're using in your virutal field's expression
  8. Notice how the virtual field isn't updating
  9. Switch edit mode off and save the changes to the dataset
  10. Notice how the virtual field isn't updating
  11. Click on the refresh toolbar button
  12. Notice how the virtual field isn't updating

While this is not a crucial issue per say (the user can close and re-open the window without losing data, etc.), it'd be important to have virtual fields updating values as underlying data is changed as those occur.

History

#1 Updated by Giovanni Manghi almost 8 years ago

  • Priority changed from High to Normal

#2 Updated by Giovanni Manghi over 7 years ago

  • Easy fix? set to No
  • Regression? set to No

#3 Updated by Giovanni Manghi over 5 years ago

  • Status changed from Open to Feedback

Please check if this issue is still valid on QGIS 3.4.5 or 3.6.

Also available in: Atom PDF