---
# System prepended metadata

title: Untitled

---


### Set rfi header
```ruby
header = Rfi::Header.find(RFI_ID)
```
### Create a Question
```ruby
question = header.questions.create!(
  body: ENTER BODY TEXT HERE
  created_by: header.created_by,
  company_id: header.company_id,
  project_id: header.project_id,
)
```
### Verify Discussion was created
```
header.discussion
```
### Create Discussion Group and Discussion Group Members
```ruby
discussion_group = header.discussion.discussion_groups.create!(
    discussion_sequence_number: 0,
    created_by: header.created_by,
    company_id: header.company_id,
    project_id: header.project_id
  )

Discussion::GroupMemberUpdater.new(
  current_user: header.created_by,
  discussion_group: discussion_group,
  updated_login_information_ids: Array of assignee_ids,
  required_login_information_ids: Array of required_assignee_ids
).rebuild_members

header.save!
```
### Validate RFI is 
```ruby
header.valid?
```
### Note: Use SumoLogic to grab question body, assignee_ids, required_assignee_ids
 - set input field to `(POST */vapid/projects/828908/rfis)`
 - set date to around the creation of the rfi (header.created_at)
 - Go through responses and find one that matches subject of the rfi (header.subject)