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

Editing - Add a new public method to check the form validity #3858

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mdouchin
Copy link
Collaborator

@mdouchin mdouchin commented Aug 25, 2023

This modification is a first step to improve the overall editing workflow, especially when creating child features for a not-yet existing parent object.

The future workflow could be

  • open the creation form for a new parent object
  • allow opening a creation form for 1 to many children
  • validate the form data for each child to create, without having to save first the parent object (and the children). Do it also when modifying the child form data (we could keep the N forms in the DOM)
  • Display the table of children "to be added or modified", with a look & feel like
UID Feature ID Label (automatically generated based on QGIS display expression) Edit Remove
96944c88-b947-4b69-a538-d9605193bd57 to be generated Lampadaire EEOOFG tungstène [edit] [x]
96944c88-b947-4b69-a538-d96051923456 38 Lampadaire AABBCC diode [edit] [x]
  • save the children form data in a single hidden text field, called for example children_data_layer_XXX which will store a table of JSON encoded form data
  • when the user will Save the parent, in the PHP backend:
    • validate the new parent object
    • re-validate each child
    • save the parent, then save the children in batch. If a database error occurred, rollback all.

Funded by Commune d'Avignon

@github-actions github-actions bot added this to the 3.7.0 milestone Aug 25, 2023
@mdouchin mdouchin changed the title Editing - Improve the workflow of creating & updating child features Editing - Add a new public method to check the form validity Sep 4, 2023
@mdouchin mdouchin added php Pull requests that update Php code backport release_3_6 labels Sep 4, 2023
lizmap/modules/lizmap/controllers/edition.classic.php Outdated Show resolved Hide resolved
lizmap/modules/lizmap/controllers/edition.classic.php Outdated Show resolved Hide resolved
lizmap/modules/lizmap/controllers/edition.classic.php Outdated Show resolved Hide resolved
lizmap/modules/lizmap/controllers/edition.classic.php Outdated Show resolved Hide resolved
lizmap/modules/lizmap/controllers/edition.classic.php Outdated Show resolved Hide resolved
lizmap/modules/lizmap/controllers/edition.classic.php Outdated Show resolved Hide resolved
lizmap/modules/lizmap/controllers/edition.classic.php Outdated Show resolved Hide resolved
lizmap/modules/lizmap/controllers/edition.classic.php Outdated Show resolved Hide resolved
lizmap/modules/lizmap/controllers/edition.classic.php Outdated Show resolved Hide resolved
lizmap/modules/lizmap/controllers/edition.classic.php Outdated Show resolved Hide resolved
@github-actions github-actions bot added the tests unit tests and docker configuration for tests label Sep 4, 2023
@Gustry Gustry added the sponsored development This development has been funded label Oct 25, 2023
@Gustry Gustry modified the milestones: 3.7.0, 3.8 Nov 23, 2023
@mdouchin mdouchin modified the milestones: 3.8.0, 3.9 May 13, 2024
Copy link

The Lizmap project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 2 months and is being automatically marked as "stale".
If there is no further activity on this pull request, it will be closed in two weeks.

@github-actions github-actions bot added stale This ticket might be closed soon and removed stale This ticket might be closed soon labels Jun 24, 2024
Copy link

github-actions bot commented Jul 1, 2024

The Lizmap project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 2 months and is being automatically marked as "stale".
If there is no further activity on this pull request, it will be closed in two weeks.

@github-actions github-actions bot added stale This ticket might be closed soon and removed stale This ticket might be closed soon labels Jul 1, 2024
Copy link

github-actions bot commented Jul 8, 2024

The Lizmap project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 2 months and is being automatically marked as "stale".
If there is no further activity on this pull request, it will be closed in two weeks.

@github-actions github-actions bot added stale This ticket might be closed soon and removed stale This ticket might be closed soon labels Jul 8, 2024
Copy link

The Lizmap project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 2 months and is being automatically marked as "stale".
If there is no further activity on this pull request, it will be closed in two weeks.

@github-actions github-actions bot added the stale This ticket might be closed soon label Jul 15, 2024
@github-actions github-actions bot removed the stale This ticket might be closed soon label Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data editor php Pull requests that update Php code sponsored development This development has been funded tests unit tests and docker configuration for tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants