feat: add maximum submissions limit for forms#3199
Conversation
Chartman123
left a comment
There was a problem hiding this comment.
@LAfricain thanks for your PR. I just had a quick look at your code and didn't test it yet in my instance. Already a few comments. :)
Chartman123
left a comment
There was a problem hiding this comment.
Some more comments :) Please have a look at the failing workflows, too.
|
Hello @Chartman123, |
|
@LAfricain sorry, I don't have much spare time at the moment :) Please fix the remaining workflow issues |
It's Ok, no rush. I didn't realize I had to fix the errors myself; I still need to get used to the tool. It's done now. |
|
@LAfricain yes, you have to fix them yourself (or use the npm scripts and php scripts). Environments like VSCode also can assist you with that :) |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
@LAfricain it's getting better :) only the DCO (sign-off your commits) and OpenAPI missing... Could you then please also squash all your commits into a single one? |
4e655a8 to
0f256fc
Compare
|
Oh, please don't merge the main branch into this PR, always use |
d1c6101 to
05bfd72
Compare
05bfd72 to
06294e7
Compare
Chartman123
left a comment
There was a problem hiding this comment.
a few more comments that came up during test
043a49d to
4246abe
Compare
|
@LAfricain please add maxSubmissions to the FormsMigrator.php import. And please don't merge the main branch into your branch. This adds lots of changed files to the PR that aren't related. Please use git rebase as I already wrote in my last comment :) |
4246abe to
2e93e84
Compare
|
Hi @Chartman123, sorry for the mess with the main branch merge. I've cleaned everything up and the PR should now only contains the relevant files. I also added maxSubmissions to FormsMigrator.php as requested. Hope it's good now! 🙏 |
0be66b0 to
5bdd12e
Compare
Add the ability to limit the number of responses a form can receive. When the limit is reached, the form is automatically closed and displays a dedicated message instead of accepting new submissions. - Add max_submissions column to forms_v2_forms table (migration) - Add maxSubmissions property to Form entity - Check submission limit in FormsService::canSubmit() - Add limit enforcement in ApiController::newSubmission() - Add isMaxSubmissionsReached flag in form API response - Update FormsForm psalm type in ResponseDefinitions - Add limit settings UI in SettingsSidebarTab - Display dedicated 'Form is full' message in Submit view - Update openapi.json - Update unit and integration tests Closes nextcloud#596 Signed-off-by: lafricain79 <lafricain79@gmail.com> Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
5bdd12e to
7a9b46a
Compare
|
@LAfricain somehow the latest changes got lost again... I've rebased the commits again on current main and added the changes back. So from my side everything looks good now and I'll merge this PR :) Thanks for your contribution!! |
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Add the ability to limit the number of responses a form can receive. When the limit is reached, the form is automatically closed and displays a dedicated message instead of accepting new submissions.
Closes #596