OperationCode / operationcode_backend

This is the backend repo for the Operation Code website
https://operationcode.org
MIT License
62 stars 110 forks source link

New Rake task: modify team_members database entries #230

Closed apex-omontgomery closed 6 years ago

apex-omontgomery commented 6 years ago

Feature: New Rake Task

Why is this feature being added?

The @OperationCode/front-end team currently uses static content for Board of Directors and dynamic content for Team Members . FrontEnd Issue #774 details new requirementsfor the /team page.

The front-end changes that impact @OperationCode/back-end are:

  1. Adding new team_members
  2. Removing team_members that have "Board" in their name.
  3. Changing any current team_members that need to be changed.

We need to respond in this manner:

  1. Backend saves board members in the team_members table.
  2. Removing senior leadership from database might not be best option and discussion on what to do is probably important.

What should your feature do?

The feature should change the database in this manner:

  1. Remove any individuals who are: a. Board Members b. Founding Members c. Any other members requiring removal
  2. Add new members based on front end requirements
  3. Update any members that need it.

The specific changes are pending from @ksmacleod99.

Further Discussion

Also, unsure how this should be handled semi-permanently. Do we normally push manual updates one or two at a time? Eventually will the team_member database have to change to account for different levels of roles? We could then help @OperationCode/front-end transition to all dynamic content.

hpjaj commented 6 years ago

@wimo7083 - I might have jumped the gun when I assigned this to you, and marked it in progress.

Let me know if you'd like me to keep this issue, or if you'd like me to mark it as available.

apex-omontgomery commented 6 years ago

My attempt

Currently have something setup, trying to get the environment running so I can try testing this. If I hit a wall I'll try and get more help.

hpjaj commented 6 years ago

@ksmacleod99 - After the work that was done today in prod's TeamMember table, here is a list of all of our TeamMembers:

https://gist.github.com/hpjaj/d515d9b3bfe9ac2bfa276160e1aa9fb8

Can you please let me know:

  1. What records need to be deleted
  2. What records need to be added
  3. What records need to be updated

Regarding the information found in a given TeamMember record, here is what one looks like:

=> #<TeamMember:0x00000006e985a8
 id: 1,
 name: "Aaron Suarez",
 role: "Gulf Coast Chapter Leader",
 created_at: Sat, 01 Jul 2017 01:28:12 UTC +00:00,
 updated_at: Sat, 01 Jul 2017 01:28:12 UTC +00:00,
 description: nil,
 group: nil,
 image_src: nil>
apex-omontgomery commented 6 years ago

I'll try and get with @ksmacleod99 this week to find out how out of date mine is. I still have the PR open which has many changes but there's been a bunch since then.

ksmacleod99 commented 6 years ago

