Repository navigation
[6.x] Forms 2: Add whereStatus to submission queries - #15636
Merged
Merged
Conversation
Supports `any`, `finalized` and `partial`. The submission status filter and the partial cleanup job now use it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A status condition (e.g. `status:is="partial"` or `status:is="any"`) overrides it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jasonvarga
added a commit
that referenced
this pull request
Oct 12, 2026
Takes #15636's whereStatus(), status filter and tag structure, and adds spam on top: a spam case in whereStatus(), spam clauses in the finalized and partial cases, and spam:* conditions overriding the tag's finalized default. Extends #15636's status tests with spam fixtures instead of keeping duplicate tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds a
whereStatus()method to the submission query builder, and uses it to keep partial submissions out of places they were leaking into.whereStatus()acceptsfinalized,partialorany. Submissions without apartialkey are finalized, so submissions saved before Forms 2 stay finalized.Like entries, queries return every status unless told otherwise.
FormSubmission::query(),Form::submissions()andForm::querySubmissions()include partial submissions, and consumers that only want finalized submissions ask for them explicitly.Partial submissions were previously included in:
{{ form:submissions }}tag. It now outputs finalized submissions by default, the same way thecollectiontag defaults to published entries. Usestatus:is="partial"orstatus:is="any"to override it.Places that already excluded partial submissions (the submission limit, the forms index count, the webhook and email previews), the submission status filter and the partial submission cleanup job now use
whereStatus()instead of querying thepartialkey directly.Exporting "All submissions" still includes partial submissions. "Filtered submissions" exports what's in the listing, which is finalized submissions by default.
The
SubmissionQueryBuildercontract is unchanged, to avoid breaking existing implementations. Custom submission repositories should add awhereStatus()method to their query builder.