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

Document management system a.k.a. polymorphic relations GUI #41009

Merged
merged 26 commits into from
Jan 22, 2021

Conversation

suricactus
Copy link
Contributor

Adds GUI to manage polymorphic relations, last followup of my previous two PRs related to implementing qgis/QGIS-Enhancement-Proposals#79 , see #40721 and #40914 .

The "Add relation" button in the relation manager screen now has additional option to add/edit polymorphic relations:
image

The "Add polymorphic relation" and "Edit polymorphic relation" open the same dialog, in the latter case with predefined values:
image

The "Add relation" dialog has been updated, now it uses the same table with buttons on the right layout as most of the QGIS UI. Other than UI, there are no other changes here.
image

Once saved, the list of relations appear as a tree widget, where the generated normal relations for a polymorphic relation appear as children. The names of the generated relations cannot be changed.
image

When saving the .qml style of the layer, the generated relations are not stored, since they are generated from their polymorphic relation every time the project is opened. The polymorphic relations are not exported either, at least for now.

@github-actions github-actions bot added this to the 3.18.0 milestone Jan 14, 2021
@3nids 3nids added the Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo. label Jan 15, 2021
Copy link
Member

@3nids 3nids left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some minor changes.
Great job!!!

src/app/qgsrelationmanagerdialog.cpp Outdated Show resolved Hide resolved
src/app/qgsrelationmanagerdialog.cpp Outdated Show resolved Hide resolved
src/app/qgsrelationmanagerdialog.cpp Outdated Show resolved Hide resolved
src/app/qgsrelationmanagerdialog.cpp Show resolved Hide resolved
src/app/qgsrelationmanagerdialog.cpp Outdated Show resolved Hide resolved
src/app/qgsrelationmanagerdialog.cpp Outdated Show resolved Hide resolved
src/app/qgsrelationmanagerdialog.cpp Outdated Show resolved Hide resolved
src/core/qgsrelation.h Outdated Show resolved Hide resolved
src/core/qgsrelation.h Outdated Show resolved Hide resolved
src/app/qgsrelationmanagerdialog.cpp Show resolved Hide resolved
src/app/qgsrelationmanagerdialog.cpp Outdated Show resolved Hide resolved
@nyalldawson nyalldawson added the Freeze Exempt Feature Freeze exemption granted label Jan 15, 2021
@nyalldawson
Copy link
Collaborator

Marking as freeze exempt for a short period following discussions with @3nids. @3nids has already reviewed and approved this prior to freeze, but wanted to leave it unmerged for potential additional review/comments from other developers for a few additional days

@nyalldawson nyalldawson added Changelog Items that are queued to appear in the visual changelog - remove after harvesting Feature labels Jan 15, 2021
@m-kuhn
Copy link
Member

m-kuhn commented Jan 22, 2021

Unrelated test failures

@m-kuhn m-kuhn merged commit a84f2a2 into qgis:master Jan 22, 2021
@DelazJ
Copy link
Contributor

DelazJ commented Jan 22, 2021

Looks like the "needs-documentation" bot is also broken. This PR did not create the expected issue report.

@suricactus
Copy link
Contributor Author

I will do this and qgis/QGIS-Documentation#6435 in one go.

@DelazJ
Copy link
Contributor

DelazJ commented Jan 22, 2021

No worries @suricactus. My comment was more an issue report than a doc request.

@zacharlie zacharlie added ChangelogHarvested This PR description has been harvested in the Changelog already. and removed Changelog Items that are queued to appear in the visual changelog - remove after harvesting labels Feb 14, 2021
@troopa81
Copy link
Contributor

@suricactus Playing with cppcheck, I stumble upon this. It looks like a possible issue right here, no?

suricactus added a commit to suricactus/QGIS that referenced this pull request Apr 29, 2022
…lidation

As pointed in qgis#41009 (comment)
there was an early return that was probably a leftover from local tests
and somehow passed the review. To facilitate proper validation, a new
event had to be added on the `referencingField` combo, which triggers
the form validation and enabling the ok button respectively.

Thank you @troopa81 for bringing my attention.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ChangelogHarvested This PR description has been harvested in the Changelog already. Feature Freeze Exempt Feature Freeze exemption granted Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants