Bug report #17187

Attribute Table refresh issue

Added by Geo Dev 3 months ago. Updated about 2 months ago.

Status:Closed
Priority:High
Assignee:Luigi Pirelli
Category:Attribute table
Affected QGIS version:master Regression?:Yes
Operating System:Linux and Windows Easy fix?:Yes
Pull Request or Patch supplied:Yes Resolution:duplicate
Crashes QGIS or corrupts data:No

Description

The Attribute Table doesn't immediately update when fields are set with the Quick Field Calculation Bar.

Steps to replicate the issue:
- Open the Attribute Table of any vector layer
- Start editing
- Select an existing field in the drop-down list of the Quick Field Calculation Bar
- Fill the textbox of the Bar with a value or an expression
- Click on Update All button: the table doesn't update
- Force the refresh of the table (e.g. clicking on cells or sorting the columns): the table updates

Same behavior with Update Selected and Update Filtered buttons.
The user has the perception that the Update buttons do not work (priority: High).
The issue already exists in 2.18.12 but doesn't exist in 2.14 (minor release regression).
The issue also occurs in QGIS 2.99.0-Master.

Bug_17187_Feature1.mp4 (3.01 MB) Steve Lowman, 10/17/2017 10:58 AM

Bug_17187_Feature2.mp4 (2.69 MB) Steve Lowman, 10/17/2017 11:00 AM


Related issues

Related to QGIS Application - Bug report #17280: When switch between filtered modes, the edited cells stop... Closed 10/14/2017
Related to QGIS Application - Bug report #17312: Attribute Table refresh issue using the Quick Field Calcu... Closed 10/21/2017
Related to QGIS Application - Bug report #17262: Attribute table data entered text is obscured by the 'x' ... Closed 10/09/2017
Duplicated by QGIS Application - Bug report #17289: Issue editing layers Closed 10/16/2017

Associated revisions

Revision 6d50b37c
Added by Paul Blottiere about 2 months ago

Merge pull request #5403 from boundlessgeo/issue_17187_backportFrom3

[bugfix] Attribute table model not updated when a feature is changed. fixes #17280 #17187

History

#1 Updated by Giovanni Manghi 3 months ago

  • Regression? changed from No to Yes

If it worked in 2.14 then is a major issue as it is a regression in between two LTR releases.

#2 Updated by Alexandre Neto 3 months ago

I faced the same problem.

At least with selected features, I was also able to refresh the table of attributes by scrolling it vertically.

#3 Updated by Steve Lowman 2 months ago

I confirm this issue with shapefile layers. And, I confirm it updates when you touch the scroll bar - you don't have to actually move it.

Is it occurring with non-shapefile layers, too?

Also I am getting a similar but less consistent issue with manual edits to individual cell values in Table view. It just did this the first time I tried to manually edit a cell, only displaying after I did the scroll, but after that I could not repeat the issue with a manual edit in the same layer. The issue is consistent with the Field Calculation bar, though.

#4 Updated by Geo Dev 2 months ago

It's a general issue. Same unexpected behavior with all the vector data formats.

#5 Updated by Steve Lowman about 2 months ago

I think #17280 is a duplicate.

Related to #17262, which also concerns data entry in attribute table 'table view'.

#6 Updated by Giovanni Manghi about 2 months ago

See also #17289

#7 Updated by Jürgen Fischer about 2 months ago

#8 Updated by Jürgen Fischer about 2 months ago

#9 Updated by Jürgen Fischer about 2 months ago

#10 Updated by Jürgen Fischer about 2 months ago

  • Related to Bug report #17280: When switch between filtered modes, the edited cells stop updating themselves. added

#11 Updated by Steve Lowman about 2 months ago

Added video demonstrating data entry in layer with one feature, showing data fails to display until Save is clicked.

#12 Updated by Steve Lowman about 2 months ago

Added video demonstrating data entry in layer with two features, showing data displaying two cells behind data entry and failure to display calculated data until Save is clicked.

#13 Updated by Luigi Pirelli about 2 months ago

seems a side effect of my fix to avoid sorting during editing.

6c84b6ea45e02ba71506fdbc6f5a24800c56b1dc

