Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Column aliases are not written to geopackage when editing them in Attributes form window #55821

Closed
1 of 2 tasks
Hajna opened this issue Jan 11, 2024 · 2 comments
Closed
1 of 2 tasks
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Feedback Waiting on the submitter for answers

Comments

@Hajna
Copy link

Hajna commented Jan 11, 2024

What is the bug or the crash?

related issue: #47344

context: column aliases are not written to geopackage when editing them in Attributes form window.

problem: there is no way (at least through UI) to edit aliases of existing columns

if this is expected behavior, please excuse me and close this issue.

when creating a new field, we can set up its alias, which is then stored to geopackage system table (gpkg_data_columns)
however for existing fields, the option to set up the alias is not enabled

reading the related issue, it is evident that alias setting has been moved to Attributes form window,
however, setting the alias in the Attributes form, does not save its value to gpkg_data_columns table

Steps to reproduce the issue

Create a new geopackage with one dummy field

image

Opening the layer properties and navigating to Field section, you are unable to edit the field alias

image

When adding a new field, we are able to set its alias

image

which is in return stored to the gpkg_data_columns system table

image

if we try to set the alias in the Attributes forms, the alias is not stored to the system tables, and it does not persist if we try to remove and reload the layer:

image

Versions

3.34.2-Prizren

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

No response

@Hajna Hajna added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Jan 11, 2024
@phidrho
Copy link
Contributor

phidrho commented Sep 13, 2024

Hi,

alias field in Layer Properties panel is saved within QGIS project, and is not pushed back to layer data source. Therefore this is an expected behavior, because you are not editing layer this way, but only representation within QGIS application. Since QGIS supports many data formats, and only some can have Aliases written inside the data source. So this is actually not a bug report but rather an Feature request for special case (when data is stored in GPKG).

You can access Alias editing on Browser panel, then it will be stored inside GPKG as you expect:
image

@phidrho
Copy link
Contributor

phidrho commented Dec 26, 2024

@agiudiceandrea
Can we change label to Feature request or close bug report since there is no response from @Hajna?

@agiudiceandrea agiudiceandrea added the Feedback Waiting on the submitter for answers label Dec 26, 2024
@Hajna Hajna closed this as completed Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Feedback Waiting on the submitter for answers
Projects
None yet
Development

No branches or pull requests

3 participants