rubyforgood / rubyforgood/human-essentials

Reconcile itemrequests and requestitems

Open
#5,083 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Difficulty—Advanced stale
Dominant language
Ruby
Stars
593
Forks
593
Avg merge
4d 22h
Merged PRs (30d)
41

Description

Summary

ItemRequests and RequestItems seem to have largely the same information We should just use one of them

Why?

This is cleanup -- I'm pretty sure it's a legacy of when we had two apps

Details

It looks like the way to go with this will be to rework the distribution printout to use ItemRequest instead of RequestItem -- then we should be able to get rid of RequestItem

Job for the core team

-- confirm that ItemRequest and RequestItem are in agreement in the prod data. If not - how long ago is the discrepency?

Context from the RubyForGood 2024 event

Migration on branch from event to attempt to synchronize these in prod data: https://github.com/rubyforgood/human-essentials/blob/kp/merge-line-items-at-request-save__data-migration/db/migrate/20240601155348_dedup_item_requests_in_requests.rb

(the event was 24 weekend if you want to see the conversation (that's the weekend before memorial day weekend for the US folk…e.g., see comments in human-essentials channel leading up to this one: https://rubyforgood.slack.com/archives/C6WLZL0DD/p1717184706390639)

Criteria for completion

  • confirm that the info is in agreement between item requests and requestitems
  • rework code using RequestItem to use ItemRequest. Thorough testing.
  • migration to remove RequestItem

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing db/migrate/20240601155348_dedup_item_requests_in_requests.rb and tracing the distribution printout code that currently uses RequestItem. Confirm the production data agreement noted in the issue before changing callers, then assess the required migration and tests. Done means the printout uses ItemRequest, coverage is thorough, and RequestItem can be removed safely.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, ruby
Domain
backend, database
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.