now checking how to update data without sorting in the new atteribute table architecture.

#14 Updated by Luigi Pirelli about 2 months ago

  • Assignee set to Luigi Pirelli

#15 Updated by Luigi Pirelli about 2 months ago

the same issue was already fixed 4month ago in master 5f22ba1c936db18f9326b84315be03b4874282e0 but never backported

I'll do it.

#16 Updated by Giovanni Manghi about 2 months ago

Luigi Pirelli wrote:

the same issue was already fixed 4month ago in master 5f22ba1c936db18f9326b84315be03b4874282e0 but never backported

I'll do it.

I assume this would also fix #17280 ?

#17 Updated by Luigi Pirelli about 2 months ago

  • Pull Request or Patch supplied changed from No to Yes
  • Easy fix? changed from No to Yes

#18 Updated by Luigi Pirelli about 2 months ago

  • Pull Request or Patch supplied changed from Yes to No

check if https://github.com/qgis/QGIS/pull/5403 really fix the issue

#19 Updated by Luigi Pirelli about 2 months ago

  • Pull Request or Patch supplied changed from No to Yes

confirmed that https://github.com/qgis/QGIS/pull/5403 fix this issue

#20 Updated by Paul Blottiere about 2 months ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

#21 Updated by Geo Dev about 2 months ago

  • Status changed from Closed to Reopened

The backported fix 5f22ba1c936db18f9326b84315be03b4874282e0
doesn't fix this issue (#17187) that still occurs also in QGIS 2.99.0-Master.

Steps to replicate the issue:
- Open the Attribute Table of any vector layer
- Start editing
- Select an existing field in the drop-down list of the Quick Field Calculation Bar
- Fill the textbox of the Bar with a value or an expression
- Click on Update All button: the table doesn't update
- Force the refresh of the table (e.g. clicking on cells or sorting the columns): the table updates

#22 Updated by Giovanni Manghi about 2 months ago

  • Affected QGIS version changed from 2.18.13 to master
  • Status changed from Reopened to Feedback

Geo Dev wrote:

The backported fix 5f22ba1c936db18f9326b84315be03b4874282e0
doesn't fix this issue (#17187) that still occurs also in QGIS 2.99.0-Master.

Steps to replicate the issue:
- Open the Attribute Table of any vector layer
- Start editing
- Select an existing field in the drop-down list of the Quick Field Calculation Bar
- Fill the textbox of the Bar with a value or an expression
- Click on Update All button: the table doesn't update
- Force the refresh of the table (e.g. clicking on cells or sorting the columns): the table updates

I just checked and indeed the behavior is little different in master:
actually you don't need to force the refresh with the refresh button after using the calculator, you just need to change the focus away from the "update" button. The problem of values not showing after entering them manually (and moving to a different cell with the "tab" key) is definitely solved also in master. For sake of clarity I would suggest to file this in a different ticket, agree?

#23 Updated by Luigi Pirelli about 2 months ago

yes, IMHO is better to close this issue and reopen one related to master. The main reason is also because, in this moment I'm more focused on 2.18 stability than master.
Is it ok for you Geo Dev?

#24 Updated by Geo Dev about 2 months ago

