Skip to content

Add support for eager-loading submission properties #801

@rungta

Description

@rungta

What are you trying to do?

We are trying to create a custom view for publishers and reviewers to look at a subset of submissions, and for each submission attempting to access the following:

  • submission.owner
  • submission.lastReview
  • submission.lastReview.element
  • submission.lastReview.user.username

This is resulting in many duplicated queries and long page load times. Would be great if there was an option to eager-load one or more of these attributes when calling craft.workflow.submissions().

What's your proposed solution?

Add support for craft.workflow.submissions().with() to eager-load submission attributes.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions