Backfill contact_us_fyi communications as incoming, then drop the dual-condition checks
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 72/100
Direzione di ricerca
Inizia da app/models/notification.rb, dal percorso di creazione di contact-form/NotificationServices e dalle specifiche di .responded_status e #requires_response? in spec/models/notification_spec.rb. Aggiungi la reversible backfill migration dopo aver confermato che le righe contact_us_fyi debbano essere incoming, aggiorna la creazione e le condizioni, quindi esegui le specifiche di Notification e verifica che il down path della migrazione sia protetto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Context
In #2239 we extended the "needs response" concept from contact_us_fyi notifications to all incoming communications. Because existing contact_us_fyi rows are stored as direction: "outgoing", the code currently has to check both conditions:
Notification#requires_response?—kind == "contact_us_fyi" || incoming?Notification.responded_statusscope —where(kind: "contact_us_fyi").or(where(direction: "incoming")), and the"na"branch has to exclude both.
A contact_us_fyi is conceptually an incoming contact (the person reached out to us), so it should simply carry direction: "incoming". Once it does, the kind == "contact_us_fyi" half of every check is redundant and can go.
Work
- Create new
contact_us_fyinotifications as incoming. Update wherever they're generated (contact-form flow /NotificationServices) sodirection: "incoming"is set on creation. Do this first — otherwise removing the OR breaks newly-created rows. - Backfill existing rows — a reversible data migration:
Notification.where(kind: "contact_us_fyi", direction: "outgoing").update_all(direction: "incoming")(guard thedown). - Simplify the code once every
contact_us_fyiis incoming:requires_response?→incoming?responded_status→ key offdirection: "incoming"only:"yes"→where(direction: "incoming", responded: true)"no"→where(direction: "incoming", responded: false)"na"→where.not(direction: "incoming")
- Update specs in
spec/models/notification_spec.rb(the.responded_statusand#requires_response?groups) to reflect the single-condition logic.
Notes
- Sanity-check that no
contact_us_fyishould legitimately be outgoing before backfilling. - Files:
app/models/notification.rb, plus the contact-form/notification-creation path.
- Lingua principale
- Ruby
- Stelle
- 15
- Fork
- 28
- Merge medio
- 1g 12m
- PR unite (30g)
- 262
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di rubyforgood/awbw
-
blocked
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
rubyforgood/awbw#2824 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
rubyforgood/awbw#2822 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
rubyforgood/awbw#2160 ·
I maintainer di solito rispondono entro 1 giorno
-
Update callout faq defualt text when the new person subscription launchesForse già presa @maebeale l’ha presa 81 giorni fa. Apertablocked
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
rubyforgood/awbw#2095 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
rubyforgood/awbw#2088 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di rubyforgood/awbw
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
matteocrippa/awesome-swift#2028 ·
I maintainer di solito rispondono entro 3 giorni
-
Release workflow: a build provenance attestation for the gem with `actions/attest-build-provenance`Apertaarea: devops area: security lane: strong-agent roadmap size: S type: task
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
arminazimi/slipway#712 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
fractaledmind/litestream-ruby#89 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 78/100
resque/resque-scheduler#848 ·
I maintainer di solito rispondono entro 1 giorno