IMHO the description of this bug (#17187) is properly focused on the issue that still occurs in both versions 2.18.13 and 2.99.0-Master (the Attribute Table doesn't immediately update when fields are set with the Quick Field Calculation Bar).
The two attached videos should instead be removed since they don't explain the issue described in this report. They show a different issue (values not showing after entering them manually) correctly explained into another bug report (#17289) but incorrectly indicated as duplicate of this one.

Furthermore this issue occurs exactly in the same way in both versions:
- in 2.18.13, exactly as in 2.99.0-Master, "you don't need to force the refresh with the refresh button after using the calculator" (even because in editing mode the refresh button "reload table" is disabled). It's enough to refresh the table e.g. clicking on cells, sorting/resizing the columns, scrolling the table, resizing the window container of the table, etc.;
- in 2.99.0-Master, exactly as in 2.18.13, it's not always enough "to change the focus away from the update button". Just after clicking on Update All button, even if you change the focus e.g. changing the selected field in the drop-down list, turning on/off the layers in the TOC, click on the Zoom to Selected button, etc. the table doesn't update anyway.

No problem to reopen another ticket for 2.99.0-Master but IMHO it would be exactly the same bug report with the same description.
Another solution might be to extend the title in "Attribute Table refresh issue using the Quick Field Calculation Bar".
In both cases the references to (#17289) should be removed to avoid confusion.
Let me know.

#25 Updated by Giovanni Manghi about 2 months ago

Geo Dev wrote:

IMHO the description of this bug (#17187) is properly focused on the issue that still occurs in both versions 2.18.13 and 2.99.0-Master (the Attribute Table doesn't immediately update when fields are set with the Quick Field Calculation Bar).

with the patch this is fixed in 2.18... not 2.18.13, you will have to wait 2.18.14 to test if you don't want to compile by yourself.

#26 Updated by Luigi Pirelli about 2 months ago

or 2.18-dev

#27 Updated by sand thorn about 2 months ago

I can not find 2.18-dev in

http://qgis.org/downloads/weekly/?C=M;O=D

There are only 2.99-dev. Besides, there seems no updates this week.

Where can I download pre-compiled developer version of current release?

#28 Updated by Giovanni Manghi about 2 months ago

sand thorn wrote:

I can not find 2.18-dev in

http://qgis.org/downloads/weekly/?C=M;O=D

There are only 2.99-dev. Besides, there seems no updates this week.

Where can I download pre-compiled developer version of current release?

use the osgeo4w installer, follow the "advanced install" and install the package qgis-rel-dev

#29 Updated by Geo Dev about 2 months ago

Tested on a just compiled code of the last 2.18-dev (with the latest commit 6d50b37) and on the already compiled OSGeo4W qgis-rel-dev 2.18.13-20 (QGIS code revision 6d50b37c62).
It's confirmed that the patch https://github.com/qgis/QGIS/pull/5403 doesn't fix this specific issue (#17187) in QGIS 2.18.

#30 Updated by Giovanni Manghi about 2 months ago

Geo Dev wrote:

Tested on a just compiled code of the last 2.18-dev (with the latest commit 6d50b37) and on the already compiled OSGeo4W qgis-rel-dev 2.18.13-20 (QGIS code revision 6d50b37c62).
It's confirmed that the patch https://github.com/qgis/QGIS/pull/5403 doesn't fix this specific issue (#17187) in QGIS 2.18.

just checked also on Windows here: also on 2.18-dev after updating with the quick calculator is needed to change the focus away from the button. This means that there is a difference between Linux (where with the patch there is no need to change the focus after pressing the button) and Windows.
Regardless, as already said is better to file a new ticket... also because the patch is already committed and other problems referred here and in its twin ticket are solved.

#31 Updated by Geo Dev about 2 months ago

Tested 2.18-dev (just compiled) also on Linux:: exactly the same issue of Windows (even with regard to focus behaviour).
Ticket reopened as #17312 to avoid confusion since:
- the patch https://github.com/qgis/QGIS/pull/5403 doesn't fix this specific issue (#17187) but the #17289 incorrectly indicated as duplicate of this one;
- the two attached videos don't explain the issue described in this report but the #17289 bug.

#32 Updated by Steve Lowman about 2 months ago

I agree - #17289 was a different bug.

The only reason I copied the videos over was because #17289 was incorrectly closed as a duplicate of #17187. As Geo Dev has observed, #17289 has now been resolved, but #17187 has not.

However, we now have duplicates in #17187 and #17312, so one of these should be closed.

#33 Updated by Geo Dev about 2 months ago

Yes, this bug report should now be closed with a reference to the new one (#17312).

#34 Updated by Giovanni Manghi about 2 months ago

  • Status changed from Feedback to Closed
  • Resolution set to duplicate

replaced by #17312

#35 Updated by Jürgen Fischer about 2 months ago

  • Related to Bug report #17312: Attribute Table refresh issue using the Quick Field Calculation Bar added

#36 Updated by Alessandro Pasotti 18 days ago

  • Related to Bug report #17262: Attribute table data entered text is obscured by the 'x' button added

Also available in: Atom PDF