Conversation
The letter-writing reminder had no already-sent guard, so a repeatedly firing cron re-created and re-sent it to all eligible sponsors every run. Skip sponsors reminded in the last month, mirroring send_wrpr_contribution_reminder.
Replace the per-record last_letter/sponsor_letter_ids reads (one correspondence search per contract, ~1000/run -> cron exceeded its time limit and re-fired every few minutes) with a stored-field start_date domain + a single read_group over correspondence. Equivalent eligibility, finishes fast so the cron's nextcall advances normally. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ionch/compassion-switzerland into T3306-wrpr-letter-reminder-guard # Conflicts: # partner_communication_switzerland/models/contracts.py
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…-guard T3306 wrpr letter reminder guard
- FEAT: calculate child's country and sort biennials according to country/partner - FEAT: add new group by country option - FEAT: child pictures are now also sorted according to country before zipped
The daily communication cron can run more than once a day (service restart), and the job-merge dedup only covers pending/failure jobs, so an already-sent reminder was re-created and auto-sent. Skip a sponsorship that already received the same reminder config in the last week. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…able-errors [T3343] FIX: skip developer email on retryable concurrency errors
[T3264] FEAT: biennials are now sorted/grouped by country.
Confidence Score: 4/5
What T-Rex did
|
| <filter | ||
| string="Country" | ||
| name="country" | ||
| domain="[]" | ||
| context="{'group_by':'child_country_id'}" | ||
| /> |
There was a problem hiding this comment.
Duplicate Country group-by filter
This adds a second Country filter immediately after the existing one with the same name, empty domain, and child_country_id group-by context. Users consequently receive two indistinguishable Country choices in the Group By menu; remove the duplicate declaration.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Artifacts
Focused PR #1787 Country filter validation script
- The exact Node and Playwright script executed against the parent and PR revisions parses the targeted view and records comparable menu captures, confirming the duplicate condition.
Focused validation command output
- The captured command output reports one Country group-by filter before the PR, two after it, and confirms that the two post-PR filters are identical.
▶ Group By menu before PR #1787 with one Country option
- The Playwright Chromium capture renders the menu derived from the parent revision and shows one Country Group By entry.
Poster frame before PR #1787 with one Country option
- The poster frame shows the parent-revision menu with a single Country Group By entry.
▶ Group By menu after PR #1787 with duplicate Country options
- The Playwright Chromium capture renders the menu derived from the PR revision and shows two indistinguishable Country Group By entries.
Poster frame after PR #1787 with duplicate Country options
- The poster frame shows the PR-revision menu containing two identical Country Group By entries.
| country = child.field_office_id.country_id.name or "ZZ" | ||
| country = child.field_office_id.country_id.name or "ZZ" |
There was a problem hiding this comment.
Redundant country assignment before filename construction
country is assigned the identical expression twice consecutively, and the second assignment overwrites the first before fname reads it. Removing either assignment preserves both the normal country-prefixed filename and the ZZ fallback while eliminating dead code.
Artifacts
PR 1787 country-assignment check script
- Authored and executed Python script parses the target AST, asserts the adjacent duplicate assignments, and runs before/after filename construction, proving the narrow control-flow condition and filename equivalence.
Current duplicate-assignment behavior
- Captured execution of the authored check with both assignments present, showing lines 116 and 117 are identical and adjacent and producing Switzerland and fallback-ZZ filenames.
Behavior after duplicate removal
- Captured execution of the authored check with one assignment removed, producing the same Switzerland and fallback-ZZ filenames, so duplicate removal preserves filename output.
No description provided.