Newsletter: Pick a redirect on every link field

Link fields with redirects: true get a list of Data > Links/redirects that fills in the short link's full address; the newsletter turns it on for its blocks' links and their items' links.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-10-05 00:39:52 -05:00
parent 6289e7203f
commit e060153798
3 changed files with 41 additions and 3 deletions

View file

@ -106,6 +106,8 @@ export const OPTION_QUERIES = {
people: "SELECT id, display_name AS label FROM people ORDER BY sort_name, display_name",
person_tag_types: "SELECT id, name AS label FROM person_tag_types ORDER BY sort_order, name",
contact_types: "SELECT id, name AS label FROM contact_types ORDER BY sort_order, name",
// Link fields with `redirects: true` pick from these (068).
redirects: "SELECT id, id || ' (' || target_url || ')' AS label FROM redirects ORDER BY id",
blog_posts: "SELECT id, title AS label FROM blog_posts ORDER BY published_on DESC, title",
// org_id rides along so the affiliation row can filter the list