Bug report #20032
Attributes Form gives Wrong value for $area
Status: | Closed | ||
---|---|---|---|
Priority: | High | ||
Assignee: | - | ||
Category: | Forms | ||
Affected QGIS version: | 3.3(master) | Regression?: | Yes |
Operating System: | Windows 7 | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | no timely feedback |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 27854 |
Description
Using Geopackage setting 'Attributes form' to Text Edit Default value using $area and apply default value on update.
I get following result for different field types and for different versions
Int and Int64 gives failure
Version3.3 2aef195527
If the field is an Int it gives NULL
If the field is decimal it gives eg. 5838,240008868463
If the field is an Int64 it gives 5838240008868463 same numbers but no decimal or round
Version 3.2 9b176802e5
If the field is an Int it gives 5838240008868463 same numbers but no decimal or round
If the field is decimal it gives eg. 5838,240008868463
If the field is an Int64 it gives NULL
When setting the Attributes form
Int64 and Decimal start as Text Edit and Int as Range
History
#1 Updated by Giovanni Manghi about 6 years ago
- Status changed from Open to Feedback
For me on linux an Int64 returns null.
Why this was tagged a regression, works fine on 2.18?
#2 Updated by Lene Fischer about 6 years ago
- Status changed from Feedback to Open
Regression from 3.2 to 3.3 sorry If I have misunderstood that ...
#3 Updated by Giovanni Manghi about 6 years ago
- Category changed from Edit widget to Forms
Lene Fischer wrote:
Regression from 3.2 to 3.3 sorry If I have misunderstood that ...
Hi Lene,
that is correct, is a regression. When is the case indicating since what version regressed helps us find the exact moment (in code) when the regression happened.
Anyway here on master (linux) if the field is an Int64 it gives NULL, so no difference with 3.2 (still a bug anyway).
#4 Updated by Alessandro Pasotti about 6 years ago
- File area.gif added
I cannot reproduce on current master (or I didn't understand how to)
#5 Updated by Loïc BARTOLETTI about 6 years ago
- Status changed from Open to Feedback
What are:
- the CRS
- the ellipsoid
Also, what are the area from measurement tools or postgis/spatialite st_area functions?
Can you send the geometry and maybe the project?
#6 Updated by Paolo Cavallini almost 6 years ago
Please give us feedback or close this issue. Thanks.
#7 Updated by Nyall Dawson almost 6 years ago
- Resolution set to no timely feedback
- Status changed from Feedback to Closed