workflow icon indicating copy to clipboard operation
workflow copied to clipboard

Add support for eager-loading submission properties

Open rungta opened this issue 6 months ago • 1 comments

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

rungta avatar May 29 '25 22:05 rungta

Sounds fair enough, looking into it!

engram-design avatar May 30 '25 12:05 engram-design