@wimo7083 & @hpjaj ; I've left all the chapter leaders until I can get a hold of Ashley's roster


  ["Alexander Laquitara", "NYC Chapter Co-Leader"],
  ["Ashley Templet", "CCO & North Carolina Chapter Leader"],
  ["Charles Sipe", "Seattle Chapter Co-Leader"],
  ["Conrad Hollomon", "Board Director"],
  ["Curt Arbtin", "San Antonio Chapter Assistant"],
  ["David Marchante", "Florida Chapter Leader"],
  ["David Molina", "Executive Director & Member Ex Officio"],
  ["Dr. James Davis", "Chairman"],
  ["Dr. Stacy Chin", "Director of Fundraising Committee"],
  ["Dr. Tyrone Grandison", "Vice Chairman"],
  ["Elmer Thomas", "Treasurer"],
  ["Eunice Heymann", "Austin Chapter Leader"],
  ["Jameel Matin", "Public Policy Director"],
  ["James Davis", "Board Director"],
  ["Jay Miller", "San Diego Chapter Leader"],
  ["Jesse James", "Portland Chapter Leader"],
  ["Jennifer Weidman", "CCMO, CDO"],
  ["Josh Smith", "San Diego Chapter Assistant"],
  ["Joshua Breeden", "Hampton Roads Chapter Assistant"],
  ["Juan Chavez", "Seattle Chapter Co-Leader"],
  ["Ken Collier", "Utah Chapter Leader"],
  ["Krystyna Ewing", "Columbus Chapter Leader"],
  ["Kyle Holmberg", "Python-Squad Lead"],
  ["Larry Burris", "Hampton Roads Chapter Leader"],
  ["Liza Rodewald", "Director of Military Families Committee"],
  ["Lloyd Garrison", "San Antonio Chapter Leader"],
  ["Maggie Molina", "Community Manager & Seattle Chapter Co-Leader"],
  ["Mark Kerr", "Chairman Emeritus & Member Ex Officio"],
  ["Matthew Bach", "Hampton Roads Chapter Assistant"],
  ["Nell Shamrell", "CTO"],
  ["Nina Alli", "NYC Chapter Co-Leader"],
  ["Roy Mosby", "Ft. Stewart - HAAF Chapter Leader"],
  ["Shelly Xiong", "Okinawa Chapter Leader"],
  ["Dr. Stacy Chin", "Director of the Fundraising Committee"],
  ["Steve Arcand", "Boston Chapter Leader"],
  ["Thomas Ciszec", "Secretary"],
  ["Thomas Ciszek", "Board Director"],
  ["Tyrone Grandison", "Board Director"],
  ["Amy Tan", "CFO"],
  ["Kelly MacLeod", "People Operations"],
  ["David Reis", "COO, acting"],
  ["Stephano D'Aniello", "General Counsel"],```
apex-omontgomery commented 6 years ago

Should I close this since the dashboard is now managing back end data?

hpjaj commented 6 years ago

@wimo7083 - I feel we still need a full inventory done to resolve

  1. What records need to be deleted
  2. What records need to be added
  3. What records need to be updated

Do you have bandwidth to own that task? Once we have all of those questions answered, then we can either:

1 - make the updates live in prod's rails console, or 2 - if there are a significant amount of changes, create a rake task to account for the work (which could double as a learning opportunity for a contributor)

apex-omontgomery commented 6 years ago

I'm free on the weekend, but the people who know the details aren't free on the weekend. I'll get as many as I can before them. And then open a PR with the list of modifications, that we can cross off and add as the database is updated and add names as more people are found.

ksmacleod99 commented 6 years ago

I am so sorry y'all! I am going to put this on my to-do list now with a suspense of Saturday. This is 100% on me.

hpjaj commented 6 years ago

Awesome, thanks @ksmacleod99 !

ksmacleod99 commented 6 years ago

  ["Ashley Templet", "CCO"],
  ["David Lim", "Seattle Chapter Co-Leader"],
  ["Conrad Hollomon", "Board Director, Boston Chapter Leader"],
  ["David Molina", "Executive Director & Member Ex Officio"],
  ["Dr. James Davis", "Chairman"],
  ["Dr. Stacy Chin", "Director of Fundraising Committee"],
  ["Dr. Tyrone Grandison", "Vice Chairman"],
  ["Elmer Thomas", "Treasurer"],
  ["Jameel Matin", "Public Policy Director"],
  ["James Davis", "Board Director"],
  ["Jay Miller", "San Diego Chapter Leader"],
  ["Jesse James", "Portland Chapter Leader"],
  ["Jennifer Weidman", "CCMO, CDO"],
  ["Josh Smith", "San Diego Chapter Assistant"],
  ["Kerri-Leigh Grady", "Hampton Roads Chapter Assistant"],
  ["Krystyna Ewing", "Columbus Chapter Leader"],
  ["Kyle Holmberg", "Python-Squad Lead"],
  ["Larry Burris", "Hampton Roads Chapter Leader"],
  ["Liza Rodewald", "Director of Military Families Committee"],
  ["Lloyd Garrison", "San Antonio Chapter Leader"],
  ["Maggie Molina", "Code Schools"],
  ["Mark Kerr", "Chairman Emeritus & Member Ex Officio"],
  ["Matthew Bach", "Hampton Roads Chapter Assistant"],
  ["Nell Shamrell", "CTO"],
  ["Kevin Lee", "NYC Chapter Co-Leader"],
  ["Roy Mosby", "Ft. Stewart - HAAF Chapter Leader"],
  ["Aime Black", "Okinawa Chapter Leader"],
  ["Dr. Stacy Chin", "Director of the Fundraising Committee"],
  ["Thomas Ciszec", "Secretary"],
  ["Thomas Ciszek", "Board Director"],
  ["Tyrone Grandison", "Board Director"],
  ["Amy Tan", "CFO"],
  ["Kelly MacLeod", "People Operations"],
  ["David Reis", "COO, acting"],
  ["Stephano D'Aniello", "General Counsel"],
  ["Sean Cameron", "San Diego Chapter Assistant"],
  ["Andrew Siemer", "Austin Chapter Leader"],
  ["Billy Le", "Sacramento Chapter Leader"],
  ["Blair Coleman", "Ft. Bragg Chapter Leader"],
  ["Cameron Hopkin", "Denver Chapter Leader"],
  ["William Montgomery", "Denver Chapter Leader"],
  ["Cherie Burgett", "Ft. Rucker Chapter Leader"],
  ["Lilian Monge", "Silicon Beach Chapter Leader"],
  ["David Wayne", "Silicon Beach Chapter Leader"],
  ["Jar-Ar Jamon", "Bay Area Chapter Leader"],
  ["Julie Weinstein", "Windward Oahu Chapter Leader"],
  ["Rod Levy", "Chicago Chapter Leader"],
  ["Ryan Pethel", "Jacksonville Chapter Leader"],
  ["Sarah Blaschke", "N. Virginia Chapter Leader"],
  ["Mercedes Welch", "N. Virginia Chapter Leader"],
  ["Stuart Ashby", "St. Louis Chapter Leader"],
  ["Toanh Tran", "Robbins AFB & Mountain Home Chapter Leader"],
  ["Amanda Dolan", "Robbins AFB Chapter Leader"],
  ["Vail Algatt", "Mountain Home Chapter Leader"],```

Or Sunday... at any rate, this is complete and accurate to the best of my knowledge as of right now.
hpjaj commented 6 years ago

@ksmacleod99 - Thanks!

@wimo7083 - Can you create a rake task that will:

  1. delete the appropriate records
  2. add the appropriate records
  3. update the appropriate existing records
hpjaj commented 6 years ago

@wimo7083 - How goes with refactoring the rake task to be directly in keeping with the three categories:

Have any blockers?