Plan the move of fund documents out of the templates - #101
Closed
taavipertman-glitch wants to merge 1 commit into
Closed
Plan the move of fund documents out of the templates#101taavipertman-glitch wants to merge 1 commit into
taavipertman-glitch wants to merge 1 commit into
Conversation
Every document on a fund page should be updatable without a code change, with one field vocabulary across all four funds and an explicit declaration of which documents each fund actually has — TKF100 is a UCITS fund and does not carry the same set as the pension funds. The plan records the four silent failures that motivate it: no field group sets show_in_rest so no ACF write has ever landed, nav_procedure_upcoming_file is read but registered nowhere, onboarding-service points at the TKF100 landing page instead of the documents page, and neither writer checks that the field changed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Superseded — the plan lives in the private tuleva repo at |
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.
Summary
Adds
docs/TODO — Fund document automation.md: the plan for making every document on every fund page updatable without a code change.Two things drove it. First, the four funds do not carry the same document set — TKF100 is a UCITS fund with a summary of investor rights and its own NAV procedure, the pension funds have neither, and CO2 intensity is not calculated for TKF100 — so a shared field vocabulary needs an explicit per-fund declaration of what applies, not just
if ($url). Second, the automated path does not currently work at all, for any fund.What the plan proposes
One catalogue of document field definitions plus a scope table declaring, per page template, whether each document is required, optional, or absent. ACF binds groups by page template and each fund has its own, so applicability is a location-rule list with per-fund granularity and no
if fund ==in any template. Withshow_in_rest,GET /wp-json/wp/v2/pages/{id}then returns exactly the field set that applies to that fund, so the publishing script can reject a not-applicable field instead of ACF silently dropping it.Steps are ordered so nothing visible changes until the fields are populated and verified, and the hardcoded fallbacks come out last.
Silent failures the plan has to fix
Verified against production, not inferred:
show_in_rest, so ACF drops theacfkey from every write.GET /wp-json/wp/v2/pages/35292and/17533both return"acf": [].scripts/update_acf.pyand onboarding-service'sWordPressMediaClientboth get HTTP 200 and change nothing — TKF100's automated path has never worked.nav_procedure_upcoming_fileis read but registered nowhere.fund-savings-details.php:40reads it; no ACF group defines it. It always returns null, so that row always comes from the hardcoded URL and cannot be set in wp-admin.FundReportMapping.TKF100uses slugtaiendav-kogumisfond→ page 37325, the landing page onpage_savings-fund-landing.php. The document fields live on 35292.updateAcfReportFieldtreats HTTP 200 as success without checking the field changed.Why not just rebase #69
#69 predates 19 commits of master and moves one field. Master has since added upcoming prospectus, terms and NAV procedure rows to all four pages — every one of them as a hardcoded template URL, including on TKF100, the fund that is supposed to be ACF-driven. Rebuilding on master with the full field set is less work than rebasing and then repeating the same PR four more times.
Doc only, no code.
🤖 Generated with Claude Code