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

do not use field alias for the display role in the field mapping model (fix #53028) #53365

Merged
merged 1 commit into from Jun 7, 2023
Merged

do not use field alias for the display role in the field mapping model (fix #53028) #53365

merged 1 commit into from Jun 7, 2023

Conversation

alexbruy
Copy link
Contributor

@alexbruy alexbruy commented Jun 5, 2023

Description

Field mapping model uses a field alias for display role, as a result even if user changes field name they won't see a new field name in the widget. This is confusing and might look like it is not possible to change a field name.

It is proposed to use field name and alias for display role, this way changes in the field name will be immediately reflected in the widget and at the same time fiels alias will provide more context.

Fixes #53028.

@alexbruy alexbruy added GUI/UX Related to QGIS application GUI or User Experience Bug Either a bug report, or a bug fix. Let's hope for the latter! backport queued_ltr_backports Queued Backports labels Jun 5, 2023
@alexbruy alexbruy requested a review from elpaso June 5, 2023 12:15
@github-actions github-actions bot added this to the 3.32.0 milestone Jun 5, 2023
@nyalldawson nyalldawson merged commit 6255547 into qgis:master Jun 7, 2023
40 checks passed
@qgis-bot
Copy link
Collaborator

qgis-bot commented Jun 7, 2023

The backport to queued_ltr_backports failed:

The process '/usr/bin/git' failed with exit code 1
stderr
error: could not apply 95cf3e4953... do not use field alias for the display role in the field mapping model (fix #53028)
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

stdout
Auto-merging src/gui/qgsfieldmappingmodel.cpp
Auto-merging tests/src/python/test_qgsfieldmappingwidget.py
CONFLICT (content): Merge conflict in tests/src/python/test_qgsfieldmappingwidget.py

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-queued_ltr_backports queued_ltr_backports
# Navigate to the new working tree
cd .worktrees/backport-queued_ltr_backports
# Create a new branch
git switch --create backport-53365-to-queued_ltr_backports
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 95cf3e4953eacca26aa1ab057211635839b03b3a
# Push it to GitHub
git push --set-upstream origin backport-53365-to-queued_ltr_backports
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-queued_ltr_backports

Then, create a pull request where the base branch is queued_ltr_backports and the compare/head branch is backport-53365-to-queued_ltr_backports.

@qgis-bot qgis-bot added the failed backport The automated backport attempt failed, needs a manual backport label Jun 7, 2023
@alexbruy alexbruy deleted the field-mapping-model-alias branch June 8, 2023 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport queued_ltr_backports Queued Backports Bug Either a bug report, or a bug fix. Let's hope for the latter! failed backport The automated backport attempt failed, needs a manual backport GUI/UX Related to QGIS application GUI or User Experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Name column always shows alias instead of field name in refactor fields algorithm
3 participants