Repository navigation
Sponsors: include central and unrecorded PDFs in the agreement backfill - #2098
Conversation
- Name central's sponsor post type as `mes` - Have the backfill query also find PDFs attached to a sponsor - Cover both in the tests Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Checked this out locally and ran through it. The post type rename is right: Also traced the Updated for
To check the new row pins what it's for, I reverted One correction to what I said earlier: I called Non-blocking follow-up if you ever want it: parameterising the Unrelated, noticed while confirming the slug: |
- Give the `mes` test fixture the capabilities of the real registration - Test the unrecorded-PDF query against both sponsor post types - Note which query arm each set of placeholder values feeds Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
bor0
left a comment
There was a problem hiding this comment.
Approving on c8486349e. Details are in my comment above: both fixes verified locally, the mutation check confirms the new data-provider row pins the central paths, and CI is green.
Nothing blocking. The one follow-up I mentioned is genuinely optional and I would not hold this for it.
Follow-up to #1992.
get_sponsor_post_types()named central's sponsor post type asmes_sponsor; it ismes.wp wc-sponsor-agreements scan/backfillnow also find a PDF attached to a sponsor that the sponsor's meta doesn't name, matching what the upload hook does for new files.Testing
Run from the repo root, with
WP="docker compose exec -T wordcamp.test wp".vendor/bin/phpunit --testsuite "WordCamp MU Plugins" --group sponsor-agreementspasses.inherit, reset it:post update <attachment> --post_status=inheritandpost meta delete <attachment> _wcorg_sponsor_agreement.$WP wc-sponsor-agreements scan --verboselists the site.$WP --url=... wc-sponsor-agreements backfillreports the attachment asPrivate: yes, andpost get <attachment> --field=post_statusis nowprivate.post get <attachment> --field=post_statusisprivate. Onproductionit staysinherit.