You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i.e., this chunk of code that gets the list of credentials for a given batch when sending out the emails:
const data = await payload.find({
collection: 'credential', // required
depth: 2,
where: { ...query }, // pass a `where` query here
sort: '-title',
locale: 'en',
});
It seems likely that the 'find' call uses paging by default, with a default result set of 10 per page. So the 'find' call in the sendBatchEmail endpoint (above) is only dealing with the first ten. It would either have to fetch all pages, or it looks like pagination can possibly be turned off, although the payload docs are version 2 and I think the dashboard payload version might be 1, or some combination of 1 and 2. In any case, here is the page from version 2 of the docs, i.e, the bit about setting pagination=false:
Describe the bug
Only the first ten recipients in a batch are sent a claim email.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
All recipients in a batch should receive emails
Additional context
The problem is very likely here:
dcc-admin-dashboard/src/endpoints/sendBatchEmail.ts
Lines 45 to 51 in a59adb2
i.e., this chunk of code that gets the list of credentials for a given batch when sending out the emails:
It seems likely that the 'find' call uses paging by default, with a default result set of 10 per page. So the 'find' call in the sendBatchEmail endpoint (above) is only dealing with the first ten. It would either have to fetch all pages, or it looks like pagination can possibly be turned off, although the payload docs are version 2 and I think the dashboard payload version might be 1, or some combination of 1 and 2. In any case, here is the page from version 2 of the docs, i.e, the bit about setting pagination=false:
https://payloadcms.com/docs/v2/local-api/overview#local-options-available
The text was updated successfully, but these errors were encountered: